[PATCH 01/15] staging: unisys: Remove num_visornic_open array
Neil Horman
nhorman at redhat.com
Tue Jul 21 14:29:52 UTC 2015
On Tue, Jul 21, 2015 at 05:05:22PM +0300, Dan Carpenter wrote:
> On Tue, Jul 21, 2015 at 09:55:35AM -0400, Benjamin Romer wrote:
> > static ssize_t enable_ints_write(struct file *file,
> > const char __user *buffer,
> > size_t count, loff_t *ppos)
> > {
> > - char buf[4];
> > - int i, new_value;
> > - struct visornic_devdata *devdata;
> > -
> > - if (count >= ARRAY_SIZE(buf))
> > - return -EINVAL;
> > -
> > - buf[count] = '\0';
> > - if (copy_from_user(buf, buffer, count))
> > - return -EFAULT;
> > -
> > - i = kstrtoint(buf, 10, &new_value);
> > - if (i != 0)
> > - return -EFAULT;
> > -
> > - /* set all counts to new_value usually 0 */
> > - for (i = 0; i < VISORNICSOPENMAX; i++) {
> > - if (num_visornic_open[i]) {
> > - devdata = netdev_priv(num_visornic_open[i]);
> > - /* TODO update features bit in channel */
> > - }
> > - }
> > -
> > + /*
> > + * Don't want to break ABI here by having a debugfs
> > + * file that no longer exists or is writable, so
> > + * lets just make this a vestigual function
> > + */
> > return count;
> > }
>
> Are there scripts which will break if we just remove the file?
> Userspace does all kinds of silly things but does it really rely on a
> writeable debugfs?
>
Thats a fair question, and honstely I don't know the answer. I would personnaly
assume no, but I didn't want to take the chance when writing this. Ben, what do
you say? If its not relevant to user space, then yes, it can be removed
entirely.
Neil
> regards,
> dan carpenter
>
More information about the devel
mailing list