Re: [PATCH 01/15] staging: unisys: Remove num_visornic_open array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
> 
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux