Re: [PATCH bpf-next v2 13/28] HID: bpf: implement hid_bpf_get|set_data

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

 



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



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux