Thread (5 messages) flat view 5 messages, 4 authors, 2016-01-22

Re: [PATCH] usbhid: replace inappropriate ENOSYS with ENODEV

From: Jiri Kosina <jikos@kernel.org>
Date: 2016-01-21 14:18:24

On Wed, 20 Jan 2016, Heiner Kallweit wrote:
Primary meaning of ENOSYS is "system call not available" but it's also used
with meaning "function not implemented". Both are not applicable here.

Typically this error occurs when the device was unplugged.
usbhid_raw_request returns -ENODEV in such a case what seems to be more
reasonable. Therefore use -ENODEV also here.

Primary motivation for this change is a change in the LED subsystem to
ignore -ENODEV if the device was most likely unplugged.
I believe POSIX defines ENOSYS as "Function not implemented". In this 
case, we are signalling there is no "URB OUT" function.

I don't have strong preference either way, but ENODEV doesn't seem to be 
particularly good fit for this purpose either.

-- 
Jiri Kosina
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help