Re: [PATCH v7 1/6] PCI: spacemit-k1: Add device data support
From: Inochi Amaoto
Date: Tue Oct 27 2026 - 04:43:20 EST
On Wed, Oct 21, 2026 at 12:12:15PM +0300, Andy Shevchenko wrote:
> On Wed, Oct 21, 2026 at 03:51:20PM +0800, Inochi Amaoto wrote:
> > On Mon, Oct 19, 2026 at 11:41:08AM -0500, Bjorn Helgaas wrote:
> > > On Tue, Sep 29, 2026 at 04:37:47PM +0800, Inochi Amaoto wrote:
>
> ...
>
> > > > +struct k1_pcie_device_data {
> > > > + const struct dw_pcie_host_ops *host_ops;
> > > > + const struct dw_pcie_ops *ops;
> > > > + int (*parse_port)(struct k1_pcie *k1);
> > > > +};
> > >
> > > Does the "const" here add anything useful? This patch suggests maybe
> > > not:
> > >
> > > https://lore.kernel.org/all/20260911233541.1650895-2-james.quinlan@xxxxxxxxxxxx/
> >
> > I am not sure whether the compiler can make use it.
> > And I have not seen any explaination for why no reason
> > for that. It is good to have a clarification.
>
> These const make no sense. First of all, the third one is missing it.
> And I have no idea what would be the proper syntax to add a such. But
> adding a such make it clear that there no sense to have them. Either
> you make the const the whole data type instance on the user level or
> don't do it at all.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
Good, I will remove it.
Regards,
Inochi