summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/xusb-padctl-common.c
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 /arch/arm/mach-tegra/xusb-padctl-common.c
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 'arch/arm/mach-tegra/xusb-padctl-common.c')
-rw-r--r--arch/arm/mach-tegra/xusb-padctl-common.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/arm/mach-tegra/xusb-padctl-common.c b/arch/arm/mach-tegra/xusb-padctl-common.c
index abc18c03a5..c8a468a034 100644
--- a/arch/arm/mach-tegra/xusb-padctl-common.c
+++ b/arch/arm/mach-tegra/xusb-padctl-common.c
@@ -84,7 +84,7 @@ tegra_xusb_padctl_group_parse_dt(struct tegra_xusb_padctl *padctl,
len = ofnode_read_string_count(node, "nvidia,lanes");
if (len < 0) {
- error("failed to parse \"nvidia,lanes\" property");
+ pr_err("failed to parse \"nvidia,lanes\" property");
return -EINVAL;
}
@@ -94,7 +94,7 @@ tegra_xusb_padctl_group_parse_dt(struct tegra_xusb_padctl *padctl,
ret = ofnode_read_string_index(node, "nvidia,lanes", i,
&group->pins[i]);
if (ret) {
- error("failed to read string from \"nvidia,lanes\" property");
+ pr_err("failed to read string from \"nvidia,lanes\" property");
return -EINVAL;
}
}
@@ -104,7 +104,7 @@ tegra_xusb_padctl_group_parse_dt(struct tegra_xusb_padctl *padctl,
ret = ofnode_read_string_index(node, "nvidia,function", 0,
&group->func);
if (ret) {
- error("failed to parse \"nvidia,func\" property");
+ pr_err("failed to parse \"nvidia,func\" property");
return -EINVAL;
}
@@ -157,14 +157,14 @@ tegra_xusb_padctl_group_apply(struct tegra_xusb_padctl *padctl,
lane = tegra_xusb_padctl_find_lane(padctl, group->pins[i]);
if (!lane) {
- error("no lane for pin %s", group->pins[i]);
+ pr_err("no lane for pin %s", group->pins[i]);
continue;
}
func = tegra_xusb_padctl_lane_find_function(padctl, lane,
group->func);
if (func < 0) {
- error("function %s invalid for lane %s: %d",
+ pr_err("function %s invalid for lane %s: %d",
group->func, lane->name, func);
continue;
}
@@ -206,7 +206,7 @@ tegra_xusb_padctl_config_apply(struct tegra_xusb_padctl *padctl,
err = tegra_xusb_padctl_group_apply(padctl, group);
if (err < 0) {
- error("failed to apply group %s: %d",
+ pr_err("failed to apply group %s: %d",
group->name, err);
continue;
}
@@ -232,7 +232,7 @@ tegra_xusb_padctl_config_parse_dt(struct tegra_xusb_padctl *padctl,
err = tegra_xusb_padctl_group_parse_dt(padctl, group, subnode);
if (err < 0) {
- error("failed to parse group %s", group->name);
+ pr_err("failed to parse group %s", group->name);
return err;
}
@@ -250,7 +250,7 @@ static int tegra_xusb_padctl_parse_dt(struct tegra_xusb_padctl *padctl,
err = ofnode_read_resource(node, 0, &padctl->regs);
if (err < 0) {
- error("registers not found");
+ pr_err("registers not found");
return err;
}
@@ -261,7 +261,7 @@ static int tegra_xusb_padctl_parse_dt(struct tegra_xusb_padctl *padctl,
err = tegra_xusb_padctl_config_parse_dt(padctl, config,
subnode);
if (err < 0) {
- error("failed to parse entry %s: %d",
+ pr_err("failed to parse entry %s: %d",
config->name, err);
continue;
}
@@ -289,7 +289,7 @@ int tegra_xusb_process_nodes(ofnode nodes[], unsigned int count,
err = tegra_xusb_padctl_parse_dt(&padctl, nodes[i]);
if (err < 0) {
- error("failed to parse DT: %d", err);
+ pr_err("failed to parse DT: %d", err);
continue;
}
@@ -298,7 +298,7 @@ int tegra_xusb_process_nodes(ofnode nodes[], unsigned int count,
err = tegra_xusb_padctl_config_apply(&padctl, &padctl.config);
if (err < 0) {
- error("failed to apply pinmux: %d", err);
+ pr_err("failed to apply pinmux: %d", err);
continue;
}