Thread (9 messages) 9 messages, 3 authors, 2010-04-12

Re: Zeroing the report before setting fields

From: Pete Zaitcev <zaitcev@redhat.com>
Date: 2010-03-09 23:26:47

On Tue, 9 Mar 2010 13:41:24 +0100 (CET)
Jiri Kosina [off-list ref] wrote:
quoted
quoted
the end of the byte. But in case of, say, my keyboard, NumLock is mask
0x01 and CapsLock is 0x02. Invoking hid_output_field for NumLock
definitely zeroes across CapsLock. The only reason this works is that
the fields are sorted by the offset.
quoted
I think Jiri is the most qualified to answer questions like that about
HID (CCed) buit I think what you are proposing is reasonable and would
make the code safer indeed.
Yes, the patch looks fine to me, thanks for CCing me. 

Pete, could you please send it to me along with your Signed-off-by line, 
so that I could queue it up?
Will do, thanks. I was hoping for a comment re. memset.
It is not needed for reports that consist of full bytes,
so it's a little wasteful. I aimed at simplicity, but I don't
know, what do you think?

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