On Wed, May 18, 2022 at 10:05:56PM +0200, Marek Behún wrote: > On Wed, 18 May 2022 21:26:00 +0200 > Pali Rohár <pali@xxxxxxxxxx> wrote: > > > On Wednesday 18 May 2022 14:23:22 Bjorn Helgaas wrote: > > > On Sun, Feb 20, 2022 at 08:33:32PM +0100, Marek Behún wrote: > > > > From: Pali Rohár <pali@xxxxxxxxxx> > > > > > > > > These macros allows to easily compose and extract Slot Power Limit and > > > > Physical Slot Number values from Slot Capability Register. > > > > > > > > Signed-off-by: Pali Rohár <pali@xxxxxxxxxx> > > > > Signed-off-by: Marek Behún <kabel@xxxxxxxxxx> > > > > > > Acked-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx> > > > > > > We talked about using FIELD_PREP() / FIELD_GET(), which I think would > > > remove the need for the *_SHIFT macros. But we can always do that > > > later. > > > > I have already done this for pci-mvebu.c driver and patch was merged: > > https://lore.kernel.org/linux-pci/20220412094946.27069-5-pali@xxxxxxxxxx/ > > > > IIRC we have decided to not use those *_SHIFT macros as it would flood > > public uapi file and from this file we cannot remove macros due to > > userspace backward compatibility. > > So should I change patch 5 of the aardvark batch 5 to also use > FIELD_GET(), so that this patch is not needed? That would be awesome if you could. I forgot about the backward compatibility issue with include/uapi/linux/pci_regs.h Bjorn