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>
diff --git a/drivers/phy/sti_usb_phy.c b/drivers/phy/sti_usb_phy.c
index 0e0b1c0..88fcfbb 100644
--- a/drivers/phy/sti_usb_phy.c
+++ b/drivers/phy/sti_usb_phy.c
@@ -47,13 +47,13 @@
 
 	ret = reset_deassert(&phy->global_ctl);
 	if (ret < 0) {
-		error("PHY global deassert failed: %d", ret);
+		pr_err("PHY global deassert failed: %d", ret);
 		return ret;
 	}
 
 	ret = reset_deassert(&phy->port_ctl);
 	if (ret < 0)
-		error("PHY port deassert failed: %d", ret);
+		pr_err("PHY port deassert failed: %d", ret);
 
 	return ret;
 }
@@ -85,13 +85,13 @@
 
 	ret = reset_assert(&phy->port_ctl);
 	if (ret < 0) {
-		error("PHY port assert failed: %d", ret);
+		pr_err("PHY port assert failed: %d", ret);
 		return ret;
 	}
 
 	ret = reset_assert(&phy->global_ctl);
 	if (ret < 0)
-		error("PHY global assert failed: %d", ret);
+		pr_err("PHY global assert failed: %d", ret);
 
 	return ret;
 }
@@ -114,20 +114,20 @@
 					 &syscfg_phandle);
 
 	if (ret < 0) {
-		error("Can't get syscfg phandle: %d\n", ret);
+		pr_err("Can't get syscfg phandle: %d\n", ret);
 		return ret;
 	}
 
 	ret = uclass_get_device_by_ofnode(UCLASS_SYSCON, syscfg_phandle.node,
 					  &syscon);
 	if (ret) {
-		error("unable to find syscon device (%d)\n", ret);
+		pr_err("unable to find syscon device (%d)\n", ret);
 		return ret;
 	}
 
 	priv->regmap = syscon_get_regmap(syscon);
 	if (!priv->regmap) {
-		error("unable to find regmap\n");
+		pr_err("unable to find regmap\n");
 		return -ENODEV;
 	}
 
@@ -137,12 +137,12 @@
 					   ARRAY_SIZE(cells));
 
 	if (count < 0) {
-		error("Bad PHY st,syscfg property %d\n", count);
+		pr_err("Bad PHY st,syscfg property %d\n", count);
 		return -EINVAL;
 	}
 
 	if (count > PHYPARAM_NB) {
-		error("Unsupported PHY param count %d\n", count);
+		pr_err("Unsupported PHY param count %d\n", count);
 		return -EINVAL;
 	}
 
@@ -152,14 +152,14 @@
 	/* get global reset control */
 	ret = reset_get_by_name(dev, "global", &priv->global_ctl);
 	if (ret) {
-		error("can't get global reset for %s (%d)", dev->name, ret);
+		pr_err("can't get global reset for %s (%d)", dev->name, ret);
 		return ret;
 	}
 
 	/* get port reset control */
 	ret = reset_get_by_name(dev, "port", &priv->port_ctl);
 	if (ret) {
-		error("can't get port reset for %s (%d)", dev->name, ret);
+		pr_err("can't get port reset for %s (%d)", dev->name, ret);
 		return ret;
 	}