mac802154: Avoid superfluous endianness handling
authorMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 30 Jan 2023 15:43:06 +0000 (16:43 +0100)
committerStefan Schmidt <stefan@datenfreihafen.org>
Mon, 30 Jan 2023 16:16:28 +0000 (17:16 +0100)
commit8338304c2719fb7aec8e4b5dd9fa684b719db06e
treec363ab01c69289068bf9d318feeeee09f476d82d
parent622bd6ea90086beb98ac439edd7d57de73d1d6f9
mac802154: Avoid superfluous endianness handling

When compiling scan.c with C=1, Sparse complains with:

   sparse:     expected unsigned short [usertype] val
   sparse:     got restricted __le16 [usertype] pan_id
   sparse: sparse: cast from restricted __le16

   sparse:     expected unsigned long long [usertype] val
   sparse:     got restricted __le64 [usertype] extended_addr
   sparse: sparse: cast from restricted __le64

The tool is right, both pan_id and extended_addr already are rightfully
defined as being __le16 and __le64 on both sides of the operations and
do not require extra endianness handling.

Fixes: 3accf4762734 ("mac802154: Handle basic beaconing")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20230130154306.114265-1-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
net/mac802154/scan.c