The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Alexander Usyskin <alexander.usyskin@intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Menachem Adin <menachem.adin@intel.com>,
	 Alexander Usyskin <alexander.usyskin@intel.com>,
	 linux-kernel@vger.kernel.org
Subject: [PATCH char-misc] mei: lb: fix incorrect type in assignment
Date: Wed, 10 Jun 2026 15:57:52 +0300	[thread overview]
Message-ID: <20260610-fix_type_le-v1-1-15c2b08b6451@intel.com> (raw)

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>


             reply	other threads:[~2026-06-10 13:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-10 12:57 Alexander Usyskin [this message]
2026-07-03 11:01 ` [PATCH char-misc] mei: lb: fix incorrect type in assignment Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260610-fix_type_le-v1-1-15c2b08b6451@intel.com \
    --to=alexander.usyskin@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menachem.adin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox