[U-Boot] [PATCH v4 07/10] mmc: allow to compile out the error messages
Tom Rini
trini at konsulko.com
Wed Nov 29 18:43:11 UTC 2017
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 <jjhiblot at ti.com>
> ---
> 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 <div64.h>
> #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: <http://lists.denx.de/pipermail/u-boot/attachments/20171129/62f32748/attachment.sig>
More information about the U-Boot
mailing list