From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miquel Raynal Date: Mon, 1 Oct 2018 12:02:30 +0200 Subject: [U-Boot] [PATCH v12 1/8] dm: drop unused helper in MTD header In-Reply-To: References: <20180929105830.13530-1-miquel.raynal@bootlin.com> <20180929105830.13530-2-miquel.raynal@bootlin.com> Message-ID: <20181001120230.5937a631@xps13> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de Hi Jagan, Jagan Teki wrote on Mon, 1 Oct 2018 15:23:46 +0530: > On Sat, Sep 29, 2018 at 4:29 PM Miquel Raynal = 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. =20 >=20 > 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=C3=A8l