From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Wed, 29 Nov 2017 13:43:11 -0500 Subject: [U-Boot] [PATCH v4 07/10] mmc: allow to compile out the error messages In-Reply-To: <1511965794-24118-8-git-send-email-jjhiblot@ti.com> References: <1511965794-24118-1-git-send-email-jjhiblot@ti.com> <1511965794-24118-8-git-send-email-jjhiblot@ti.com> Message-ID: <20171129184311.GY3587@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Nov 29, 2017 at 03:29:52PM +0100, Jean-Jacques Hiblot wrote: > Error messages may not be as valued as code space. Allow to compile out > most of them to free space. > > Signed-off-by: Jean-Jacques Hiblot > --- > drivers/mmc/Kconfig | 1 + > drivers/mmc/mmc.c | 44 ++++++++++++++++++++------------------------ > 2 files changed, 21 insertions(+), 24 deletions(-) > > diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig > index dbbef5a..7a45d4b 100644 > --- a/drivers/mmc/Kconfig > +++ b/drivers/mmc/Kconfig > @@ -60,6 +60,7 @@ config MMC_VERBOSE > > config SPL_MMC_VERBOSE > bool "Output more information about the MMC in SPL" > + depends on SPL_LIBCOMMON_SUPPORT > default n > help > Enable the output of more information about the card such as the > diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c > index 13979a5..af303b3 100644 > --- a/drivers/mmc/mmc.c > +++ b/drivers/mmc/mmc.c > @@ -22,6 +22,12 @@ > #include > #include "mmc_private.h" > > +#if CONFIG_IS_ENABLED(MMC_VERBOSE) > +#define error printf > +#else > +#define error(...) > +#endif Lets switch to pr_XXX so that we can make use of the normal log level tweaking to keep / drop these, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: