Re: drivers/misc/mei/mei_lb.c:284:32: sparse: sparse: restricted __le32 degrades to integer

From: Andy Shevchenko

Date: Sun May 10 2026 - 06:14:07 EST


On Sat, May 09, 2026 at 03:59:00PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 70390501d1944d4e5b8f7352be180fceb3a44132
> commit: 773a43b8627f54dca56d08949497014b4ee8878a mei: lb: add late binding version 2
> date: 5 weeks ago
> config: mips-randconfig-r134-20260508 (https://download.01.org/0day-ci/archive/20260509/202605091533.79Zcv3CX-lkp@xxxxxxxxx/config)
> compiler: mips-linux-gcc (GCC) 8.5.0
> sparse: v0.6.5-rc1
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260509/202605091533.79Zcv3CX-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
> | Fixes: 773a43b8627f ("mei: lb: add late binding version 2")
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202605091533.79Zcv3CX-lkp@xxxxxxxxx/

> sparse warnings: (new ones prefixed by >>)
> >> drivers/misc/mei/mei_lb.c:284:32: sparse: sparse: restricted __le32 degrades to integer
> >> drivers/misc/mei/mei_lb.c:330:40: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] command_id @@ got int @@
> drivers/misc/mei/mei_lb.c:330:40: sparse: expected restricted __le32 [usertype] command_id
> drivers/misc/mei/mei_lb.c:330:40: sparse: got int

Alexander, in case you are going to address this, address them all at once. You
can run sparse locally to get all this.

make W=1 C=1 CF=-D__CHECK_ENDIAN__ ...

is my regular `make` command for building Linux kernel with `sparse` checks.

--
With Best Regards,
Andy Shevchenko