[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <pqd5e46fa36wmdf7vgt6lvejpsx3cmkmwcaccaubt4uvzi26mb@r55x7lns5sbu>
Date: Sun, 19 Oct 2025 12:50:24 +0530
From: Manivannan Sadhasivam <mani@...nel.org>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
Cc: Christian Marangi <ansuelsmth@...il.com>,
Ryder Lee <ryder.lee@...iatek.com>, Jianjun Wang <jianjun.wang@...iatek.com>,
Bjorn Helgaas <bhelgaas@...gle.com>, Lorenzo Pieralisi <lpieralisi@...nel.org>,
Krzysztof Wilczyński <kwilczynski@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>, linux-pci@...r.kernel.org, linux-mediatek@...ts.infradead.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, upstream@...oha.com
Subject: Re: [PATCH v5 4/5] PCI: mediatek: convert bool to single flags entry
and bitmap
On Tue, Oct 14, 2025 at 01:46:04PM +0200, AngeloGioacchino Del Regno wrote:
> Il 12/10/25 22:56, Christian Marangi ha scritto:
> > To clean Mediatek SoC PCIe struct, convert all the bool to a bitmap and
> > use a single flags to reference all the values. This permits cleaner
> > addition of new flag without having to define a new bool in the struct.
> >
> > Signed-off-by: Christian Marangi <ansuelsmth@...il.com>
> > ---
> > drivers/pci/controller/pcie-mediatek.c | 28 +++++++++++++++-----------
> > 1 file changed, 16 insertions(+), 12 deletions(-)
> >
> > diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c
> > index 24cc30a2ab6c..1678461e56d3 100644
> > --- a/drivers/pci/controller/pcie-mediatek.c
> > +++ b/drivers/pci/controller/pcie-mediatek.c
> > @@ -142,24 +142,29 @@
> > struct mtk_pcie_port;
> > +enum mtk_pcie_flags {
>
> enum mtk_pcie_quirks seems to be a better fit here, as this is used for... well..
> quirks.
>
> > + NEED_FIX_CLASS_ID = BIT(0), /* host's class ID needed to be fixed */
> > + NEED_FIX_DEVICE_ID = BIT(1), /* host's device ID needed to be fixed */
> > + NO_MSI = BIT(2), /* Bridge has no MSI support, and relies on an
> > + * external block
Add comments as Kernel doc.
> > + */
>
> Also perhaps... MTK_PCIE_FIX_CLASS_ID, MTK_PCIE_FIX_DEV_ID, MTK_PCIE_NO_MSI
>
> > +};
> > +
> > /**
> > * struct mtk_pcie_soc - differentiate between host generations
> > - * @need_fix_class_id: whether this host's class ID needed to be fixed or not
> > - * @need_fix_device_id: whether this host's device ID needed to be fixed or not
> > * @no_msi: Bridge has no MSI support, and relies on an external block
Forgot to remove @no_msi?
- Mani
--
மணிவண்ணன் சதாசிவம்
Powered by blists - more mailing lists