All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Florian Eckert <fe@dev.tdt.de>
Cc: gregkh@linuxfoundation.org, jirislaby@kernel.org,
	kumaravel.thiagarajan@microchip.com, pnewman@connecttech.com,
	angelogioacchino.delregno@collabora.com, peterz@infradead.org,
	yujiaoliang@vivo.com, arnd@kernel.org, cang1@live.co.uk,
	macro@orcam.me.uk, schnelle@linux.ibm.com,
	Eckert.Florian@googlemail.com, linux-kernel@vger.kernel.org,
	linux-serial@vger.kernel.org
Subject: Re: [PATCH v2] serial: 8250_pcilib: Replace deprecated PCI functions
Date: Mon, 20 Oct 2025 11:42:13 +0300	[thread overview]
Message-ID: <aPX15a2Zv9b_wM3u@smile.fi.intel.com> (raw)
In-Reply-To: <84ad1b3070a8374ec20f06588fab9f86@dev.tdt.de>

On Mon, Oct 20, 2025 at 08:47:16AM +0200, Florian Eckert wrote:
> On 2025-10-18 21:33, Andy Shevchenko wrote:
> > On Tue, Sep 30, 2025 at 09:27:43AM +0200, Florian Eckert wrote:

...

> > > +	if (pci_resource_flags(priv->dev, bar) & IORESOURCE_MEM) {
> > 
> > Dunno if this is included already in Linux Next, but here is room for
> > improvement.
> 
> I followed the code in the 'serial8250_pci_setup_port()' [1] function.
> The same pattern is used there [2].

I see. So if we want to amend that, it should be done separately.

> > The problem with the above code is it (wrongly?) checks for bit and not
> > for the resource type. OTOH I don't remember if 64-bit version requires
> > the IORESOURCE_MEM to be set along with that.
> 
> Do you mean the function 'platform_get_resource()' [3]? This is a platform
> device function?

I mean that the IORESOURCE_MEM and IORESOURCE_MEM_64 are separate bit flags in
struct resource::flags. Checking on one might not imply the other be set,
however brief look at the sources shows that _MEM_64 is supposed to be set on
top of _MEM.

> [1] https://elixir.bootlin.com/linux/v6.18-rc1/source/drivers/tty/serial/8250/8250_pcilib.c#L24
> [2] https://elixir.bootlin.com/linux/v6.18-rc1/source/drivers/tty/serial/8250/8250_pcilib.c#L30
> [3]
> https://elixir.bootlin.com/linux/v6.17.3/source/drivers/base/platform.c#L55

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-10-20  8:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-18 19:33 [PATCH v2] serial: 8250_pcilib: Replace deprecated PCI functions Andy Shevchenko
2025-10-20  6:47 ` Florian Eckert
2025-10-20  8:42   ` Andy Shevchenko [this message]
2025-10-20 16:18     ` Florian Eckert
2025-10-20 17:32       ` Andy Shevchenko
  -- strict thread matches above, loose matches on Subject: below --
2025-09-30  7:27 Florian Eckert
2025-09-30  7:34 ` Jiri Slaby
2025-10-01 14:45   ` Florian Eckert
2025-10-02  5:25     ` Greg KH
2025-10-07 14:31       ` Florian Eckert
2025-10-13 20:35 ` Andy Shevchenko

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=aPX15a2Zv9b_wM3u@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=Eckert.Florian@googlemail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=arnd@kernel.org \
    --cc=cang1@live.co.uk \
    --cc=fe@dev.tdt.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=kumaravel.thiagarajan@microchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=macro@orcam.me.uk \
    --cc=peterz@infradead.org \
    --cc=pnewman@connecttech.com \
    --cc=schnelle@linux.ibm.com \
    --cc=yujiaoliang@vivo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.