lkml.org 
[lkml]   [2022]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH bpf-next v2 13/28] HID: bpf: implement hid_bpf_get|set_data
On Fri, Mar 04, 2022 at 06:28:37PM +0100, Benjamin Tissoires wrote:
> We have 2 cases of usage here:
> - either n <= 32: we are addressing individual bits at the given offset
>
> - either n > 32: we are using a memcpy to transmit the data to the caller,
> meaning that we need to be byte-aligned.

That is crazy. Can you split this into a bits/bytes function set to
have 4 of them? You are using each function in two totally different
ways.

thanks,

greg k-h

\
 
 \ /
  Last update: 2022-03-04 19:40    [W:0.804 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site