Message ID | 20191212004755.11091-9-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Tom Rini |
Headers | show |
Series | common: Further reduce size of common.h even more | expand |
On Wed, Dec 11, 2019 at 05:47:33PM -0700, Simon Glass wrote: > This only exists to control whether the post/ directory is build. It is > just as easy to check this in the Makefile. Remove CONFIG_HAS_POST and use > an ifdef in the Makefile instead. > > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > Makefile | 4 +++- > include/common.h | 4 ---- > 2 files changed, 3 insertions(+), 5 deletions(-) > > diff --git a/Makefile b/Makefile > index 0766f78dcb..6b7d80139e 100644 > --- a/Makefile > +++ b/Makefile > @@ -762,7 +762,9 @@ libs-y += cmd/ > libs-y += common/ > libs-y += env/ > libs-$(CONFIG_API) += api/ > -libs-$(CONFIG_HAS_POST) += post/ > +ifdef CONFIG_POST > +libs-y += post/ > +endif Why isn't this just libs-$(CONFIG_POST) += post/ ?
Hi Tom, On Thu, 12 Dec 2019 at 06:59, Tom Rini <trini@konsulko.com> wrote: > > On Wed, Dec 11, 2019 at 05:47:33PM -0700, Simon Glass wrote: > > This only exists to control whether the post/ directory is build. It is > > just as easy to check this in the Makefile. Remove CONFIG_HAS_POST and use > > an ifdef in the Makefile instead. > > > > Signed-off-by: Simon Glass <sjg@chromium.org> > > --- > > > > Makefile | 4 +++- > > include/common.h | 4 ---- > > 2 files changed, 3 insertions(+), 5 deletions(-) > > > > diff --git a/Makefile b/Makefile > > index 0766f78dcb..6b7d80139e 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -762,7 +762,9 @@ libs-y += cmd/ > > libs-y += common/ > > libs-y += env/ > > libs-$(CONFIG_API) += api/ > > -libs-$(CONFIG_HAS_POST) += post/ > > +ifdef CONFIG_POST > > +libs-y += post/ > > +endif > > Why isn't this just libs-$(CONFIG_POST) += post/ ? Unfortunately this is not a boolean CONFIG, and doesn't even use Kconfig. See for example xpedite517x.h: #define CONFIG_POST (CONFIG_SYS_POST_MEMORY |\ CONFIG_SYS_POST_I2C) Regards, Simon
On Fri, Dec 27, 2019 at 09:42:04AM -0700, Simon Glass wrote: > Hi Tom, > > On Thu, 12 Dec 2019 at 06:59, Tom Rini <trini@konsulko.com> wrote: > > > > On Wed, Dec 11, 2019 at 05:47:33PM -0700, Simon Glass wrote: > > > This only exists to control whether the post/ directory is build. It is > > > just as easy to check this in the Makefile. Remove CONFIG_HAS_POST and use > > > an ifdef in the Makefile instead. > > > > > > Signed-off-by: Simon Glass <sjg@chromium.org> > > > --- > > > > > > Makefile | 4 +++- > > > include/common.h | 4 ---- > > > 2 files changed, 3 insertions(+), 5 deletions(-) > > > > > > diff --git a/Makefile b/Makefile > > > index 0766f78dcb..6b7d80139e 100644 > > > --- a/Makefile > > > +++ b/Makefile > > > @@ -762,7 +762,9 @@ libs-y += cmd/ > > > libs-y += common/ > > > libs-y += env/ > > > libs-$(CONFIG_API) += api/ > > > -libs-$(CONFIG_HAS_POST) += post/ > > > +ifdef CONFIG_POST > > > +libs-y += post/ > > > +endif > > > > Why isn't this just libs-$(CONFIG_POST) += post/ ? > > Unfortunately this is not a boolean CONFIG, and doesn't even use > Kconfig. See for example xpedite517x.h: > > #define CONFIG_POST (CONFIG_SYS_POST_MEMORY |\ > CONFIG_SYS_POST_I2C) OK, so lets fix that then please, POST stuff needs to be migrated to Kconfig at some point anyhow. Thanks!
diff --git a/Makefile b/Makefile index 0766f78dcb..6b7d80139e 100644 --- a/Makefile +++ b/Makefile @@ -762,7 +762,9 @@ libs-y += cmd/ libs-y += common/ libs-y += env/ libs-$(CONFIG_API) += api/ -libs-$(CONFIG_HAS_POST) += post/ +ifdef CONFIG_POST +libs-y += post/ +endif libs-$(CONFIG_UNIT_TEST) += test/ test/dm/ libs-$(CONFIG_UT_ENV) += test/env/ libs-$(CONFIG_UT_OPTEE) += test/optee/ diff --git a/include/common.h b/include/common.h index 1fba17b0f7..a102f9deff 100644 --- a/include/common.h +++ b/include/common.h @@ -123,10 +123,6 @@ int get_serial_clock(void); /* Put only stuff here that the assembler can digest */ -#ifdef CONFIG_POST -#define CONFIG_HAS_POST -#endif - #define ROUND(a,b) (((a) + (b) - 1) & ~((b) - 1)) /*
This only exists to control whether the post/ directory is build. It is just as easy to check this in the Makefile. Remove CONFIG_HAS_POST and use an ifdef in the Makefile instead. Signed-off-by: Simon Glass <sjg@chromium.org> --- Makefile | 4 +++- include/common.h | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-)