From 9b643e312d528f291966c1f30b0d90bf3b1d43dc Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sat, 16 Sep 2017 14:10:41 +0900 Subject: treewide: replace with error() with pr_err() U-Boot widely uses error() as a bit noisier variant of printf(). This macro causes name conflict with the following line in include/linux/compiler-gcc.h: # define __compiletime_error(message) __attribute__((error(message))) This prevents us from using __compiletime_error(), and makes it difficult to fully sync BUILD_BUG macros with Linux. (Notice Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().) Let's convert error() into now treewide-available pr_err(). Done with the help of Coccinelle, excluing tools/ directory. The semantic patch I used is as follows: // @@@@ -error +pr_err (...) // Signed-off-by: Masahiro Yamada Reviewed-by: Simon Glass [trini: Re-run Coccinelle] Signed-off-by: Tom Rini --- arch/arm/mach-tegra/tegra30/clock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/arm/mach-tegra/tegra30/clock.c') diff --git a/arch/arm/mach-tegra/tegra30/clock.c b/arch/arm/mach-tegra/tegra30/clock.c index 4fd8b8a3b1..282f34fb89 100644 --- a/arch/arm/mach-tegra/tegra30/clock.c +++ b/arch/arm/mach-tegra/tegra30/clock.c @@ -696,7 +696,7 @@ static int tegra_plle_train(void) } while (--timeout); if (timeout == 0) { - error("timeout waiting for PLLE to become ready"); + pr_err("timeout waiting for PLLE to become ready"); return -ETIMEDOUT; } @@ -726,7 +726,7 @@ int tegra_plle_enable(void) if ((value & PLLE_MISC_PLL_READY) == 0) { err = tegra_plle_train(); if (err < 0) { - error("failed to train PLLE: %d", err); + pr_err("failed to train PLLE: %d", err); return err; } } @@ -772,7 +772,7 @@ int tegra_plle_enable(void) } while (--timeout); if (timeout == 0) { - error("timeout waiting for PLLE to lock"); + pr_err("timeout waiting for PLLE to lock"); return -ETIMEDOUT; } -- cgit v1.2.1