From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Alexander Usyskin <alexander.usyskin@intel.com>
Cc: Menachem Adin <menachem.adin@intel.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH char-misc] mei: lb: fix incorrect type in assignment
Date: Fri, 3 Jul 2026 13:01:10 +0200 [thread overview]
Message-ID: <2026070333-rabid-flavored-4e6e@gregkh> (raw)
In-Reply-To: <20260610-fix_type_le-v1-1-15c2b08b6451@intel.com>
On Wed, Jun 10, 2026 at 03:57:52PM +0300, Alexander Usyskin wrote:
> 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)
This will give you an odd thing when you use this directly in a printk()
later on. So perhaps fix this correctly where it is used instead?
thanks,
greg k-h
prev parent reply other threads:[~2026-07-03 11:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=2026070333-rabid-flavored-4e6e@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=alexander.usyskin@intel.com \
--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