lkml.org 
[lkml]   [2017]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2017-11-02 21:51    [W:0.087 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site