Thread (4 messages) 4 messages, 2 authors, 2013-12-16

Re: Recent change to hid-core.c

From: Jiri Kosina <hidden>
Date: 2013-12-16 14:56:12

On Mon, 16 Dec 2013, Mark Lord wrote:
quoted hunk ↗ jump to hunk
quoted
quoted
The recent update 08ec2dcc3527a20c619aca2fb36f800908256bac
 "Merge branches 'for-3.11/multitouch', 'for-3.11/sony' and 'for-3.11/upstream' into for-linus"
included an unexpected change to the return code handing for ->raw_event() calls.
,,
quoted
quoted
Was this intentional?  Doesn't that have side-effects for some drivers?
..
quoted
this was intentional -- please see commit b1a1442a23 and discussion here: 
https://lkml.org/lkml/2013/3/21/591
..

Thanks Jiri.
In that case you'll be wanting this patch (unmangled copy attached) as well
to clean up a tiny bit of leftover logic in there.

* * * * * * SNIP * * * * * *

Recent updates to raw_event handling resulted in some leftover "dead" logic
in hid-core.c::hid_input_report().  Nuke it.

Signed-off-by: Mark Lord <redacted>
--- old/drivers/hid/hid-core.c	2013-12-12 01:38:07.000000000 -0500
+++ linux/drivers/hid/hid-core.c	2013-12-16 09:48:27.339162173 -0500
@@ -1418,10 +1418,8 @@

 	if (hdrv && hdrv->raw_event && hid_match_report(hid, report)) {
 		ret = hdrv->raw_event(hid, report, data, size);
-		if (ret < 0) {
-			ret = ret < 0 ? ret : 0;
+		if (ret < 0)
 			goto unlock;
-		}
Please see commit 556483e2a ("HID: remove self-assignment from 
hid_input_report") in Linus' tree.

-- 
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