summaryrefslogtreecommitdiff
path: root/board/samsung
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-09-16 14:10:41 +0900
committerTom Rini <trini@konsulko.com>2017-10-04 11:59:44 -0400
commit9b643e312d528f291966c1f30b0d90bf3b1d43dc (patch)
tree35e3780c0aabb8af73ce19a60bb8973b3f2479cd /board/samsung
parentb44b30260ffa3dc82f4bb98b022483bb09e95353 (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')
-rw-r--r--board/samsung/common/exynos5-dt.c2
-rw-r--r--board/samsung/common/misc.c2
-rw-r--r--board/samsung/goni/goni.c4
-rw-r--r--board/samsung/odroid/odroid.c12
4 files changed, 10 insertions, 10 deletions
diff --git a/board/samsung/common/exynos5-dt.c b/board/samsung/common/exynos5-dt.c
index ae2a6e6bfa..0d17f30712 100644
--- a/board/samsung/common/exynos5-dt.c
+++ b/board/samsung/common/exynos5-dt.c
@@ -161,7 +161,7 @@ int board_usb_init(int index, enum usb_init_type init)
samsung_get_base_usb3_phy();
if (!phy) {
- error("usb3 phy not supported");
+ pr_err("usb3 phy not supported");
return -ENODEV;
}
diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c
index 4157349d02..eba25b7b98 100644
--- a/board/samsung/common/misc.c
+++ b/board/samsung/common/misc.c
@@ -457,7 +457,7 @@ void draw_logo(void)
addr = panel_info.logo_addr;
if (!addr) {
- error("There is no logo data.");
+ pr_err("There is no logo data.");
return;
}
diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c
index d0247ac257..debc4c57ff 100644
--- a/board/samsung/goni/goni.c
+++ b/board/samsung/goni/goni.c
@@ -102,7 +102,7 @@ int board_mmc_init(bd_t *bis)
ret = s5p_mmc_init(0, 4);
if (ret)
- error("MMC: Failed to init MMC:0.\n");
+ pr_err("MMC: Failed to init MMC:0.\n");
/*
* SD card (T_FLASH) detect and init
@@ -127,7 +127,7 @@ int board_mmc_init(bd_t *bis)
ret_sd = s5p_mmc_init(2, 4);
if (ret_sd)
- error("MMC: Failed to init SD card (MMC:2).\n");
+ pr_err("MMC: Failed to init SD card (MMC:2).\n");
}
return ret & ret_sd;
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