diff mbox series

[v4] plfxlc: fix le16_to_cpu warning for beacon_interval

Message ID 20220502150133.6052-1-srini.raju@purelifi.com (mailing list archive)
State Accepted
Commit ccc915e7dd7e79d2d810a62a73c57e25a120795d
Delegated to: Kalle Valo
Headers show
Series [v4] plfxlc: fix le16_to_cpu warning for beacon_interval | expand

Commit Message

Srinivasan Raju May 2, 2022, 3:01 p.m. UTC
Fix the following sparse warnings:
drivers/net/wireless/purelifi/plfxlc/chip.c:36:31: sparse: expected unsigned short [usertype] beacon_interval
drivers/net/wireless/purelifi/plfxlc/chip.c:36:31: sparse: got restricted __le16 [usertype]

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Srinivasan Raju <srini.raju@purelifi.com>
---
 drivers/net/wireless/purelifi/plfxlc/chip.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Kalle Valo May 3, 2022, 5:29 a.m. UTC | #1
Srinivasan Raju <srini.raju@purelifi.com> wrote:

> Fix the following sparse warnings:
> drivers/net/wireless/purelifi/plfxlc/chip.c:36:31: sparse: expected unsigned short [usertype] beacon_interval
> drivers/net/wireless/purelifi/plfxlc/chip.c:36:31: sparse: got restricted __le16 [usertype]
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Srinivasan Raju <srini.raju@purelifi.com>

Patch applied to wireless-next.git, thanks.

ccc915e7dd7e plfxlc: fix le16_to_cpu warning for beacon_interval
diff mbox series

Patch

diff --git a/drivers/net/wireless/purelifi/plfxlc/chip.c b/drivers/net/wireless/purelifi/plfxlc/chip.c
index a5ec10b66ed5..f4ef9ff97146 100644
--- a/drivers/net/wireless/purelifi/plfxlc/chip.c
+++ b/drivers/net/wireless/purelifi/plfxlc/chip.c
@@ -29,11 +29,10 @@  int plfxlc_set_beacon_interval(struct plfxlc_chip *chip, u16 interval,
 			       u8 dtim_period, int type)
 {
 	if (!interval ||
-	    (chip->beacon_set &&
-	     le16_to_cpu(chip->beacon_interval) == interval))
+	    (chip->beacon_set && chip->beacon_interval == interval))
 		return 0;
 
-	chip->beacon_interval = cpu_to_le16(interval);
+	chip->beacon_interval = interval;
 	chip->beacon_set = true;
 	return plfxlc_usb_wreq(chip->usb.ez_usb,
 			       &chip->beacon_interval,