diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-09-16 14:10:41 +0900 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-10-04 11:59:44 -0400 |
commit | 9b643e312d528f291966c1f30b0d90bf3b1d43dc (patch) | |
tree | 35e3780c0aabb8af73ce19a60bb8973b3f2479cd /board/samsung/odroid | |
parent | b44b30260ffa3dc82f4bb98b022483bb09e95353 (diff) |
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:
// <smpl>
@@@@
-error
+pr_err
(...)
// </smpl>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: Re-run Coccinelle]
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board/samsung/odroid')
-rw-r--r-- | board/samsung/odroid/odroid.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c index e40a2f6e3a..0df96c1a3d 100644 --- a/board/samsung/odroid/odroid.c +++ b/board/samsung/odroid/odroid.c @@ -429,7 +429,7 @@ int exynos_power_init(void) }; if (regulator_list_autoset(mmc_regulators, NULL, true)) - error("Unable to init all mmc regulators"); + pr_err("Unable to init all mmc regulators"); return 0; } @@ -442,7 +442,7 @@ static int s5pc210_phy_control(int on) ret = regulator_get_by_platname("VDD_UOTG_3.0V", &dev); if (ret) { - error("Regulator get error: %d", ret); + pr_err("Regulator get error: %d", ret); return ret; } @@ -487,25 +487,25 @@ int board_usb_init(int index, enum usb_init_type init) ret = regulator_get_by_platname("VCC_P3V3_2.85V", &dev); if (ret) { - error("Regulator get error: %d", ret); + pr_err("Regulator get error: %d", ret); return ret; } ret = regulator_set_enable(dev, true); if (ret) { - error("Regulator %s enable setting error: %d", dev->name, ret); + pr_err("Regulator %s enable setting error: %d", dev->name, ret); return ret; } ret = regulator_set_value(dev, 750000); if (ret) { - error("Regulator %s value setting error: %d", dev->name, ret); + pr_err("Regulator %s value setting error: %d", dev->name, ret); return ret; } ret = regulator_set_value(dev, 3300000); if (ret) { - error("Regulator %s value setting error: %d", dev->name, ret); + pr_err("Regulator %s value setting error: %d", dev->name, ret); return ret; } #endif |