Re: [v2] HID: corsair-void: Add Corsair Void headset family driver

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

 



> This was the case for a while.
>
> Increasing applications of scope-based resource management provide
> further opportunities for smaller scopes according to some local variables,
> don't they?

Personally I'd rather it just fits in with the rest of the kernel,
but if the general consensus is that new drivers should use tighter
scopes, I can do that instead.

> How do you think about to collaborate with other data structures
> than character arrays?
>
> See also:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v6.11-rc4#n953

Hm, I picked a character array since all it's doing is sending a
buffer to the device.
There's no published specification to follow, only "Well the Windows
driver sends these bytes and this happens".
So there isn't really a structure that really comes naturally,
especially with all the magic numbers.

Unless you're suggesting I just do `unsigned char send_buf[3] = {...}`?
I checked the docs, apparently I misread somewhere that
`hid_hw_raw_request` couldn't use stack allocated memory safely,
whoops.

Thanks for the review,
Stuart




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux