From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: [PATCH] fixup! pci: set upper word for 64bit base addresses
Date: Tue, 23 May 2023 08:08:51 +0200 [thread overview]
Message-ID: <9c678311-3227-7577-780c-3f2d26596f74@pengutronix.de> (raw)
In-Reply-To: <20230523055042.2863795-1-a.fatoum@pengutronix.de>
On 23.05.23 07:50, Ahmad Fatoum wrote:
> pci: fix warning building for 32-bit
>
> On systems with sizeof(resource_size_t) == 4, shifting by 32 will result
> in a warning. Use the upper_32_bits macro to fix this.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> drivers/pci/pci.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 046711cd145b..ff2ffacffb6b 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -223,7 +223,8 @@ static void setup_device(struct pci_dev *dev, int max_bar)
> *last_addr = ALIGN(*last_addr, size);
> pci_write_config_dword(dev, pci_base_address_0, *last_addr);
Sascha, could you change this into lower_32_bits(*last_addr) when you apply?
Cheers,
Ahmad
> if (mask & PCI_BASE_ADDRESS_MEM_TYPE_64)
> - pci_write_config_dword(dev, pci_base_address_1, *last_addr >> 32);
> + pci_write_config_dword(dev, pci_base_address_1,
> + upper_32_bits(*last_addr));
> start = *last_addr;
> *last_addr += size;
> } else {
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2023-05-23 6:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-23 5:50 Ahmad Fatoum
2023-05-23 6:08 ` Ahmad Fatoum [this message]
2023-05-23 7:11 ` Sascha Hauer
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=9c678311-3227-7577-780c-3f2d26596f74@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.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