[U-Boot] [PATCH v12 1/8] dm: drop unused helper in MTD header

Miquel Raynal miquel.raynal at bootlin.com
Mon Oct 1 10:02:30 UTC 2018


Hi Jagan,

Jagan Teki <jagan at amarulasolutions.com> wrote on Mon, 1 Oct 2018
15:23:46 +0530:

> On Sat, Sep 29, 2018 at 4:29 PM Miquel Raynal <miquel.raynal at bootlin.com> wrote:
> >
> > include/mtd.h might be included by files even if CONFIG_DM is not
> > enabled. In this case, the call to dev_get_uclass_priv() would trigger
> > a build error. Because this helper has no user, let's drop it off.  
> 
> Why would they use DM include file w/o using it? we need to fix in those places.

There was no user of include/mtd.h not using CONFIG_DM.

But now I am creating cmd/mtd.c which should work with both CONFIG_DM
and no CONFIG_DM support. So include/mtd.h has reasons to be included.

What should be fixed, is the possibility to include DM-related headers
without breaking the compilation of several boards. But, with in mind
that nothing is sealed in stone and this is easily fixable in the -rc
revisions if you want a different solution, are you fine with this
approach for now?


Thanks,
Miquèl


More information about the U-Boot mailing list