Re: [PATCH next] of/fdt: Fix defined but not used compiler warning

From: Rob Herring
Date: Fri Jun 14 2019 - 09:58:27 EST


On Wed, Jun 12, 2019 at 12:29 PM Frank Rowand <frowand.list@xxxxxxxxx> wrote:
>
> On 6/12/19 10:00 AM, Rob Herring wrote:
> > On Wed, Jun 12, 2019 at 10:45 AM Frank Rowand <frowand.list@xxxxxxxxx> wrote:
> >>
> >> Hi Kefeng,
> >>
> >> If Rob agrees, I'd like to see one more change in this patch.
> >>
> >> Since the only caller of of_fdt_match() is of_flat_dt_match(),
> >> can you move the body of of_fdt_match() into of_flat_dt_match()
> >> and eliminate of_fdt_match()?
> >
> > That's fine as long as we think there's never any use for of_fdt_match
> > after init? Fixup of nodes in an overlay for example.
>
> We can always re-expose the functionality as of_fdt_match() in the future
> if the need arises. But Stephen's recent patch was moving in the opposite
> direction, removing of_fdt_match() from the header file and making it
> static.

Yes, we can, but it is just churn if we think it is likely needed.

OTOH, we probably want users to just use libfdt API directly and
should add this to libfdt if needed.

So yes, please implement Frank's suggestion.

Rob