From: ALOK TIWARI <alok.a.tiwari@oracle.com>
To: Bjorn Helgaas <helgaas@kernel.org>, Frank Li <frank.li@nxp.com>
Cc: "Krzysztof Wilczyński" <kw@linux.com>,
"imx@lists.linux.dev" <imx@lists.linux.dev>,
"Rob Herring" <robh@kernel.org>,
"open list:PCI DRIVER FOR FREESCALE LAYERSCAPE"
<linux-pci@vger.kernel.org>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"open list" <linux-kernel@vger.kernel.org>,
"M.H. Lian" <minghuan.lian@nxp.com>,
"moderated list:PCI DRIVER FOR FREESCALE LAYERSCAPE"
<linux-arm-kernel@lists.infradead.org>,
"Roy Zang" <roy.zang@nxp.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"open list:PCI DRIVER FOR FREESCALE LAYERSCAPE"
<linuxppc-dev@lists.ozlabs.org>,
"Mingkai Hu" <mingkai.hu@nxp.com>
Subject: Re: [External] : RE: [EXT] [PATCH v2 1/1] PCI: layerscape: Add EP mode support for ls1028a
Date: Thu, 9 Feb 2023 16:07:51 +0530 [thread overview]
Message-ID: <46998ff6-bb1c-528a-a135-e492dd0a2cdc@oracle.com> (raw)
In-Reply-To: <20230208222311.GA2490083@bhelgaas>
yes, it is more about sort the list using .data and .compatible. key
much better if it we keep this as suggested by Frank,
static const struct of_device_id ls_pcie_ep_of_match[] = {
+ { .compatible = "fsl,ls1028a-pcie-ep", .data = &ls1_ep_drvdata },
{ .compatible = "fsl,ls1046a-pcie-ep", .data = &ls1_ep_drvdata },
{ .compatible = "fsl,ls1088a-pcie-ep", .data = &ls2_ep_drvdata },
Thanks,
Alok
On 2/9/2023 3:53 AM, Bjorn Helgaas wrote:
> On Tue, Feb 07, 2023 at 04:20:21PM +0000, Frank Li wrote:
>>> Subject: Re: [External] : RE: [EXT] [PATCH v2 1/1] PCI: layerscape: Add EP
>>> mode support for ls1028a
>>>
>>> { .compatible = "fsl,ls1046a-pcie-ep", .data = &ls1_ep_drvdata },
>>> + { .compatible = "fsl,ls1028a-pcie-ep", .data = &ls1_ep_drvdata },
>>> { .compatible = "fsl,ls1088a-pcie-ep", .data = &ls2_ep_drvdata },
>>>
>>> can it be like this for better readability. ?
>> It is just chip name and follow name conversion, which already
>> upstreamed and documented.
>>
>> Why do you think it not is good readability?
> I thought maybe ALOK's point was to sort the list, which does make a
> lot of sense. But if you want to sort by the .data member, I would
> think you would make .compatible a secondary sort key, which means
> ls1028a would come before ls1046a, so you would end up with this
> instead:
>
> static const struct of_device_id ls_pcie_ep_of_match[] = {
> + { .compatible = "fsl,ls1028a-pcie-ep", .data = &ls1_ep_drvdata },
> { .compatible = "fsl,ls1046a-pcie-ep", .data = &ls1_ep_drvdata },
> { .compatible = "fsl,ls1088a-pcie-ep", .data = &ls2_ep_drvdata },
> { .compatible = "fsl,ls2088a-pcie-ep", .data = &ls2_ep_drvdata },
> { .compatible = "fsl,lx2160ar2-pcie-ep", .data = &lx2_ep_drvdata },
> { },
> };
>
next prev parent reply other threads:[~2023-02-09 12:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-12 19:34 [PATCH v2 1/1] PCI: layerscape: Add EP mode support for ls1028a Frank Li
2023-02-02 17:41 ` [EXT] " Frank Li
2023-02-03 5:17 ` [External] : " ALOK TIWARI
2023-02-07 16:20 ` Frank Li
2023-02-08 22:23 ` Bjorn Helgaas
2023-02-09 10:37 ` ALOK TIWARI [this message]
2023-02-09 15:12 ` Frank Li
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=46998ff6-bb1c-528a-a135-e492dd0a2cdc@oracle.com \
--to=alok.a.tiwari@oracle.com \
--cc=bhelgaas@google.com \
--cc=frank.li@nxp.com \
--cc=helgaas@kernel.org \
--cc=imx@lists.linux.dev \
--cc=kw@linux.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lpieralisi@kernel.org \
--cc=minghuan.lian@nxp.com \
--cc=mingkai.hu@nxp.com \
--cc=robh@kernel.org \
--cc=roy.zang@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).