Re: [PATCH] PCI: Add PCI_RID_MASK macro

From: Lukas Wunner

Date: Mon Feb 16 2026 - 08:10:23 EST


On Mon, Feb 16, 2026 at 05:36:00PM +0530, Aksh Garg wrote:
> +++ b/include/linux/pci.h
> @@ -71,6 +71,7 @@
> #define PCI_DEVID(bus, devfn) ((((u16)(bus)) << 8) | (devfn))
> /* return bus from PCI devid = ((u16)bus_number) << 8) | devfn */
> #define PCI_BUS_NUM(x) (((x) >> 8) & 0xff)
> +#define PCI_RID_MASK 0xffff

Why not instead introduce

#define PCI_RID(x) ((x) & 0xffff)

to go alongside PCI_SLOT() & friends?

Thanks,

Lukas