Re: [PATCH] usb/f_hid: remove gotos

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

 



Oliver Neukum wrote:
Am Donnerstag, 4. August 2011, 21:33:31 schrieb Sebastian Andrzej Siewior:
use status variable instead of explicit gotos to distinguish between a
repsonse and stall condition.

Why? Where's the improvement? You have even reduced the information
content to the reader. "goto stall" is very clear. "status = -EOPNOTSUPP" is
meaningless.

How so? composite_setup() and other gadgets return a this (a negative
error code) to let udc driver know to reply with a stall. The stall label
itself returned earlier the same error code for the same purpose. The goto
statements are nice for clean-ups and so on but this criss-cross jumps can
be handler in a nicer way.


	Regards
		Oliver
Sebastian
--
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