From: Mattijs Korpershoek <mkorpershoek@kernel.org>
To: Siddharth Vadapalli <s-vadapalli@ti.com>,
trini@konsulko.com, lukma@denx.de, mkorpershoek@kernel.org
Cc: u-boot@lists.denx.de, srk@ti.com, s-vadapalli@ti.com
Subject: Re: [PATCH] common: spl: spl_dfu.c: Fix warning associated with PCI subclass_code
Date: Thu, 05 Mar 2026 14:08:30 +0100 [thread overview]
Message-ID: <87h5qumnjl.fsf@kernel.org> (raw)
In-Reply-To: <20260305103815.999886-1-s-vadapalli@ti.com>
Hi Siddharth,
Thank you for the patch.
On Thu, Mar 05, 2026 at 16:08, Siddharth Vadapalli <s-vadapalli@ti.com> wrote:
> The subclass_code member of the pci_ep_header structure is a 1-byte
> field. The macro PCI_CLASS_MEMORY_RAM is a concetation of baseclass_code
> and subclass_code as follows:
> PCI_BASE_CLASS_MEMORY: 0x05
> Subclass Code for RAM: 0x00
> PCI_CLASS_MEMORY_RAM: 0x0500
> Hence, instead of extracting it via an implicity type conversion from int
> to u8 which throws a warning, explicitly mask the bits to extract the
What's the exact warning string? With which compiler version?
Is there an example defconfig that I can use to reproduce this?
Thanks
Mattijs
> subclass_code.
>
> Fixes: cde77583cf0b ("spl: Add support for Device Firmware Upgrade (DFU) over PCIe")
> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
> ---
>
> Hello,
>
> This patch is based on commit
> f473a453b0c kbuild: Drop phandle from diff between base DT and U-Boot augmented DT if DEVICE_TREE_DEBUG=1of the master branch of U-Boot.
>
> Regards,
> Siddharth.
>
> common/spl/spl_dfu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/spl/spl_dfu.c b/common/spl/spl_dfu.c
> index b09f82790c9..7d21bb4d16a 100644
> --- a/common/spl/spl_dfu.c
> +++ b/common/spl/spl_dfu.c
> @@ -64,7 +64,7 @@ static int dfu_over_pcie(void)
> hdr.deviceid = CONFIG_SPL_PCI_DFU_DEVICE_ID;
> hdr.vendorid = CONFIG_SPL_PCI_DFU_VENDOR_ID;
> hdr.baseclass_code = PCI_BASE_CLASS_MEMORY;
> - hdr.subclass_code = PCI_CLASS_MEMORY_RAM;
> + hdr.subclass_code = PCI_CLASS_MEMORY_RAM & 0xff;
>
> ret = pci_ep_write_header(dev, fn, &hdr);
> if (ret) {
> --
> 2.51.1
next prev parent reply other threads:[~2026-03-05 13:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 10:38 [PATCH] common: spl: spl_dfu.c: Fix warning associated with PCI subclass_code Siddharth Vadapalli
2026-03-05 13:08 ` Mattijs Korpershoek [this message]
2026-03-05 14:54 ` Siddharth Vadapalli
2026-03-06 5:04 ` Anshul Dalal
2026-03-12 8:58 ` Mattijs Korpershoek
2026-03-12 8:59 ` Mattijs Korpershoek
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=87h5qumnjl.fsf@kernel.org \
--to=mkorpershoek@kernel.org \
--cc=lukma@denx.de \
--cc=s-vadapalli@ti.com \
--cc=srk@ti.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/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