treewide: replace with error() with pr_err()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 16 Sep 2017 05:10:41 +0000 (14:10 +0900)
committerTom Rini <trini@konsulko.com>
Wed, 4 Oct 2017 15:59:44 +0000 (11:59 -0400)
commit9b643e312d528f291966c1f30b0d90bf3b1d43dc
tree35e3780c0aabb8af73ce19a60bb8973b3f2479cd
parentb44b30260ffa3dc82f4bb98b022483bb09e95353
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>
128 files changed:
arch/arm/mach-omap2/am33xx/board.c
arch/arm/mach-omap2/utils.c
arch/arm/mach-rockchip/rk3188-board-spl.c
arch/arm/mach-rockchip/rk3188-board.c
arch/arm/mach-rockchip/rk3368-board-spl.c
arch/arm/mach-socfpga/reset_manager_arria10.c
arch/arm/mach-tegra/ivc.c
arch/arm/mach-tegra/tegra124/xusb-padctl.c
arch/arm/mach-tegra/tegra186/nvtboot_mem.c
arch/arm/mach-tegra/tegra20/clock.c
arch/arm/mach-tegra/tegra210/xusb-padctl.c
arch/arm/mach-tegra/tegra30/clock.c
arch/arm/mach-tegra/xusb-padctl-common.c
arch/x86/cpu/tangier/sdram.c
board/nvidia/jetson-tk1/jetson-tk1.c
board/samsung/common/exynos5-dt.c
board/samsung/common/misc.c
board/samsung/goni/goni.c
board/samsung/odroid/odroid.c
cmd/fastboot.c
cmd/nvedit.c
cmd/regulator.c
cmd/thordown.c
cmd/tpm_test.c
cmd/usb_gadget_sdp.c
cmd/usb_mass_storage.c
common/dfu.c
common/fb_mmc.c
common/fb_nand.c
common/spl/spl_dfu.c
common/spl/spl_sdp.c
common/update.c
disk/part_efi.c
drivers/adc/adc-uclass.c
drivers/adc/exynos-adc.c
drivers/adc/rockchip-saradc.c
drivers/adc/sandbox.c
drivers/ata/dwc_ahci.c
drivers/clk/clk_boston.c
drivers/clk/clk_stm32f7.c
drivers/clk/clk_stm32h7.c
drivers/clk/rockchip/clk_rk3368.c
drivers/clk/rockchip/clk_rk3399.c
drivers/clk/rockchip/clk_rv1108.c
drivers/dfu/dfu.c
drivers/dfu/dfu_mmc.c
drivers/dfu/dfu_ram.c
drivers/dfu/dfu_tftp.c
drivers/dma/dma-uclass.c
drivers/dma/lpc32xx_dma.c
drivers/dma/ti-edma3.c
drivers/i2c/i2c-gpio.c
drivers/i2c/omap24xx_i2c.c
drivers/i2c/stm32f7_i2c.c
drivers/i2c/tegra_i2c.c
drivers/misc/tegra186_bpmp.c
drivers/mmc/exynos_dw_mmc.c
drivers/mmc/hi6220_dw_mmc.c
drivers/mmc/sti_sdhci.c
drivers/mmc/stm32_sdmmc2.c
drivers/mmc/xenon_sdhci.c
drivers/mtd/nand/lpc32xx_nand_mlc.c
drivers/mtd/nand/pxa3xx_nand.c
drivers/net/bcm-sf2-eth-gmac.c
drivers/net/bcm-sf2-eth.c
drivers/net/cpsw-common.c
drivers/net/cpsw.c
drivers/net/dwc_eth_qos.c
drivers/net/ep93xx_eth.c
drivers/net/keystone_net.c
drivers/pci/pci_tegra.c
drivers/pci/pcie_xilinx.c
drivers/phy/marvell/comphy_cp110.c
drivers/phy/sti_usb_phy.c
drivers/phy/ti-pipe3-phy.c
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
drivers/pinctrl/pinctrl-sti.c
drivers/pinctrl/pinctrl_stm32.c
drivers/power/pmic/as3722.c
drivers/power/pmic/as3722_gpio.c
drivers/power/pmic/i2c_pmic_emul.c
drivers/power/pmic/lp873x.c
drivers/power/pmic/lp87565.c
drivers/power/pmic/max77686.c
drivers/power/pmic/max8997.c
drivers/power/pmic/max8998.c
drivers/power/pmic/palmas.c
drivers/power/pmic/pfuze100.c
drivers/power/pmic/s2mps11.c
drivers/power/pmic/s5m8767.c
drivers/power/pmic/sandbox.c
drivers/power/pmic/tps65090.c
drivers/power/regulator/fixed.c
drivers/power/regulator/gpio-regulator.c
drivers/power/regulator/max77686.c
drivers/power/regulator/pbias_regulator.c
drivers/power/regulator/sandbox.c
drivers/ram/rockchip/dmc-rk3368.c
drivers/ram/rockchip/sdram_rk3399.c
drivers/ram/stm32_sdram.c
drivers/reset/sti-reset.c
drivers/spi/atmel_spi.c
drivers/spi/lpc32xx_ssp.c
drivers/sysreset/sysreset_sti.c
drivers/sysreset/sysreset_syscon.c
drivers/sysreset/sysreset_watchdog.c
drivers/tpm/tpm_tis_infineon.c
drivers/usb/common/common.c
drivers/usb/eth/mcs7830.c
drivers/usb/gadget/at91_udc.c
drivers/usb/gadget/atmel_usba_udc.c
drivers/usb/gadget/dwc2_udc_otg.c
drivers/usb/gadget/ether.c
drivers/usb/gadget/f_fastboot.c
drivers/usb/gadget/f_sdp.c
drivers/usb/gadget/f_thor.c
drivers/usb/host/dwc2.c
drivers/usb/host/dwc3-sti-glue.c
drivers/usb/host/ehci-generic.c
drivers/usb/host/ohci-generic.c
drivers/usb/host/xhci-dwc3.c
drivers/usb/host/xhci-rockchip.c
drivers/usb/musb-new/ti-musb.c
drivers/video/am335x-fb.c
env/common.c
env/sf.c
fs/jffs2/jffs2_nand_1pass.c
fs/yaffs2/yaffs_uboot_glue.c