Re: [PATCH net-next v1 1/2] ieee802154: ca8210: Use proper setter and getters for bitwise types

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

 



On Mon, Mar 03, 2025 at 05:06:32PM +0100, Miquel Raynal wrote:
> On 03/03/2025 at 17:07:39 +02, Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> 
> > Sparse complains that the driver doesn't respect the bitwise types:
> >
> > drivers/net/ieee802154/ca8210.c:1796:27: warning: incorrect type in assignment (different base types)
> > drivers/net/ieee802154/ca8210.c:1796:27:    expected restricted __le16 [addressable] [assigned] [usertype] pan_id
> > drivers/net/ieee802154/ca8210.c:1796:27:    got unsigned short [usertype]
> > drivers/net/ieee802154/ca8210.c:1801:25: warning: incorrect type in assignment (different base types)
> > drivers/net/ieee802154/ca8210.c:1801:25:    expected restricted __le16 [addressable] [assigned] [usertype] pan_id
> > drivers/net/ieee802154/ca8210.c:1801:25:    got unsigned short [usertype]
> > drivers/net/ieee802154/ca8210.c:1928:28: warning: incorrect type in argument 3 (different base types)
> > drivers/net/ieee802154/ca8210.c:1928:28:    expected unsigned short [usertype] dst_pan_id
> > drivers/net/ieee802154/ca8210.c:1928:28:    got restricted __le16 [addressable] [usertype] pan_id
> >
> > Use proper setter and getters for bitwise types.
> >
> > Note, in accordance with [1] the protocol is little endian.
> >
> > Link: https://www.cascoda.com/wp-content/uploads/2018/11/CA-8210_datasheet_0418.pdf [1]
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> 
> Looks correct indeed,

TBH, my guts feeling is that this driver was never tested on BE platforms...

> Reviewed-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>

Thanks for review!

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux