Thread (7 messages) flat view 7 messages, 3 authors, 2023-02-09

Re: [External] : RE: [EXT] [PATCH v2 1/1] PCI: layerscape: Add EP mode support for ls1028a

From: ALOK TIWARI <hidden>
Date: 2023-02-09 10:39:23
Also in: imx, linux-arm-kernel, linux-pci, lkml

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:
quoted
quoted
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 },
         { },
  };
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help