Re: [PATCH] usbfs: Add a new disconnect-and-claim ioctl

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

 



On Wed, 22 Aug 2012, Hans de Goede wrote:

> >> +		if ((dc.flags & USBDEVFS_DISCONNECT_CLAIM_IF_DRIVER) &&
> >> +			strncmp(dc.driver, intf->dev.driver->name,
> >> +				sizeof(dc.driver)) != 0)
> >> +			return -EBUSY;
> >> +
> >> +		if ((dc.flags & USBDEVFS_DISCONNECT_CLAIM_EXCEPT_DRIVER) &&
> >> +			strncmp(dc.driver, intf->dev.driver->name,
> >> +				sizeof(dc.driver)) == 0)
> >> +			return -EBUSY;
> >
> > Please don't indent continuation lines by exactly one tab stop.  It
> > makes them look like the start of a sub-block.
> 
> Ok, so you want 4 spaces there to but the 's' of strncmp below the second
> '(' I assume? I actually had that first, then changed to this :)

My style isn't always the same.  Most of the time I indent continuation
lines by 2 extra tab stops.  Sometimes I indent them by 1/2 tab stop (4
columns), especially when the length would otherwise go way over the
80-column limit.

In this case I would do:

		if ((dc.flags & USBDEVFS_DISCONNECT_CLAIM_EXCEPT_DRIVER) &&
				strncmp(dc.driver, intf->dev.driver->name,
					sizeof(dc.driver)) == 0)
			return -EBUSY;

If you prefer something else, that's okay.  Just don't put the
"strncmp" in the same column as the "return".

> Before I respin the patch, any other remarks from you?

No, everything else seems okay.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux