[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <48924BBB91ABDE4D9335632A6B179DD6A77728@MIPSMAIL01.mipstec.com>
Date: Fri, 3 Nov 2017 14:04:19 +0000
From: Miodrag Dinic <Miodrag.Dinic@...s.com>
To: Paul Burton <Paul.Burton@...s.com>
CC: Aleksandar Markovic <aleksandar.markovic@...rk.com>,
"linux-mips@...ux-mips.org" <linux-mips@...ux-mips.org>,
Goran Ferenc <Goran.Ferenc@...s.com>,
Aleksandar Markovic <Aleksandar.Markovic@...s.com>,
"David S. Miller" <davem@...emloft.net>,
Douglas Leung <Douglas.Leung@...s.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
James Hogan <James.Hogan@...s.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Miodrag Dinic <miodrag.dinic@...tec.com>,
Paul Burton <paul.burton@...tec.com>,
Petar Jovanovic <Petar.Jovanovic@...s.com>,
"Raghu Gandham" <Raghu.Gandham@...s.com>,
Ralf Baechle <ralf@...ux-mips.org>,
Randy Dunlap <rdunlap@...radead.org>
Subject: RE: [PATCH v6 5/5] MIPS: ranchu: Add Ranchu as a new generic-based
board
Hi Paul,
> > We can not remove the forward declaration because we need to define
> > __mips_mach_ranchu (which is done by MIPS_MACHINE(ranchu)) before ranchu_of_match.
>
> Why? Why do you need to set the struct of_device_id data field? The generic
> code only provides the match data to the machine fixup_fdt callback which you
> don't implement, so the value is never used.
Oooh, yes you are right. This was a leftover when we started porting Ranchu as a legacy platform.
We will fix it in V8. Thank you.
Kind regards,
Miodrag
________________________________________
From: Paul Burton [paul.burton@...s.com]
Sent: Thursday, November 2, 2017 9:49 PM
To: Miodrag Dinic
Cc: Aleksandar Markovic; linux-mips@...ux-mips.org; Goran Ferenc; Aleksandar Markovic; David S. Miller; Douglas Leung; Greg Kroah-Hartman; James Hogan; linux-kernel@...r.kernel.org; Mauro Carvalho Chehab; Miodrag Dinic; Paul Burton; Petar Jovanovic; Raghu Gandham; Ralf Baechle; Randy Dunlap
Subject: Re: [PATCH v6 5/5] MIPS: ranchu: Add Ranchu as a new generic-based board
Hi Miodrag,
On Thu, Nov 02, 2017 at 06:47:05AM -0700, Miodrag Dinic wrote:
> > > +static const struct of_device_id ranchu_of_match[];
> > > +
> > > +MIPS_MACHINE(ranchu) = {
> > > + .matches = ranchu_of_match,
> > > + .measure_hpt_freq = ranchu_measure_hpt_freq,
> > > +};
> > > +
> > > +static const struct of_device_id ranchu_of_match[] = {
> > > + {
> > > + .compatible = "mti,ranchu",
> > > + .data = &__mips_mach_ranchu,
> > > + },
> > > +};
> >
> > Could you move ranchu_of_match before the MIPS_MACHINE & drop the forward
> > declaration? That would feel tidier to me. It could also be marked as
> > __initdata.
>
> We can not remove the forward declaration because we need to define
> __mips_mach_ranchu (which is done by MIPS_MACHINE(ranchu)) before ranchu_of_match.
Why? Why do you need to set the struct of_device_id data field? The generic
code only provides the match data to the machine fixup_fdt callback which you
don't implement, so the value is never used.
Thanks,
Paul
Powered by blists - more mailing lists