Hi Shitalkumar,
Thanks for the patch!
[...]
> Found via a custom Coccinelle semantic patch hunting for short-byte
> kfifo I/O on byte-mode kfifos used to shuttle pointers.
>
> Fixes: ded845a781a5 ("ieee802154: Add CA8210 IEEE 802.15.4 device
> driver")
I don't remember what the net rules are exactly, but this definitely
should be backported:
Cc: [email protected]
[...]
> - if (kfifo_out(&priv->test.up_fifo, &fifo_buffer, 4) != 4) {
> + if (kfifo_out(&priv->test.up_fifo, &fifo_buffer, sizeof(fifo_buffer))
> + != sizeof(fifo_buffer)) {
This line becomes unreadable. Can you please use an intermediate
variable? Something like:
ret = kfifo_out(...);
if (ret != sizeof(...)) {
Thanks,
Miquèl