drivers/leds/leds-turris-omnia.c:438:15: sparse: sparse: cast to restricted __le16

From: kernel test robot
Date: Wed Nov 29 2023 - 10:44:42 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 18d46e76d7c2eedd8577fae67e3f1d4db25018b0
commit: 43e9082fbccc7df8b2028c1ba040c58cefda703f leds: turris-omnia: Add support for enabling/disabling HW gamma correction
date: 4 weeks ago
config: powerpc-randconfig-c042-20230517 (https://download.01.org/0day-ci/archive/20231129/202311292308.oZ97PtBs-lkp@xxxxxxxxx/config)
compiler: powerpc-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20231129/202311292308.oZ97PtBs-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311292308.oZ97PtBs-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> drivers/leds/leds-turris-omnia.c:438:15: sparse: sparse: cast to restricted __le16
drivers/leds/leds-turris-omnia.c:446:16: sparse: sparse: cast to restricted __le16

vim +438 drivers/leds/leds-turris-omnia.c

426
427 static int omnia_mcu_get_features(const struct i2c_client *client)
428 {
429 u16 reply;
430 int err;
431
432 err = omnia_cmd_read_raw(client->adapter, OMNIA_MCU_I2C_ADDR,
433 CMD_GET_STATUS_WORD, &reply, sizeof(reply));
434 if (err < 0)
435 return err;
436
437 /* Check whether MCU firmware supports the CMD_GET_FEAUTRES command */
> 438 if (!(le16_to_cpu(reply) & STS_FEATURES_SUPPORTED))
439 return 0;
440
441 err = omnia_cmd_read_raw(client->adapter, OMNIA_MCU_I2C_ADDR,
442 CMD_GET_FEATURES, &reply, sizeof(reply));
443 if (err < 0)
444 return err;
445
446 return le16_to_cpu(reply);
447 }
448

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki