The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH char-misc] mei: lb: fix incorrect type in assignment
@ 2026-06-10 12:57 Alexander Usyskin
  2026-07-03 11:01 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Usyskin @ 2026-06-10 12:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Menachem Adin, Alexander Usyskin, linux-kernel

Fix the mix between __le32 and integer by defining
the MEI_LB2_CMD constant as __le32.

Fixes sparse waring:
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

Fixes: 773a43b8627f ("mei: lb: add late binding version 2")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202605091533.79Zcv3CX-lkp@intel.com/
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
---
 drivers/misc/mei/mei_lb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/mei/mei_lb.c b/drivers/misc/mei/mei_lb.c
index f6a258c2b838..a4e3f788c8b8 100644
--- a/drivers/misc/mei/mei_lb.c
+++ b/drivers/misc/mei/mei_lb.c
@@ -104,7 +104,7 @@ struct mei_lb_rsp {
 
 /* Late Binding version 2 */
 
-#define MEI_LB2_CMD 0x01
+#define MEI_LB2_CMD cpu_to_le32(0x01)
 
 #define MEI_LB2_HDR_FLAG_RSP 0x01
 

---
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
change-id: 20260603-fix_type_le-0184c7ed2399

Best regards,
-- 
Alexander Usyskin <alexander.usyskin@intel.com>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-03 11:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-10 12:57 [PATCH char-misc] mei: lb: fix incorrect type in assignment Alexander Usyskin
2026-07-03 11:01 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox