mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-11 00:04:33 +08:00
plfxlc: fix le16_to_cpu warning for beacon_interval
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> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220502150133.6052-1-srini.raju@purelifi.com
This commit is contained in:
parent
0d3b26c4b9
commit
ccc915e7dd
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user