Add error message to platform_get_irq*()
Subsystems (220)
v6 cover Add error message to platform_get_irq*()
This is a resend of patch 2/3 from the v5[1] series, but split up to be per-subsystem. Please apply patches directly to subsystem trees if possible.
[1] https://lkml.kernel.org/r/[email protected]
Stephen Boyd (57):
ata: Remove dev_err() usage after platform_get_irq()
bus: sunxi-rsb: Remove dev_err() usage after platform_get_irq()
hwrng: Remove dev_err() usage after platform_get_irq()
clocksource: Remove dev_err() usage after platform_get_irq()
crypto: Remove dev_err() usage after platform_get_irq()
cpufreq: Remove dev_err() usage after platform_get_irq()
ARM: Remove dev_err() usage after platform_get_irq()
MIPS: Remove dev_err() usage after platform_get_irq()
devfreq: Remove dev_err() usage after platform_get_irq()
dmaengine: Remove dev_err() usage after platform_get_irq()
edac: Remove dev_err() usage after platform_get_irq()
extcon: Remove dev_err() usage after platform_get_irq()
firmware: Remove dev_err() usage after platform_get_irq()
fpga: Remove dev_err() usage after platform_get_irq()
gpio: Remove dev_err() usage after platform_get_irq()
HSI: Remove dev_err() usage after platform_get_irq()
hwmon: Remove dev_err() usage after platform_get_irq()
i2c: Remove dev_err() usage after platform_get_irq()
iio: Remove dev_err() usage after platform_get_irq()
infiniband: Remove dev_err() usage after platform_get_irq()
Input: Remove dev_err() usage after platform_get_irq()
iommu: Remove dev_err() usage after platform_get_irq()
irqchip: Remove dev_err() usage after platform_get_irq()
mailbox: Remove dev_err() usage after platform_get_irq()
media: Remove dev_err() usage after platform_get_irq()
memory: Remove dev_err() usage after platform_get_irq()
mfd: Remove dev_err() usage after platform_get_irq()
pcie-gadget-spear: Remove dev_err() usage after platform_get_irq()
mmc: Remove dev_err() usage after platform_get_irq()
mtd: Remove dev_err() usage after platform_get_irq()
pci: Remove dev_err() usage after platform_get_irq()
perf: Remove dev_err() usage after platform_get_irq()
pinctrl: Remove dev_err() usage after platform_get_irq()
pinctrl: intel: Remove dev_err() usage after platform_get_irq()
power: supply: Remove dev_err() usage after platform_get_irq()
pwm: Remove dev_err() usage after platform_get_irq()
regulator: Remove dev_err() usage after platform_get_irq()
remoteproc: Remove dev_err() usage after platform_get_irq()
rtc: Remove dev_err() usage after platform_get_irq()
soc: Remove dev_err() usage after platform_get_irq()
spi: Remove dev_err() usage after platform_get_irq()
staging: Remove dev_err() usage after platform_get_irq()
thermal: Remove dev_err() usage after platform_get_irq()
tty: Remove dev_err() usage after platform_get_irq()
uio: Remove dev_err() usage after platform_get_irq()
usb: Remove dev_err() usage after platform_get_irq()
video: Remove dev_err() usage after platform_get_irq()
watchdog: Remove dev_err() usage after platform_get_irq()
ASoC: Remove dev_err() usage after platform_get_irq()
gpu: Remove dev_err() usage after platform_get_irq()
net: Remove dev_err() usage after platform_get_irq() platform/x86: intel_pmc_ipc: Remove dev_err() usage after
platform_get_irq()
platform/mellanox: mlxreg-hotplug: Remove dev_err() usage after
platform_get_irq()
platform/x86: intel_bxtwc_tmu: Remove dev_err() usage after
platform_get_irq()
platform/x86: intel_int0002_vgpio: Remove dev_err() usage after
platform_get_irq()
scsi: Remove dev_err() usage after platform_get_irq()
ALSA: x86: Remove dev_err() usage after platform_get_irq()
arch/arm/plat-omap/dma.c | 1 - arch/arm/plat-pxa/ssp.c | 5 ++- arch/arm/plat-samsung/adc.c | 4 +-- arch/mips/ralink/timer.c | 4 +-- drivers/ata/libahci_platform.c | 7 ++-- drivers/ata/pata_rb532_cf.c | 4 +-- drivers/ata/sata_highbank.c | 4 +-- drivers/bus/sunxi-rsb.c | 4 +-- drivers/char/hw_random/imx-rngc.c | 4 +-- drivers/char/hw_random/omap-rng.c | 5 +-- drivers/char/hw_random/xgene-rng.c | 4 +-- drivers/clocksource/em_sti.c | 4 +-- drivers/clocksource/sh_cmt.c | 5 +-- drivers/clocksource/sh_tmu.c | 5 +-- drivers/cpufreq/brcmstb-avs-cpufreq.c | 2 -- drivers/crypto/atmel-aes.c | 1 - drivers/crypto/atmel-sha.c | 1 - drivers/crypto/atmel-tdes.c | 1 - drivers/crypto/ccree/cc_driver.c | 4 +-- drivers/crypto/img-hash.c | 1 - drivers/crypto/mediatek/mtk-platform.c | 4 +-- drivers/crypto/mxs-dcp.c | 8 ++--- drivers/crypto/omap-aes.c | 1 - drivers/crypto/omap-des.c | 1 - drivers/crypto/omap-sham.c | 1 - drivers/crypto/sahara.c | 4 +-- drivers/crypto/stm32/stm32-cryp.c | 4 +-- drivers/crypto/stm32/stm32-hash.c | 4 +-- drivers/devfreq/tegra-devfreq.c | 4 +-- drivers/dma/dma-jz4780.c | 4 +-- drivers/dma/fsl-edma.c | 8 ++--- drivers/dma/fsl-qdma.c | 9 ++--- drivers/dma/mediatek/mtk-uart-apdma.c | 4 +-- drivers/dma/qcom/hidma_mgmt.c | 1 - drivers/dma/s3c24xx-dma.c | 5 +-- drivers/dma/sh/rcar-dmac.c | 4 +-- drivers/dma/sh/usb-dmac.c | 4 +-- drivers/dma/st_fdma.c | 4 +-- drivers/dma/stm32-dma.c | 6 +--- drivers/dma/stm32-mdma.c | 4 +-- drivers/dma/sun4i-dma.c | 4 +-- drivers/dma/sun6i-dma.c | 4 +-- drivers/dma/uniphier-mdmac.c | 5 +-- drivers/dma/xgene-dma.c | 8 ++--- drivers/edac/altera_edac.c | 13 ++----- drivers/edac/xgene_edac.c | 1 - drivers/extcon/extcon-adc-jack.c | 4 +-- drivers/firmware/tegra/bpmp-tegra210.c | 8 ++--- drivers/fpga/zynq-fpga.c | 4 +-- drivers/gpio/gpio-brcmstb.c | 4 +-- drivers/gpio/gpio-eic-sprd.c | 4 +-- drivers/gpio/gpio-grgpio.c | 2 -- drivers/gpio/gpio-max77620.c | 4 +-- drivers/gpio/gpio-pmic-eic-sprd.c | 4 +-- drivers/gpio/gpio-sprd.c | 4 +-- drivers/gpio/gpio-tb10x.c | 4 +-- drivers/gpio/gpio-tegra.c | 4 +-- drivers/gpio/gpio-zx.c | 1 - drivers/gpio/gpio-zynq.c | 4 +-- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 +-- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 4 +-- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 1 - drivers/gpu/drm/exynos/exynos_drm_rotator.c | 4 +-- drivers/gpu/drm/exynos/exynos_drm_scaler.c | 4 +-- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 4 +-- drivers/gpu/drm/imx/imx-tve.c | 4 +-- drivers/gpu/drm/ingenic/ingenic-drm.c | 4 +-- drivers/gpu/drm/mediatek/mtk_cec.c | 4 +-- drivers/gpu/drm/mediatek/mtk_dpi.c | 4 +-- drivers/gpu/drm/mediatek/mtk_dsi.c | 4 +-- drivers/gpu/drm/meson/meson_dw_hdmi.c | 4 +-- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 4 +-- drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 +-- drivers/gpu/drm/tegra/dc.c | 4 +-- drivers/gpu/drm/tegra/dpaux.c | 4 +-- drivers/gpu/drm/tegra/sor.c | 4 +-- drivers/gpu/host1x/dev.c | 4 +-- drivers/hsi/controllers/omap_ssi_core.c | 4 +-- drivers/hsi/controllers/omap_ssi_port.c | 4 +-- drivers/hwmon/jz4740-hwmon.c | 5 +-- drivers/hwmon/npcm750-pwm-fan.c | 4 +-- drivers/i2c/busses/i2c-altera.c | 4 +-- drivers/i2c/busses/i2c-axxia.c | 4 +-- drivers/i2c/busses/i2c-bcm-kona.c | 1 - drivers/i2c/busses/i2c-cht-wc.c | 4 +-- drivers/i2c/busses/i2c-efm32.c | 1 - drivers/i2c/busses/i2c-hix5hd2.c | 4 +-- drivers/i2c/busses/i2c-img-scb.c | 4 +-- drivers/i2c/busses/i2c-imx-lpi2c.c | 4 +-- drivers/i2c/busses/i2c-imx.c | 4 +-- drivers/i2c/busses/i2c-lpc2k.c | 4 +-- drivers/i2c/busses/i2c-meson.c | 4 +-- drivers/i2c/busses/i2c-omap.c | 4 +-- drivers/i2c/busses/i2c-owl.c | 4 +-- drivers/i2c/busses/i2c-pnx.c | 1 - drivers/i2c/busses/i2c-pxa.c | 4 +-- drivers/i2c/busses/i2c-qcom-geni.c | 4 +-- drivers/i2c/busses/i2c-qup.c | 4 +-- drivers/i2c/busses/i2c-rk3x.c | 4 +-- drivers/i2c/busses/i2c-sprd.c | 4 +-- drivers/i2c/busses/i2c-stm32f7.c | 12 ++----- drivers/i2c/busses/i2c-sun6i-p2wi.c | 4 +-- drivers/i2c/busses/i2c-synquacer.c | 4 +-- drivers/i2c/busses/i2c-uniphier-f.c | 4 +-- drivers/i2c/busses/i2c-uniphier.c | 4 +-- drivers/i2c/busses/i2c-xlp9xx.c | 6 ++-- drivers/iio/adc/ad7606_par.c | 4 +-- drivers/iio/adc/at91_adc.c | 4 +-- drivers/iio/adc/axp288_adc.c | 4 +-- drivers/iio/adc/bcm_iproc_adc.c | 7 ++-- drivers/iio/adc/da9150-gpadc.c | 4 +-- drivers/iio/adc/envelope-detector.c | 5 +-- drivers/iio/adc/exynos_adc.c | 4 +-- drivers/iio/adc/fsl-imx25-gcq.c | 1 - drivers/iio/adc/imx7d_adc.c | 4 +-- drivers/iio/adc/lpc32xx_adc.c | 4 +-- drivers/iio/adc/npcm_adc.c | 1 - drivers/iio/adc/rockchip_saradc.c | 4 +-- drivers/iio/adc/sc27xx_adc.c | 4 +-- drivers/iio/adc/spear_adc.c | 1 - drivers/iio/adc/stm32-adc-core.c | 1 - drivers/iio/adc/stm32-adc.c | 4 +-- drivers/iio/adc/stm32-dfsdm-adc.c | 5 +-- drivers/iio/adc/sun4i-gpadc-iio.c | 4 +-- drivers/iio/adc/twl6030-gpadc.c | 4 +-- drivers/iio/adc/vf610_adc.c | 4 +-- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 4 +-- drivers/input/keyboard/bcm-keypad.c | 4 +-- drivers/input/keyboard/davinci_keyscan.c | 1 - drivers/input/keyboard/imx_keypad.c | 4 +-- drivers/input/keyboard/lpc32xx-keys.c | 4 +-- drivers/input/keyboard/nomadik-ske-keypad.c | 4 +-- drivers/input/keyboard/nspire-keypad.c | 4 +-- drivers/input/keyboard/opencores-kbd.c | 4 +-- drivers/input/keyboard/pmic8xxx-keypad.c | 8 ++--- drivers/input/keyboard/pxa27x_keypad.c | 4 +-- drivers/input/keyboard/pxa930_rotary.c | 4 +-- drivers/input/keyboard/sh_keysc.c | 4 +-- drivers/input/keyboard/snvs_pwrkey.c | 4 +-- drivers/input/keyboard/spear-keyboard.c | 4 +-- drivers/input/keyboard/st-keyscan.c | 4 +-- drivers/input/keyboard/tegra-kbc.c | 4 +-- drivers/input/keyboard/w90p910_keypad.c | 4 +-- drivers/input/misc/88pm80x_onkey.c | 1 - drivers/input/misc/88pm860x_onkey.c | 4 +-- drivers/input/misc/ab8500-ponkey.c | 8 ++--- drivers/input/misc/axp20x-pek.c | 10 ++---- drivers/input/misc/da9055_onkey.c | 5 +-- drivers/input/misc/da9063_onkey.c | 7 ++-- drivers/input/misc/e3x0-button.c | 10 ++---- drivers/input/misc/hisi_powerkey.c | 8 ++--- drivers/input/misc/max8925_onkey.c | 8 ++--- drivers/input/misc/pm8941-pwrkey.c | 4 +-- drivers/input/misc/rk805-pwrkey.c | 8 ++--- drivers/input/misc/stpmic1_onkey.c | 10 ++---- drivers/input/misc/tps65218-pwrbutton.c | 4 +-- drivers/input/misc/twl6040-vibra.c | 4 +-- drivers/input/mouse/pxa930_trkball.c | 4 +-- drivers/input/serio/arc_ps2.c | 4 +-- drivers/input/serio/ps2-gpio.c | 2 -- drivers/input/touchscreen/88pm860x-ts.c | 4 +-- drivers/input/touchscreen/bcm_iproc_tsc.c | 4 +-- drivers/input/touchscreen/fsl-imx25-tcq.c | 4 +-- drivers/input/touchscreen/imx6ul_tsc.c | 8 ++--- drivers/input/touchscreen/lpc32xx_ts.c | 4 +-- drivers/iommu/exynos-iommu.c | 4 +-- drivers/iommu/msm_iommu.c | 1 - drivers/iommu/qcom_iommu.c | 4 +-- drivers/irqchip/irq-imgpdc.c | 8 ++--- drivers/irqchip/irq-keystone.c | 4 +-- drivers/irqchip/qcom-irq-combiner.c | 4 +-- drivers/mailbox/armada-37xx-rwtm-mailbox.c | 4 +-- drivers/mailbox/platform_mhu.c | 4 +-- drivers/mailbox/stm32-ipcc.c | 5 --- drivers/mailbox/zynqmp-ipi-mailbox.c | 4 +-- drivers/media/platform/am437x/am437x-vpfe.c | 1 - .../media/platform/atmel/atmel-sama5d2-isc.c | 7 ++-- drivers/media/platform/exynos4-is/mipi-csis.c | 4 +-- drivers/media/platform/imx-pxp.c | 4 +-- drivers/media/platform/omap3isp/isp.c | 1 - drivers/media/platform/renesas-ceu.c | 4 +-- drivers/media/platform/rockchip/rga/rga.c | 1 - drivers/media/platform/s3c-camif/camif-core.c | 4 +-- .../platform/sti/c8sectpfe/c8sectpfe-core.c | 8 ++--- drivers/media/platform/sti/hva/hva-hw.c | 8 ++--- drivers/media/platform/stm32/stm32-dcmi.c | 5 +-- .../platform/sunxi/sun6i-csi/sun6i_csi.c | 7 ++-- drivers/media/rc/img-ir/img-ir-core.c | 4 +-- drivers/media/rc/ir-hix5hd2.c | 4 +-- drivers/media/rc/meson-ir.c | 4 +-- drivers/media/rc/mtk-cir.c | 4 +-- drivers/media/rc/sunxi-cir.c | 1 - drivers/memory/emif.c | 5 +-- drivers/memory/tegra/mc.c | 4 +-- drivers/mfd/ab8500-debugfs.c | 8 ++--- drivers/mfd/db8500-prcmu.c | 4 +-- drivers/mfd/fsl-imx25-tsadc.c | 4 +-- drivers/mfd/intel_soc_pmic_bxtwc.c | 4 +-- drivers/mfd/jz4740-adc.c | 11 ++---- drivers/mfd/qcom_rpm.c | 12 ++----- drivers/mfd/sm501.c | 4 +-- drivers/misc/spear13xx_pcie_gadget.c | 4 +-- drivers/mmc/host/bcm2835.c | 1 - drivers/mmc/host/jz4740_mmc.c | 1 - drivers/mmc/host/meson-gx-mmc.c | 1 - drivers/mmc/host/mxcmmc.c | 4 +-- drivers/mmc/host/s3cmci.c | 1 - drivers/mmc/host/sdhci-msm.c | 2 -- drivers/mmc/host/sdhci-pltfm.c | 1 - drivers/mmc/host/sdhci-s3c.c | 4 +-- drivers/mmc/host/sdhci_f_sdh30.c | 4 +-- drivers/mmc/host/uniphier-sd.c | 4 +-- drivers/mtd/devices/spear_smi.c | 1 - drivers/mtd/nand/raw/denali_dt.c | 4 +-- drivers/mtd/nand/raw/hisi504_nand.c | 4 +-- drivers/mtd/nand/raw/lpc32xx_mlc.c | 1 - drivers/mtd/nand/raw/marvell_nand.c | 4 +-- drivers/mtd/nand/raw/meson_nand.c | 4 +-- drivers/mtd/nand/raw/mtk_ecc.c | 4 +-- drivers/mtd/nand/raw/mtk_nand.c | 1 - drivers/mtd/nand/raw/omap2.c | 8 ++--- drivers/mtd/nand/raw/sh_flctl.c | 4 +-- drivers/mtd/nand/raw/stm32_fmc2_nand.c | 5 +-- drivers/mtd/nand/raw/sunxi_nand.c | 4 +-- drivers/mtd/spi-nor/cadence-quadspi.c | 4 +-- drivers/net/can/janz-ican3.c | 1 - drivers/net/can/rcar/rcar_can.c | 1 - drivers/net/can/rcar/rcar_canfd.c | 2 -- drivers/net/can/sun4i_can.c | 1 - drivers/net/ethernet/amd/au1000_eth.c | 1 - drivers/net/ethernet/amd/xgbe/xgbe-platform.c | 14 ++------ drivers/net/ethernet/apm/xgene-v2/main.c | 4 +-- .../net/ethernet/apm/xgene/xgene_enet_main.c | 4 +-- drivers/net/ethernet/aurora/nb8800.c | 4 +-- .../net/ethernet/broadcom/bgmac-platform.c | 4 +-- drivers/net/ethernet/cortina/gemini.c | 4 +-- drivers/net/ethernet/davicom/dm9000.c | 2 -- drivers/net/ethernet/hisilicon/hisi_femac.c | 1 - drivers/net/ethernet/lantiq_xrx200.c | 10 ++---- drivers/net/ethernet/nuvoton/w90p910_ether.c | 2 -- drivers/net/ethernet/qualcomm/emac/emac.c | 5 +-- drivers/net/ethernet/socionext/sni_ave.c | 4 +-- .../stmicro/stmmac/dwmac-dwc-qos-eth.c | 7 +--- .../ethernet/stmicro/stmmac/stmmac_platform.c | 7 +--- .../net/wireless/mediatek/mt76/mt7603/soc.c | 4 +-- drivers/pci/controller/dwc/pci-dra7xx.c | 8 ++--- drivers/pci/controller/dwc/pci-exynos.c | 8 ++--- drivers/pci/controller/dwc/pci-imx6.c | 4 +-- drivers/pci/controller/dwc/pci-keystone.c | 4 +-- drivers/pci/controller/dwc/pci-meson.c | 4 +-- drivers/pci/controller/dwc/pcie-armada8k.c | 4 +-- drivers/pci/controller/dwc/pcie-artpec6.c | 4 +-- drivers/pci/controller/dwc/pcie-histb.c | 4 +-- drivers/pci/controller/dwc/pcie-kirin.c | 5 +-- drivers/pci/controller/dwc/pcie-spear13xx.c | 4 +-- drivers/pci/controller/pci-tegra.c | 8 ++--- drivers/pci/controller/pci-v3-semi.c | 4 +-- drivers/pci/controller/pci-xgene-msi.c | 2 -- drivers/pci/controller/pcie-altera-msi.c | 1 - drivers/pci/controller/pcie-altera.c | 4 +-- drivers/pci/controller/pcie-mobiveil.c | 4 +-- drivers/pci/controller/pcie-rockchip-host.c | 12 ++----- drivers/pci/controller/pcie-tango.c | 4 +-- drivers/pci/controller/pcie-xilinx-nwl.c | 11 ++---- drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 4 +-- drivers/perf/hisilicon/hisi_uncore_hha_pmu.c | 4 +-- drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 4 +-- drivers/perf/qcom_l2_pmu.c | 6 +--- drivers/perf/xgene_pmu.c | 4 +-- drivers/pinctrl/intel/pinctrl-cherryview.c | 4 +-- drivers/pinctrl/intel/pinctrl-intel.c | 4 +-- drivers/pinctrl/pinctrl-amd.c | 4 +-- drivers/pinctrl/pinctrl-oxnas.c | 4 +-- drivers/pinctrl/pinctrl-pic32.c | 4 +-- drivers/pinctrl/pinctrl-stmfx.c | 4 +-- drivers/pinctrl/qcom/pinctrl-msm.c | 4 +-- drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c | 5 +-- drivers/platform/mellanox/mlxreg-hotplug.c | 5 +-- drivers/platform/x86/intel_bxtwc_tmu.c | 5 +-- drivers/platform/x86/intel_int0002_vgpio.c | 4 +-- drivers/platform/x86/intel_pmc_ipc.c | 4 +-- drivers/power/supply/88pm860x_battery.c | 8 ++--- drivers/power/supply/axp288_charger.c | 4 +-- drivers/power/supply/bd70528-charger.c | 5 +-- drivers/power/supply/da9150-charger.c | 8 ++--- drivers/power/supply/da9150-fg.c | 1 - drivers/power/supply/goldfish_battery.c | 4 +-- drivers/power/supply/jz4740-battery.c | 4 +-- drivers/power/supply/qcom_smbb.c | 5 +-- drivers/power/supply/sc27xx_fuel_gauge.c | 4 +-- drivers/pwm/pwm-sti.c | 4 +-- drivers/regulator/da9062-regulator.c | 4 +-- drivers/regulator/da9063-regulator.c | 4 +-- drivers/remoteproc/da8xx_remoteproc.c | 4 +-- drivers/remoteproc/keystone_remoteproc.c | 4 --- drivers/remoteproc/qcom_q6v5.c | 35 +++---------------- drivers/rtc/rtc-88pm80x.c | 1 - drivers/rtc/rtc-88pm860x.c | 4 +-- drivers/rtc/rtc-ac100.c | 4 +-- drivers/rtc/rtc-armada38x.c | 5 +-- drivers/rtc/rtc-asm9260.c | 4 +-- drivers/rtc/rtc-at91rm9200.c | 4 +-- drivers/rtc/rtc-at91sam9.c | 4 +-- drivers/rtc/rtc-bd70528.c | 5 +-- drivers/rtc/rtc-davinci.c | 4 +-- drivers/rtc/rtc-jz4740.c | 4 +-- drivers/rtc/rtc-max77686.c | 5 +-- drivers/rtc/rtc-mt7622.c | 1 - drivers/rtc/rtc-pic32.c | 4 +-- drivers/rtc/rtc-pm8xxx.c | 4 +-- drivers/rtc/rtc-puv3.c | 8 ++--- drivers/rtc/rtc-pxa.c | 8 ++--- drivers/rtc/rtc-rk808.c | 6 +--- drivers/rtc/rtc-s3c.c | 8 ++--- drivers/rtc/rtc-sc27xx.c | 4 +-- drivers/rtc/rtc-spear.c | 4 +-- drivers/rtc/rtc-stm32.c | 1 - drivers/rtc/rtc-sun6i.c | 4 +-- drivers/rtc/rtc-sunxi.c | 4 +-- drivers/rtc/rtc-tegra.c | 4 +-- drivers/rtc/rtc-vt8500.c | 4 +-- drivers/rtc/rtc-xgene.c | 4 +-- drivers/rtc/rtc-zynqmp.c | 8 ++--- drivers/scsi/ufs/ufshcd-pltfrm.c | 1 - drivers/soc/fsl/qbman/bman_portal.c | 4 +-- drivers/soc/fsl/qbman/qman_portal.c | 4 +-- drivers/soc/qcom/smp2p.c | 4 +-- drivers/spi/atmel-quadspi.c | 1 - drivers/spi/spi-armada-3700.c | 1 - drivers/spi/spi-bcm2835.c | 1 - drivers/spi/spi-bcm2835aux.c | 1 - drivers/spi/spi-bcm63xx-hsspi.c | 4 +-- drivers/spi/spi-bcm63xx.c | 4 +-- drivers/spi/spi-cadence.c | 1 - drivers/spi/spi-dw-mmio.c | 4 +-- drivers/spi/spi-efm32.c | 4 +-- drivers/spi/spi-ep93xx.c | 4 +-- drivers/spi/spi-fsl-dspi.c | 1 - drivers/spi/spi-fsl-qspi.c | 4 +-- drivers/spi/spi-geni-qcom.c | 4 +-- drivers/spi/spi-lantiq-ssc.c | 12 ++----- drivers/spi/spi-mt65xx.c | 1 - drivers/spi/spi-npcm-pspi.c | 1 - drivers/spi/spi-nuc900.c | 1 - drivers/spi/spi-nxp-fspi.c | 4 +-- drivers/spi/spi-pic32-sqi.c | 1 - drivers/spi/spi-pic32.c | 12 ++----- drivers/spi/spi-qcom-qspi.c | 4 +-- drivers/spi/spi-s3c24xx.c | 1 - drivers/spi/spi-sh-msiof.c | 1 - drivers/spi/spi-sh.c | 4 +-- drivers/spi/spi-sifive.c | 1 - drivers/spi/spi-slave-mt27xx.c | 1 - drivers/spi/spi-sprd.c | 4 +-- drivers/spi/spi-stm32-qspi.c | 5 +-- drivers/spi/spi-sun4i.c | 1 - drivers/spi/spi-sun6i.c | 1 - drivers/spi/spi-synquacer.c | 2 -- drivers/spi/spi-ti-qspi.c | 1 - drivers/spi/spi-uniphier.c | 1 - drivers/spi/spi-xlp.c | 4 +-- drivers/spi/spi-zynq-qspi.c | 1 - drivers/spi/spi-zynqmp-gqspi.c | 1 - drivers/staging/emxx_udc/emxx_udc.c | 4 +-- drivers/staging/goldfish/goldfish_audio.c | 4 +-- .../staging/media/allegro-dvt/allegro-core.c | 4 +-- drivers/staging/media/hantro/hantro_drv.c | 4 +-- drivers/staging/media/imx/imx7-media-csi.c | 4 +-- drivers/staging/media/imx/imx7-mipi-csis.c | 4 +-- drivers/staging/media/meson/vdec/esparser.c | 4 +-- drivers/staging/media/omap4iss/iss.c | 1 - .../staging/media/sunxi/cedrus/cedrus_hw.c | 5 +-- drivers/staging/most/dim2/dim2.c | 2 -- drivers/staging/mt7621-dma/mtk-hsdma.c | 4 +-- drivers/staging/nvec/nvec.c | 4 +-- drivers/staging/ralink-gdma/ralink-gdma.c | 4 +-- .../interface/vchiq_arm/vchiq_2835_arm.c | 4 +-- drivers/thermal/broadcom/brcmstb_thermal.c | 4 +-- drivers/thermal/da9062-thermal.c | 4 +-- drivers/thermal/db8500_thermal.c | 2 -- drivers/thermal/rockchip_thermal.c | 4 +-- drivers/thermal/st/st_thermal_memmap.c | 4 +-- drivers/thermal/st/stm_thermal.c | 4 +-- drivers/thermal/ti-soc-thermal/ti-bandgap.c | 4 +-- drivers/tty/serial/8250/8250_bcm2835aux.c | 4 +-- drivers/tty/serial/8250/8250_lpc18xx.c | 4 +-- drivers/tty/serial/8250/8250_uniphier.c | 4 +-- drivers/tty/serial/amba-pl011.c | 5 +-- drivers/tty/serial/fsl_lpuart.c | 4 +-- drivers/tty/serial/lpc32xx_hs.c | 5 +-- drivers/tty/serial/mvebu-uart.c | 12 ++----- drivers/tty/serial/owl-uart.c | 4 +-- drivers/tty/serial/qcom_geni_serial.c | 4 +-- drivers/tty/serial/rda-uart.c | 4 +-- drivers/tty/serial/sccnxp.c | 1 - drivers/tty/serial/serial-tegra.c | 4 +-- drivers/tty/serial/sifive.c | 4 +-- drivers/tty/serial/sprd_serial.c | 4 +-- drivers/tty/serial/stm32-usart.c | 17 +++------ drivers/uio/uio_dmem_genirq.c | 4 +-- drivers/usb/chipidea/core.c | 1 - drivers/usb/dwc2/platform.c | 4 +-- drivers/usb/dwc3/dwc3-keystone.c | 1 - drivers/usb/dwc3/dwc3-omap.c | 4 +-- drivers/usb/gadget/udc/aspeed-vhub/core.c | 1 - drivers/usb/gadget/udc/bcm63xx_udc.c | 8 ++--- drivers/usb/gadget/udc/bdc/bdc_core.c | 4 +-- drivers/usb/gadget/udc/gr_udc.c | 8 ++--- drivers/usb/gadget/udc/lpc32xx_udc.c | 5 +-- drivers/usb/gadget/udc/renesas_usb3.c | 4 +-- drivers/usb/gadget/udc/s3c-hsudc.c | 4 +-- drivers/usb/gadget/udc/udc-xilinx.c | 4 +-- drivers/usb/host/ehci-atmel.c | 3 -- drivers/usb/host/ehci-omap.c | 4 +-- drivers/usb/host/ehci-orion.c | 3 -- drivers/usb/host/ehci-platform.c | 4 +-- drivers/usb/host/ehci-sh.c | 3 -- drivers/usb/host/ehci-st.c | 4 +-- drivers/usb/host/imx21-hcd.c | 4 +-- drivers/usb/host/ohci-platform.c | 4 +-- drivers/usb/host/ohci-st.c | 4 +-- drivers/usb/mtu3/mtu3_core.c | 4 +-- drivers/usb/phy/phy-ab8500-usb.c | 12 ++----- drivers/usb/typec/tcpm/wcove.c | 4 +-- drivers/video/fbdev/atmel_lcdfb.c | 1 - drivers/video/fbdev/mmp/hw/mmp_ctrl.c | 1 - drivers/video/fbdev/nuc900fb.c | 4 +-- drivers/video/fbdev/pxa168fb.c | 4 +-- drivers/video/fbdev/pxa3xx-gcu.c | 4 +-- drivers/video/fbdev/pxafb.c | 1 - drivers/video/fbdev/s3c2410fb.c | 4 +-- drivers/video/fbdev/vt8500lcdfb.c | 1 - drivers/watchdog/sprd_wdt.c | 4 +-- sound/soc/atmel/atmel-classd.c | 7 ++-- sound/soc/atmel/atmel-pdmic.c | 7 ++-- sound/soc/bcm/cygnus-ssp.c | 7 ++-- sound/soc/codecs/msm8916-wcd-analog.c | 12 ++----- sound/soc/codecs/twl6040.c | 4 +-- sound/soc/fsl/fsl_asrc.c | 4 +-- sound/soc/fsl/fsl_esai.c | 4 +-- sound/soc/fsl/fsl_sai.c | 4 +-- sound/soc/fsl/fsl_spdif.c | 4 +-- sound/soc/fsl/fsl_ssi.c | 4 +-- sound/soc/fsl/imx-ssi.c | 4 +-- sound/soc/kirkwood/kirkwood-i2s.c | 4 +-- sound/soc/mediatek/common/mtk-btcvsd.c | 4 +-- sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 4 +-- sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 4 +-- sound/soc/mxs/mxs-saif.c | 8 ++--- sound/soc/qcom/lpass-platform.c | 5 +-- sound/soc/sof/intel/bdw.c | 5 +-- sound/soc/sof/intel/byt.c | 5 +-- sound/soc/sprd/sprd-mcdt.c | 4 +-- sound/soc/sti/sti_uniperif.c | 4 +-- sound/soc/stm/stm32_i2s.c | 5 +-- sound/soc/stm/stm32_sai.c | 4 +-- sound/soc/stm/stm32_spdifrx.c | 4 +-- sound/soc/sunxi/sun4i-i2s.c | 4 +-- sound/soc/uniphier/aio-dma.c | 4 +-- sound/soc/xilinx/xlnx_formatter_pcm.c | 2 -- sound/soc/xtensa/xtfpga-i2s.c | 1 - sound/x86/intel_hdmi_audio.c | 4 +-- 462 files changed, 441 insertions(+), 1504 deletions(-)
base-commit: 7b5cf701ea9c395c792e2a7e3b7caf4c68b87721
prerequisite-patch-id: 3886b1af0c4ad13235927e24e92fd468caa724af
Signature · 1 line
Sent by a computer through tubes
PATCH v6 1/57 ata: Remove dev_err() usage after platform_get_irq()
We don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/ata/libahci_platform.c | 7 ++----- drivers/ata/pata_rb532_cf.c | 4 +--- drivers/ata/sata_highbank.c | 4 +--- 3 files changed, 4 insertions(+), 11 deletions(-)
drivers/ata/libahci_platform.c +2 -5
@@ -583,11 +583,8 @@ int ahci_platform_init_host(struct platform_device *pdev,int i, irq, n_ports, rc; irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -if (irq != -EPROBE_DEFER ) -dev_err (dev,"no irq\n" ); -return irq; - } +if (irq <=0 ) +return irq ? : -ENXIO ; hpriv->irq = irq;
drivers/ata/pata_rb532_cf.c +1 -3
@@ -115,10 +115,8 @@ static int rb532_pata_driver_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (&pdev->dev,"no IRQ resource found\n" ); +if (irq <=0 )return -ENOENT ; - } gpiod =devm_gpiod_get (&pdev->dev,NULL ,GPIOD_IN );if (IS_ERR (gpiod)) {
drivers/ata/sata_highbank.c +1 -3
@@ -469,10 +469,8 @@ static int ahci_highbank_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (dev,"no irq\n" ); +if (irq <=0 )return -EINVAL ; - } hpriv =devm_kzalloc (dev,sizeof (*hpriv),GFP_KERNEL );if (!hpriv) {
Signature · 1 line
Sent by a computer through tubes
PATCH v6 2/57 bus: sunxi-rsb: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/bus/sunxi-rsb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/bus/sunxi-rsb.c +1 -3
@@ -651,10 +651,8 @@ static int sunxi_rsb_probe(struct platform_device *pdev)return PTR_ERR (rsb->regs); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"failed to retrieve irq: %d\n" , irq); +if (irq <0 )return irq; - } rsb->clk =devm_clk_get (dev,NULL );if (IS_ERR (rsb->clk)) {
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 02/57] bus: sunxi-rsb: Remove dev_err() usage after platform_get_irq()
Hi,
Quoted 36 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>While we're here, remove braces on if statements that only have one statement (manually).
Quoted 7 lines
Cc Greg Kroah-Hartman <[email protected]>Cc Maxime Ripard <[email protected]>Cc Chen-Yu Tsai <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
I didn't follow this series. Is this for -fixes or -next?
Thanks.
Quoted 22 lines
drivers/bus/sunxi-rsb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/bus/sunxi-rsb.c +1
-4@@ -651,10 +651,8 @@ static int sunxi_rsb_probe(struct platform_device *pdev)return PTR_ERR (rsb->regs); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"failed to retrieve irq: %d\n" , irq); +if (irq <0 )return irq; - } rsb->clk =devm_clk_get (dev,NULL );if (IS_ERR (rsb->clk)) { --Sent by a computer through tubes
Re: [PATCH v6 02/57] bus: sunxi-rsb: Remove dev_err() usage after platform_get_irq()
Quoting Chen-Yu Tsai (2019-08-04 20:35:05)
Quoted 7 lines · Stephen Boyd
Quoted 3 lines
Please apply directly to subsystem trees
I didn't follow this series. Is this for -fixes or -next?
It's for -next. Sorry for not including a link to the patch that introduces the platform_get_irq() changes. You can see it here:
Re: [PATCH v6 02/57] bus: sunxi-rsb: Remove dev_err() usage after platform_get_irq()
Quoted 7 lines · Stephen Boyd
Quoting Chen-Yu Tsai (2019-08-04 20:35:05)
Quoted 5 lines · Stephen Boyd
Quoted 3 lines
Please apply directly to subsystem trees
Quoted 7 lines
Quoted 2 lines
I didn't follow this series. Is this for -fixes or -next?
It's for -next. Sorry for not including a link to the patch that introduces the
platform_get_irq()changes. You can see it here:
Applied for 5.4.
Thanks.
PATCH v6 3/57 hwrng: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/char/hw_random/imx-rngc.c | 4 +--- drivers/char/hw_random/omap-rng.c | 5 +---- drivers/char/hw_random/xgene-rng.c | 4 +--- 3 files changed, 3 insertions(+), 10 deletions(-)
drivers/char/hw_random/imx-rngc.c +1 -3
@@ -216,10 +216,8 @@ static int imx_rngc_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (&pdev->dev,"Couldn't get irq %d\n" , irq); +if (irq <=0 )return irq; - } ret =clk_prepare_enable (rngc->clk);if (ret)
drivers/char/hw_random/omap-rng.c +1 -4
@@ -385,11 +385,8 @@ static int of_get_omap_rng_device_details(struct omap_rng_dev *priv,if (of_device_is_compatible (dev->of_node,"ti,omap4-rng" ) ||of_device_is_compatible (dev->of_node,"inside-secure,safexcel-eip76" )) { irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"%s: error getting IRQ resource - %d\n" , - __func__, irq); +if (irq <0 )return irq; - } err =devm_request_irq (dev, irq, omap4_rng_irq,IRQF_TRIGGER_NONE ,dev_name (dev), priv);
drivers/char/hw_random/xgene-rng.c +1 -3
@@ -330,10 +330,8 @@ static int xgene_rng_probe(struct platform_device *pdev)return PTR_ERR (ctx->csr_base); rc =platform_get_irq (pdev,0 ); -if (rc <0 ) { -dev_err (&pdev->dev,"No IRQ resource\n" ); +if (rc <0 )return rc; - } ctx->irq = rc; dev_dbg(&pdev->dev, "APM X-Gene RNG BASE %p ALARM IRQ %d",
Signature · 1 line
Sent by a computer through tubes
Herbert Xu
maintainerRe: [PATCH v6 03/57] hwrng: Remove dev_err() usage after platform_get_irq()
Quoted 32 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>
Quoted 7 lines
While we're here, remove braces on if statements that only have one statement (manually).
Cc Greg Kroah-Hartman <[email protected]>Cc Matt Mackall <[email protected]>Cc Herbert Xu <[email protected]>Signed-off-by Stephen Boyd <[email protected]>
Please resend via linux-crypto. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
PATCH v6 4/57 clocksource: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/clocksource/em_sti.c | 4 +--- drivers/clocksource/sh_cmt.c | 5 +---- drivers/clocksource/sh_tmu.c | 5 +---- 3 files changed, 3 insertions(+), 11 deletions(-)
drivers/clocksource/em_sti.c +1 -3
@@ -291,10 +291,8 @@ static int em_sti_probe(struct platform_device *pdev)platform_set_drvdata (pdev, p); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get irq\n" ); +if (irq <0 )return irq; - }/* map memory, let base point to the STI instance */ res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );
drivers/clocksource/sh_cmt.c +1 -4
@@ -776,11 +776,8 @@ static int sh_cmt_register_clockevent(struct sh_cmt_channel *ch,int ret; irq =platform_get_irq (ch->cmt->pdev, ch->index); -if (irq <0 ) { -dev_err (&ch->cmt->pdev->dev,"ch%u: failed to get irq\n" , - ch->index); +if (irq <0 )return irq; - } ret = request_irq(irq, sh_cmt_interrupt, IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
drivers/clocksource/sh_tmu.c +1 -4
@@ -462,11 +462,8 @@ static int sh_tmu_channel_setup(struct sh_tmu_channel *ch, unsigned int index, ch->base = tmu->mapbase +8 + ch->index *12 ; ch->irq =platform_get_irq (tmu->pdev, index); -if (ch->irq <0 ) { -dev_err (&tmu->pdev->dev,"ch%u: failed to get irq\n" , - ch->index); +if (ch->irq <0 )return ch->irq; - } ch->cs_enabled = false; ch->enable_count =0 ;
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 04/57] clocksource: Remove dev_err() usage after platform_get_irq()
Quoted 32 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>
Quoted 7 lines
While we're here, remove braces on if statements that only have one statement (manually).
Cc Greg Kroah-Hartman <[email protected]>Cc Daniel Lezcano <[email protected]>Cc Thomas Gleixner <[email protected]>Signed-off-by Stephen Boyd <[email protected]>
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Daniel Lezcano
AppliedRe: [PATCH v6 04/57] clocksource: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydQuoted 35 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>While we're here, remove braces on if statements that only have one statement (manually).
Quoted 7 lines
Cc Greg Kroah-Hartman <[email protected]>Cc Daniel Lezcano <[email protected]>Cc Thomas Gleixner <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
Applied, thanks.
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
PATCH v6 5/57 crypto: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/crypto/atmel-aes.c | 1 - drivers/crypto/atmel-sha.c | 1 - drivers/crypto/atmel-tdes.c | 1 - drivers/crypto/ccree/cc_driver.c | 4 +--- drivers/crypto/img-hash.c | 1 - drivers/crypto/mediatek/mtk-platform.c | 4 +--- drivers/crypto/mxs-dcp.c | 8 ++------ drivers/crypto/omap-aes.c | 1 - drivers/crypto/omap-des.c | 1 - drivers/crypto/omap-sham.c | 1 - drivers/crypto/sahara.c | 4 +--- drivers/crypto/stm32/stm32-cryp.c | 4 +--- drivers/crypto/stm32/stm32-hash.c | 4 +--- 13 files changed, 7 insertions(+), 28 deletions(-)
drivers/crypto/atmel-aes.c +0 -1
@@ -2673,7 +2673,6 @@ static int atmel_aes_probe(struct platform_device *pdev)/* Get the IRQ */ aes_dd->irq =platform_get_irq (pdev,0 );if (aes_dd->irq <0 ) { -dev_err (dev,"no IRQ resource info\n" ); err = aes_dd->irq; goto res_err; }
drivers/crypto/atmel-sha.c +0 -1
@@ -2779,7 +2779,6 @@ static int atmel_sha_probe(struct platform_device *pdev)/* Get the IRQ */ sha_dd->irq =platform_get_irq (pdev,0 );if (sha_dd->irq <0 ) { -dev_err (dev,"no IRQ resource info\n" ); err = sha_dd->irq; goto res_err; }
drivers/crypto/atmel-tdes.c +0 -1
@@ -1281,7 +1281,6 @@ static int atmel_tdes_probe(struct platform_device *pdev)/* Get the IRQ */ tdes_dd->irq =platform_get_irq (pdev,0 );if (tdes_dd->irq <0 ) { -dev_err (dev,"no IRQ resource info\n" ); err = tdes_dd->irq; goto res_err; }
drivers/crypto/ccree/cc_driver.c +1 -3
@@ -339,10 +339,8 @@ static int init_cc_resources(struct platform_device *plat_dev)/* Then IRQ */ new_drvdata->irq =platform_get_irq (plat_dev,0 ); -if (new_drvdata->irq <0 ) { -dev_err (dev,"Failed getting IRQ resource\n" ); +if (new_drvdata->irq <0 )return new_drvdata->irq; - }init_completion (&new_drvdata->hw_queue_avail);
drivers/crypto/img-hash.c +0 -1
@@ -980,7 +980,6 @@ static int img_hash_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <0 ) { -dev_err (dev,"no IRQ resource info\n" ); err = irq; goto res_err; }
drivers/crypto/mediatek/mtk-platform.c +1 -3
@@ -495,10 +495,8 @@ static int mtk_crypto_probe(struct platform_device *pdev)for (i =0 ; i <MTK_IRQ_NUM ; i++) { cryp->irq[i] =platform_get_irq (pdev, i); -if (cryp->irq[i] <0 ) { -dev_err (cryp->dev,"no IRQ:%d resource info\n" , i); +if (cryp->irq[i] <0 )return cryp->irq[i]; - } } cryp->clk_cryp =devm_clk_get (&pdev->dev,"cryp" );
drivers/crypto/mxs-dcp.c +2 -6
@@ -994,16 +994,12 @@ static int mxs_dcp_probe(struct platform_device *pdev) } dcp_vmi_irq =platform_get_irq (pdev,0 ); -if (dcp_vmi_irq <0 ) { -dev_err (dev,"Failed to get IRQ: (%d)!\n" , dcp_vmi_irq); +if (dcp_vmi_irq <0 )return dcp_vmi_irq; - } dcp_irq =platform_get_irq (pdev,1 ); -if (dcp_irq <0 ) { -dev_err (dev,"Failed to get IRQ: (%d)!\n" , dcp_irq); +if (dcp_irq <0 )return dcp_irq; - } sdcp =devm_kzalloc (dev,sizeof (*sdcp),GFP_KERNEL );if (!sdcp)
drivers/crypto/omap-aes.c +0 -1
@@ -1180,7 +1180,6 @@ static int omap_aes_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <0 ) { -dev_err (dev,"can't get IRQ resource\n" ); err = irq; goto err_irq; }
drivers/crypto/omap-des.c +0 -1
@@ -1049,7 +1049,6 @@ static int omap_des_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <0 ) { -dev_err (dev,"can't get IRQ resource: %d\n" , irq); err = irq; goto err_irq; }
drivers/crypto/omap-sham.c +0 -1
@@ -1989,7 +1989,6 @@ static int omap_sham_get_res_pdev(struct omap_sham_dev *dd,/* Get the IRQ */ dd->irq =platform_get_irq (pdev,0 );if (dd->irq <0 ) { -dev_err (dev,"no IRQ resource info\n" ); err = dd->irq; goto err; }
drivers/crypto/sahara.c +1 -3
@@ -1403,10 +1403,8 @@ static int sahara_probe(struct platform_device *pdev)/* Get the IRQ */ irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get irq resource\n" ); +if (irq <0 )return irq; - } err =devm_request_irq (&pdev->dev, irq, sahara_irq_handler,0 ,dev_name (&pdev->dev), dev);
drivers/crypto/stm32/stm32-cryp.c +1 -3
@@ -1975,10 +1975,8 @@ static int stm32_cryp_probe(struct platform_device *pdev)return PTR_ERR (cryp->regs); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"Cannot get IRQ resource\n" ); +if (irq <0 )return irq; - } ret = devm_request_threaded_irq(dev, irq, stm32_cryp_irq, stm32_cryp_irq_thread, IRQF_ONESHOT,
drivers/crypto/stm32/stm32-hash.c +1 -3
@@ -1450,10 +1450,8 @@ static int stm32_hash_probe(struct platform_device *pdev)return ret; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"Cannot get IRQ resource\n" ); +if (irq <0 )return irq; - } ret = devm_request_threaded_irq(dev, irq, stm32_hash_irq_handler, stm32_hash_irq_thread, IRQF_ONESHOT,
Signature · 1 line
Sent by a computer through tubes
Herbert Xu
maintainerRe: [PATCH v6 05/57] crypto: Remove dev_err() usage after platform_get_irq()
Quoted 44 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>While we're here, remove braces on if statements that only have one statement (manually).
Cc Greg Kroah-Hartman <[email protected]>Cc Herbert Xu <[email protected]>Cc "David S. Miller" <[email protected]>Cc <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
Quoted 14 lines
drivers/crypto/atmel-aes.c | 1 - drivers/crypto/atmel-sha.c | 1 - drivers/crypto/atmel-tdes.c | 1 - drivers/crypto/ccree/cc_driver.c | 4 +--- drivers/crypto/img-hash.c | 1 - drivers/crypto/mediatek/mtk-platform.c | 4 +--- drivers/crypto/mxs-dcp.c | 8 ++------ drivers/crypto/omap-aes.c | 1 - drivers/crypto/omap-des.c | 1 - drivers/crypto/omap-sham.c | 1 - drivers/crypto/sahara.c | 4 +--- drivers/crypto/stm32/stm32-cryp.c | 4 +--- drivers/crypto/stm32/stm32-hash.c | 4 +--- 13 files changed, 7 insertions(+), 28 deletions(-)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
PATCH v6 6/57 cpufreq: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/cpufreq/brcmstb-avs-cpufreq.c | 2 -- 1 file changed, 2 deletions(-)
drivers/cpufreq/brcmstb-avs-cpufreq.c +0 -2
@@ -538,8 +538,6 @@ static int brcm_avs_prepare_init(struct platform_device *pdev) host_irq =platform_get_irq_byname (pdev,BRCM_AVS_HOST_INTR );if (host_irq <0 ) { -dev_err (dev,"Couldn't find interrupt %s -- %d\n" , -BRCM_AVS_HOST_INTR , host_irq); ret = host_irq; goto unmap_intr_base; }
Signature · 1 line
Sent by a computer through tubes
PATCH v6 7/57 ARM: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
arch/arm/plat-omap/dma.c | 1 - arch/arm/plat-pxa/ssp.c | 5 ++--- arch/arm/plat-samsung/adc.c | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-)
arch/arm/plat-omap/dma.c +0 -1
@@ -1371,7 +1371,6 @@ static int omap_system_dma_probe(struct platform_device *pdev)strcpy (irq_name,"0" ); dma_irq =platform_get_irq_byname (pdev, irq_name);if (dma_irq <0 ) { -dev_err (&pdev->dev,"failed: request IRQ %d" , dma_irq); ret = dma_irq; goto exit_dma_lch_fail; }
arch/arm/plat-pxa/ssp.c +2 -3
@@ -146,10 +146,9 @@ static int pxa_ssp_probe(struct platform_device *pdev) } ssp->irq =platform_get_irq (pdev,0 ); -if (ssp->irq <0 ) { -dev_err (dev,"no IRQ resource defined\n" ); +if (ssp->irq <0 )return -ENODEV ; - } +if (dev->of_node) { const struct of_device_id *id =
arch/arm/plat-samsung/adc.c +1 -3
@@ -354,10 +354,8 @@ static int s3c_adc_probe(struct platform_device *pdev) } adc->irq =platform_get_irq (pdev,1 ); -if (adc->irq <=0 ) { -dev_err (dev,"failed to get adc irq\n" ); +if (adc->irq <=0 )return -ENOENT ; - } ret =devm_request_irq (dev, adc->irq, s3c_adc_irq,0 ,dev_name (dev), adc);
Signature · 1 line
Sent by a computer through tubes
PATCH v6 8/57 MIPS: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
arch/mips/ralink/timer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
arch/mips/ralink/timer.c +1 -3
@@ -106,10 +106,8 @@ static int rt_timer_probe(struct platform_device *pdev) } rt->irq =platform_get_irq (pdev,0 ); -if (rt->irq <0 ) { -dev_err (&pdev->dev,"failed to load irq\n" ); +if (rt->irq <0 )return rt->irq; - } rt->membase =devm_ioremap_resource (&pdev->dev, res);if (IS_ERR (rt->membase))
Signature · 1 line
Sent by a computer through tubes
Paul Burton
AppliedRe: [PATCH v6 08/57] MIPS: Remove dev_err() usage after platform_get_irq()
Hello,
Quoted 32 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>
Quoted 2 lines
While we're here, remove braces on if statements that only have one statement (manually).
Applied to mips-next.
Quoted 5 lines
commit
322e577b02ab
https://git.kernel.org/mips/c/322e577b02abSigned-off-by Stephen Boyd <[email protected]>Signed-off-by Paul Burton <[email protected]>
Thanks,
Paul
[ This message was auto-generated; if you believe anything is incorrect
then please email [email protected] to report it. ]
PATCH v6 9/57 devfreq: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/devfreq/tegra-devfreq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/devfreq/tegra-devfreq.c +1 -3
@@ -674,10 +674,8 @@ static int tegra_devfreq_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"Failed to get IRQ: %d\n" , irq); +if (irq <0 )return irq; - }platform_set_drvdata (pdev, tegra);
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 09/57] devfreq: Remove dev_err() usage after platform_get_irq()
Quoted 55 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>While we're here, remove braces on if statements that only have one statement (manually).
Cc MyungJoo Ham <[email protected]>Cc Kyungmin Park <[email protected]>Cc Chanwoo Choi <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
drivers/devfreq/tegra-devfreq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/devfreq/tegra-devfreq.c +0
-0@@ -674,10 +674,8 @@ static int tegra_devfreq_probe(struct platform_device *pdev) }
drivers/devfreq/tegra-devfreq.c static int tegra_devfreq_probe(struct platform_device *pdev) · line 681
Quoted 10 lines
drivers/devfreq/tegra-devfreq.c +1
-3irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"Failed to get IRQ: %d\n" , irq); +if (irq <0 )return irq; - }platform_set_drvdata (pdev, tegra);
Signature · 3 lines
Best Regards, Chanwoo Choi Samsung Electronics
PATCH v6 10/57 dmaengine: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/dma/dma-jz4780.c | 4 +--- drivers/dma/fsl-edma.c | 8 ++------ drivers/dma/fsl-qdma.c | 9 ++------- drivers/dma/mediatek/mtk-uart-apdma.c | 4 +--- drivers/dma/qcom/hidma_mgmt.c | 1 - drivers/dma/s3c24xx-dma.c | 5 +---- drivers/dma/sh/rcar-dmac.c | 4 +--- drivers/dma/sh/usb-dmac.c | 4 +--- drivers/dma/st_fdma.c | 4 +--- drivers/dma/stm32-dma.c | 6 +----- drivers/dma/stm32-mdma.c | 4 +--- drivers/dma/sun4i-dma.c | 4 +--- drivers/dma/sun6i-dma.c | 4 +--- drivers/dma/uniphier-mdmac.c | 5 +---- drivers/dma/xgene-dma.c | 8 ++------ 15 files changed, 17 insertions(+), 57 deletions(-)
drivers/dma/dma-jz4780.c +1 -3
@@ -878,10 +878,8 @@ static int jz4780_dma_probe(struct platform_device *pdev) } ret =platform_get_irq (pdev,0 ); -if (ret <0 ) { -dev_err (dev,"failed to get IRQ: %d\n" , ret); +if (ret <0 )return ret; - } jzdma->irq = ret;
drivers/dma/fsl-edma.c +2 -6
@@ -125,16 +125,12 @@ fsl_edma_irq_init(struct platform_device *pdev, struct fsl_edma_engine *fsl_edmaint ret; fsl_edma->txirq =platform_get_irq_byname (pdev,"edma-tx" ); -if (fsl_edma->txirq <0 ) { -dev_err (&pdev->dev,"Can't get edma-tx irq.\n" ); +if (fsl_edma->txirq <0 )return fsl_edma->txirq; - } fsl_edma->errirq =platform_get_irq_byname (pdev,"edma-err" ); -if (fsl_edma->errirq <0 ) { -dev_err (&pdev->dev,"Can't get edma-err irq.\n" ); +if (fsl_edma->errirq <0 )return fsl_edma->errirq; - }if (fsl_edma->txirq == fsl_edma->errirq) { ret = devm_request_irq(&pdev->dev, fsl_edma->txirq,
drivers/dma/fsl-qdma.c +2 -7
@@ -758,10 +758,8 @@ fsl_qdma_irq_init(struct platform_device *pdev, fsl_qdma->error_irq =platform_get_irq_byname (pdev,"qdma-error" ); -if (fsl_qdma->error_irq <0 ) { -dev_err (&pdev->dev,"Can't get qdma controller irq.\n" ); +if (fsl_qdma->error_irq <0 )return fsl_qdma->error_irq; - } ret = devm_request_irq(&pdev->dev, fsl_qdma->error_irq, fsl_qdma_error_handler, 0,
@@ -776,11 +774,8 @@ fsl_qdma_irq_init(struct platform_device *pdev, fsl_qdma->queue_irq[i] =platform_get_irq_byname (pdev, irq_name); -if (fsl_qdma->queue_irq[i] <0 ) { -dev_err (&pdev->dev, -"Can't get qdma queue %d irq.\n" , i); +if (fsl_qdma->queue_irq[i] <0 )return fsl_qdma->queue_irq[i]; - } ret = devm_request_irq(&pdev->dev, fsl_qdma->queue_irq[i],
drivers/dma/mediatek/mtk-uart-apdma.c +1 -3
@@ -547,10 +547,8 @@ static int mtk_uart_apdma_probe(struct platform_device *pdev)vchan_init (&c->vc, &mtkd->ddev); rc =platform_get_irq (pdev, i); -if (rc <0 ) { -dev_err (&pdev->dev,"failed to get IRQ[%d]\n" , i); +if (rc <0 ) goto err_no_dma; - } c->irq = rc; }
drivers/dma/qcom/hidma_mgmt.c +0 -1
@@ -183,7 +183,6 @@ static int hidma_mgmt_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <0 ) { -dev_err (&pdev->dev,"irq resources not found\n" ); rc = irq; goto out; }
drivers/dma/s3c24xx-dma.c +1 -4
@@ -1237,11 +1237,8 @@ static int s3c24xx_dma_probe(struct platform_device *pdev) phy->host = s3cdma; phy->irq =platform_get_irq (pdev, i); -if (phy->irq <0 ) { -dev_err (&pdev->dev,"failed to get irq %d, err %d\n" , - i, phy->irq); +if (phy->irq <0 )continue ; - } ret =devm_request_irq (&pdev->dev, phy->irq, s3c24xx_dma_irq,0 , pdev->name, phy);
drivers/dma/sh/rcar-dmac.c +1 -3
@@ -1744,10 +1744,8 @@ static int rcar_dmac_chan_probe(struct rcar_dmac *dmac,/* Request the channel interrupt. */ sprintf (pdev_irqname,"ch%u" , index); rchan->irq =platform_get_irq_byname (pdev, pdev_irqname); -if (rchan->irq <0 ) { -dev_err (dmac->dev,"no IRQ specified for channel %u\n" , index); +if (rchan->irq <0 )return -ENODEV ; - } irqname =devm_kasprintf (dmac->dev,GFP_KERNEL ,"%s:%u" ,dev_name (dmac->dev), index);
drivers/dma/sh/usb-dmac.c +1 -3
@@ -717,10 +717,8 @@ static int usb_dmac_chan_probe(struct usb_dmac *dmac,/* Request the channel interrupt. */ sprintf (pdev_irqname,"ch%u" , index); uchan->irq =platform_get_irq_byname (pdev, pdev_irqname); -if (uchan->irq <0 ) { -dev_err (dmac->dev,"no IRQ specified for channel %u\n" , index); +if (uchan->irq <0 )return -ENODEV ; - } irqname =devm_kasprintf (dmac->dev,GFP_KERNEL ,"%s:%u" ,dev_name (dmac->dev), index);
drivers/dma/st_fdma.c +1 -3
@@ -771,10 +771,8 @@ static int st_fdma_probe(struct platform_device *pdev)platform_set_drvdata (pdev, fdev); fdev->irq =platform_get_irq (pdev,0 ); -if (fdev->irq <0 ) { -dev_err (&pdev->dev,"Failed to get irq resource\n" ); +if (fdev->irq <0 )return -EINVAL ; - } ret =devm_request_irq (&pdev->dev, fdev->irq, st_fdma_irq_handler,0 ,dev_name (&pdev->dev), fdev);
drivers/dma/stm32-dma.c +1 -5
@@ -1366,12 +1366,8 @@ static int stm32_dma_probe(struct platform_device *pdev)for (i =0 ; i <STM32_DMA_MAX_CHANNELS ; i++) { chan = &dmadev->chan[i]; ret =platform_get_irq (pdev, i); -if (ret <0 ) { -if (ret != -EPROBE_DEFER ) -dev_err (&pdev->dev, -"No irq resource for chan %d\n" , i); +if (ret <0 ) goto err_unregister; - } chan->irq = ret; ret = devm_request_irq(&pdev->dev, chan->irq,
drivers/dma/stm32-mdma.c +1 -3
@@ -1638,10 +1638,8 @@ static int stm32_mdma_probe(struct platform_device *pdev) } dmadev->irq =platform_get_irq (pdev,0 ); -if (dmadev->irq <0 ) { -dev_err (&pdev->dev,"failed to get IRQ\n" ); +if (dmadev->irq <0 )return dmadev->irq; - } ret =devm_request_irq (&pdev->dev, dmadev->irq, stm32_mdma_irq_handler,0 ,dev_name (&pdev->dev), dmadev);
drivers/dma/sun4i-dma.c +1 -3
@@ -1132,10 +1132,8 @@ static int sun4i_dma_probe(struct platform_device *pdev)return PTR_ERR (priv->base); priv->irq =platform_get_irq (pdev,0 ); -if (priv->irq <0 ) { -dev_err (&pdev->dev,"Cannot claim IRQ\n" ); +if (priv->irq <0 )return priv->irq; - } priv->clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (priv->clk)) {
drivers/dma/sun6i-dma.c +1 -3
@@ -1251,10 +1251,8 @@ static int sun6i_dma_probe(struct platform_device *pdev)return PTR_ERR (sdc->base); sdc->irq =platform_get_irq (pdev,0 ); -if (sdc->irq <0 ) { -dev_err (&pdev->dev,"Cannot claim IRQ\n" ); +if (sdc->irq <0 )return sdc->irq; - } sdc->clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (sdc->clk)) {
drivers/dma/uniphier-mdmac.c +1 -4
@@ -354,11 +354,8 @@ static int uniphier_mdmac_chan_init(struct platform_device *pdev,int irq, ret; irq =platform_get_irq (pdev, chan_id); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get IRQ number for ch%d\n" , - chan_id); +if (irq <0 )return irq; - } irq_name =devm_kasprintf (dev,GFP_KERNEL ,"uniphier-mio-dmac-ch%d" , chan_id);
drivers/dma/xgene-dma.c +2 -6
@@ -1678,20 +1678,16 @@ static int xgene_dma_get_resources(struct platform_device *pdev,/* Get DMA error interrupt */ irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (&pdev->dev,"Failed to get Error IRQ\n" ); +if (irq <=0 )return -ENXIO ; - } pdma->err_irq = irq;/* Get DMA Rx ring descriptor interrupts for all DMA channels */ for (i =1 ; i <=XGENE_DMA_MAX_CHANNEL ; i++) { irq =platform_get_irq (pdev, i); -if (irq <=0 ) { -dev_err (&pdev->dev,"Failed to get Rx IRQ\n" ); +if (irq <=0 )return -ENXIO ; - } pdma->chan[i -1 ].rx_irq = irq; }
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 10/57] dmaengine: Remove dev_err() usage after platform_get_irq()
Quoted 32 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>
Quoted 2 lines
While we're here, remove braces on if statements that only have one statement (manually).
I would have preferred a patch per driver, but that does become insane for treewide work, so I am taking this as is
Applied, thanks
Signature · 1 line
~Vinod
PATCH v6 11/57 edac: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/edac/altera_edac.c | 13 +++---------- drivers/edac/xgene_edac.c | 1 - 2 files changed, 3 insertions(+), 11 deletions(-)
drivers/edac/altera_edac.c +3 -10
@@ -347,11 +347,8 @@ static int altr_sdram_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -edac_printk (KERN_ERR ,EDAC_MC , -"No irq %d in DT\n" , irq); +if (irq <0 )return -ENODEV ; - }/* Arria10 has a 2nd IRQ */ irq2 =platform_get_irq (pdev,1 );
@@ -2177,10 +2174,8 @@ static int altr_edac_a10_probe(struct platform_device *pdev) } edac->sb_irq =platform_get_irq (pdev,0 ); -if (edac->sb_irq <0 ) { -dev_err (&pdev->dev,"No SBERR IRQ resource\n" ); +if (edac->sb_irq <0 )return edac->sb_irq; - } irq_set_chained_handler_and_data(edac->sb_irq, altr_edac_a10_irq_handler,
@@ -2212,10 +2207,8 @@ static int altr_edac_a10_probe(struct platform_device *pdev) }#else edac->db_irq =platform_get_irq (pdev,1 ); -if (edac->db_irq <0 ) { -dev_err (&pdev->dev,"No DBERR IRQ resource\n" ); +if (edac->db_irq <0 )return edac->db_irq; - }irq_set_chained_handler_and_data (edac->db_irq, altr_edac_a10_irq_handler, edac);#endif
drivers/edac/xgene_edac.c +0 -1
@@ -1921,7 +1921,6 @@ static int xgene_edac_probe(struct platform_device *pdev)for (i =0 ; i <3 ; i++) { irq =platform_get_irq (pdev, i);if (irq <0 ) { -dev_err (&pdev->dev,"No IRQ resource\n" ); rc = -EINVAL ; goto out_err; }
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 11/57] edac: Remove dev_err() usage after platform_get_irq()
Hi,
Quoted 3 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong.
I assume this is part of a series that makes this the case...
Quoted 30 lines
Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>
Quoted 2 lines
While we're here, remove braces on if statements that only have one statement (manually).
Thanks,
James
PATCH v6 12/57 extcon: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/extcon/extcon-adc-jack.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/extcon/extcon-adc-jack.c +1 -3
@@ -140,10 +140,8 @@ static int adc_jack_probe(struct platform_device *pdev)return err; data->irq =platform_get_irq (pdev,0 ); -if (data->irq <0 ) { -dev_err (&pdev->dev,"platform_get_irq failed\n" ); +if (data->irq <0 )return -ENODEV ; - } err =request_any_context_irq (data->irq, adc_jack_irq_thread, pdata->irq_flags, pdata->name, data);
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 12/57] extcon: Remove dev_err() usage after platform_get_irq()
Quoted 53 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>While we're here, remove braces on if statements that only have one statement (manually).
Cc MyungJoo Ham <[email protected]>Cc Chanwoo Choi <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
drivers/extcon/extcon-adc-jack.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/extcon/extcon-adc-jack.c +0
-0@@ -140,10 +140,8 @@ static int adc_jack_probe(struct platform_device *pdev)return err;
drivers/extcon/extcon-adc-jack.c static int adc_jack_probe(struct platform_device *pdev) · line 147
Quoted 10 lines
drivers/extcon/extcon-adc-jack.c +1
-3data->irq =platform_get_irq (pdev,0 ); -if (data->irq <0 ) { -dev_err (&pdev->dev,"platform_get_irq failed\n" ); +if (data->irq <0 )return -ENODEV ; - } err =request_any_context_irq (data->irq, adc_jack_irq_thread, pdata->irq_flags, pdata->name, data);
Applied it. Thanks.
Signature · 3 lines
Best Regards, Chanwoo Choi Samsung Electronics
PATCH v6 13/57 firmware: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/firmware/tegra/bpmp-tegra210.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/firmware/tegra/bpmp-tegra210.c +2 -6
@@ -202,10 +202,8 @@ static int tegra210_bpmp_init(struct tegra_bpmp *bpmp) } err =platform_get_irq_byname (pdev,"tx" ); -if (err <0 ) { -dev_err (&pdev->dev,"failed to get TX IRQ: %d\n" , err); +if (err <0 )return err; - } priv->tx_irq_data =irq_get_irq_data (err);if (!priv->tx_irq_data) {
@@ -214,10 +212,8 @@ static int tegra210_bpmp_init(struct tegra_bpmp *bpmp) } err =platform_get_irq_byname (pdev,"rx" ); -if (err <0 ) { -dev_err (&pdev->dev,"failed to get rx IRQ: %d\n" , err); +if (err <0 )return err; - } err =devm_request_irq (&pdev->dev, err, rx_irq,IRQF_NO_SUSPEND ,dev_name (&pdev->dev), bpmp);
Signature · 1 line
Sent by a computer through tubes
PATCH v6 14/57 fpga: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/fpga/zynq-fpga.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/fpga/zynq-fpga.c +1 -3
@@ -578,10 +578,8 @@ static int zynq_fpga_probe(struct platform_device *pdev)init_completion (&priv->dma_done); priv->irq =platform_get_irq (pdev,0 ); -if (priv->irq <0 ) { -dev_err (dev,"No IRQ available\n" ); +if (priv->irq <0 )return priv->irq; - } priv->clk =devm_clk_get (dev,"ref_clk" );if (IS_ERR (priv->clk)) {
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 14/57] fpga: Remove dev_err() usage after platform_get_irq()
Quoted 65 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>While we're here, remove braces on if statements that only have one statement (manually).
Cc Moritz Fischer <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
drivers/fpga/zynq-fpga.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/fpga/zynq-fpga.c +1
-3@@ -578,10 +578,8 @@ static int zynq_fpga_probe(struct platform_device *pdev)init_completion (&priv->dma_done); priv->irq =platform_get_irq (pdev,0 ); -if (priv->irq <0 ) { -dev_err (dev,"No IRQ available\n" ); +if (priv->irq <0 )return priv->irq; - } priv->clk =devm_clk_get (dev,"ref_clk" );if (IS_ERR (priv->clk)) {Signature · 1 line
Sent by a computer through tubes
Applied to for-next. If all goes well I'll queue it for next PR.
PATCH v6 15/57 gpio: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/gpio/gpio-brcmstb.c | 4 +--- drivers/gpio/gpio-eic-sprd.c | 4 +--- drivers/gpio/gpio-grgpio.c | 2 -- drivers/gpio/gpio-max77620.c | 4 +--- drivers/gpio/gpio-pmic-eic-sprd.c | 4 +--- drivers/gpio/gpio-sprd.c | 4 +--- drivers/gpio/gpio-tb10x.c | 4 +--- drivers/gpio/gpio-tegra.c | 4 +--- drivers/gpio/gpio-zx.c | 1 - drivers/gpio/gpio-zynq.c | 4 +--- 10 files changed, 8 insertions(+), 27 deletions(-)
drivers/gpio/gpio-brcmstb.c +1 -3
@@ -636,10 +636,8 @@ static int brcmstb_gpio_probe(struct platform_device *pdev)if (of_property_read_bool (np,"interrupt-controller" )) { priv->parent_irq =platform_get_irq (pdev,0 ); -if (priv->parent_irq <=0 ) { -dev_err (dev,"Couldn't get IRQ" ); +if (priv->parent_irq <=0 )return -ENOENT ; - } }else { priv->parent_irq = -ENOENT ; }
drivers/gpio/gpio-eic-sprd.c +1 -3
@@ -584,10 +584,8 @@ static int sprd_eic_probe(struct platform_device *pdev) sprd_eic->type = pdata->type; sprd_eic->irq =platform_get_irq (pdev,0 ); -if (sprd_eic->irq <0 ) { -dev_err (&pdev->dev,"Failed to get EIC interrupt.\n" ); +if (sprd_eic->irq <0 )return sprd_eic->irq; - }for (i =0 ; i <SPRD_EIC_MAX_BANK ; i++) {/*
drivers/gpio/gpio-grgpio.c +0 -2
@@ -408,8 +408,6 @@ static int grgpio_probe(struct platform_device *ofdev)* Continue without irq functionality for that * gpio line */ -dev_err (priv->dev, -"Failed to get irq for offset %d\n" , i);continue ; } priv->uirqs[lirq->index].uirq = ret;
drivers/gpio/gpio-max77620.c +1 -3
@@ -270,10 +270,8 @@ static int max77620_gpio_probe(struct platform_device *pdev)int ret; gpio_irq =platform_get_irq (pdev,0 ); -if (gpio_irq <=0 ) { -dev_err (&pdev->dev,"GPIO irq not available %d\n" , gpio_irq); +if (gpio_irq <=0 )return -ENODEV ; - } mgpio =devm_kzalloc (&pdev->dev,sizeof (*mgpio),GFP_KERNEL );if (!mgpio)
drivers/gpio/gpio-pmic-eic-sprd.c +1 -3
@@ -305,10 +305,8 @@ static int sprd_pmic_eic_probe(struct platform_device *pdev)mutex_init (&pmic_eic->buslock); pmic_eic->irq =platform_get_irq (pdev,0 ); -if (pmic_eic->irq <0 ) { -dev_err (&pdev->dev,"Failed to get PMIC EIC interrupt.\n" ); +if (pmic_eic->irq <0 )return pmic_eic->irq; - } pmic_eic->map =dev_get_regmap (pdev->dev.parent,NULL );if (!pmic_eic->map)
drivers/gpio/gpio-sprd.c +1 -3
@@ -226,10 +226,8 @@ static int sprd_gpio_probe(struct platform_device *pdev)return -ENOMEM ; sprd_gpio->irq =platform_get_irq (pdev,0 ); -if (sprd_gpio->irq <0 ) { -dev_err (&pdev->dev,"Failed to get GPIO interrupt.\n" ); +if (sprd_gpio->irq <0 )return sprd_gpio->irq; - } sprd_gpio->base =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (sprd_gpio->base))
drivers/gpio/gpio-tb10x.c +1 -3
@@ -171,10 +171,8 @@ static int tb10x_gpio_probe(struct platform_device *pdev)struct irq_chip_generic *gc; ret =platform_get_irq (pdev,0 ); -if (ret <0 ) { -dev_err (dev,"No interrupt specified.\n" ); +if (ret <0 )return ret; - } tb10x_gpio->gc.to_irq = tb10x_gpio_to_irq; tb10x_gpio->irq = ret;
drivers/gpio/gpio-tegra.c +1 -3
@@ -624,10 +624,8 @@ static int tegra_gpio_probe(struct platform_device *pdev)for (i =0 ; i < tgi->bank_count; i++) { ret =platform_get_irq (pdev, i); -if (ret <0 ) { -dev_err (&pdev->dev,"Missing IRQ resource: %d\n" , ret); +if (ret <0 )return ret; - } bank = &tgi->bank_info[i]; bank->bank = i;
drivers/gpio/gpio-zx.c +0 -1
@@ -253,7 +253,6 @@ static int zx_gpio_probe(struct platform_device *pdev)writew_relaxed (0 , chip->base +ZX_GPIO_IE ); irq =platform_get_irq (pdev,0 );if (irq <0 ) { -dev_err (dev,"invalid IRQ\n" );gpiochip_remove (&chip->gc);return -ENODEV ; }
drivers/gpio/gpio-zynq.c +1 -3
@@ -849,10 +849,8 @@ static int zynq_gpio_probe(struct platform_device *pdev)return PTR_ERR (gpio->base_addr); gpio->irq =platform_get_irq (pdev,0 ); -if (gpio->irq <0 ) { -dev_err (&pdev->dev,"invalid IRQ\n" ); +if (gpio->irq <0 )return gpio->irq; - }/* configure the gpio chip */ chip = &gpio->chip;
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 15/57] gpio: Remove dev_err() usage after platform_get_irq()
wt., 30 lip 2019 o 20:16 Stephen Boyd <[email protected]> napisał(a):
Quoted 211 lines
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>While we're here, remove braces on if statements that only have one statement (manually).
Cc Linus Walleij <[email protected]>Cc Bartosz Golaszewski <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
drivers/gpio/gpio-brcmstb.c | 4 +--- drivers/gpio/gpio-eic-sprd.c | 4 +--- drivers/gpio/gpio-grgpio.c | 2 -- drivers/gpio/gpio-max77620.c | 4 +--- drivers/gpio/gpio-pmic-eic-sprd.c | 4 +--- drivers/gpio/gpio-sprd.c | 4 +--- drivers/gpio/gpio-tb10x.c | 4 +--- drivers/gpio/gpio-tegra.c | 4 +--- drivers/gpio/gpio-zx.c | 1 - drivers/gpio/gpio-zynq.c | 4 +--- 10 files changed, 8 insertions(+), 27 deletions(-)drivers/gpio/gpio-brcmstb.c +1
-3@@ -636,10 +636,8 @@ static int brcmstb_gpio_probe(struct platform_device *pdev)if (of_property_read_bool (np,"interrupt-controller" )) { priv->parent_irq =platform_get_irq (pdev,0 ); -if (priv->parent_irq <=0 ) { -dev_err (dev,"Couldn't get IRQ" ); +if (priv->parent_irq <=0 )return -ENOENT ; - } }else { priv->parent_irq = -ENOENT ; }drivers/gpio/gpio-eic-sprd.c +1
-3@@ -584,10 +584,8 @@ static int sprd_eic_probe(struct platform_device *pdev) sprd_eic->type = pdata->type; sprd_eic->irq =platform_get_irq (pdev,0 ); -if (sprd_eic->irq <0 ) { -dev_err (&pdev->dev,"Failed to get EIC interrupt.\n" ); +if (sprd_eic->irq <0 )return sprd_eic->irq; - }for (i =0 ; i <SPRD_EIC_MAX_BANK ; i++) {/* drivers/gpio/gpio-grgpio.c +0
-2@@ -408,8 +408,6 @@ static int grgpio_probe(struct platform_device *ofdev)* Continue without irq functionality for that * gpio line */ -dev_err (priv->dev, -"Failed to get irq for offset %d\n" , i);continue ; } priv->uirqs[lirq->index].uirq = ret;drivers/gpio/gpio-max77620.c +1
-3@@ -270,10 +270,8 @@ static int max77620_gpio_probe(struct platform_device *pdev)int ret; gpio_irq =platform_get_irq (pdev,0 ); -if (gpio_irq <=0 ) { -dev_err (&pdev->dev,"GPIO irq not available %d\n" , gpio_irq); +if (gpio_irq <=0 )return -ENODEV ; - } mgpio =devm_kzalloc (&pdev->dev,sizeof (*mgpio),GFP_KERNEL );if (!mgpio)drivers/gpio/gpio-pmic-eic-sprd.c +1
-3@@ -305,10 +305,8 @@ static int sprd_pmic_eic_probe(struct platform_device *pdev)mutex_init (&pmic_eic->buslock); pmic_eic->irq =platform_get_irq (pdev,0 ); -if (pmic_eic->irq <0 ) { -dev_err (&pdev->dev,"Failed to get PMIC EIC interrupt.\n" ); +if (pmic_eic->irq <0 )return pmic_eic->irq; - } pmic_eic->map =dev_get_regmap (pdev->dev.parent,NULL );if (!pmic_eic->map)drivers/gpio/gpio-sprd.c +1
-3@@ -226,10 +226,8 @@ static int sprd_gpio_probe(struct platform_device *pdev)return -ENOMEM ; sprd_gpio->irq =platform_get_irq (pdev,0 ); -if (sprd_gpio->irq <0 ) { -dev_err (&pdev->dev,"Failed to get GPIO interrupt.\n" ); +if (sprd_gpio->irq <0 )return sprd_gpio->irq; - } sprd_gpio->base =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (sprd_gpio->base))drivers/gpio/gpio-tb10x.c +1
-3@@ -171,10 +171,8 @@ static int tb10x_gpio_probe(struct platform_device *pdev)struct irq_chip_generic *gc; ret =platform_get_irq (pdev,0 ); -if (ret <0 ) { -dev_err (dev,"No interrupt specified.\n" ); +if (ret <0 )return ret; - } tb10x_gpio->gc.to_irq = tb10x_gpio_to_irq; tb10x_gpio->irq = ret;drivers/gpio/gpio-tegra.c +1
-3@@ -624,10 +624,8 @@ static int tegra_gpio_probe(struct platform_device *pdev)for (i =0 ; i < tgi->bank_count; i++) { ret =platform_get_irq (pdev, i); -if (ret <0 ) { -dev_err (&pdev->dev,"Missing IRQ resource: %d\n" , ret); +if (ret <0 )return ret; - } bank = &tgi->bank_info[i]; bank->bank = i;drivers/gpio/gpio-zx.c +0
-1@@ -253,7 +253,6 @@ static int zx_gpio_probe(struct platform_device *pdev)writew_relaxed (0 , chip->base +ZX_GPIO_IE ); irq =platform_get_irq (pdev,0 );if (irq <0 ) { -dev_err (dev,"invalid IRQ\n" );gpiochip_remove (&chip->gc);return -ENODEV ; }drivers/gpio/gpio-zynq.c +1
-4@@ -849,10 +849,8 @@ static int zynq_gpio_probe(struct platform_device *pdev)return PTR_ERR (gpio->base_addr); gpio->irq =platform_get_irq (pdev,0 ); -if (gpio->irq <0 ) { -dev_err (&pdev->dev,"invalid IRQ\n" ); +if (gpio->irq <0 )return gpio->irq; - }/* configure the gpio chip */ chip = &gpio->chip; --
Quoted 2 lines
Sent by a computer through tubes
Re: [PATCH v6 15/57] gpio: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydQuoted 3 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
(...)
Quoted 8 lines
While we're here, remove braces on if statements that only have one statement (manually).
Cc Linus Walleij <[email protected]>Cc Bartosz Golaszewski <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>
Patch applied!
Yours,
Linus Walleij
PATCH v6 16/57 HSI: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/hsi/controllers/omap_ssi_core.c | 4 +--- drivers/hsi/controllers/omap_ssi_port.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/hsi/controllers/omap_ssi_core.c +1 -3
@@ -370,10 +370,8 @@ static int ssi_add_controller(struct hsi_controller *ssi,if (err <0 ) goto out_err; err =platform_get_irq_byname (pd,"gdd_mpu" ); -if (err <0 ) { -dev_err (&pd->dev,"GDD IRQ resource missing\n" ); +if (err <0 ) goto out_err; - } omap_ssi->gdd_irq = err;tasklet_init (&omap_ssi->gdd_tasklet, ssi_gdd_tasklet, (unsigned long )ssi);
drivers/hsi/controllers/omap_ssi_port.c +1 -3
@@ -1038,10 +1038,8 @@ static int ssi_port_irq(struct hsi_port *port, struct platform_device *pd)int err; err =platform_get_irq (pd,0 ); -if (err <0 ) { -dev_err (&port->device,"Port IRQ resource missing\n" ); +if (err <0 )return err; - } omap_port->irq = err; err =devm_request_threaded_irq (&port->device, omap_port->irq,NULL , ssi_pio_thread,IRQF_ONESHOT ,"SSI PORT" , port);
Signature · 1 line
Sent by a computer through tubes
Sebastian Reichel
maintainerRe: [PATCH v6 16/57] HSI: Remove dev_err() usage after platform_get_irq()
Hi,
Quoted 35 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>While we're here, remove braces on if statements that only have one statement (manually).
Quoted 6 lines
Cc Sebastian Reichel <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
Thanks, queued to hsi-next.
-- Sebastian
Quoted 40 lines
drivers/hsi/controllers/omap_ssi_core.c | 4 +--- drivers/hsi/controllers/omap_ssi_port.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)drivers/hsi/controllers/omap_ssi_core.c +1
-3@@ -370,10 +370,8 @@ static int ssi_add_controller(struct hsi_controller *ssi,if (err <0 ) goto out_err; err =platform_get_irq_byname (pd,"gdd_mpu" ); -if (err <0 ) { -dev_err (&pd->dev,"GDD IRQ resource missing\n" ); +if (err <0 ) goto out_err; - } omap_ssi->gdd_irq = err;tasklet_init (&omap_ssi->gdd_tasklet, ssi_gdd_tasklet, (unsigned long )ssi);drivers/hsi/controllers/omap_ssi_port.c +1
-3@@ -1038,10 +1038,8 @@ static int ssi_port_irq(struct hsi_port *port, struct platform_device *pd)int err; err =platform_get_irq (pd,0 ); -if (err <0 ) { -dev_err (&port->device,"Port IRQ resource missing\n" ); +if (err <0 )return err; - } omap_port->irq = err; err =devm_request_threaded_irq (&port->device, omap_port->irq,NULL , ssi_pio_thread,IRQF_ONESHOT ,"SSI PORT" , port);Signature · 1 line
Sent by a computer through tubes
PATCH v6 17/57 hwmon: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/hwmon/jz4740-hwmon.c | 5 +---- drivers/hwmon/npcm750-pwm-fan.c | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-)
drivers/hwmon/jz4740-hwmon.c +1 -4
@@ -93,11 +93,8 @@ static int jz4740_hwmon_probe(struct platform_device *pdev) hwmon->cell =mfd_get_cell (pdev); hwmon->irq =platform_get_irq (pdev,0 ); -if (hwmon->irq <0 ) { -dev_err (&pdev->dev,"Failed to get platform irq: %d\n" , - hwmon->irq); +if (hwmon->irq <0 )return hwmon->irq; - } hwmon->base =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (hwmon->base))
drivers/hwmon/npcm750-pwm-fan.c +1 -3
@@ -967,10 +967,8 @@ static int npcm7xx_pwm_fan_probe(struct platform_device *pdev)spin_lock_init (&data->fan_lock[i]); data->fan_irq[i] =platform_get_irq (pdev, i); -if (data->fan_irq[i] <0 ) { -dev_err (dev,"get IRQ fan%d failed\n" , i); +if (data->fan_irq[i] <0 )return data->fan_irq[i]; - }sprintf (name,"NPCM7XX-FAN-MD%d" , i); ret = devm_request_irq(dev, data->fan_irq[i], npcm7xx_fan_isr,
Signature · 1 line
Sent by a computer through tubes
PATCH v6 18/57 i2c: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/i2c/busses/i2c-altera.c | 4 +--- drivers/i2c/busses/i2c-axxia.c | 4 +--- drivers/i2c/busses/i2c-bcm-kona.c | 1 - drivers/i2c/busses/i2c-cht-wc.c | 4 +--- drivers/i2c/busses/i2c-efm32.c | 1 - drivers/i2c/busses/i2c-hix5hd2.c | 4 +--- drivers/i2c/busses/i2c-img-scb.c | 4 +--- drivers/i2c/busses/i2c-imx-lpi2c.c | 4 +--- drivers/i2c/busses/i2c-imx.c | 4 +--- drivers/i2c/busses/i2c-lpc2k.c | 4 +--- drivers/i2c/busses/i2c-meson.c | 4 +--- drivers/i2c/busses/i2c-omap.c | 4 +--- drivers/i2c/busses/i2c-owl.c | 4 +--- drivers/i2c/busses/i2c-pnx.c | 1 - drivers/i2c/busses/i2c-pxa.c | 4 +--- drivers/i2c/busses/i2c-qcom-geni.c | 4 +--- drivers/i2c/busses/i2c-qup.c | 4 +--- drivers/i2c/busses/i2c-rk3x.c | 4 +--- drivers/i2c/busses/i2c-sprd.c | 4 +--- drivers/i2c/busses/i2c-stm32f7.c | 12 ++---------- drivers/i2c/busses/i2c-sun6i-p2wi.c | 4 +--- drivers/i2c/busses/i2c-synquacer.c | 4 +--- drivers/i2c/busses/i2c-uniphier-f.c | 4 +--- drivers/i2c/busses/i2c-uniphier.c | 4 +--- drivers/i2c/busses/i2c-xlp9xx.c | 6 ++---- 25 files changed, 24 insertions(+), 77 deletions(-)
drivers/i2c/busses/i2c-altera.c +1 -3
@@ -396,10 +396,8 @@ static int altr_i2c_probe(struct platform_device *pdev)return PTR_ERR (idev->base); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"missing interrupt resource\n" ); +if (irq <0 )return irq; - } idev->i2c_clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (idev->i2c_clk)) {
drivers/i2c/busses/i2c-axxia.c +1 -3
@@ -612,10 +612,8 @@ static int axxia_i2c_probe(struct platform_device *pdev)return PTR_ERR (base); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"missing interrupt resource\n" ); +if (irq <0 )return irq; - } idev->i2c_clk =devm_clk_get (&pdev->dev,"i2c" );if (IS_ERR (idev->i2c_clk)) {
drivers/i2c/busses/i2c-bcm-kona.c +0 -1
@@ -823,7 +823,6 @@ static int bcm_kona_i2c_probe(struct platform_device *pdev)/* Get the interrupt number */ dev->irq =platform_get_irq (pdev,0 );if (dev->irq <0 ) { -dev_err (dev->device,"no irq resource\n" ); rc = -ENODEV ; goto probe_disable_clk; }
drivers/i2c/busses/i2c-cht-wc.c +1 -3
@@ -269,10 +269,8 @@ static int cht_wc_i2c_adap_i2c_probe(struct platform_device *pdev)int ret, reg, irq; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"Error missing irq resource\n" ); +if (irq <0 )return -EINVAL ; - } adap =devm_kzalloc (&pdev->dev,sizeof (*adap),GFP_KERNEL );if (!adap)
drivers/i2c/busses/i2c-efm32.c +0 -1
@@ -352,7 +352,6 @@ static int efm32_i2c_probe(struct platform_device *pdev) ret =platform_get_irq (pdev,0 );if (ret <=0 ) { -dev_err (&pdev->dev,"failed to get irq (%d)\n" , ret);if (!ret) ret = -EINVAL ;return ret;
drivers/i2c/busses/i2c-hix5hd2.c +1 -3
@@ -417,10 +417,8 @@ static int hix5hd2_i2c_probe(struct platform_device *pdev)return PTR_ERR (priv->regs); irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (&pdev->dev,"cannot find HS-I2C IRQ\n" ); +if (irq <=0 )return irq; - } priv->clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (priv->clk)) {
drivers/i2c/busses/i2c-img-scb.c +1 -3
@@ -1344,10 +1344,8 @@ static int img_i2c_probe(struct platform_device *pdev)return PTR_ERR (i2c->base); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"can't get irq number\n" ); +if (irq <0 )return irq; - } i2c->sys_clk =devm_clk_get (&pdev->dev,"sys" );if (IS_ERR (i2c->sys_clk)) {
drivers/i2c/busses/i2c-imx-lpi2c.c +1 -3
@@ -559,10 +559,8 @@ static int lpi2c_imx_probe(struct platform_device *pdev)return PTR_ERR (lpi2c_imx->base); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"can't get irq number\n" ); +if (irq <0 )return irq; - } lpi2c_imx->adapter.owner =THIS_MODULE ; lpi2c_imx->adapter.algo = &lpi2c_imx_algo;
drivers/i2c/busses/i2c-imx.c +1 -3
@@ -1062,10 +1062,8 @@ static int i2c_imx_probe(struct platform_device *pdev)dev_dbg (&pdev->dev,"<%s>\n" , __func__); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"can't get irq number\n" ); +if (irq <0 )return irq; - } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); base =devm_ioremap_resource (&pdev->dev, res);
drivers/i2c/busses/i2c-lpc2k.c +1 -3
@@ -362,10 +362,8 @@ static int i2c_lpc2k_probe(struct platform_device *pdev)return PTR_ERR (i2c->base); i2c->irq =platform_get_irq (pdev,0 ); -if (i2c->irq <0 ) { -dev_err (&pdev->dev,"can't get interrupt resource\n" ); +if (i2c->irq <0 )return i2c->irq; - }init_waitqueue_head (&i2c->wait);
drivers/i2c/busses/i2c-meson.c +1 -3
@@ -395,10 +395,8 @@ static int meson_i2c_probe(struct platform_device *pdev)return PTR_ERR (i2c->regs); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"can't find IRQ\n" ); +if (irq <0 )return irq; - } ret =devm_request_irq (&pdev->dev, irq, meson_i2c_irq,0 ,NULL , i2c);if (ret <0 ) {
drivers/i2c/busses/i2c-omap.c +1 -3
@@ -1366,10 +1366,8 @@ omap_i2c_probe(struct platform_device *pdev)u16 minor, major; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"no irq resource?\n" ); +if (irq <0 )return irq; - } omap =devm_kzalloc (&pdev->dev,sizeof (struct omap_i2c_dev ),GFP_KERNEL );if (!omap)
drivers/i2c/busses/i2c-owl.c +1 -3
@@ -412,10 +412,8 @@ static int owl_i2c_probe(struct platform_device *pdev)return PTR_ERR (i2c_dev->base); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"failed to get IRQ number\n" ); +if (irq <0 )return irq; - }if (of_property_read_u32 (dev->of_node,"clock-frequency" , &i2c_dev->bus_freq))
drivers/i2c/busses/i2c-pnx.c +0 -1
@@ -720,7 +720,6 @@ static int i2c_pnx_probe(struct platform_device *pdev) alg_data->irq =platform_get_irq (pdev,0 );if (alg_data->irq <0 ) { -dev_err (&pdev->dev,"Failed to get IRQ from platform resource\n" ); ret = alg_data->irq; goto out_clock; }
drivers/i2c/busses/i2c-pxa.c +1 -3
@@ -1218,10 +1218,8 @@ static int i2c_pxa_probe(struct platform_device *dev)return PTR_ERR (i2c->reg_base); irq =platform_get_irq (dev,0 ); -if (irq <0 ) { -dev_err (&dev->dev,"no irq resource: %d\n" , irq); +if (irq <0 )return irq; - }/* Default adapter num to device id; i2c_pxa_probe_dt can override. */ i2c->adap.nr = dev->id;
drivers/i2c/busses/i2c-qcom-geni.c +1 -3
@@ -529,10 +529,8 @@ static int geni_i2c_probe(struct platform_device *pdev)ACPI_COMPANION_SET (&gi2c->adap.dev,ACPI_COMPANION (&pdev->dev)); gi2c->irq =platform_get_irq (pdev,0 ); -if (gi2c->irq <0 ) { -dev_err (&pdev->dev,"IRQ error for i2c-geni\n" ); +if (gi2c->irq <0 )return gi2c->irq; - } ret =geni_i2c_clk_map_idx (gi2c);if (ret) {
drivers/i2c/busses/i2c-qup.c +1 -3
@@ -1768,10 +1768,8 @@ static int qup_i2c_probe(struct platform_device *pdev)return PTR_ERR (qup->base); qup->irq =platform_get_irq (pdev,0 ); -if (qup->irq <0 ) { -dev_err (qup->dev,"No IRQ defined\n" ); +if (qup->irq <0 )return qup->irq; - }if (has_acpi_companion (qup->dev)) { ret = device_property_read_u32(qup->dev,
drivers/i2c/busses/i2c-rk3x.c +1 -3
@@ -1262,10 +1262,8 @@ static int rk3x_i2c_probe(struct platform_device *pdev)/* IRQ setup */ irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"cannot find rk3x IRQ\n" ); +if (irq <0 )return irq; - } ret =devm_request_irq (&pdev->dev, irq, rk3x_i2c_irq,0 ,dev_name (&pdev->dev), i2c);
drivers/i2c/busses/i2c-sprd.c +1 -3
@@ -493,10 +493,8 @@ static int sprd_i2c_probe(struct platform_device *pdev)return PTR_ERR (i2c_dev->base); i2c_dev->irq =platform_get_irq (pdev,0 ); -if (i2c_dev->irq <0 ) { -dev_err (&pdev->dev,"failed to get irq resource\n" ); +if (i2c_dev->irq <0 )return i2c_dev->irq; - }i2c_set_adapdata (&i2c_dev->adap, i2c_dev);init_completion (&i2c_dev->complete);
drivers/i2c/busses/i2c-stm32f7.c +2 -10
@@ -1839,20 +1839,12 @@ static int stm32f7_i2c_probe(struct platform_device *pdev) phy_addr = (dma_addr_t )res->start; irq_event =platform_get_irq (pdev,0 ); -if (irq_event <=0 ) { -if (irq_event != -EPROBE_DEFER ) -dev_err (&pdev->dev,"Failed to get IRQ event: %d\n" , - irq_event); +if (irq_event <=0 )return irq_event ? : -ENOENT ; - } irq_error =platform_get_irq (pdev,1 ); -if (irq_error <=0 ) { -if (irq_error != -EPROBE_DEFER ) -dev_err (&pdev->dev,"Failed to get IRQ error: %d\n" , - irq_error); +if (irq_error <=0 )return irq_error ? : -ENOENT ; - } i2c_dev->clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (i2c_dev->clk)) {
drivers/i2c/busses/i2c-sun6i-p2wi.c +1 -3
@@ -238,10 +238,8 @@ static int p2wi_probe(struct platform_device *pdev)strlcpy (p2wi->adapter.name, pdev->name,sizeof (p2wi->adapter.name)); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"failed to retrieve irq: %d\n" , irq); +if (irq <0 )return irq; - } p2wi->clk =devm_clk_get (dev,NULL );if (IS_ERR (p2wi->clk)) {
drivers/i2c/busses/i2c-synquacer.c +1 -3
@@ -580,10 +580,8 @@ static int synquacer_i2c_probe(struct platform_device *pdev)return PTR_ERR (i2c->base); i2c->irq =platform_get_irq (pdev,0 ); -if (i2c->irq <0 ) { -dev_err (&pdev->dev,"no IRQ resource found\n" ); +if (i2c->irq <0 )return -ENODEV ; - } ret =devm_request_irq (&pdev->dev, i2c->irq, synquacer_i2c_isr,0 ,dev_name (&pdev->dev), i2c);
drivers/i2c/busses/i2c-uniphier-f.c +1 -3
@@ -553,10 +553,8 @@ static int uniphier_fi2c_probe(struct platform_device *pdev)return PTR_ERR (priv->membase); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"failed to get IRQ number\n" ); +if (irq <0 )return irq; - }if (of_property_read_u32 (dev->of_node,"clock-frequency" , &bus_speed)) bus_speed =UNIPHIER_FI2C_DEFAULT_SPEED ;
drivers/i2c/busses/i2c-uniphier.c +1 -3
@@ -341,10 +341,8 @@ static int uniphier_i2c_probe(struct platform_device *pdev)return PTR_ERR (priv->membase); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"failed to get IRQ number\n" ); +if (irq <0 )return irq; - }if (of_property_read_u32 (dev->of_node,"clock-frequency" , &bus_speed)) bus_speed =UNIPHIER_I2C_DEFAULT_SPEED ;
drivers/i2c/busses/i2c-xlp9xx.c +2 -4
@@ -517,10 +517,8 @@ static int xlp9xx_i2c_probe(struct platform_device *pdev)return PTR_ERR (priv->base); priv->irq =platform_get_irq (pdev,0 ); -if (priv->irq <=0 ) { -dev_err (&pdev->dev,"invalid irq!\n" ); -return priv->irq; - } +if (priv->irq <=0 ) +return priv->irq ? : -ENXIO ;/* SMBAlert irq */ priv->alert_data.irq =platform_get_irq (pdev,1 );if (priv->alert_data.irq <=0 )
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 18/57] i2c: Remove dev_err() usage after platform_get_irq()
Quoted 1 line
-dev_err(...);
What about pr_err, ...?
Quoted 2 lines
While we're here, remove braces on if statements that only have one statement (manually).
You can let cocci do this for you, too. From the top of my head:
if (...)
- {
S
- }
with S being a statement and this rule depending on the matching rule.
Re: [PATCH v6 18/57] i2c: Remove dev_err() usage after platform_get_irq()
Quoting Wolfram Sang (2019-07-31 07:30:11)
Quoted 3 lines
Quoted 1 line
-dev_err(...);
What about
pr_err, ...?
Sure. I haven't tried to find these ones or pr_warn(), etc.
Quoted 4 lines
Quoted 3 lines
While we're here, remove braces on if statements that only have one statement (manually).
Quoted 9 lines
You can let cocci do this for you, too. From the top of my head:
if (...)
- {
S
- }with S being a statement and this rule depending on the matching rule.
Cool thanks for the tip! I'll have to try it out.
PATCH v6 19/57 iio: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/iio/adc/ad7606_par.c | 4 +--- drivers/iio/adc/at91_adc.c | 4 +--- drivers/iio/adc/axp288_adc.c | 4 +--- drivers/iio/adc/bcm_iproc_adc.c | 7 ++----- drivers/iio/adc/da9150-gpadc.c | 4 +--- drivers/iio/adc/envelope-detector.c | 5 +---- drivers/iio/adc/exynos_adc.c | 4 +--- drivers/iio/adc/fsl-imx25-gcq.c | 1 - drivers/iio/adc/imx7d_adc.c | 4 +--- drivers/iio/adc/lpc32xx_adc.c | 4 +--- drivers/iio/adc/npcm_adc.c | 1 - drivers/iio/adc/rockchip_saradc.c | 4 +--- drivers/iio/adc/sc27xx_adc.c | 4 +--- drivers/iio/adc/spear_adc.c | 1 - drivers/iio/adc/stm32-adc-core.c | 1 - drivers/iio/adc/stm32-adc.c | 4 +--- drivers/iio/adc/stm32-dfsdm-adc.c | 5 +---- drivers/iio/adc/sun4i-gpadc-iio.c | 4 +--- drivers/iio/adc/twl6030-gpadc.c | 4 +--- drivers/iio/adc/vf610_adc.c | 4 +--- 20 files changed, 17 insertions(+), 56 deletions(-)
drivers/iio/adc/ad7606_par.c +1 -3
@@ -53,10 +53,8 @@ static int ad7606_par_probe(struct platform_device *pdev)int irq; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"no irq: %d\n" , irq); +if (irq <0 )return irq; - } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); addr =devm_ioremap_resource (&pdev->dev, res);
drivers/iio/adc/at91_adc.c +1 -3
@@ -1179,10 +1179,8 @@ static int at91_adc_probe(struct platform_device *pdev) idev->info = &at91_adc_info; st->irq =platform_get_irq (pdev,0 ); -if (st->irq <0 ) { -dev_err (&pdev->dev,"No IRQ ID is designated\n" ); +if (st->irq <0 )return -ENODEV ; - } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );
drivers/iio/adc/axp288_adc.c +1 -3
@@ -225,10 +225,8 @@ static int axp288_adc_probe(struct platform_device *pdev) info =iio_priv (indio_dev); info->irq =platform_get_irq (pdev,0 ); -if (info->irq <0 ) { -dev_err (&pdev->dev,"no irq resource?\n" ); +if (info->irq <0 )return info->irq; - }platform_set_drvdata (pdev, indio_dev); info->regmap = axp20x->regmap;/*
drivers/iio/adc/bcm_iproc_adc.c +2 -5
@@ -540,11 +540,8 @@ static int iproc_adc_probe(struct platform_device *pdev) } adc_priv->irqno =platform_get_irq (pdev,0 ); -if (adc_priv->irqno <=0 ) { -dev_err (&pdev->dev,"platform_get_irq failed\n" ); - ret = -ENODEV ; -return ret; - } +if (adc_priv->irqno <=0 ) +return -ENODEV ; ret =regmap_update_bits (adc_priv->regmap,IPROC_REGCTL2 ,IPROC_ADC_AUXIN_SCAN_ENA ,0 );
drivers/iio/adc/da9150-gpadc.c +1 -3
@@ -337,10 +337,8 @@ static int da9150_gpadc_probe(struct platform_device *pdev)init_completion (&gpadc->complete); irq =platform_get_irq_byname (pdev,"GPADC" ); -if (irq <0 ) { -dev_err (dev,"Failed to get IRQ: %d\n" , irq); +if (irq <0 )return irq; - } ret =devm_request_threaded_irq (dev, irq,NULL , da9150_gpadc_irq,IRQF_ONESHOT ,"GPADC" , gpadc);
drivers/iio/adc/envelope-detector.c +1 -4
@@ -357,11 +357,8 @@ static int envelope_detector_probe(struct platform_device *pdev) } env->comp_irq =platform_get_irq_byname (pdev,"comp" ); -if (env->comp_irq <0 ) { -if (env->comp_irq != -EPROBE_DEFER ) -dev_err (dev,"failed to get compare interrupt\n" ); +if (env->comp_irq <0 )return env->comp_irq; - } ret =devm_request_irq (dev, env->comp_irq, envelope_detector_comp_isr,0 ,"envelope-detector" , env);
drivers/iio/adc/exynos_adc.c +1 -3
@@ -805,10 +805,8 @@ static int exynos_adc_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"no irq resource?\n" ); +if (irq <0 )return irq; - } info->irq = irq; irq =platform_get_irq (pdev,1 );
drivers/iio/adc/fsl-imx25-gcq.c +0 -1
@@ -340,7 +340,6 @@ static int mx25_gcq_probe(struct platform_device *pdev) priv->irq =platform_get_irq (pdev,0 );if (priv->irq <=0 ) { -dev_err (dev,"Failed to get IRQ\n" ); ret = priv->irq;if (!ret) ret = -ENXIO ;
drivers/iio/adc/imx7d_adc.c +1 -3
@@ -492,10 +492,8 @@ static int imx7d_adc_probe(struct platform_device *pdev)return PTR_ERR (info->regs); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"No irq resource?\n" ); +if (irq <0 )return irq; - } info->clk =devm_clk_get (dev,"adc" );if (IS_ERR (info->clk)) {
drivers/iio/adc/lpc32xx_adc.c +1 -3
@@ -172,10 +172,8 @@ static int lpc32xx_adc_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (&pdev->dev,"failed getting interrupt resource\n" ); +if (irq <=0 )return -ENXIO ; - } retval =devm_request_irq (&pdev->dev, irq, lpc32xx_adc_isr,0 ,LPC32XXAD_NAME , st);
drivers/iio/adc/npcm_adc.c +0 -1
@@ -225,7 +225,6 @@ static int npcm_adc_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <=0 ) { -dev_err (dev,"failed getting interrupt resource\n" ); ret = -EINVAL ; goto err_disable_clk; }
drivers/iio/adc/rockchip_saradc.c +1 -3
@@ -244,10 +244,8 @@ static int rockchip_saradc_probe(struct platform_device *pdev)init_completion (&info->completion); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"no irq resource?\n" ); +if (irq <0 )return irq; - } ret =devm_request_irq (&pdev->dev, irq, rockchip_saradc_isr,0 ,dev_name (&pdev->dev), info);
drivers/iio/adc/sc27xx_adc.c +1 -3
@@ -528,10 +528,8 @@ static int sc27xx_adc_probe(struct platform_device *pdev) } sc27xx_data->irq =platform_get_irq (pdev,0 ); -if (sc27xx_data->irq <0 ) { -dev_err (&pdev->dev,"failed to get ADC irq number\n" ); +if (sc27xx_data->irq <0 )return sc27xx_data->irq; - } ret =of_hwspin_lock_get_id (np,0 );if (ret <0 ) {
drivers/iio/adc/spear_adc.c +0 -1
@@ -301,7 +301,6 @@ static int spear_adc_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <=0 ) { -dev_err (dev,"failed getting interrupt resource\n" ); ret = -EINVAL ; goto errout2; }
drivers/iio/adc/stm32-adc-core.c +0 -1
@@ -349,7 +349,6 @@ static int stm32_adc_irq_probe(struct platform_device *pdev,*/ if (i && priv->irq[i] == -ENXIO )continue ; -dev_err (&pdev->dev,"failed to get irq\n" );return priv->irq[i]; }
drivers/iio/adc/stm32-adc.c +1 -3
@@ -1919,10 +1919,8 @@ static int stm32_adc_probe(struct platform_device *pdev) } adc->irq =platform_get_irq (pdev,0 ); -if (adc->irq <0 ) { -dev_err (&pdev->dev,"failed to get irq\n" ); +if (adc->irq <0 )return adc->irq; - } ret =devm_request_irq (&pdev->dev, adc->irq, stm32_adc_isr,0 , pdev->name, adc);
drivers/iio/adc/stm32-dfsdm-adc.c +1 -4
@@ -1601,11 +1601,8 @@ static int stm32_dfsdm_adc_probe(struct platform_device *pdev)* So IRQ associated to filter instance 0 is dedicated to the Filter 0. */ irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -if (irq != -EPROBE_DEFER ) -dev_err (dev,"Failed to get IRQ: %d\n" , irq); +if (irq <0 )return irq; - } ret =devm_request_irq (dev, irq, stm32_dfsdm_irq,0 , pdev->name, adc);
drivers/iio/adc/sun4i-gpadc-iio.c +1 -3
@@ -460,10 +460,8 @@ static int sun4i_irq_init(struct platform_device *pdev, const char *name,atomic_set (atomic,1 ); ret =platform_get_irq_byname (pdev, name); -if (ret <0 ) { -dev_err (&pdev->dev,"no %s interrupt registered\n" , name); +if (ret <0 )return ret; - } ret =regmap_irq_get_virq (mfd_dev->regmap_irqc, ret);if (ret <0 ) {
drivers/iio/adc/twl6030-gpadc.c +1 -3
@@ -905,10 +905,8 @@ static int twl6030_gpadc_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get irq\n" ); +if (irq <0 )return irq; - } ret = devm_request_threaded_irq(dev, irq, NULL, twl6030_gpadc_irq_handler,
drivers/iio/adc/vf610_adc.c +1 -3
@@ -821,10 +821,8 @@ static int vf610_adc_probe(struct platform_device *pdev)return PTR_ERR (info->regs); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"no irq resource?\n" ); +if (irq <0 )return irq; - } ret = devm_request_irq(info->dev, irq, vf610_adc_isr, 0,
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 19/57] iio: Remove dev_err() usage after platform_get_irq()
G'day Stephen,
A comment unrelated to your change.
On 31/07/2019 02:15, Stephen Boyd wrote:
....
drivers/iio/adc/at91_adc.c static int at91_adc_probe(struct platform_device *pdev) · line 1183
Quoted 12 lines
drivers/iio/adc/at91_adc.c +1
-2@@ -1179,10 +1179,8 @@ static int at91_adc_probe(struct platform_device *pdev) idev->info = &at91_adc_info; st->irq =platform_get_irq (pdev,0 ); -if (st->irq <0 ) { -dev_err (&pdev->dev,"No IRQ ID is designated\n" ); +if (st->irq <0 )return -ENODEV ;
Should this be returning st->irq instead of -ENODEV?
eg: platform_get_irq can return -EPROBE_DEFER
Pattern is repeated in a number of other places.
drivers/iio/adc/at91_adc.c static int at91_adc_probe(struct platform_device *pdev) · line 1186
Quoted 4 lines
drivers/iio/adc/at91_adc.c +0
-1- } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );
Regards
Phil Reid
Re: [PATCH v6 19/57] iio: Remove dev_err() usage after platform_get_irq()
Quoting Phil Reid (2019-07-30 23:42:16)
Quoted 22 lines
G'day Stephen,
A comment unrelated to your change.
On 31/07/2019 02:15, Stephen Boyd wrote:
....drivers/iio/adc/at91_adc.c static int at91_adc_probe(struct platform_device *pdev) · line 1183
Quoted 12 lines
drivers/iio/adc/at91_adc.c +1
-2@@ -1179,10 +1179,8 @@ static int at91_adc_probe(struct platform_device *pdev) idev->info = &at91_adc_info; st->irq =platform_get_irq (pdev,0 ); -if (st->irq <0 ) { -dev_err (&pdev->dev,"No IRQ ID is designated\n" ); +if (st->irq <0 )return -ENODEV ;Should this be returning
st->irqinstead of-ENODEV?
eg:platform_get_irqcan return -EPROBE_DEFER
Quoted 1 line
Pattern is repeated in a number of other places.
Probably? Here's a patch.
----8<----
From: Stephen Boyd <[email protected]>
Subject: [PATCH] iio: Return error values from platform_get_irq*()
Sometimes platform_get_irq*() can return -EPROBE_DEFER, so it's best to return the actual error value from calling this function instead of overriding the value to something like -EINVAL or -ENXIO. Except for in the case when the irq value is 0 and the driver knows that irq 0 isn't valid. In such a situation, return whatever error value was returned before this change.
--- drivers/iio/adc/at91_adc.c | 2 +- drivers/iio/adc/bcm_iproc_adc.c | 2 +- drivers/iio/adc/fsl-imx25-gcq.c | 4 +--- drivers/iio/adc/lpc32xx_adc.c | 2 +- drivers/iio/adc/npcm_adc.c | 2 +- drivers/iio/adc/spear_adc.c | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-)
drivers/iio/adc/at91_adc.c +1 -1
@@ -1180,7 +1180,7 @@ static int at91_adc_probe(struct platform_device *pdev) st->irq =platform_get_irq (pdev,0 );if (st->irq <0 ) -return -ENODEV ; +return st->irq; res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );
drivers/iio/adc/bcm_iproc_adc.c +1 -1
@@ -541,7 +541,7 @@ static int iproc_adc_probe(struct platform_device *pdev) adc_priv->irqno =platform_get_irq (pdev,0 );if (adc_priv->irqno <=0 ) -return -ENODEV ; +return adc_priv->irqno; ret =regmap_update_bits (adc_priv->regmap,IPROC_REGCTL2 ,IPROC_ADC_AUXIN_SCAN_ENA ,0 );
drivers/iio/adc/fsl-imx25-gcq.c +1 -3
@@ -340,9 +340,7 @@ static int mx25_gcq_probe(struct platform_device *pdev) priv->irq =platform_get_irq (pdev,0 );if (priv->irq <=0 ) { - ret = priv->irq; -if (!ret) - ret = -ENXIO ; + ret = priv->irq ? : -ENXIO ; goto err_clk_unprepare; }
drivers/iio/adc/lpc32xx_adc.c +1 -1
@@ -173,7 +173,7 @@ static int lpc32xx_adc_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <=0 ) -return -ENXIO ; +return irq ? : -ENXIO ; retval =devm_request_irq (&pdev->dev, irq, lpc32xx_adc_isr,0 ,LPC32XXAD_NAME , st);
drivers/iio/adc/npcm_adc.c +1 -1
@@ -225,7 +225,7 @@ static int npcm_adc_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <=0 ) { - ret = -EINVAL ; + ret = irq ? : -EINVAL ; goto err_disable_clk; }
drivers/iio/adc/spear_adc.c +1 -1
@@ -301,7 +301,7 @@ static int spear_adc_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <=0 ) { - ret = -EINVAL ; + ret = irq ? : -EINVAL ; goto errout2; }
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 19/57] iio: Remove dev_err() usage after platform_get_irq()
G'day Stephen,
One comment below.
Quoted 74 lines · Stephen Boyd
Quoting Phil Reid (2019-07-30 23:42:16)
Quoted 22 lines
G'day Stephen,
A comment unrelated to your change.
On 31/07/2019 02:15, Stephen Boyd wrote:
....drivers/iio/adc/at91_adc.c static int at91_adc_probe(struct platform_device *pdev) · line 1183
Quoted 12 lines
drivers/iio/adc/at91_adc.c +1
-2@@ -1179,10 +1179,8 @@ static int at91_adc_probe(struct platform_device *pdev) idev->info = &at91_adc_info; st->irq =platform_get_irq (pdev,0 ); -if (st->irq <0 ) { -dev_err (&pdev->dev,"No IRQ ID is designated\n" ); +if (st->irq <0 )return -ENODEV ;Should this be returning
st->irqinstead of-ENODEV?
eg:platform_get_irqcan return -EPROBE_DEFERQuoted 1 line
Pattern is repeated in a number of other places.
Probably? Here's a patch.
----8<----
From: Stephen Boyd <[email protected]>
Subject: [PATCH] iio: Return error values from platform_get_irq*()Sometimes platform_get_irq*() can return -EPROBE_DEFER, so it's best to return the actual error value from calling this function instead of overriding the value to something like
-EINVALor-ENXIO. Except for in the case when the irq value is 0 and the driver knows that irq 0 isn't valid. In such a situation, return whatever error value was returned before this change.Reported-by Phil Reid <[email protected]>Cc Phil Reid <[email protected]>Cc Jonathan Cameron <[email protected]>Cc Hartmut Knaack <[email protected]>Cc Lars-Peter Clausen <[email protected]>Cc Peter Meerwald-Stadler <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>--- drivers/iio/adc/at91_adc.c | 2 +- drivers/iio/adc/bcm_iproc_adc.c | 2 +- drivers/iio/adc/fsl-imx25-gcq.c | 4 +--- drivers/iio/adc/lpc32xx_adc.c | 2 +- drivers/iio/adc/npcm_adc.c | 2 +- drivers/iio/adc/spear_adc.c | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-)drivers/iio/adc/at91_adc.c +1
-1@@ -1180,7 +1180,7 @@ static int at91_adc_probe(struct platform_device *pdev) st->irq =platform_get_irq (pdev,0 );if (st->irq <0 ) -return -ENODEV ; +return st->irq; res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );drivers/iio/adc/bcm_iproc_adc.c +0
-0
drivers/iio/adc/bcm_iproc_adc.c static int iproc_adc_probe(struct platform_device *pdev) · line 544
Quoted 5 lines
drivers/iio/adc/bcm_iproc_adc.c +1
-1@@ -541,7 +541,7 @@ static int iproc_adc_probe(struct platform_device *pdev) adc_priv->irqno =platform_get_irq (pdev,0 );if (adc_priv->irqno <=0 ) -return -ENODEV ; +return adc_priv->irqno;
return adc_priv->irqno ? : -ENODEV;
Quoted 58 lines
drivers/iio/adc/bcm_iproc_adc.c +0
-0ret =regmap_update_bits (adc_priv->regmap,IPROC_REGCTL2 ,IPROC_ADC_AUXIN_SCAN_ENA ,0 );drivers/iio/adc/fsl-imx25-gcq.c +1
-3@@ -340,9 +340,7 @@ static int mx25_gcq_probe(struct platform_device *pdev) priv->irq =platform_get_irq (pdev,0 );if (priv->irq <=0 ) { - ret = priv->irq; -if (!ret) - ret = -ENXIO ; + ret = priv->irq ? : -ENXIO ; goto err_clk_unprepare; }drivers/iio/adc/lpc32xx_adc.c +1
-1@@ -173,7 +173,7 @@ static int lpc32xx_adc_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <=0 ) -return -ENXIO ; +return irq ? : -ENXIO ; retval =devm_request_irq (&pdev->dev, irq, lpc32xx_adc_isr,0 ,LPC32XXAD_NAME , st);drivers/iio/adc/npcm_adc.c +1
-1@@ -225,7 +225,7 @@ static int npcm_adc_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <=0 ) { - ret = -EINVAL ; + ret = irq ? : -EINVAL ; goto err_disable_clk; }drivers/iio/adc/spear_adc.c +1
-1@@ -301,7 +301,7 @@ static int spear_adc_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <=0 ) { - ret = -EINVAL ; + ret = irq ? : -EINVAL ; goto errout2; }
Signature · 2 lines
Regards Phil Reid
Jonathan Cameron
maintainerRe: [PATCH v6 19/57] iio: Remove dev_err() usage after platform_get_irq()
Quoted 3 lines · On Thu, 1 Aug 2019 10:37:40 +0800 Phil Reid <[email protected]> wrote:
G'day Stephen,
One comment below.
Please send as fresh patch. Nice to clean these up, but I'll loose it buried in a thread like this!
Thanks,
Jonathan
Quoted 144 lines · Stephen Boyd
Quoted 74 lines
Quoting Phil Reid (2019-07-30 23:42:16)
Quoted 22 lines
G'day Stephen,
A comment unrelated to your change.
On 31/07/2019 02:15, Stephen Boyd wrote:
....drivers/iio/adc/at91_adc.c static int at91_adc_probe(struct platform_device *pdev) · line 1183
Quoted 12 lines
drivers/iio/adc/at91_adc.c +1
-2@@ -1179,10 +1179,8 @@ static int at91_adc_probe(struct platform_device *pdev) idev->info = &at91_adc_info; st->irq =platform_get_irq (pdev,0 ); -if (st->irq <0 ) { -dev_err (&pdev->dev,"No IRQ ID is designated\n" ); +if (st->irq <0 )return -ENODEV ;Should this be returning
st->irqinstead of-ENODEV?
eg:platform_get_irqcan return -EPROBE_DEFERQuoted 1 line
Pattern is repeated in a number of other places.
Probably? Here's a patch.
----8<----
From: Stephen Boyd <[email protected]>
Subject: [PATCH] iio: Return error values from platform_get_irq*()Sometimes platform_get_irq*() can return -EPROBE_DEFER, so it's best to return the actual error value from calling this function instead of overriding the value to something like
-EINVALor-ENXIO. Except for in the case when the irq value is 0 and the driver knows that irq 0 isn't valid. In such a situation, return whatever error value was returned before this change.Reported-by Phil Reid <[email protected]>Cc Phil Reid <[email protected]>Cc Jonathan Cameron <[email protected]>Cc Hartmut Knaack <[email protected]>Cc Lars-Peter Clausen <[email protected]>Cc Peter Meerwald-Stadler <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>--- drivers/iio/adc/at91_adc.c | 2 +- drivers/iio/adc/bcm_iproc_adc.c | 2 +- drivers/iio/adc/fsl-imx25-gcq.c | 4 +--- drivers/iio/adc/lpc32xx_adc.c | 2 +- drivers/iio/adc/npcm_adc.c | 2 +- drivers/iio/adc/spear_adc.c | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-)drivers/iio/adc/at91_adc.c +1
-1@@ -1180,7 +1180,7 @@ static int at91_adc_probe(struct platform_device *pdev) st->irq =platform_get_irq (pdev,0 );if (st->irq <0 ) -return -ENODEV ; +return st->irq; res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );drivers/iio/adc/bcm_iproc_adc.c +0
-0drivers/iio/adc/bcm_iproc_adc.c static int iproc_adc_probe(struct platform_device *pdev) · line 544
Quoted 5 lines
drivers/iio/adc/bcm_iproc_adc.c +1
-1@@ -541,7 +541,7 @@ static int iproc_adc_probe(struct platform_device *pdev) adc_priv->irqno =platform_get_irq (pdev,0 );if (adc_priv->irqno <=0 ) -return -ENODEV ; +return adc_priv->irqno;return adc_priv->irqno ? : -ENODEV;Quoted 58 lines
drivers/iio/adc/bcm_iproc_adc.c +0
-0ret =regmap_update_bits (adc_priv->regmap,IPROC_REGCTL2 ,IPROC_ADC_AUXIN_SCAN_ENA ,0 );drivers/iio/adc/fsl-imx25-gcq.c +1
-3@@ -340,9 +340,7 @@ static int mx25_gcq_probe(struct platform_device *pdev) priv->irq =platform_get_irq (pdev,0 );if (priv->irq <=0 ) { - ret = priv->irq; -if (!ret) - ret = -ENXIO ; + ret = priv->irq ? : -ENXIO ; goto err_clk_unprepare; }drivers/iio/adc/lpc32xx_adc.c +1
-1@@ -173,7 +173,7 @@ static int lpc32xx_adc_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <=0 ) -return -ENXIO ; +return irq ? : -ENXIO ; retval =devm_request_irq (&pdev->dev, irq, lpc32xx_adc_isr,0 ,LPC32XXAD_NAME , st);drivers/iio/adc/npcm_adc.c +1
-1@@ -225,7 +225,7 @@ static int npcm_adc_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <=0 ) { - ret = -EINVAL ; + ret = irq ? : -EINVAL ; goto err_disable_clk; }drivers/iio/adc/spear_adc.c +1
-1@@ -301,7 +301,7 @@ static int spear_adc_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <=0 ) { - ret = -EINVAL ; + ret = irq ? : -EINVAL ; goto errout2; }
Jonathan Cameron
maintainerRe: [PATCH v6 19/57] iio: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydQuoted 35 lines · On Tue, 30 Jul 2019 11:15:19 -0700 Stephen Boyd <[email protected]> wrote:
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>While we're here, remove braces on if statements that only have one statement (manually).
Quoted 7 lines
Cc Jonathan Cameron <[email protected]>Cc Hartmut Knaack <[email protected]>Cc Lars-Peter Clausen <[email protected]>Cc Peter Meerwald-Stadler <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>
Some fuzz due to other changes which is inevitable when a patch touches large numbers of drivers. Anyhow, nothing complex so fixed up and applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.
Thanks,
Jonathan
Quoted 334 lines
---
Please apply directly to subsystem trees
drivers/iio/adc/ad7606_par.c | 4 +--- drivers/iio/adc/at91_adc.c | 4 +--- drivers/iio/adc/axp288_adc.c | 4 +--- drivers/iio/adc/bcm_iproc_adc.c | 7 ++----- drivers/iio/adc/da9150-gpadc.c | 4 +--- drivers/iio/adc/envelope-detector.c | 5 +---- drivers/iio/adc/exynos_adc.c | 4 +--- drivers/iio/adc/fsl-imx25-gcq.c | 1 - drivers/iio/adc/imx7d_adc.c | 4 +--- drivers/iio/adc/lpc32xx_adc.c | 4 +--- drivers/iio/adc/npcm_adc.c | 1 - drivers/iio/adc/rockchip_saradc.c | 4 +--- drivers/iio/adc/sc27xx_adc.c | 4 +--- drivers/iio/adc/spear_adc.c | 1 - drivers/iio/adc/stm32-adc-core.c | 1 - drivers/iio/adc/stm32-adc.c | 4 +--- drivers/iio/adc/stm32-dfsdm-adc.c | 5 +---- drivers/iio/adc/sun4i-gpadc-iio.c | 4 +--- drivers/iio/adc/twl6030-gpadc.c | 4 +--- drivers/iio/adc/vf610_adc.c | 4 +--- 20 files changed, 17 insertions(+), 56 deletions(-)drivers/iio/adc/ad7606_par.c +1
-3@@ -53,10 +53,8 @@ static int ad7606_par_probe(struct platform_device *pdev)int irq; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"no irq: %d\n" , irq); +if (irq <0 )return irq; - } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); addr =devm_ioremap_resource (&pdev->dev, res);drivers/iio/adc/at91_adc.c +1
-3@@ -1179,10 +1179,8 @@ static int at91_adc_probe(struct platform_device *pdev) idev->info = &at91_adc_info; st->irq =platform_get_irq (pdev,0 ); -if (st->irq <0 ) { -dev_err (&pdev->dev,"No IRQ ID is designated\n" ); +if (st->irq <0 )return -ENODEV ; - } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );drivers/iio/adc/axp288_adc.c +1
-3@@ -225,10 +225,8 @@ static int axp288_adc_probe(struct platform_device *pdev) info =iio_priv (indio_dev); info->irq =platform_get_irq (pdev,0 ); -if (info->irq <0 ) { -dev_err (&pdev->dev,"no irq resource?\n" ); +if (info->irq <0 )return info->irq; - }platform_set_drvdata (pdev, indio_dev); info->regmap = axp20x->regmap;/* drivers/iio/adc/bcm_iproc_adc.c +2
-5@@ -540,11 +540,8 @@ static int iproc_adc_probe(struct platform_device *pdev) } adc_priv->irqno =platform_get_irq (pdev,0 ); -if (adc_priv->irqno <=0 ) { -dev_err (&pdev->dev,"platform_get_irq failed\n" ); - ret = -ENODEV ; -return ret; - } +if (adc_priv->irqno <=0 ) +return -ENODEV ; ret =regmap_update_bits (adc_priv->regmap,IPROC_REGCTL2 ,IPROC_ADC_AUXIN_SCAN_ENA ,0 );drivers/iio/adc/da9150-gpadc.c +1
-3@@ -337,10 +337,8 @@ static int da9150_gpadc_probe(struct platform_device *pdev)init_completion (&gpadc->complete); irq =platform_get_irq_byname (pdev,"GPADC" ); -if (irq <0 ) { -dev_err (dev,"Failed to get IRQ: %d\n" , irq); +if (irq <0 )return irq; - } ret =devm_request_threaded_irq (dev, irq,NULL , da9150_gpadc_irq,IRQF_ONESHOT ,"GPADC" , gpadc);drivers/iio/adc/envelope-detector.c +1
-4@@ -357,11 +357,8 @@ static int envelope_detector_probe(struct platform_device *pdev) } env->comp_irq =platform_get_irq_byname (pdev,"comp" ); -if (env->comp_irq <0 ) { -if (env->comp_irq != -EPROBE_DEFER ) -dev_err (dev,"failed to get compare interrupt\n" ); +if (env->comp_irq <0 )return env->comp_irq; - } ret =devm_request_irq (dev, env->comp_irq, envelope_detector_comp_isr,0 ,"envelope-detector" , env);drivers/iio/adc/exynos_adc.c +1
-3@@ -805,10 +805,8 @@ static int exynos_adc_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"no irq resource?\n" ); +if (irq <0 )return irq; - } info->irq = irq; irq =platform_get_irq (pdev,1 );drivers/iio/adc/fsl-imx25-gcq.c +0
-1@@ -340,7 +340,6 @@ static int mx25_gcq_probe(struct platform_device *pdev) priv->irq =platform_get_irq (pdev,0 );if (priv->irq <=0 ) { -dev_err (dev,"Failed to get IRQ\n" ); ret = priv->irq;if (!ret) ret = -ENXIO ;drivers/iio/adc/imx7d_adc.c +1
-3@@ -492,10 +492,8 @@ static int imx7d_adc_probe(struct platform_device *pdev)return PTR_ERR (info->regs); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"No irq resource?\n" ); +if (irq <0 )return irq; - } info->clk =devm_clk_get (dev,"adc" );if (IS_ERR (info->clk)) {drivers/iio/adc/lpc32xx_adc.c +1
-3@@ -172,10 +172,8 @@ static int lpc32xx_adc_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (&pdev->dev,"failed getting interrupt resource\n" ); +if (irq <=0 )return -ENXIO ; - } retval =devm_request_irq (&pdev->dev, irq, lpc32xx_adc_isr,0 ,LPC32XXAD_NAME , st);drivers/iio/adc/npcm_adc.c +0
-1@@ -225,7 +225,6 @@ static int npcm_adc_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <=0 ) { -dev_err (dev,"failed getting interrupt resource\n" ); ret = -EINVAL ; goto err_disable_clk; }drivers/iio/adc/rockchip_saradc.c +1
-3@@ -244,10 +244,8 @@ static int rockchip_saradc_probe(struct platform_device *pdev)init_completion (&info->completion); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"no irq resource?\n" ); +if (irq <0 )return irq; - } ret =devm_request_irq (&pdev->dev, irq, rockchip_saradc_isr,0 ,dev_name (&pdev->dev), info);drivers/iio/adc/sc27xx_adc.c +1
-3@@ -528,10 +528,8 @@ static int sc27xx_adc_probe(struct platform_device *pdev) } sc27xx_data->irq =platform_get_irq (pdev,0 ); -if (sc27xx_data->irq <0 ) { -dev_err (&pdev->dev,"failed to get ADC irq number\n" ); +if (sc27xx_data->irq <0 )return sc27xx_data->irq; - } ret =of_hwspin_lock_get_id (np,0 );if (ret <0 ) {drivers/iio/adc/spear_adc.c +0
-1@@ -301,7 +301,6 @@ static int spear_adc_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <=0 ) { -dev_err (dev,"failed getting interrupt resource\n" ); ret = -EINVAL ; goto errout2; }drivers/iio/adc/stm32-adc-core.c +0
-1@@ -349,7 +349,6 @@ static int stm32_adc_irq_probe(struct platform_device *pdev,*/ if (i && priv->irq[i] == -ENXIO )continue ; -dev_err (&pdev->dev,"failed to get irq\n" );return priv->irq[i]; }drivers/iio/adc/stm32-adc.c +1
-3@@ -1919,10 +1919,8 @@ static int stm32_adc_probe(struct platform_device *pdev) } adc->irq =platform_get_irq (pdev,0 ); -if (adc->irq <0 ) { -dev_err (&pdev->dev,"failed to get irq\n" ); +if (adc->irq <0 )return adc->irq; - } ret =devm_request_irq (&pdev->dev, adc->irq, stm32_adc_isr,0 , pdev->name, adc);drivers/iio/adc/stm32-dfsdm-adc.c +1
-4@@ -1601,11 +1601,8 @@ static int stm32_dfsdm_adc_probe(struct platform_device *pdev)* So IRQ associated to filter instance 0 is dedicated to the Filter 0. */ irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -if (irq != -EPROBE_DEFER ) -dev_err (dev,"Failed to get IRQ: %d\n" , irq); +if (irq <0 )return irq; - } ret =devm_request_irq (dev, irq, stm32_dfsdm_irq,0 , pdev->name, adc);drivers/iio/adc/sun4i-gpadc-iio.c +1
-3@@ -460,10 +460,8 @@ static int sun4i_irq_init(struct platform_device *pdev, const char *name,atomic_set (atomic,1 ); ret =platform_get_irq_byname (pdev, name); -if (ret <0 ) { -dev_err (&pdev->dev,"no %s interrupt registered\n" , name); +if (ret <0 )return ret; - } ret =regmap_irq_get_virq (mfd_dev->regmap_irqc, ret);if (ret <0 ) {drivers/iio/adc/twl6030-gpadc.c +1
-3@@ -905,10 +905,8 @@ static int twl6030_gpadc_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get irq\n" ); +if (irq <0 )return irq; - } ret = devm_request_threaded_irq(dev, irq, NULL, twl6030_gpadc_irq_handler,drivers/iio/adc/vf610_adc.c +1
-3@@ -821,10 +821,8 @@ static int vf610_adc_probe(struct platform_device *pdev)return PTR_ERR (info->regs); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"no irq resource?\n" ); +if (irq <0 )return irq; - } ret = devm_request_irq(info->dev, irq, vf610_adc_isr, 0,
PATCH v6 20/57 infiniband: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/infiniband/hw/hns/hns_roce_hw_v1.c +1 -3
@@ -4637,10 +4637,8 @@ static int hns_roce_get_cfg(struct hns_roce_dev *hr_dev)/* fetch the interrupt numbers */ for (i =0 ; i <HNS_ROCE_V1_MAX_IRQ_NUM ; i++) { hr_dev->irq[i] =platform_get_irq (hr_dev->pdev, i); -if (hr_dev->irq[i] <=0 ) { -dev_err (dev,"platform get of irq[=%d] failed!\n" , i); +if (hr_dev->irq[i] <=0 )return -EINVAL ; - } }return 0 ;
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 20/57] infiniband: Remove dev_err() usage after platform_get_irq()
Quoted 34 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-5-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... } -dev_err(...);)
...
}
// </smpl>While we're here, remove braces on if statements that only have one statement (manually).
Quoted 9 lines
Cc Doug Ledford <[email protected]>Cc Jason Gunthorpe <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
Thanks for being clear about where you wanted these applied. This patch applied to rdma for-next, thanks.
Signature · 3 lines
Doug Ledford <[email protected]> GPG KeyID: B826A3330E572FDD Fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
PATCH v6 21/57 Input: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/input/keyboard/bcm-keypad.c | 4 +--- drivers/input/keyboard/davinci_keyscan.c | 1 - drivers/input/keyboard/imx_keypad.c | 4 +--- drivers/input/keyboard/lpc32xx-keys.c | 4 +--- drivers/input/keyboard/nomadik-ske-keypad.c | 4 +--- drivers/input/keyboard/nspire-keypad.c | 4 +--- drivers/input/keyboard/opencores-kbd.c | 4 +--- drivers/input/keyboard/pmic8xxx-keypad.c | 8 ++------ drivers/input/keyboard/pxa27x_keypad.c | 4 +--- drivers/input/keyboard/pxa930_rotary.c | 4 +--- drivers/input/keyboard/sh_keysc.c | 4 +--- drivers/input/keyboard/snvs_pwrkey.c | 4 +--- drivers/input/keyboard/spear-keyboard.c | 4 +--- drivers/input/keyboard/st-keyscan.c | 4 +--- drivers/input/keyboard/tegra-kbc.c | 4 +--- drivers/input/keyboard/w90p910_keypad.c | 4 +--- drivers/input/misc/88pm80x_onkey.c | 1 - drivers/input/misc/88pm860x_onkey.c | 4 +--- drivers/input/misc/ab8500-ponkey.c | 8 ++------ drivers/input/misc/axp20x-pek.c | 10 ++-------- drivers/input/misc/da9055_onkey.c | 5 +---- drivers/input/misc/da9063_onkey.c | 7 ++----- drivers/input/misc/e3x0-button.c | 10 ++-------- drivers/input/misc/hisi_powerkey.c | 8 ++------ drivers/input/misc/max8925_onkey.c | 8 ++------ drivers/input/misc/pm8941-pwrkey.c | 4 +--- drivers/input/misc/rk805-pwrkey.c | 8 ++------ drivers/input/misc/stpmic1_onkey.c | 10 ++-------- drivers/input/misc/tps65218-pwrbutton.c | 4 +--- drivers/input/misc/twl6040-vibra.c | 4 +--- drivers/input/mouse/pxa930_trkball.c | 4 +--- drivers/input/serio/arc_ps2.c | 4 +--- drivers/input/serio/ps2-gpio.c | 2 -- drivers/input/touchscreen/88pm860x-ts.c | 4 +--- drivers/input/touchscreen/bcm_iproc_tsc.c | 4 +--- drivers/input/touchscreen/fsl-imx25-tcq.c | 4 +--- drivers/input/touchscreen/imx6ul_tsc.c | 8 ++------ drivers/input/touchscreen/lpc32xx_ts.c | 4 +--- 38 files changed, 45 insertions(+), 145 deletions(-)
drivers/input/keyboard/bcm-keypad.c +1 -3
@@ -413,10 +413,8 @@ static int bcm_kp_probe(struct platform_device *pdev)bcm_kp_stop (kp); kp->irq =platform_get_irq (pdev,0 ); -if (kp->irq <0 ) { -dev_err (&pdev->dev,"no IRQ specified\n" ); +if (kp->irq <0 )return -EINVAL ; - } error = devm_request_threaded_irq(&pdev->dev, kp->irq, NULL, bcm_kp_isr_thread,
drivers/input/keyboard/davinci_keyscan.c +0 -1
@@ -192,7 +192,6 @@ static int __init davinci_ks_probe(struct platform_device *pdev) davinci_ks->irq =platform_get_irq (pdev,0 );if (davinci_ks->irq <0 ) { -dev_err (dev,"no key scan irq\n" ); error = davinci_ks->irq; goto fail2; }
drivers/input/keyboard/imx_keypad.c +1 -3
@@ -430,10 +430,8 @@ static int imx_keypad_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"no irq defined in platform data\n" ); +if (irq <0 )return irq; - } input_dev =devm_input_allocate_device (&pdev->dev);if (!input_dev) {
drivers/input/keyboard/lpc32xx-keys.c +1 -3
@@ -172,10 +172,8 @@ static int lpc32xx_kscan_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get platform irq\n" ); +if (irq <0 )return -EINVAL ; - } kscandat =devm_kzalloc (&pdev->dev,sizeof (*kscandat),GFP_KERNEL );
drivers/input/keyboard/nomadik-ske-keypad.c +1 -3
@@ -235,10 +235,8 @@ static int __init ske_keypad_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get keypad irq\n" ); +if (irq <0 )return -EINVAL ; - } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (!res) {
drivers/input/keyboard/nspire-keypad.c +1 -3
@@ -165,10 +165,8 @@ static int nspire_keypad_probe(struct platform_device *pdev)int error; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get keypad irq\n" ); +if (irq <0 )return -EINVAL ; - } keypad =devm_kzalloc (&pdev->dev,sizeof (struct nspire_keypad ),GFP_KERNEL );
drivers/input/keyboard/opencores-kbd.c +1 -3
@@ -49,10 +49,8 @@ static int opencores_kbd_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"missing board IRQ resource\n" ); +if (irq <0 )return -EINVAL ; - } opencores_kbd =devm_kzalloc (&pdev->dev,sizeof (*opencores_kbd),GFP_KERNEL );
drivers/input/keyboard/pmic8xxx-keypad.c +2 -6
@@ -544,16 +544,12 @@ static int pmic8xxx_kp_probe(struct platform_device *pdev) } kp->key_sense_irq =platform_get_irq (pdev,0 ); -if (kp->key_sense_irq <0 ) { -dev_err (&pdev->dev,"unable to get keypad sense irq\n" ); +if (kp->key_sense_irq <0 )return kp->key_sense_irq; - } kp->key_stuck_irq =platform_get_irq (pdev,1 ); -if (kp->key_stuck_irq <0 ) { -dev_err (&pdev->dev,"unable to get keypad stuck irq\n" ); +if (kp->key_stuck_irq <0 )return kp->key_stuck_irq; - } kp->input->name ="PMIC8XXX keypad" ; kp->input->phys ="pmic8xxx_keypad/input0" ;
drivers/input/keyboard/pxa27x_keypad.c +1 -3
@@ -727,10 +727,8 @@ static int pxa27x_keypad_probe(struct platform_device *pdev)return -EINVAL ; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get keypad irq\n" ); +if (irq <0 )return -ENXIO ; - } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (res ==NULL ) {
drivers/input/keyboard/pxa930_rotary.c +1 -3
@@ -89,10 +89,8 @@ static int pxa930_rotary_probe(struct platform_device *pdev)int err; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"no irq for rotary controller\n" ); +if (irq <0 )return -ENXIO ; - } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (!res) {
drivers/input/keyboard/sh_keysc.c +1 -3
@@ -181,10 +181,8 @@ static int sh_keysc_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get irq\n" ); +if (irq <0 ) goto err0; - } priv =kzalloc (sizeof (*priv),GFP_KERNEL );if (priv ==NULL ) {
drivers/input/keyboard/snvs_pwrkey.c +1 -3
@@ -118,10 +118,8 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev) pdata->wakeup =of_property_read_bool (np,"wakeup-source" ); pdata->irq =platform_get_irq (pdev,0 ); -if (pdata->irq <0 ) { -dev_err (&pdev->dev,"no irq defined in platform data\n" ); +if (pdata->irq <0 )return -EINVAL ; - }regmap_update_bits (pdata->snvs,SNVS_LPCR_REG ,SNVS_LPCR_DEP_EN ,SNVS_LPCR_DEP_EN );
drivers/input/keyboard/spear-keyboard.c +1 -3
@@ -191,10 +191,8 @@ static int spear_kbd_probe(struct platform_device *pdev)int error; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"not able to get irq for the device\n" ); +if (irq <0 )return irq; - } kbd =devm_kzalloc (&pdev->dev,sizeof (*kbd),GFP_KERNEL );if (!kbd) {
drivers/input/keyboard/st-keyscan.c +1 -3
@@ -187,10 +187,8 @@ static int keyscan_probe(struct platform_device *pdev)keyscan_stop (keypad_data); keypad_data->irq =platform_get_irq (pdev,0 ); -if (keypad_data->irq <0 ) { -dev_err (&pdev->dev,"no IRQ specified\n" ); +if (keypad_data->irq <0 )return -EINVAL ; - } error =devm_request_irq (&pdev->dev, keypad_data->irq, keyscan_isr,0 , pdev->name, keypad_data);
drivers/input/keyboard/tegra-kbc.c +1 -3
@@ -631,10 +631,8 @@ static int tegra_kbc_probe(struct platform_device *pdev)return -EINVAL ; kbc->irq =platform_get_irq (pdev,0 ); -if (kbc->irq <0 ) { -dev_err (&pdev->dev,"failed to get keyboard IRQ\n" ); +if (kbc->irq <0 )return -ENXIO ; - } kbc->idev =devm_input_allocate_device (&pdev->dev);if (!kbc->idev) {
drivers/input/keyboard/w90p910_keypad.c +1 -3
@@ -132,10 +132,8 @@ static int w90p910_keypad_probe(struct platform_device *pdev) keymap_data = pdata->keymap_data; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get keypad irq\n" ); +if (irq <0 )return -ENXIO ; - } keypad =kzalloc (sizeof (struct w90p910_keypad ),GFP_KERNEL ); input_dev =input_allocate_device ();
drivers/input/misc/88pm80x_onkey.c +0 -1
@@ -77,7 +77,6 @@ static int pm80x_onkey_probe(struct platform_device *pdev) info->irq =platform_get_irq (pdev,0 );if (info->irq <0 ) { -dev_err (&pdev->dev,"No IRQ resource!\n" ); err = -EINVAL ; goto out; }
drivers/input/misc/88pm860x_onkey.c +1 -3
@@ -64,10 +64,8 @@ static int pm860x_onkey_probe(struct platform_device *pdev)int irq, ret; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"No IRQ resource!\n" ); +if (irq <0 )return -EINVAL ; - } info =devm_kzalloc (&pdev->dev,sizeof (struct pm860x_onkey_info ),GFP_KERNEL );
drivers/input/misc/ab8500-ponkey.c +2 -6
@@ -55,16 +55,12 @@ static int ab8500_ponkey_probe(struct platform_device *pdev)int error; irq_dbf =platform_get_irq_byname (pdev,"ONKEY_DBF" ); -if (irq_dbf <0 ) { -dev_err (&pdev->dev,"No IRQ for ONKEY_DBF, error=%d\n" , irq_dbf); +if (irq_dbf <0 )return irq_dbf; - } irq_dbr =platform_get_irq_byname (pdev,"ONKEY_DBR" ); -if (irq_dbr <0 ) { -dev_err (&pdev->dev,"No IRQ for ONKEY_DBR, error=%d\n" , irq_dbr); +if (irq_dbr <0 )return irq_dbr; - } ponkey =devm_kzalloc (&pdev->dev,sizeof (struct ab8500_ponkey ),GFP_KERNEL );
drivers/input/misc/axp20x-pek.c +2 -8
@@ -232,20 +232,14 @@ static int axp20x_pek_probe_input_device(struct axp20x_pek *axp20x_pek,int error; axp20x_pek->irq_dbr =platform_get_irq_byname (pdev,"PEK_DBR" ); -if (axp20x_pek->irq_dbr <0 ) { -dev_err (&pdev->dev,"No IRQ for PEK_DBR, error=%d\n" , - axp20x_pek->irq_dbr); +if (axp20x_pek->irq_dbr <0 )return axp20x_pek->irq_dbr; - } axp20x_pek->irq_dbr =regmap_irq_get_virq (axp20x->regmap_irqc, axp20x_pek->irq_dbr); axp20x_pek->irq_dbf =platform_get_irq_byname (pdev,"PEK_DBF" ); -if (axp20x_pek->irq_dbf <0 ) { -dev_err (&pdev->dev,"No IRQ for PEK_DBF, error=%d\n" , - axp20x_pek->irq_dbf); +if (axp20x_pek->irq_dbf <0 )return axp20x_pek->irq_dbf; - } axp20x_pek->irq_dbf =regmap_irq_get_virq (axp20x->regmap_irqc, axp20x_pek->irq_dbf);
drivers/input/misc/da9055_onkey.c +1 -4
@@ -76,11 +76,8 @@ static int da9055_onkey_probe(struct platform_device *pdev)int irq, err; irq =platform_get_irq_byname (pdev,"ONKEY" ); -if (irq <0 ) { -dev_err (&pdev->dev, -"Failed to get an IRQ for input device, %d\n" , irq); +if (irq <0 )return -EINVAL ; - } onkey =devm_kzalloc (&pdev->dev,sizeof (*onkey),GFP_KERNEL );if (!onkey) {
drivers/input/misc/da9063_onkey.c +2 -5
@@ -248,11 +248,8 @@ static int da9063_onkey_probe(struct platform_device *pdev) } irq =platform_get_irq_byname (pdev,"ONKEY" ); -if (irq <0 ) { - error = irq; -dev_err (&pdev->dev,"Failed to get platform IRQ: %d\n" , error); -return error; - } +if (irq <0 ) +return irq; error = devm_request_threaded_irq(&pdev->dev, irq, NULL, da9063_onkey_irq_handler,
drivers/input/misc/e3x0-button.c +2 -8
@@ -65,18 +65,12 @@ static int e3x0_button_probe(struct platform_device *pdev)int error; irq_press =platform_get_irq_byname (pdev,"press" ); -if (irq_press <0 ) { -dev_err (&pdev->dev,"No IRQ for 'press', error=%d\n" , - irq_press); +if (irq_press <0 )return irq_press; - } irq_release =platform_get_irq_byname (pdev,"release" ); -if (irq_release <0 ) { -dev_err (&pdev->dev,"No IRQ for 'release', error=%d\n" , - irq_release); +if (irq_release <0 )return irq_release; - } input =devm_input_allocate_device (&pdev->dev);if (!input)
drivers/input/misc/hisi_powerkey.c +2 -6
@@ -90,12 +90,8 @@ static int hi65xx_powerkey_probe(struct platform_device *pdev)for (i =0 ; i <ARRAY_SIZE (hi65xx_irq_info); i++) { irq =platform_get_irq_byname (pdev, hi65xx_irq_info[i].name); -if (irq <0 ) { - error = irq; -dev_err (dev,"couldn't get irq %s: %d\n" , - hi65xx_irq_info[i].name, error); -return error; - } +if (irq <0 ) +return irq; error = devm_request_any_context_irq(dev, irq, hi65xx_irq_info[i].handler,
drivers/input/misc/max8925_onkey.c +2 -6
@@ -71,16 +71,12 @@ static int max8925_onkey_probe(struct platform_device *pdev)int irq[2 ], error; irq[0 ] =platform_get_irq (pdev,0 ); -if (irq[0 ] <0 ) { -dev_err (&pdev->dev,"No IRQ resource!\n" ); +if (irq[0 ] <0 )return -EINVAL ; - } irq[1 ] =platform_get_irq (pdev,1 ); -if (irq[1 ] <0 ) { -dev_err (&pdev->dev,"No IRQ resource!\n" ); +if (irq[1 ] <0 )return -EINVAL ; - } info =devm_kzalloc (&pdev->dev,sizeof (struct max8925_onkey_info ),GFP_KERNEL );
drivers/input/misc/pm8941-pwrkey.c +1 -3
@@ -205,10 +205,8 @@ static int pm8941_pwrkey_probe(struct platform_device *pdev)return error; pwrkey->irq =platform_get_irq (pdev,0 ); -if (pwrkey->irq <0 ) { -dev_err (&pdev->dev,"failed to get irq\n" ); +if (pwrkey->irq <0 )return pwrkey->irq; - } error =regmap_read (pwrkey->regmap, pwrkey->baseaddr +PON_REV2 , &pwrkey->revision);
drivers/input/misc/rk805-pwrkey.c +2 -6
@@ -53,16 +53,12 @@ static int rk805_pwrkey_probe(struct platform_device *pdev)input_set_capability (pwr,EV_KEY ,KEY_POWER ); fall_irq =platform_get_irq (pdev,0 ); -if (fall_irq <0 ) { -dev_err (&pdev->dev,"Can't get fall irq: %d\n" , fall_irq); +if (fall_irq <0 )return fall_irq; - } rise_irq =platform_get_irq (pdev,1 ); -if (rise_irq <0 ) { -dev_err (&pdev->dev,"Can't get rise irq: %d\n" , rise_irq); +if (rise_irq <0 )return rise_irq; - } err = devm_request_any_context_irq(&pwr->dev, fall_irq, pwrkey_fall_irq,
drivers/input/misc/stpmic1_onkey.c +2 -8
@@ -61,18 +61,12 @@ static int stpmic1_onkey_probe(struct platform_device *pdev)return -ENOMEM ; onkey->irq_falling =platform_get_irq_byname (pdev,"onkey-falling" ); -if (onkey->irq_falling <0 ) { -dev_err (dev,"failed: request IRQ onkey-falling %d\n" , - onkey->irq_falling); +if (onkey->irq_falling <0 )return onkey->irq_falling; - } onkey->irq_rising =platform_get_irq_byname (pdev,"onkey-rising" ); -if (onkey->irq_rising <0 ) { -dev_err (dev,"failed: request IRQ onkey-rising %d\n" , - onkey->irq_rising); +if (onkey->irq_rising <0 )return onkey->irq_rising; - }if (!device_property_read_u32 (dev,"power-off-time-sec" , &val)) {if (val >0 && val <=16 ) {
drivers/input/misc/tps65218-pwrbutton.c +1 -3
@@ -124,10 +124,8 @@ static int tps6521x_pb_probe(struct platform_device *pdev)device_init_wakeup (dev, true); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"No IRQ resource!\n" ); +if (irq <0 )return -EINVAL ; - } error = devm_request_threaded_irq(dev, irq, NULL, tps6521x_pb_irq, IRQF_TRIGGER_RISING |
drivers/input/misc/twl6040-vibra.c +1 -3
@@ -272,10 +272,8 @@ static int twl6040_vibra_probe(struct platform_device *pdev) } info->irq =platform_get_irq (pdev,0 ); -if (info->irq <0 ) { -dev_err (info->dev,"invalid irq\n" ); +if (info->irq <0 )return -EINVAL ; - } error = devm_request_threaded_irq(&pdev->dev, info->irq, NULL, twl6040_vib_irq_handler,
drivers/input/mouse/pxa930_trkball.c +1 -3
@@ -147,10 +147,8 @@ static int pxa930_trkball_probe(struct platform_device *pdev)int irq, error; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get trkball irq\n" ); +if (irq <0 )return -ENXIO ; - } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (!res) {
drivers/input/serio/arc_ps2.c +1 -3
@@ -187,10 +187,8 @@ static int arc_ps2_probe(struct platform_device *pdev)int error, id, i; irq =platform_get_irq_byname (pdev,"arc_ps2_irq" ); -if (irq <0 ) { -dev_err (&pdev->dev,"no IRQ defined\n" ); +if (irq <0 )return -EINVAL ; - } arc_ps2 =devm_kzalloc (&pdev->dev,sizeof (struct arc_ps2_data ),GFP_KERNEL );
drivers/input/serio/ps2-gpio.c +0 -2
@@ -369,8 +369,6 @@ static int ps2_gpio_probe(struct platform_device *pdev) drvdata->irq =platform_get_irq (pdev,0 );if (drvdata->irq <0 ) { -dev_err (dev,"failed to get irq from platform resource: %d\n" , - drvdata->irq); error = drvdata->irq; goto err_free_serio; }
drivers/input/touchscreen/88pm860x-ts.c +1 -3
@@ -185,10 +185,8 @@ static int pm860x_touch_probe(struct platform_device *pdev)int irq, ret, res_x =0 , data =0 ; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"No IRQ resource!\n" ); +if (irq <0 )return -EINVAL ; - }if (pm860x_touch_dt_init (pdev, chip, &res_x)) {if (pdata) {
drivers/input/touchscreen/bcm_iproc_tsc.c +1 -3
@@ -489,10 +489,8 @@ static int iproc_ts_probe(struct platform_device *pdev)/* get interrupt */ irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"platform_get_irq failed: %d\n" , irq); +if (irq <0 )return irq; - } error = devm_request_irq(&pdev->dev, irq, iproc_touchscreen_interrupt,
drivers/input/touchscreen/fsl-imx25-tcq.c +1 -3
@@ -528,10 +528,8 @@ static int mx25_tcq_probe(struct platform_device *pdev) } priv->irq =platform_get_irq (pdev,0 ); -if (priv->irq <=0 ) { -dev_err (dev,"Failed to get IRQ\n" ); +if (priv->irq <=0 )return priv->irq; - } idev =devm_input_allocate_device (dev);if (!idev) {
drivers/input/touchscreen/imx6ul_tsc.c +2 -6
@@ -430,16 +430,12 @@ static int imx6ul_tsc_probe(struct platform_device *pdev) } tsc_irq =platform_get_irq (pdev,0 ); -if (tsc_irq <0 ) { -dev_err (&pdev->dev,"no tsc irq resource?\n" ); +if (tsc_irq <0 )return tsc_irq; - } adc_irq =platform_get_irq (pdev,1 ); -if (adc_irq <0 ) { -dev_err (&pdev->dev,"no adc irq resource?\n" ); +if (adc_irq <0 )return adc_irq; - } err = devm_request_threaded_irq(tsc->dev, tsc_irq, NULL, tsc_irq_fn, IRQF_ONESHOT,
drivers/input/touchscreen/lpc32xx_ts.c +1 -3
@@ -212,10 +212,8 @@ static int lpc32xx_ts_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"Can't get interrupt resource\n" ); +if (irq <0 )return irq; - } tsc =kzalloc (sizeof (*tsc),GFP_KERNEL ); input =input_allocate_device ();
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 21/57] Input: Remove dev_err() usage after platform_get_irq()
Quoted 32 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>
Quoted 7 lines
While we're here, remove braces on if statements that only have one statement (manually).
Cc Dmitry Torokhov <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>
Applied, thank you.
Signature · 1 line
Dmitry
PATCH v6 22/57 iommu: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/iommu/exynos-iommu.c | 4 +--- drivers/iommu/msm_iommu.c | 1 - drivers/iommu/qcom_iommu.c | 4 +--- 3 files changed, 2 insertions(+), 7 deletions(-)
drivers/iommu/exynos-iommu.c +1 -3
@@ -583,10 +583,8 @@ static int __init exynos_sysmmu_probe(struct platform_device *pdev)return PTR_ERR (data->sfrbase); irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (dev,"Unable to find IRQ resource\n" ); +if (irq <=0 )return irq; - } ret =devm_request_irq (dev, irq, exynos_sysmmu_irq,0 ,dev_name (dev), data);
drivers/iommu/msm_iommu.c +0 -1
@@ -750,7 +750,6 @@ static int msm_iommu_probe(struct platform_device *pdev) iommu->irq =platform_get_irq (pdev,0 );if (iommu->irq <0 ) { -dev_err (iommu->dev,"could not get iommu irq\n" ); ret = -ENODEV ; goto fail; }
drivers/iommu/qcom_iommu.c +1 -3
@@ -696,10 +696,8 @@ static int qcom_iommu_ctx_probe(struct platform_device *pdev)return PTR_ERR (ctx->base); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"failed to get irq\n" ); +if (irq <0 )return -ENODEV ; - }/* clear IRQs before registering fault handler, just in case the * boot-loader left us a surprise:
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 22/57] iommu: Remove dev_err() usage after platform_get_irq()
Quoted 1 line · Stephen Boyd
Please apply directly to subsystem trees
Applied, thanks.
PATCH v6 23/57 irqchip: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/irqchip/irq-imgpdc.c | 8 ++------ drivers/irqchip/irq-keystone.c | 4 +--- drivers/irqchip/qcom-irq-combiner.c | 4 +--- 3 files changed, 4 insertions(+), 12 deletions(-)
drivers/irqchip/irq-imgpdc.c +2 -6
@@ -362,10 +362,8 @@ static int pdc_intc_probe(struct platform_device *pdev) }for (i =0 ; i < priv->nr_perips; ++i) { irq =platform_get_irq (pdev,1 + i); -if (irq <0 ) { -dev_err (&pdev->dev,"cannot find perip IRQ #%u\n" , i); +if (irq <0 )return irq; - } priv->perip_irqs[i] = irq; }/* check if too many were provided */
@@ -376,10 +374,8 @@ static int pdc_intc_probe(struct platform_device *pdev)/* Get syswake IRQ number */ irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"cannot find syswake IRQ\n" ); +if (irq <0 )return irq; - } priv->syswake_irq = irq;/* Set up an IRQ domain */
drivers/irqchip/irq-keystone.c +1 -3
@@ -164,10 +164,8 @@ static int keystone_irq_probe(struct platform_device *pdev) } kirq->irq =platform_get_irq (pdev,0 ); -if (kirq->irq <0 ) { -dev_err (dev,"no irq resource %d\n" , kirq->irq); +if (kirq->irq <0 )return kirq->irq; - } kirq->dev = dev; kirq->mask = ~0x0 ;
drivers/irqchip/qcom-irq-combiner.c +1 -3
@@ -248,10 +248,8 @@ static int __init combiner_probe(struct platform_device *pdev)return err; combiner->parent_irq =platform_get_irq (pdev,0 ); -if (combiner->parent_irq <=0 ) { -dev_err (&pdev->dev,"Error getting IRQ resource\n" ); +if (combiner->parent_irq <=0 )return -EPROBE_DEFER ; - } combiner->domain =irq_domain_create_linear (pdev->dev.fwnode, combiner->nirqs, &domain_ops, combiner);
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 23/57] irqchip: Remove dev_err() usage after platform_get_irq()
Hi Stephen,
Quoted 54 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>While we're here, remove braces on if statements that only have one statement (manually).
Cc Thomas Gleixner <[email protected]>Cc Jason Cooper <[email protected]>Cc Marc Zyngier <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
drivers/irqchip/irq-imgpdc.c | 8 ++------ drivers/irqchip/irq-keystone.c | 4 +--- drivers/irqchip/qcom-irq-combiner.c | 4 +--- 3 files changed, 4 insertions(+), 12 deletions(-)drivers/irqchip/irq-imgpdc.c +0
-0
drivers/irqchip/irq-imgpdc.c static int pdc_intc_probe(struct platform_device *pdev) · line 365
Quoted 6 lines
drivers/irqchip/irq-imgpdc.c +1
-2@@ -362,10 +362,8 @@ static int pdc_intc_probe(struct platform_device *pdev) }for (i =0 ; i < priv->nr_perips; ++i) { irq =platform_get_irq (pdev,1 + i); -if (irq <0 ) { -dev_err (&pdev->dev,"cannot find perip IRQ #%u\n" , i); +if (irq <0 )
There's a bug here. irq == 0 *is* an error. Same thing for the next two hunks. Nothing wrong with your patch though.
I guess I'll fix it on top as I apply it.
Thanks,
M.
Signature · 1 line
Jazz is not dead. It just smells funny...
PATCH v6 24/57 mailbox: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/mailbox/armada-37xx-rwtm-mailbox.c | 4 +--- drivers/mailbox/platform_mhu.c | 4 +--- drivers/mailbox/stm32-ipcc.c | 5 ----- drivers/mailbox/zynqmp-ipi-mailbox.c | 4 +--- 4 files changed, 3 insertions(+), 14 deletions(-)
drivers/mailbox/armada-37xx-rwtm-mailbox.c +1 -3
@@ -165,10 +165,8 @@ static int armada_37xx_mbox_probe(struct platform_device *pdev) } mbox->irq =platform_get_irq (pdev,0 ); -if (mbox->irq <0 ) { -dev_err (&pdev->dev,"Cannot get irq\n" ); +if (mbox->irq <0 )return mbox->irq; - } mbox->dev = &pdev->dev;
drivers/mailbox/platform_mhu.c +1 -3
@@ -137,10 +137,8 @@ static int platform_mhu_probe(struct platform_device *pdev)for (i =0 ; i <MHU_CHANS ; i++) { mhu->chan[i].con_priv = &mhu->mlink[i]; mhu->mlink[i].irq =platform_get_irq (pdev, i); -if (mhu->mlink[i].irq <0 ) { -dev_err (dev,"failed to get irq%d\n" , i); +if (mhu->mlink[i].irq <0 )return mhu->mlink[i].irq; - } mhu->mlink[i].rx_reg = mhu->base + platform_mhu_reg[i]; mhu->mlink[i].tx_reg = mhu->mlink[i].rx_reg +TX_REG_OFFSET ; }
drivers/mailbox/stm32-ipcc.c +0 -5
@@ -258,9 +258,6 @@ static int stm32_ipcc_probe(struct platform_device *pdev)for (i =0 ; i <IPCC_IRQ_NUM ; i++) { ipcc->irqs[i] =platform_get_irq_byname (pdev, irq_name[i]);if (ipcc->irqs[i] <0 ) { -if (ipcc->irqs[i] != -EPROBE_DEFER ) -dev_err (dev,"no IRQ specified %s\n" , - irq_name[i]); ret = ipcc->irqs[i]; goto err_clk; }
@@ -284,8 +281,6 @@ static int stm32_ipcc_probe(struct platform_device *pdev)if (of_property_read_bool (np,"wakeup-source" )) { ipcc->wkp =platform_get_irq_byname (pdev,"wakeup" );if (ipcc->wkp <0 ) { -if (ipcc->wkp != -EPROBE_DEFER ) -dev_err (dev,"could not get wakeup IRQ\n" ); ret = ipcc->wkp; goto err_clk; }
drivers/mailbox/zynqmp-ipi-mailbox.c +1 -3
@@ -668,10 +668,8 @@ static int zynqmp_ipi_probe(struct platform_device *pdev)/* IPI IRQ */ ret =platform_get_irq (pdev,0 ); -if (ret <0 ) { -dev_err (dev,"unable to find IPI IRQ.\n" ); +if (ret <0 ) goto free_mbox_dev; - } pdata->irq = ret; ret =devm_request_irq (dev, pdata->irq, zynqmp_ipi_interrupt,IRQF_SHARED ,dev_name (dev), pdata);
Signature · 1 line
Sent by a computer through tubes
PATCH v6 25/57 media: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/media/platform/am437x/am437x-vpfe.c | 1 - drivers/media/platform/atmel/atmel-sama5d2-isc.c | 7 ++----- drivers/media/platform/exynos4-is/mipi-csis.c | 4 +--- drivers/media/platform/imx-pxp.c | 4 +--- drivers/media/platform/omap3isp/isp.c | 1 - drivers/media/platform/renesas-ceu.c | 4 +--- drivers/media/platform/rockchip/rga/rga.c | 1 - drivers/media/platform/s3c-camif/camif-core.c | 4 +--- drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 8 ++------ drivers/media/platform/sti/hva/hva-hw.c | 8 ++------ drivers/media/platform/stm32/stm32-dcmi.c | 5 +---- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 7 ++----- drivers/media/rc/img-ir/img-ir-core.c | 4 +--- drivers/media/rc/ir-hix5hd2.c | 4 +--- drivers/media/rc/meson-ir.c | 4 +--- drivers/media/rc/mtk-cir.c | 4 +--- drivers/media/rc/sunxi-cir.c | 1 - 17 files changed, 17 insertions(+), 54 deletions(-)
drivers/media/platform/am437x/am437x-vpfe.c +0 -1
@@ -2557,7 +2557,6 @@ static int vpfe_probe(struct platform_device *pdev) ret =platform_get_irq (pdev,0 );if (ret <=0 ) { -dev_err (&pdev->dev,"No IRQ resource\n" ); ret = -ENODEV ; goto probe_out_cleanup; }
drivers/media/platform/atmel/atmel-sama5d2-isc.c +2 -5
@@ -160,11 +160,8 @@ static int atmel_isc_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { - ret = irq; -dev_err (dev,"failed to get irq: %d\n" , ret); -return ret; - } +if (irq <0 ) +return irq; ret =devm_request_irq (dev, irq, isc_interrupt,0 ,ATMEL_ISC_NAME , isc);
drivers/media/platform/exynos4-is/mipi-csis.c +1 -3
@@ -803,10 +803,8 @@ static int s5pcsis_probe(struct platform_device *pdev)return PTR_ERR (state->regs); state->irq =platform_get_irq (pdev,0 ); -if (state->irq <0 ) { -dev_err (dev,"Failed to get irq\n" ); +if (state->irq <0 )return state->irq; - }for (i =0 ; i <CSIS_NUM_SUPPLIES ; i++) state->supplies[i].supply = csis_supply_name[i];
drivers/media/platform/imx-pxp.c +1 -3
@@ -1661,10 +1661,8 @@ static int pxp_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"Failed to get irq resource: %d\n" , irq); +if (irq <0 )return irq; - } ret =devm_request_threaded_irq (&pdev->dev, irq,NULL , pxp_irq_handler,IRQF_ONESHOT ,dev_name (&pdev->dev), dev);
drivers/media/platform/omap3isp/isp.c +0 -1
@@ -2324,7 +2324,6 @@ static int isp_probe(struct platform_device *pdev)/* Interrupt */ ret =platform_get_irq (pdev,0 );if (ret <=0 ) { -dev_err (isp->dev,"No IRQ resource\n" ); ret = -ENODEV ; goto error_iommu; }
drivers/media/platform/renesas-ceu.c +1 -3
@@ -1659,10 +1659,8 @@ static int ceu_probe(struct platform_device *pdev) } ret =platform_get_irq (pdev,0 ); -if (ret <0 ) { -dev_err (dev,"Failed to get irq: %d\n" , ret); +if (ret <0 ) goto error_free_ceudev; - } irq = ret; ret = devm_request_irq(dev, irq, ceu_irq,
drivers/media/platform/rockchip/rga/rga.c +0 -1
@@ -831,7 +831,6 @@ static int rga_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <0 ) { -dev_err (rga->dev,"failed to get irq\n" ); ret = irq; goto err_put_clk; }
drivers/media/platform/s3c-camif/camif-core.c +1 -3
@@ -386,10 +386,8 @@ static int camif_request_irqs(struct platform_device *pdev,init_waitqueue_head (&vp->irq_queue); irq =platform_get_irq (pdev, i); -if (irq <=0 ) { -dev_err (&pdev->dev,"failed to get IRQ %d\n" , i); +if (irq <=0 )return -ENXIO ; - } ret =devm_request_irq (&pdev->dev, irq, s3c_camif_irq_handler,0 ,dev_name (&pdev->dev), vp);
drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c +2 -6
@@ -693,16 +693,12 @@ static int c8sectpfe_probe(struct platform_device *pdev) fei->sram_size =resource_size (res); fei->idle_irq =platform_get_irq_byname (pdev,"c8sectpfe-idle-irq" ); -if (fei->idle_irq <0 ) { -dev_err (dev,"Can't get c8sectpfe-idle-irq\n" ); +if (fei->idle_irq <0 )return fei->idle_irq; - } fei->error_irq =platform_get_irq_byname (pdev,"c8sectpfe-error-irq" ); -if (fei->error_irq <0 ) { -dev_err (dev,"Can't get c8sectpfe-error-irq\n" ); +if (fei->error_irq <0 )return fei->error_irq; - }platform_set_drvdata (pdev, fei);
drivers/media/platform/sti/hva/hva-hw.c +2 -6
@@ -341,10 +341,8 @@ int hva_hw_probe(struct platform_device *pdev, struct hva_dev *hva)/* get status interruption resource */ ret =platform_get_irq (pdev,0 ); -if (ret <0 ) { -dev_err (dev,"%s failed to get status IRQ\n" ,HVA_PREFIX ); +if (ret <0 ) goto err_clk; - } hva->irq_its = ret; ret = devm_request_threaded_irq(dev, hva->irq_its, hva_hw_its_interrupt,
@@ -360,10 +358,8 @@ int hva_hw_probe(struct platform_device *pdev, struct hva_dev *hva)/* get error interruption resource */ ret =platform_get_irq (pdev,1 ); -if (ret <0 ) { -dev_err (dev,"%s failed to get error IRQ\n" ,HVA_PREFIX ); +if (ret <0 ) goto err_clk; - } hva->irq_err = ret; ret = devm_request_threaded_irq(dev, hva->irq_err, hva_hw_err_interrupt,
drivers/media/platform/stm32/stm32-dcmi.c +1 -4
@@ -1699,11 +1699,8 @@ static int dcmi_probe(struct platform_device *pdev) dcmi->bus.data_shift = ep.bus.parallel.data_shift; irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -if (irq != -EPROBE_DEFER ) -dev_err (&pdev->dev,"Could not get irq\n" ); +if (irq <=0 )return irq ? irq : -ENXIO ; - } dcmi->res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (!dcmi->res) {
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c +2 -5
@@ -866,11 +866,8 @@ static int sun6i_csi_resource_request(struct sun6i_csi_dev *sdev, } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"No csi IRQ specified\n" ); - ret = -ENXIO ; -return ret; - } +if (irq <0 ) +return -ENXIO ; ret =devm_request_irq (&pdev->dev, irq, sun6i_csi_isr,0 ,MODULE_NAME , sdev);
drivers/media/rc/img-ir/img-ir-core.c +1 -3
@@ -81,10 +81,8 @@ static int img_ir_probe(struct platform_device *pdev)/* Get resources from platform device */ irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"cannot find IRQ resource\n" ); +if (irq <0 )return irq; - }/* Private driver data */ priv =devm_kzalloc (&pdev->dev,sizeof (*priv),GFP_KERNEL );
drivers/media/rc/ir-hix5hd2.c +1 -3
@@ -232,10 +232,8 @@ static int hix5hd2_ir_probe(struct platform_device *pdev)return PTR_ERR (priv->base); priv->irq =platform_get_irq (pdev,0 ); -if (priv->irq <0 ) { -dev_err (dev,"irq can not get\n" ); +if (priv->irq <0 )return priv->irq; - } rdev =rc_allocate_device (RC_DRIVER_IR_RAW );if (!rdev)
drivers/media/rc/meson-ir.c +1 -3
@@ -117,10 +117,8 @@ static int meson_ir_probe(struct platform_device *pdev)return PTR_ERR (ir->reg); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"no irq resource\n" ); +if (irq <0 )return irq; - } ir->rc =devm_rc_allocate_device (dev,RC_DRIVER_IR_RAW );if (!ir->rc) {
drivers/media/rc/mtk-cir.c +1 -3
@@ -353,10 +353,8 @@ static int mtk_ir_probe(struct platform_device *pdev)platform_set_drvdata (pdev, ir); ir->irq =platform_get_irq (pdev,0 ); -if (ir->irq <0 ) { -dev_err (dev,"no irq resource\n" ); +if (ir->irq <0 )return -ENODEV ; - }if (clk_prepare_enable (ir->clk)) {dev_err (dev,"try to enable ir_clk failed\n" );
drivers/media/rc/sunxi-cir.c +0 -1
@@ -233,7 +233,6 @@ static int sunxi_ir_probe(struct platform_device *pdev)/* IRQ */ ir->irq =platform_get_irq (pdev,0 );if (ir->irq <0 ) { -dev_err (dev,"no irq resource\n" ); ret = ir->irq; goto exit_free_dev; }
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 25/57] media: Remove dev_err() usage after platform_get_irq()
Hi Stephen,
Quoted 53 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>While we're here, remove braces on if statements that only have one statement (manually).
Cc Mauro Carvalho Chehab <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
drivers/media/platform/am437x/am437x-vpfe.c | 1 - drivers/media/platform/atmel/atmel-sama5d2-isc.c | 7 ++----- drivers/media/platform/exynos4-is/mipi-csis.c | 4 +--- drivers/media/platform/imx-pxp.c | 4 +--- drivers/media/platform/omap3isp/isp.c | 1 - drivers/media/platform/renesas-ceu.c | 4 +--- drivers/media/platform/rockchip/rga/rga.c | 1 - drivers/media/platform/s3c-camif/camif-core.c | 4 +--- drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 8 ++------ drivers/media/platform/sti/hva/hva-hw.c | 8 ++------
Quoted 8 lines
drivers/media/platform/stm32/stm32-dcmi.c | 5 +---- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 7 ++----- drivers/media/rc/img-ir/img-ir-core.c | 4 +--- drivers/media/rc/ir-hix5hd2.c | 4 +--- drivers/media/rc/meson-ir.c | 4 +--- drivers/media/rc/mtk-cir.c | 4 +--- drivers/media/rc/sunxi-cir.c | 1 - 17 files changed, 17 insertions(+), 54 deletions(-)
Looks like this didn't catch the double assignments in:
drivers/media/platform/rcar_fdp1.c: fdp1->irq = ret =platform_get_irq(pdev, 0);drivers/media/platform/rcar_fdp1.c- if (ret < 0) {drivers/media/platform/rcar_fdp1.c- dev_err(&pdev->dev,
"cannot find IRQ\n");drivers/media/platform/rcar_fdp1.c- return ret;drivers/media/platform/rcar_fdp1.c- }drivers/media/platform/rcar_fdp1.c-
--drivers/media/platform/rcar_jpu.c: jpu->irq = ret =platform_get_irq(pdev, 0);drivers/media/platform/rcar_jpu.c- if (ret < 0) {drivers/media/platform/rcar_jpu.c- dev_err(&pdev->dev,
"cannot find IRQ\n");drivers/media/platform/rcar_jpu.c- return ret;drivers/media/platform/rcar_jpu.c- }drivers/media/platform/rcar_jpu.c-
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
PATCH v6 26/57 memory: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/memory/emif.c | 5 +---- drivers/memory/tegra/mc.c | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-)
drivers/memory/emif.c +1 -4
@@ -1563,11 +1563,8 @@ static int __init_or_module emif_probe(struct platform_device *pdev) goto error; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (emif->dev,"%s: error getting IRQ resource - %d\n" , - __func__, irq); +if (irq <0 ) goto error; - }emif_onetime_settings (emif);emif_debugfs_init (emif);
drivers/memory/tegra/mc.c +1 -3
@@ -677,10 +677,8 @@ static int tegra_mc_probe(struct platform_device *pdev) } mc->irq =platform_get_irq (pdev,0 ); -if (mc->irq <0 ) { -dev_err (&pdev->dev,"interrupt not specified\n" ); +if (mc->irq <0 )return mc->irq; - }WARN (!mc->soc->client_id_mask,"missing client ID mask for this SoC\n" );
Signature · 1 line
Sent by a computer through tubes
PATCH v6 27/57 mfd: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/mfd/ab8500-debugfs.c | 8 ++------ drivers/mfd/db8500-prcmu.c | 4 +--- drivers/mfd/fsl-imx25-tsadc.c | 4 +--- drivers/mfd/intel_soc_pmic_bxtwc.c | 4 +--- drivers/mfd/jz4740-adc.c | 11 +++-------- drivers/mfd/qcom_rpm.c | 12 +++--------- drivers/mfd/sm501.c | 4 +--- 7 files changed, 12 insertions(+), 35 deletions(-)
drivers/mfd/ab8500-debugfs.c +2 -6
@@ -2682,16 +2682,12 @@ static int ab8500_debug_probe(struct platform_device *plf) irq_ab8500 = res->start; irq_first =platform_get_irq_byname (plf,"IRQ_FIRST" ); -if (irq_first <0 ) { -dev_err (&plf->dev,"First irq not found, err %d\n" , irq_first); +if (irq_first <0 )return irq_first; - } irq_last =platform_get_irq_byname (plf,"IRQ_LAST" ); -if (irq_last <0 ) { -dev_err (&plf->dev,"Last irq not found, err %d\n" , irq_last); +if (irq_last <0 )return irq_last; - } ab8500_dir =debugfs_create_dir (AB8500_NAME_STRING ,NULL );if (!ab8500_dir)
drivers/mfd/db8500-prcmu.c +1 -3
@@ -3128,10 +3128,8 @@ static int db8500_prcmu_probe(struct platform_device *pdev)writel (ALL_MBOX_BITS ,PRCM_ARM_IT1_CLR ); irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (&pdev->dev,"no prcmu irq provided\n" ); +if (irq <=0 )return irq; - } err =request_threaded_irq (irq, prcmu_irq_handler, prcmu_irq_thread_fn,IRQF_NO_SUSPEND ,"prcmu" ,NULL );
drivers/mfd/fsl-imx25-tsadc.c +1 -3
@@ -69,10 +69,8 @@ static int mx25_tsadc_setup_irq(struct platform_device *pdev,int irq; irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (dev,"Failed to get irq\n" ); +if (irq <=0 )return irq; - } tsadc->domain =irq_domain_add_simple (np,2 ,0 , &mx25_tsadc_domain_ops, tsadc);
drivers/mfd/intel_soc_pmic_bxtwc.c +1 -3
@@ -450,10 +450,8 @@ static int bxtwc_probe(struct platform_device *pdev)return -ENOMEM ; ret =platform_get_irq (pdev,0 ); -if (ret <0 ) { -dev_err (&pdev->dev,"Invalid IRQ\n" ); +if (ret <0 )return ret; - } pmic->irq = ret;dev_set_drvdata (&pdev->dev, pmic);
drivers/mfd/jz4740-adc.c +3 -8
@@ -208,17 +208,12 @@ static int jz4740_adc_probe(struct platform_device *pdev)return -ENOMEM ; adc->irq =platform_get_irq (pdev,0 ); -if (adc->irq <0 ) { - ret = adc->irq; -dev_err (&pdev->dev,"Failed to get platform irq: %d\n" , ret); -return ret; - } +if (adc->irq <0 ) +return adc->irq; irq_base =platform_get_irq (pdev,1 ); -if (irq_base <0 ) { -dev_err (&pdev->dev,"Failed to get irq base: %d\n" , irq_base); +if (irq_base <0 )return irq_base; - } mem_base =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (!mem_base) {
drivers/mfd/qcom_rpm.c +3 -9
@@ -561,22 +561,16 @@ static int qcom_rpm_probe(struct platform_device *pdev)clk_prepare_enable (rpm->ramclk);/* Accepts NULL */ irq_ack =platform_get_irq_byname (pdev,"ack" ); -if (irq_ack <0 ) { -dev_err (&pdev->dev,"required ack interrupt missing\n" ); +if (irq_ack <0 )return irq_ack; - } irq_err =platform_get_irq_byname (pdev,"err" ); -if (irq_err <0 ) { -dev_err (&pdev->dev,"required err interrupt missing\n" ); +if (irq_err <0 )return irq_err; - } irq_wakeup =platform_get_irq_byname (pdev,"wakeup" ); -if (irq_wakeup <0 ) { -dev_err (&pdev->dev,"required wakeup interrupt missing\n" ); +if (irq_wakeup <0 )return irq_wakeup; - } match =of_match_device (qcom_rpm_of_match, &pdev->dev);if (!match)
drivers/mfd/sm501.c +1 -3
@@ -1394,10 +1394,8 @@ static int sm501_plat_probe(struct platform_device *dev) sm->platdata =dev_get_platdata (&dev->dev); ret =platform_get_irq (dev,0 ); -if (ret <0 ) { -dev_err (&dev->dev,"failed to get irq resource\n" ); +if (ret <0 ) goto err_res; - } sm->irq = ret; sm->io_res =platform_get_resource (dev,IORESOURCE_MEM ,1 );
Signature · 1 line
Sent by a computer through tubes
Lee Jones
AppliedRe: [PATCH v6 27/57] mfd: Remove dev_err() usage after platform_get_irq()
Quoted 42 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>While we're here, remove braces on if statements that only have one statement (manually).
Cc Lee Jones <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
Quoted 8 lines
drivers/mfd/ab8500-debugfs.c | 8 ++------ drivers/mfd/db8500-prcmu.c | 4 +--- drivers/mfd/fsl-imx25-tsadc.c | 4 +--- drivers/mfd/intel_soc_pmic_bxtwc.c | 4 +--- drivers/mfd/jz4740-adc.c | 11 +++-------- drivers/mfd/qcom_rpm.c | 12 +++--------- drivers/mfd/sm501.c | 4 +--- 7 files changed, 12 insertions(+), 35 deletions(-)
Applied, thanks.
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH v6 28/57 pcie-gadget-spear: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/misc/spear13xx_pcie_gadget.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/misc/spear13xx_pcie_gadget.c +1 -3
@@ -702,10 +702,8 @@ static int spear_pcie_gadget_probe(struct platform_device *pdev)platform_set_drvdata (pdev, target); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"no update irq?\n" ); +if (irq <0 )return irq; - } status =devm_request_irq (&pdev->dev, irq, spear_pcie_gadget_irq,0 , pdev->name,NULL );
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 28/57] pcie-gadget-spear: Remove dev_err() usage after platform_get_irq()
Quoted 5 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
Quoted 7 lines
Cc Arnd Bergmann <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
The patch looks coorrect
I wonder if we should just remove that driver though, it's been marked as 'depends on BROKEN' since 2013, and it has never been possible to compile it.
Arnd
Re: [PATCH v6 28/57] pcie-gadget-spear: Remove dev_err() usage after platform_get_irq()
Quoting Arnd Bergmann (2019-07-30 11:29:45)
Quoted 14 lines · Stephen Boyd
Quoted 5 lines
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.Quoted 7 lines
Cc Arnd Bergmann <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
Quoted 7 lines
The patch looks coorrect
Acked-by Arnd Bergmann <[email protected]>I wonder if we should just remove that driver though, it's been marked as 'depends on BROKEN' since 2013, and it has never been possible to compile it.
I'm happy to replace this patch with a deletion patch.
-----8<-----
From: Stephen Boyd <[email protected]>
Subject: [PATCH] misc: Remove spear13xx pcie gadget driver
This driver has been marked broken since 2013, see commit 98097858ccf3 ("misc: mark spear13xx-pcie-gadget as broken"). Let's remove this file now that it's been more than 5 years of existing in a broken state.
--- drivers/misc/Kconfig | 9 - drivers/misc/Makefile | 1 - drivers/misc/spear13xx_pcie_gadget.c | 797 --------------------------- 3 files changed, 807 deletions(-) delete mode 100644 drivers/misc/spear13xx_pcie_gadget.c
drivers/misc/Kconfig +0 -9
@@ -375,15 +375,6 @@ config DS1682 This driver can also be built as a module. If so, the module will be called ds1682. -config SPEAR13XX_PCIE_GADGET - bool "PCIe gadget support for SPEAr13XX platform" - depends on ARCH_SPEAR13XX && BROKEN - help - This option enables gadget support for PCIe controller. If - board file defines any controller as PCIe endpoint then a sysfs - entry will be created for that controller. User can use these - sysfs node to configure PCIe EP as per his requirements. - config VMWARE_BALLOON tristate "VMware Balloon Driver" depends on VMWARE_VMCI && X86 && HYPERVISOR_GUEST
drivers/misc/Makefile +0 -1
@@ -37,7 +37,6 @@ obj-$(CONFIG_C2PORT) += c2port/ obj-$(CONFIG_HMC6352) += hmc6352.o obj-y += eeprom/ obj-y += cb710/ -obj-$(CONFIG_SPEAR13XX_PCIE_GADGET) += spear13xx_pcie_gadget.o obj-$(CONFIG_VMWARE_BALLOON) += vmw_balloon.o obj-$(CONFIG_PCH_PHUB) += pch_phub.o obj-y += ti-st/
drivers/misc/spear13xx_pcie_gadget.c deleted +0 -797
797 lines not on this page · raw message
Signature · 1 line
Sent by a computer through tubes
Greg Kroah-Hartman
maintainerRe: [PATCH v6 28/57] pcie-gadget-spear: Remove dev_err() usage after platform_get_irq()
Quoted 29 lines · Stephen Boyd
Quoting Arnd Bergmann (2019-07-30 11:29:45)
Quoted 14 lines · Stephen Boyd
Quoted 5 lines
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.Quoted 7 lines
Cc Arnd Bergmann <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
Quoted 7 lines
The patch looks coorrect
Acked-by Arnd Bergmann <[email protected]>I wonder if we should just remove that driver though, it's been marked as 'depends on BROKEN' since 2013, and it has never been possible to compile it.
I'm happy to replace this patch with a deletion patch.
-----8<-----
From: Stephen Boyd <[email protected]>
Subject: [PATCH] misc: Remove spear13xx pcie gadget driver
Quoted 7 lines
This driver has been marked broken since 2013, see commit
98097858ccf3("misc: mark spear13xx-pcie-gadget as broken"). Let's remove this file now that it's been more than 5 years of existing in a broken state.Cc Arnd Bergmann <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>
Good idea, I've now queued up this deletion patch instead, thanks!
greg k-h
PATCH v6 29/57 mmc: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/mmc/host/bcm2835.c | 1 - drivers/mmc/host/jz4740_mmc.c | 1 - drivers/mmc/host/meson-gx-mmc.c | 1 - drivers/mmc/host/mxcmmc.c | 4 +--- drivers/mmc/host/s3cmci.c | 1 - drivers/mmc/host/sdhci-msm.c | 2 -- drivers/mmc/host/sdhci-pltfm.c | 1 - drivers/mmc/host/sdhci-s3c.c | 4 +--- drivers/mmc/host/sdhci_f_sdh30.c | 4 +--- drivers/mmc/host/uniphier-sd.c | 4 +--- 10 files changed, 4 insertions(+), 19 deletions(-)
drivers/mmc/host/bcm2835.c +0 -1
@@ -1409,7 +1409,6 @@ static int bcm2835_probe(struct platform_device *pdev) host->irq =platform_get_irq (pdev,0 );if (host->irq <=0 ) { -dev_err (dev,"get IRQ failed\n" ); ret = -EINVAL ; goto err; }
drivers/mmc/host/jz4740_mmc.c +0 -1
@@ -969,7 +969,6 @@ static int jz4740_mmc_probe(struct platform_device* pdev) host->irq =platform_get_irq (pdev,0 );if (host->irq <0 ) { ret = host->irq; -dev_err (&pdev->dev,"Failed to get platform irq: %d\n" , ret); goto err_free_host; }
drivers/mmc/host/meson-gx-mmc.c +0 -1
@@ -1091,7 +1091,6 @@ static int meson_mmc_probe(struct platform_device *pdev) host->irq =platform_get_irq (pdev,0 );if (host->irq <=0 ) { -dev_err (&pdev->dev,"failed to get interrupt resource.\n" ); ret = -EINVAL ; goto free_host; }
drivers/mmc/host/mxcmmc.c +1 -3
@@ -1010,10 +1010,8 @@ static int mxcmci_probe(struct platform_device *pdev) res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get IRQ: %d\n" , irq); +if (irq <0 )return irq; - } mmc =mmc_alloc_host (sizeof (*host), &pdev->dev);if (!mmc)
drivers/mmc/host/s3cmci.c +0 -1
@@ -1614,7 +1614,6 @@ static int s3cmci_probe(struct platform_device *pdev) host->irq =platform_get_irq (pdev,0 );if (host->irq <=0 ) { -dev_err (&pdev->dev,"failed to get interrupt resource.\n" ); ret = -EINVAL ; goto probe_iounmap; }
drivers/mmc/host/sdhci-msm.c +0 -2
@@ -1917,8 +1917,6 @@ static int sdhci_msm_probe(struct platform_device *pdev)/* Setup IRQ for handling power/voltage tasks with PMIC */ msm_host->pwr_irq =platform_get_irq_byname (pdev,"pwr_irq" );if (msm_host->pwr_irq <0 ) { -dev_err (&pdev->dev,"Get pwr_irq failed (%d)\n" , - msm_host->pwr_irq); ret = msm_host->pwr_irq; goto clk_disable; }
drivers/mmc/host/sdhci-pltfm.c +0 -1
@@ -131,7 +131,6 @@ struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev, irq =platform_get_irq (pdev,0 );if (irq <0 ) { -dev_err (&pdev->dev,"failed to get IRQ number\n" ); ret = irq; goto err; }
drivers/mmc/host/sdhci-s3c.c +1 -3
@@ -490,10 +490,8 @@ static int sdhci_s3c_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"no irq specified\n" ); +if (irq <0 )return irq; - } host =sdhci_alloc_host (dev,sizeof (struct sdhci_s3c ));if (IS_ERR (host)) {
drivers/mmc/host/sdhci_f_sdh30.c +1 -3
@@ -119,10 +119,8 @@ static int sdhci_f_sdh30_probe(struct platform_device *pdev)u32 reg =0 ; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"%s: no irq specified\n" , __func__); +if (irq <0 )return irq; - } host =sdhci_alloc_host (dev,sizeof (struct f_sdhost_priv ));if (IS_ERR (host))
drivers/mmc/host/uniphier-sd.c +1 -3
@@ -557,10 +557,8 @@ static int uniphier_sd_probe(struct platform_device *pdev)int irq, ret; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"failed to get IRQ number" ); +if (irq <0 )return irq; - } priv =devm_kzalloc (dev,sizeof (*priv),GFP_KERNEL );if (!priv)
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 29/57] mmc: Remove dev_err() usage after platform_get_irq()
Quoted 33 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>
Quoted 7 lines
While we're here, remove braces on if statements that only have one statement (manually).
Cc Ulf Hansson <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>
Applied for next, thanks!
Kind regards
Uffe
Quoted 156 lines
---
Please apply directly to subsystem trees
drivers/mmc/host/bcm2835.c | 1 - drivers/mmc/host/jz4740_mmc.c | 1 - drivers/mmc/host/meson-gx-mmc.c | 1 - drivers/mmc/host/mxcmmc.c | 4 +--- drivers/mmc/host/s3cmci.c | 1 - drivers/mmc/host/sdhci-msm.c | 2 -- drivers/mmc/host/sdhci-pltfm.c | 1 - drivers/mmc/host/sdhci-s3c.c | 4 +--- drivers/mmc/host/sdhci_f_sdh30.c | 4 +--- drivers/mmc/host/uniphier-sd.c | 4 +--- 10 files changed, 4 insertions(+), 19 deletions(-)drivers/mmc/host/bcm2835.c +0
-1@@ -1409,7 +1409,6 @@ static int bcm2835_probe(struct platform_device *pdev) host->irq =platform_get_irq (pdev,0 );if (host->irq <=0 ) { -dev_err (dev,"get IRQ failed\n" ); ret = -EINVAL ; goto err; }drivers/mmc/host/jz4740_mmc.c +0
-1@@ -969,7 +969,6 @@ static int jz4740_mmc_probe(struct platform_device* pdev) host->irq =platform_get_irq (pdev,0 );if (host->irq <0 ) { ret = host->irq; -dev_err (&pdev->dev,"Failed to get platform irq: %d\n" , ret); goto err_free_host; }drivers/mmc/host/meson-gx-mmc.c +0
-1@@ -1091,7 +1091,6 @@ static int meson_mmc_probe(struct platform_device *pdev) host->irq =platform_get_irq (pdev,0 );if (host->irq <=0 ) { -dev_err (&pdev->dev,"failed to get interrupt resource.\n" ); ret = -EINVAL ; goto free_host; }drivers/mmc/host/mxcmmc.c +1
-3@@ -1010,10 +1010,8 @@ static int mxcmci_probe(struct platform_device *pdev) res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get IRQ: %d\n" , irq); +if (irq <0 )return irq; - } mmc =mmc_alloc_host (sizeof (*host), &pdev->dev);if (!mmc)drivers/mmc/host/s3cmci.c +0
-1@@ -1614,7 +1614,6 @@ static int s3cmci_probe(struct platform_device *pdev) host->irq =platform_get_irq (pdev,0 );if (host->irq <=0 ) { -dev_err (&pdev->dev,"failed to get interrupt resource.\n" ); ret = -EINVAL ; goto probe_iounmap; }drivers/mmc/host/sdhci-msm.c +0
-2@@ -1917,8 +1917,6 @@ static int sdhci_msm_probe(struct platform_device *pdev)/* Setup IRQ for handling power/voltage tasks with PMIC */ msm_host->pwr_irq =platform_get_irq_byname (pdev,"pwr_irq" );if (msm_host->pwr_irq <0 ) { -dev_err (&pdev->dev,"Get pwr_irq failed (%d)\n" , - msm_host->pwr_irq); ret = msm_host->pwr_irq; goto clk_disable; }drivers/mmc/host/sdhci-pltfm.c +0
-1@@ -131,7 +131,6 @@ struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev, irq =platform_get_irq (pdev,0 );if (irq <0 ) { -dev_err (&pdev->dev,"failed to get IRQ number\n" ); ret = irq; goto err; }drivers/mmc/host/sdhci-s3c.c +1
-3@@ -490,10 +490,8 @@ static int sdhci_s3c_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"no irq specified\n" ); +if (irq <0 )return irq; - } host =sdhci_alloc_host (dev,sizeof (struct sdhci_s3c ));if (IS_ERR (host)) {drivers/mmc/host/sdhci_f_sdh30.c +1
-3@@ -119,10 +119,8 @@ static int sdhci_f_sdh30_probe(struct platform_device *pdev)u32 reg =0 ; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"%s: no irq specified\n" , __func__); +if (irq <0 )return irq; - } host =sdhci_alloc_host (dev,sizeof (struct f_sdhost_priv ));if (IS_ERR (host))drivers/mmc/host/uniphier-sd.c +1
-4@@ -557,10 +557,8 @@ static int uniphier_sd_probe(struct platform_device *pdev)int irq, ret; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"failed to get IRQ number" ); +if (irq <0 )return irq; - } priv =devm_kzalloc (dev,sizeof (*priv),GFP_KERNEL );if (!priv) --Sent by a computer through tubes
Re: [PATCH v6 29/57] mmc: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydHi Stephen,
Quoted 43 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>While we're here, remove braces on if statements that only have one statement (manually).
Cc Ulf Hansson <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
Quoted 11 lines
drivers/mmc/host/bcm2835.c | 1 - drivers/mmc/host/jz4740_mmc.c | 1 - drivers/mmc/host/meson-gx-mmc.c | 1 - drivers/mmc/host/mxcmmc.c | 4 +--- drivers/mmc/host/s3cmci.c | 1 - drivers/mmc/host/sdhci-msm.c | 2 -- drivers/mmc/host/sdhci-pltfm.c | 1 - drivers/mmc/host/sdhci-s3c.c | 4 +--- drivers/mmc/host/sdhci_f_sdh30.c | 4 +--- drivers/mmc/host/uniphier-sd.c | 4 +--- 10 files changed, 4 insertions(+), 19 deletions(-)
Failed to catch:
drivers/mmc/host/sh_mmcif.c: irq[0] = platform_get_irq(pdev, 0); drivers/mmc/host/sh_mmcif.c: irq[1] = platform_get_irq(pdev, 1);
drivers/mmc/host/sh_mmcif.c- if (irq[0] < 0) {drivers/mmc/host/sh_mmcif.c- dev_err(dev, "Get irq error\n");drivers/mmc/host/sh_mmcif.c- return -ENXIO;drivers/mmc/host/sh_mmcif.c- }
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
PATCH v6 30/57 mtd: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/mtd/devices/spear_smi.c | 1 - drivers/mtd/nand/raw/denali_dt.c | 4 +--- drivers/mtd/nand/raw/hisi504_nand.c | 4 +--- drivers/mtd/nand/raw/lpc32xx_mlc.c | 1 - drivers/mtd/nand/raw/marvell_nand.c | 4 +--- drivers/mtd/nand/raw/meson_nand.c | 4 +--- drivers/mtd/nand/raw/mtk_ecc.c | 4 +--- drivers/mtd/nand/raw/mtk_nand.c | 1 - drivers/mtd/nand/raw/omap2.c | 8 ++------ drivers/mtd/nand/raw/sh_flctl.c | 4 +--- drivers/mtd/nand/raw/stm32_fmc2_nand.c | 5 +---- drivers/mtd/nand/raw/sunxi_nand.c | 4 +--- drivers/mtd/spi-nor/cadence-quadspi.c | 4 +--- 13 files changed, 11 insertions(+), 37 deletions(-)
drivers/mtd/devices/spear_smi.c +0 -1
@@ -933,7 +933,6 @@ static int spear_smi_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <0 ) { ret = -ENODEV ; -dev_err (&pdev->dev,"invalid smi irq\n" ); goto err; }
drivers/mtd/nand/raw/denali_dt.c +1 -3
@@ -167,10 +167,8 @@ static int denali_dt_probe(struct platform_device *pdev) denali->dev = dev; denali->irq =platform_get_irq (pdev,0 ); -if (denali->irq <0 ) { -dev_err (dev,"no irq defined\n" ); +if (denali->irq <0 )return denali->irq; - } res =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"denali_reg" ); denali->reg =devm_ioremap_resource (dev, res);
drivers/mtd/nand/raw/hisi504_nand.c +1 -3
@@ -751,10 +751,8 @@ static int hisi_nfc_probe(struct platform_device *pdev) mtd =nand_to_mtd (chip); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"no IRQ resource defined\n" ); +if (irq <0 )return -ENXIO ; - } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); host->iobase =devm_ioremap_resource (dev, res);
drivers/mtd/nand/raw/lpc32xx_mlc.c +0 -1
@@ -773,7 +773,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev) host->irq =platform_get_irq (pdev,0 );if (host->irq <0 ) { -dev_err (&pdev->dev,"failed to get platform irq\n" ); res = -EINVAL ; goto release_dma_chan; }
drivers/mtd/nand/raw/marvell_nand.c +1 -3
@@ -2862,10 +2862,8 @@ static int marvell_nfc_probe(struct platform_device *pdev)return PTR_ERR (nfc->regs); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"failed to retrieve irq\n" ); +if (irq <0 )return irq; - } nfc->core_clk =devm_clk_get (&pdev->dev,"core" );
drivers/mtd/nand/raw/meson_nand.c +1 -3
@@ -1398,10 +1398,8 @@ static int meson_nfc_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"no NFC IRQ resource\n" ); +if (irq <0 )return -EINVAL ; - } ret =meson_nfc_clk_init (nfc);if (ret) {
drivers/mtd/nand/raw/mtk_ecc.c +1 -3
@@ -527,10 +527,8 @@ static int mtk_ecc_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"failed to get irq: %d\n" , irq); +if (irq <0 )return irq; - } ret =dma_set_mask (dev,DMA_BIT_MASK (32 ));if (ret) {
drivers/mtd/nand/raw/mtk_nand.c +0 -1
@@ -1540,7 +1540,6 @@ static int mtk_nfc_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <0 ) { -dev_err (dev,"no nfi irq resource\n" ); ret = -EINVAL ; goto clk_disable; }
drivers/mtd/nand/raw/omap2.c +2 -6
@@ -1967,10 +1967,8 @@ static int omap_nand_attach_chip(struct nand_chip *chip)case NAND_OMAP_PREFETCH_IRQ : info->gpmc_irq_fifo =platform_get_irq (info->pdev,0 ); -if (info->gpmc_irq_fifo <=0 ) { -dev_err (dev,"Error getting fifo IRQ\n" ); +if (info->gpmc_irq_fifo <=0 )return -ENODEV ; - } err =devm_request_irq (dev, info->gpmc_irq_fifo, omap_nand_irq,IRQF_SHARED ,"gpmc-nand-fifo" , info);
@@ -1982,10 +1980,8 @@ static int omap_nand_attach_chip(struct nand_chip *chip) } info->gpmc_irq_count =platform_get_irq (info->pdev,1 ); -if (info->gpmc_irq_count <=0 ) { -dev_err (dev,"Error getting IRQ count\n" ); +if (info->gpmc_irq_count <=0 )return -ENODEV ; - } err =devm_request_irq (dev, info->gpmc_irq_count, omap_nand_irq,IRQF_SHARED ,"gpmc-nand-count" , info);
drivers/mtd/nand/raw/sh_flctl.c +1 -3
@@ -1129,10 +1129,8 @@ static int flctl_probe(struct platform_device *pdev) flctl->fifo = res->start +0x24 ;/* FLDTFIFO */ irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get flste irq data: %d\n" , irq); +if (irq <0 )return irq; - } ret =devm_request_irq (&pdev->dev, irq, flctl_handle_flste,IRQF_SHARED ,"flste" , flctl);
drivers/mtd/nand/raw/stm32_fmc2_nand.c +1 -4
@@ -1912,11 +1912,8 @@ static int stm32_fmc2_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -if (irq != -EPROBE_DEFER ) -dev_err (dev,"IRQ error missing or invalid\n" ); +if (irq <0 )return irq; - } ret =devm_request_irq (dev, irq, stm32_fmc2_irq,0 ,dev_name (dev), fmc2);
drivers/mtd/nand/raw/sunxi_nand.c +1 -3
@@ -2071,10 +2071,8 @@ static int sunxi_nfc_probe(struct platform_device *pdev)return PTR_ERR (nfc->regs); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"failed to retrieve irq\n" ); +if (irq <0 )return irq; - } nfc->ahb_clk =devm_clk_get (dev,"ahb" );if (IS_ERR (nfc->ahb_clk)) {
drivers/mtd/spi-nor/cadence-quadspi.c +1 -3
@@ -1375,10 +1375,8 @@ static int cqspi_probe(struct platform_device *pdev)/* Obtain IRQ line. */ irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"Cannot obtain IRQ.\n" ); +if (irq <0 )return -ENXIO ; - }pm_runtime_enable (dev); ret =pm_runtime_get_sync (dev);
Signature · 6 lines
Sent by a computer through tubes ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH v6 30/57] mtd: Remove dev_err() usage after platform_get_irq()
Quoted 35 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>While we're here, remove braces on if statements that only have one statement (manually).
Quoted 9 lines
Cc David Woodhouse <[email protected]>Cc Brian Norris <[email protected]>Cc Marek Vasut <[email protected]>Cc Miquel Raynal <[email protected]>Cc Richard Weinberger <[email protected]>Cc Vignesh Raghavendra <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
PATCH v6 31/57 pci: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/pci/controller/dwc/pci-dra7xx.c | 8 ++------ drivers/pci/controller/dwc/pci-exynos.c | 8 ++------ drivers/pci/controller/dwc/pci-imx6.c | 4 +--- drivers/pci/controller/dwc/pci-keystone.c | 4 +--- drivers/pci/controller/dwc/pci-meson.c | 4 +--- drivers/pci/controller/dwc/pcie-armada8k.c | 4 +--- drivers/pci/controller/dwc/pcie-artpec6.c | 4 +--- drivers/pci/controller/dwc/pcie-histb.c | 4 +--- drivers/pci/controller/dwc/pcie-kirin.c | 5 +---- drivers/pci/controller/dwc/pcie-spear13xx.c | 4 +--- drivers/pci/controller/pci-tegra.c | 8 ++------ drivers/pci/controller/pci-v3-semi.c | 4 +--- drivers/pci/controller/pci-xgene-msi.c | 2 -- drivers/pci/controller/pcie-altera-msi.c | 1 - drivers/pci/controller/pcie-altera.c | 4 +--- drivers/pci/controller/pcie-mobiveil.c | 4 +--- drivers/pci/controller/pcie-rockchip-host.c | 12 +++--------- drivers/pci/controller/pcie-tango.c | 4 +--- drivers/pci/controller/pcie-xilinx-nwl.c | 11 ++--------- 19 files changed, 23 insertions(+), 76 deletions(-)
drivers/pci/controller/dwc/pci-dra7xx.c +2 -6
@@ -462,10 +462,8 @@ static int __init dra7xx_add_pcie_port(struct dra7xx_pcie *dra7xx,struct resource *res; pp->irq =platform_get_irq (pdev,1 ); -if (pp->irq <0 ) { -dev_err (dev,"missing IRQ resource\n" ); +if (pp->irq <0 )return pp->irq; - } ret = devm_request_irq(dev, pp->irq, dra7xx_pcie_msi_irq_handler, IRQF_SHARED | IRQF_NO_THREAD,
@@ -713,10 +711,8 @@ static int __init dra7xx_pcie_probe(struct platform_device *pdev) pci->ops = &dw_pcie_ops; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"missing IRQ resource: %d\n" , irq); +if (irq <0 )return irq; - } res =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"ti_conf" ); base =devm_ioremap_nocache (dev, res->start,resource_size (res));
drivers/pci/controller/dwc/pci-exynos.c +2 -6
@@ -402,10 +402,8 @@ static int __init exynos_add_pcie_port(struct exynos_pcie *ep,int ret; pp->irq =platform_get_irq (pdev,1 ); -if (pp->irq <0 ) { -dev_err (dev,"failed to get irq\n" ); +if (pp->irq <0 )return pp->irq; - } ret =devm_request_irq (dev, pp->irq, exynos_pcie_irq_handler,IRQF_SHARED ,"exynos-pcie" , ep);if (ret) {
@@ -415,10 +413,8 @@ static int __init exynos_add_pcie_port(struct exynos_pcie *ep,if (IS_ENABLED (CONFIG_PCI_MSI )) { pp->msi_irq =platform_get_irq (pdev,0 ); -if (pp->msi_irq <0 ) { -dev_err (dev,"failed to get msi irq\n" ); +if (pp->msi_irq <0 )return pp->msi_irq; - } } pp->ops = &exynos_pcie_host_ops;
drivers/pci/controller/dwc/pci-imx6.c +1 -3
@@ -867,10 +867,8 @@ static int imx6_add_pcie_port(struct imx6_pcie *imx6_pcie,if (IS_ENABLED (CONFIG_PCI_MSI )) { pp->msi_irq =platform_get_irq_byname (pdev,"msi" ); -if (pp->msi_irq <=0 ) { -dev_err (dev,"failed to get MSI irq\n" ); +if (pp->msi_irq <=0 )return -ENODEV ; - } } pp->ops = &imx6_pcie_host_ops;
drivers/pci/controller/dwc/pci-keystone.c +1 -3
@@ -1247,10 +1247,8 @@ static int __init ks_pcie_probe(struct platform_device *pdev) pci->version = version; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"missing IRQ resource: %d\n" , irq); +if (irq <0 )return irq; - } ret =request_irq (irq, ks_pcie_err_irq_handler,IRQF_SHARED ,"ks-pcie-error-irq" , ks_pcie);
drivers/pci/controller/dwc/pci-meson.c +1 -3
@@ -500,10 +500,8 @@ static int meson_add_pcie_port(struct meson_pcie *mp,if (IS_ENABLED (CONFIG_PCI_MSI )) { pp->msi_irq =platform_get_irq (pdev,0 ); -if (pp->msi_irq <0 ) { -dev_err (dev,"failed to get MSI IRQ\n" ); +if (pp->msi_irq <0 )return pp->msi_irq; - } } pp->ops = &meson_pcie_host_ops;
drivers/pci/controller/dwc/pcie-armada8k.c +1 -3
@@ -249,10 +249,8 @@ static int armada8k_add_pcie_port(struct armada8k_pcie *pcie, pp->ops = &armada8k_pcie_host_ops; pp->irq =platform_get_irq (pdev,0 ); -if (pp->irq <0 ) { -dev_err (dev,"failed to get irq for port\n" ); +if (pp->irq <0 )return pp->irq; - } ret =devm_request_irq (dev, pp->irq, armada8k_pcie_irq_handler,IRQF_SHARED ,"armada8k-pcie" , pcie);
drivers/pci/controller/dwc/pcie-artpec6.c +1 -3
@@ -393,10 +393,8 @@ static int artpec6_add_pcie_port(struct artpec6_pcie *artpec6_pcie,if (IS_ENABLED (CONFIG_PCI_MSI )) { pp->msi_irq =platform_get_irq_byname (pdev,"msi" ); -if (pp->msi_irq <0 ) { -dev_err (dev,"failed to get MSI irq\n" ); +if (pp->msi_irq <0 )return pp->msi_irq; - } } pp->ops = &artpec6_pcie_host_ops;
drivers/pci/controller/dwc/pcie-histb.c +1 -3
@@ -402,10 +402,8 @@ static int histb_pcie_probe(struct platform_device *pdev)if (IS_ENABLED (CONFIG_PCI_MSI )) { pp->msi_irq =platform_get_irq_byname (pdev,"msi" ); -if (pp->msi_irq <0 ) { -dev_err (dev,"Failed to get MSI IRQ\n" ); +if (pp->msi_irq <0 )return pp->msi_irq; - } } hipcie->phy =devm_phy_get (dev,"phy" );
drivers/pci/controller/dwc/pcie-kirin.c +1 -4
@@ -455,11 +455,8 @@ static int kirin_pcie_add_msi(struct dw_pcie *pci,if (IS_ENABLED (CONFIG_PCI_MSI )) { irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev, -"failed to get MSI IRQ (%d)\n" , irq); +if (irq <0 )return irq; - } pci->pp.msi_irq = irq; }
drivers/pci/controller/dwc/pcie-spear13xx.c +1 -3
@@ -198,10 +198,8 @@ static int spear13xx_add_pcie_port(struct spear13xx_pcie *spear13xx_pcie,int ret; pp->irq =platform_get_irq (pdev,0 ); -if (pp->irq <0 ) { -dev_err (dev,"failed to get irq\n" ); +if (pp->irq <0 )return pp->irq; - } ret =devm_request_irq (dev, pp->irq, spear13xx_pcie_irq_handler,IRQF_SHARED |IRQF_NO_THREAD ,"spear1340-pcie" , spear13xx_pcie);
drivers/pci/controller/pci-tegra.c +2 -6
@@ -1549,10 +1549,8 @@ static int tegra_pcie_get_resources(struct tegra_pcie *pcie)/* request interrupt */ err =platform_get_irq_byname (pdev,"intr" ); -if (err <0 ) { -dev_err (dev,"failed to get IRQ: %d\n" , err); +if (err <0 ) goto phys_put; - } pcie->irq = err;
@@ -1767,10 +1765,8 @@ static int tegra_pcie_msi_setup(struct tegra_pcie *pcie) } err =platform_get_irq_byname (pdev,"msi" ); -if (err <0 ) { -dev_err (dev,"failed to get IRQ: %d\n" , err); +if (err <0 ) goto free_irq_domain; - } msi->irq = err;
drivers/pci/controller/pci-v3-semi.c +1 -3
@@ -804,10 +804,8 @@ static int v3_pci_probe(struct platform_device *pdev)/* Get and request error IRQ resource */ irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (dev,"unable to obtain PCIv3 error IRQ\n" ); +if (irq <=0 )return -ENODEV ; - } ret =devm_request_irq (dev, irq, v3_irq,0 ,"PCIv3 error" , v3);if (ret <0 ) {
drivers/pci/controller/pci-xgene-msi.c +0 -2
@@ -478,8 +478,6 @@ static int xgene_msi_probe(struct platform_device *pdev)for (irq_index =0 ; irq_index <NR_HW_IRQS ; irq_index++) { virt_msir =platform_get_irq (pdev, irq_index);if (virt_msir <0 ) { -dev_err (&pdev->dev,"Cannot translate IRQ index %d\n" , - irq_index); rc = virt_msir; goto error; }
drivers/pci/controller/pcie-altera-msi.c +0 -1
@@ -256,7 +256,6 @@ static int altera_msi_probe(struct platform_device *pdev) msi->irq =platform_get_irq (pdev,0 );if (msi->irq <0 ) { -dev_err (&pdev->dev,"failed to map IRQ: %d\n" , msi->irq); ret = msi->irq; goto err; }
drivers/pci/controller/pcie-altera.c +1 -3
@@ -747,10 +747,8 @@ static int altera_pcie_parse_dt(struct altera_pcie *pcie)/* setup IRQ */ pcie->irq =platform_get_irq (pdev,0 ); -if (pcie->irq <0 ) { -dev_err (dev,"failed to get IRQ: %d\n" , pcie->irq); +if (pcie->irq <0 )return pcie->irq; - }irq_set_chained_handler_and_data (pcie->irq, altera_pcie_isr, pcie);return 0 ;
drivers/pci/controller/pcie-mobiveil.c +1 -3
@@ -453,10 +453,8 @@ static int mobiveil_pcie_parse_dt(struct mobiveil_pcie *pcie) pcie->ppio_wins =MAX_PIO_WINDOWS ; pcie->irq =platform_get_irq (pdev,0 ); -if (pcie->irq <=0 ) { -dev_err (dev,"failed to map IRQ: %d\n" , pcie->irq); +if (pcie->irq <=0 )return -ENODEV ; - }return 0 ; }
drivers/pci/controller/pcie-rockchip-host.c +3 -9
@@ -549,10 +549,8 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip)struct platform_device *pdev =to_platform_device (dev); irq =platform_get_irq_byname (pdev,"sys" ); -if (irq <0 ) { -dev_err (dev,"missing sys IRQ resource\n" ); +if (irq <0 )return irq; - } err =devm_request_irq (dev, irq, rockchip_pcie_subsys_irq_handler,IRQF_SHARED ,"pcie-sys" , rockchip);
@@ -562,20 +560,16 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip) } irq =platform_get_irq_byname (pdev,"legacy" ); -if (irq <0 ) { -dev_err (dev,"missing legacy IRQ resource\n" ); +if (irq <0 )return irq; - }irq_set_chained_handler_and_data (irq, rockchip_pcie_legacy_int_handler, rockchip); irq =platform_get_irq_byname (pdev,"client" ); -if (irq <0 ) { -dev_err (dev,"missing client IRQ resource\n" ); +if (irq <0 )return irq; - } err =devm_request_irq (dev, irq, rockchip_pcie_client_irq_handler,IRQF_SHARED ,"pcie-client" , rockchip);
drivers/pci/controller/pcie-tango.c +1 -3
@@ -273,10 +273,8 @@ static int tango_pcie_probe(struct platform_device *pdev)writel_relaxed (0 , pcie->base +SMP8759_ENABLE + offset); virq =platform_get_irq (pdev,1 ); -if (virq <=0 ) { -dev_err (dev,"Failed to map IRQ\n" ); +if (virq <=0 )return -ENXIO ; - } irq_dom =irq_domain_create_linear (fwnode,MSI_MAX , &dom_ops, pcie);if (!irq_dom) {
drivers/pci/controller/pcie-xilinx-nwl.c +2 -9
@@ -586,7 +586,6 @@ static int nwl_pcie_enable_msi(struct nwl_pcie *pcie)/* Get msi_1 IRQ number */ msi->irq_msi1 =platform_get_irq_byname (pdev,"msi1" );if (msi->irq_msi1 <0 ) { -dev_err (dev,"failed to get IRQ#%d\n" , msi->irq_msi1); ret = -EINVAL ; goto err; }
@@ -597,7 +596,6 @@ static int nwl_pcie_enable_msi(struct nwl_pcie *pcie)/* Get msi_0 IRQ number */ msi->irq_msi0 =platform_get_irq_byname (pdev,"msi0" );if (msi->irq_msi0 <0 ) { -dev_err (dev,"failed to get IRQ#%d\n" , msi->irq_msi0); ret = -EINVAL ; goto err; }
@@ -728,11 +726,8 @@ static int nwl_pcie_bridge_init(struct nwl_pcie *pcie)/* Get misc IRQ number */ pcie->irq_misc =platform_get_irq_byname (pdev,"misc" ); -if (pcie->irq_misc <0 ) { -dev_err (dev,"failed to get misc IRQ %d\n" , - pcie->irq_misc); +if (pcie->irq_misc <0 )return -EINVAL ; - } err = devm_request_irq(dev, pcie->irq_misc, nwl_pcie_misc_handler, IRQF_SHARED,
@@ -797,10 +792,8 @@ static int nwl_pcie_parse_dt(struct nwl_pcie *pcie,/* Get intx IRQ number */ pcie->irq_intx =platform_get_irq_byname (pdev,"intx" ); -if (pcie->irq_intx <0 ) { -dev_err (dev,"failed to get intx IRQ %d\n" , pcie->irq_intx); +if (pcie->irq_intx <0 )return pcie->irq_intx; - }irq_set_chained_handler_and_data (pcie->irq_intx, nwl_pcie_leg_handler, pcie);
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 31/57] pci: Remove dev_err() usage after platform_get_irq()
[+cc Lorenzo, maintainer of native host bridge drivers] [+cc maintainers of drivers with additional questions below]
Please run "git log --oneline drivers/pci/controller" and match the style, e.g.,
PCI: Remove dev_err() usage after platform_get_irq()
Quoted 3 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
Lorenzo will take care of this, but it looks good to me.
I *would* like to include the reference for the commit that added the error message in platform_get_irq() (or maybe it's in something *called* by platform_get_irq() -- I didn't bother to dig deeper). But folks might care about making sure that message is there before back-porting this patch.
There are a few comments below, but they don't affect *this* patch; they're incidental comments for things in the context lines that look wrong.
So, after fixing the subject and adding the commit reference, you can add my
Quoted 121 lines
// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>While we're here, remove braces on if statements that only have one statement (manually).
Cc Bjorn Helgaas <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
drivers/pci/controller/dwc/pci-dra7xx.c | 8 ++------ drivers/pci/controller/dwc/pci-exynos.c | 8 ++------ drivers/pci/controller/dwc/pci-imx6.c | 4 +--- drivers/pci/controller/dwc/pci-keystone.c | 4 +--- drivers/pci/controller/dwc/pci-meson.c | 4 +--- drivers/pci/controller/dwc/pcie-armada8k.c | 4 +--- drivers/pci/controller/dwc/pcie-artpec6.c | 4 +--- drivers/pci/controller/dwc/pcie-histb.c | 4 +--- drivers/pci/controller/dwc/pcie-kirin.c | 5 +---- drivers/pci/controller/dwc/pcie-spear13xx.c | 4 +--- drivers/pci/controller/pci-tegra.c | 8 ++------ drivers/pci/controller/pci-v3-semi.c | 4 +--- drivers/pci/controller/pci-xgene-msi.c | 2 -- drivers/pci/controller/pcie-altera-msi.c | 1 - drivers/pci/controller/pcie-altera.c | 4 +--- drivers/pci/controller/pcie-mobiveil.c | 4 +--- drivers/pci/controller/pcie-rockchip-host.c | 12 +++--------- drivers/pci/controller/pcie-tango.c | 4 +--- drivers/pci/controller/pcie-xilinx-nwl.c | 11 ++--------- 19 files changed, 23 insertions(+), 76 deletions(-)drivers/pci/controller/dwc/pci-dra7xx.c +2
-6@@ -462,10 +462,8 @@ static int __init dra7xx_add_pcie_port(struct dra7xx_pcie *dra7xx,struct resource *res; pp->irq =platform_get_irq (pdev,1 ); -if (pp->irq <0 ) { -dev_err (dev,"missing IRQ resource\n" ); +if (pp->irq <0 )return pp->irq; - } ret = devm_request_irq(dev, pp->irq, dra7xx_pcie_msi_irq_handler, IRQF_SHARED | IRQF_NO_THREAD,@@ -713,10 +711,8 @@ static int __init dra7xx_pcie_probe(struct platform_device *pdev) pci->ops = &dw_pcie_ops; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"missing IRQ resource: %d\n" , irq); +if (irq <0 )return irq; - } res =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"ti_conf" ); base =devm_ioremap_nocache (dev, res->start,resource_size (res));drivers/pci/controller/dwc/pci-exynos.c +2
-6@@ -402,10 +402,8 @@ static int __init exynos_add_pcie_port(struct exynos_pcie *ep,int ret; pp->irq =platform_get_irq (pdev,1 ); -if (pp->irq <0 ) { -dev_err (dev,"failed to get irq\n" ); +if (pp->irq <0 )return pp->irq; - } ret =devm_request_irq (dev, pp->irq, exynos_pcie_irq_handler,IRQF_SHARED ,"exynos-pcie" , ep);if (ret) {@@ -415,10 +413,8 @@ static int __init exynos_add_pcie_port(struct exynos_pcie *ep,if (IS_ENABLED (CONFIG_PCI_MSI )) { pp->msi_irq =platform_get_irq (pdev,0 ); -if (pp->msi_irq <0 ) { -dev_err (dev,"failed to get msi irq\n" ); +if (pp->msi_irq <0 )return pp->msi_irq; - } } pp->ops = &exynos_pcie_host_ops;drivers/pci/controller/dwc/pci-imx6.c +0
-0
drivers/pci/controller/dwc/pci-imx6.c static int imx6_add_pcie_port(struct imx6_pcie *imx6_pcie, · line 871
Quoted 7 lines
drivers/pci/controller/dwc/pci-imx6.c +1
-2@@ -867,10 +867,8 @@ static int imx6_add_pcie_port(struct imx6_pcie *imx6_pcie,if (IS_ENABLED (CONFIG_PCI_MSI )) { pp->msi_irq =platform_get_irq_byname (pdev,"msi" ); -if (pp->msi_irq <=0 ) { -dev_err (dev,"failed to get MSI irq\n" ); +if (pp->msi_irq <=0 )return -ENODEV ;
Why does this return -ENODEV when most of the others return the error from platform_get_irq()? Obviously *this* patch is fine; the possible return change is material for a different patch.
Quoted 150 lines
drivers/pci/controller/dwc/pci-imx6.c +0
-1- } } pp->ops = &imx6_pcie_host_ops;drivers/pci/controller/dwc/pci-keystone.c +1
-3@@ -1247,10 +1247,8 @@ static int __init ks_pcie_probe(struct platform_device *pdev) pci->version = version; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"missing IRQ resource: %d\n" , irq); +if (irq <0 )return irq; - } ret =request_irq (irq, ks_pcie_err_irq_handler,IRQF_SHARED ,"ks-pcie-error-irq" , ks_pcie);drivers/pci/controller/dwc/pci-meson.c +1
-3@@ -500,10 +500,8 @@ static int meson_add_pcie_port(struct meson_pcie *mp,if (IS_ENABLED (CONFIG_PCI_MSI )) { pp->msi_irq =platform_get_irq (pdev,0 ); -if (pp->msi_irq <0 ) { -dev_err (dev,"failed to get MSI IRQ\n" ); +if (pp->msi_irq <0 )return pp->msi_irq; - } } pp->ops = &meson_pcie_host_ops;drivers/pci/controller/dwc/pcie-armada8k.c +1
-3@@ -249,10 +249,8 @@ static int armada8k_add_pcie_port(struct armada8k_pcie *pcie, pp->ops = &armada8k_pcie_host_ops; pp->irq =platform_get_irq (pdev,0 ); -if (pp->irq <0 ) { -dev_err (dev,"failed to get irq for port\n" ); +if (pp->irq <0 )return pp->irq; - } ret =devm_request_irq (dev, pp->irq, armada8k_pcie_irq_handler,IRQF_SHARED ,"armada8k-pcie" , pcie);drivers/pci/controller/dwc/pcie-artpec6.c +1
-3@@ -393,10 +393,8 @@ static int artpec6_add_pcie_port(struct artpec6_pcie *artpec6_pcie,if (IS_ENABLED (CONFIG_PCI_MSI )) { pp->msi_irq =platform_get_irq_byname (pdev,"msi" ); -if (pp->msi_irq <0 ) { -dev_err (dev,"failed to get MSI irq\n" ); +if (pp->msi_irq <0 )return pp->msi_irq; - } } pp->ops = &artpec6_pcie_host_ops;drivers/pci/controller/dwc/pcie-histb.c +1
-3@@ -402,10 +402,8 @@ static int histb_pcie_probe(struct platform_device *pdev)if (IS_ENABLED (CONFIG_PCI_MSI )) { pp->msi_irq =platform_get_irq_byname (pdev,"msi" ); -if (pp->msi_irq <0 ) { -dev_err (dev,"Failed to get MSI IRQ\n" ); +if (pp->msi_irq <0 )return pp->msi_irq; - } } hipcie->phy =devm_phy_get (dev,"phy" );drivers/pci/controller/dwc/pcie-kirin.c +1
-4@@ -455,11 +455,8 @@ static int kirin_pcie_add_msi(struct dw_pcie *pci,if (IS_ENABLED (CONFIG_PCI_MSI )) { irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev, -"failed to get MSI IRQ (%d)\n" , irq); +if (irq <0 )return irq; - } pci->pp.msi_irq = irq; }drivers/pci/controller/dwc/pcie-spear13xx.c +1
-3@@ -198,10 +198,8 @@ static int spear13xx_add_pcie_port(struct spear13xx_pcie *spear13xx_pcie,int ret; pp->irq =platform_get_irq (pdev,0 ); -if (pp->irq <0 ) { -dev_err (dev,"failed to get irq\n" ); +if (pp->irq <0 )return pp->irq; - } ret =devm_request_irq (dev, pp->irq, spear13xx_pcie_irq_handler,IRQF_SHARED |IRQF_NO_THREAD ,"spear1340-pcie" , spear13xx_pcie);drivers/pci/controller/pci-tegra.c +2
-6@@ -1549,10 +1549,8 @@ static int tegra_pcie_get_resources(struct tegra_pcie *pcie)/* request interrupt */ err =platform_get_irq_byname (pdev,"intr" ); -if (err <0 ) { -dev_err (dev,"failed to get IRQ: %d\n" , err); +if (err <0 ) goto phys_put; - } pcie->irq = err;@@ -1767,10 +1765,8 @@ static int tegra_pcie_msi_setup(struct tegra_pcie *pcie) } err =platform_get_irq_byname (pdev,"msi" ); -if (err <0 ) { -dev_err (dev,"failed to get IRQ: %d\n" , err); +if (err <0 ) goto free_irq_domain; - } msi->irq = err;drivers/pci/controller/pci-v3-semi.c +0
-0
drivers/pci/controller/pci-v3-semi.c static int v3_pci_probe(struct platform_device *pdev) · line 807
Quoted 6 lines
drivers/pci/controller/pci-v3-semi.c +1
-2@@ -804,10 +804,8 @@ static int v3_pci_probe(struct platform_device *pdev)/* Get and request error IRQ resource */ irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (dev,"unable to obtain PCIv3 error IRQ\n" ); +if (irq <=0 )
Why does this test for <= 0 when all the others test for < 0? Again, obviously that would be material for a separate patch.
Quoted 51 lines
drivers/pci/controller/pci-v3-semi.c +0
-1return -ENODEV ; - } ret =devm_request_irq (dev, irq, v3_irq,0 ,"PCIv3 error" , v3);if (ret <0 ) {drivers/pci/controller/pci-xgene-msi.c +0
-2@@ -478,8 +478,6 @@ static int xgene_msi_probe(struct platform_device *pdev)for (irq_index =0 ; irq_index <NR_HW_IRQS ; irq_index++) { virt_msir =platform_get_irq (pdev, irq_index);if (virt_msir <0 ) { -dev_err (&pdev->dev,"Cannot translate IRQ index %d\n" , - irq_index); rc = virt_msir; goto error; }drivers/pci/controller/pcie-altera-msi.c +0
-1@@ -256,7 +256,6 @@ static int altera_msi_probe(struct platform_device *pdev) msi->irq =platform_get_irq (pdev,0 );if (msi->irq <0 ) { -dev_err (&pdev->dev,"failed to map IRQ: %d\n" , msi->irq); ret = msi->irq; goto err; }drivers/pci/controller/pcie-altera.c +1
-3@@ -747,10 +747,8 @@ static int altera_pcie_parse_dt(struct altera_pcie *pcie)/* setup IRQ */ pcie->irq =platform_get_irq (pdev,0 ); -if (pcie->irq <0 ) { -dev_err (dev,"failed to get IRQ: %d\n" , pcie->irq); +if (pcie->irq <0 )return pcie->irq; - }irq_set_chained_handler_and_data (pcie->irq, altera_pcie_isr, pcie);return 0 ;drivers/pci/controller/pcie-mobiveil.c +0
-0
drivers/pci/controller/pcie-mobiveil.c static int mobiveil_pcie_parse_dt(struct mobiveil_pcie *pcie) · line 457
Quoted 7 lines
drivers/pci/controller/pcie-mobiveil.c +1
-2@@ -453,10 +453,8 @@ static int mobiveil_pcie_parse_dt(struct mobiveil_pcie *pcie) pcie->ppio_wins =MAX_PIO_WINDOWS ; pcie->irq =platform_get_irq (pdev,0 ); -if (pcie->irq <=0 ) { -dev_err (dev,"failed to map IRQ: %d\n" , pcie->irq); +if (pcie->irq <=0 )return -ENODEV ;
Why -ENODEV instead of the failure returned by platform_get_irq()? And why <= 0 instead of < 0?
Quoted 48 lines
drivers/pci/controller/pcie-mobiveil.c +0
-1- }return 0 ; }drivers/pci/controller/pcie-rockchip-host.c +3
-9@@ -549,10 +549,8 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip)struct platform_device *pdev =to_platform_device (dev); irq =platform_get_irq_byname (pdev,"sys" ); -if (irq <0 ) { -dev_err (dev,"missing sys IRQ resource\n" ); +if (irq <0 )return irq; - } err =devm_request_irq (dev, irq, rockchip_pcie_subsys_irq_handler,IRQF_SHARED ,"pcie-sys" , rockchip);@@ -562,20 +560,16 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip) } irq =platform_get_irq_byname (pdev,"legacy" ); -if (irq <0 ) { -dev_err (dev,"missing legacy IRQ resource\n" ); +if (irq <0 )return irq; - }irq_set_chained_handler_and_data (irq, rockchip_pcie_legacy_int_handler, rockchip); irq =platform_get_irq_byname (pdev,"client" ); -if (irq <0 ) { -dev_err (dev,"missing client IRQ resource\n" ); +if (irq <0 )return irq; - } err =devm_request_irq (dev, irq, rockchip_pcie_client_irq_handler,IRQF_SHARED ,"pcie-client" , rockchip);drivers/pci/controller/pcie-tango.c +0
-0
drivers/pci/controller/pcie-tango.c static int tango_pcie_probe(struct platform_device *pdev) · line 277
Quoted 7 lines
drivers/pci/controller/pcie-tango.c +1
-2@@ -273,10 +273,8 @@ static int tango_pcie_probe(struct platform_device *pdev)writel_relaxed (0 , pcie->base +SMP8759_ENABLE + offset); virq =platform_get_irq (pdev,1 ); -if (virq <=0 ) { -dev_err (dev,"Failed to map IRQ\n" ); +if (virq <=0 )return -ENXIO ;
Why <= 0 and -ENXIO?
Quoted 9 lines
drivers/pci/controller/pcie-tango.c +0
-1- } irq_dom =irq_domain_create_linear (fwnode,MSI_MAX , &dom_ops, pcie);if (!irq_dom) {drivers/pci/controller/pcie-xilinx-nwl.c +0
-0
drivers/pci/controller/pcie-xilinx-nwl.c static int nwl_pcie_enable_msi(struct nwl_pcie *pcie) · line 589
Quoted 5 lines
drivers/pci/controller/pcie-xilinx-nwl.c +0
-1@@ -586,7 +586,6 @@ static int nwl_pcie_enable_msi(struct nwl_pcie *pcie)/* Get msi_1 IRQ number */ msi->irq_msi1 =platform_get_irq_byname (pdev,"msi1" );if (msi->irq_msi1 <0 ) { -dev_err (dev,"failed to get IRQ#%d\n" , msi->irq_msi1); ret = -EINVAL ;
Why -EINVAL instead of error from platform_get_irq_byname()?
drivers/pci/controller/pcie-xilinx-nwl.c static int nwl_pcie_enable_msi(struct nwl_pcie *pcie) · line 599
Quoted 8 lines
drivers/pci/controller/pcie-xilinx-nwl.c +0
-1goto err; }@@ -597,7 +596,6 @@ static int nwl_pcie_enable_msi(struct nwl_pcie *pcie)/* Get msi_0 IRQ number */ msi->irq_msi0 =platform_get_irq_byname (pdev,"msi0" );if (msi->irq_msi0 <0 ) { -dev_err (dev,"failed to get IRQ#%d\n" , msi->irq_msi0); ret = -EINVAL ;
Again.
drivers/pci/controller/pcie-xilinx-nwl.c static int nwl_pcie_bridge_init(struct nwl_pcie *pcie) · line 730
Quoted 11 lines
drivers/pci/controller/pcie-xilinx-nwl.c +1
-3goto err; }@@ -728,11 +726,8 @@ static int nwl_pcie_bridge_init(struct nwl_pcie *pcie)/* Get misc IRQ number */ pcie->irq_misc =platform_get_irq_byname (pdev,"misc" ); -if (pcie->irq_misc <0 ) { -dev_err (dev,"failed to get misc IRQ %d\n" , - pcie->irq_misc); +if (pcie->irq_misc <0 )return -EINVAL ;
Again.
Quoted 19 lines
drivers/pci/controller/pcie-xilinx-nwl.c +1
-4- } err = devm_request_irq(dev, pcie->irq_misc, nwl_pcie_misc_handler, IRQF_SHARED,@@ -797,10 +792,8 @@ static int nwl_pcie_parse_dt(struct nwl_pcie *pcie,/* Get intx IRQ number */ pcie->irq_intx =platform_get_irq_byname (pdev,"intx" ); -if (pcie->irq_intx <0 ) { -dev_err (dev,"failed to get intx IRQ %d\n" , pcie->irq_intx); +if (pcie->irq_intx <0 )return pcie->irq_intx; - }irq_set_chained_handler_and_data (pcie->irq_intx, nwl_pcie_leg_handler, pcie);Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 31/57] pci: Remove dev_err() usage after platform_get_irq()
Quoted 7 lines · Bjorn Helgaas
Quoted 7 lines
drivers/pci/controller/pcie-tango.c +0
-0@@ -273,10 +273,8 @@ static int tango_pcie_probe(struct platform_device *pdev)writel_relaxed (0 , pcie->base +SMP8759_ENABLE + offset);
Quoted 7 lines
drivers/pci/controller/pcie-tango.c static int tango_pcie_probe(struct platform_device *pdev) · line 277
Quoted 5 lines
drivers/pci/controller/pcie-tango.c +1
-2virq =platform_get_irq (pdev,1 ); -if (virq <=0 ) { -dev_err (dev,"Failed to map IRQ\n" ); +if (virq <=0 )return -ENXIO ;Why <= 0 and
-ENXIO?
Smirk. I remember discussing this in the past...
Here it is:
https://patchwork.kernel.org/patch/10006651/
A) AFAIU platform_get_irq() = 0 signals an error.
https://yarchive.net/comp/linux/zero.html https://lkml.org/lkml/2016/2/9/212 https://patchwork.ozlabs.org/patch/486056/
B) I don't remember why I picked ENXIO.
Perhaps it made more sense to me (at the time) than EINVAL or ENODEV.
Regards.
Re: [PATCH v6 31/57] pci: Remove dev_err() usage after platform_get_irq()
Quoted 17 lines · Marc Gonzalez
Quoted 7 lines · Bjorn Helgaas
Quoted 7 lines
drivers/pci/controller/pcie-tango.c +0
-0@@ -273,10 +273,8 @@ static int tango_pcie_probe(struct platform_device *pdev)writel_relaxed (0 , pcie->base +SMP8759_ENABLE + offset);Quoted 7 lines
drivers/pci/controller/pcie-tango.c static int tango_pcie_probe(struct platform_device *pdev) · line 277
Quoted 5 lines
drivers/pci/controller/pcie-tango.c +1
-2virq =platform_get_irq (pdev,1 ); -if (virq <=0 ) { -dev_err (dev,"Failed to map IRQ\n" ); +if (virq <=0 )return -ENXIO ;Why <= 0 and
-ENXIO?
Quoted 4 lines
Smirk. I remember discussing this in the past...
Here it is:https://patchwork.kernel.org/patch/10006651/
Sigh, what a mess. I did say in that discussion that it wasn't worth changing existing "irq <= 0" tests. I can't remember why I said that, but I think I was wrong.
platform_get_irq() is a generic interface and we have to be able to interpret return values consistently. The overwhelming consensus among platform_get_irq() callers is to treat "irq < 0" as an error, and I think we should follow suit.
Quoted 8 lines
A) AFAIU
platform_get_irq()= 0 signals an error.https://yarchive.net/comp/linux/zero.html https://lkml.org/lkml/2016/2/9/212 https://patchwork.ozlabs.org/patch/486056/B) I don't remember why I picked ENXIO.
Perhaps it made more sense to me (at the time) than EINVAL or ENODEV.
I think the best pattern is:
irq = platform_get_irq(pdev, i);
if (irq < 0)
return irq;There's not an overwhelming consensus on whether to return the result of platform_get_irq() or a hard-coded -ENXIO/-EINVAL/-ENODEV etc, but why throw away information?
Bjorn
Re: [PATCH v6 31/57] pci: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydHi Stephen,
Quoted 55 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>While we're here, remove braces on if statements that only have one statement (manually).
Cc Bjorn Helgaas <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
drivers/pci/controller/dwc/pci-dra7xx.c | 8 ++------ drivers/pci/controller/dwc/pci-exynos.c | 8 ++------ drivers/pci/controller/dwc/pci-imx6.c | 4 +--- drivers/pci/controller/dwc/pci-keystone.c | 4 +--- drivers/pci/controller/dwc/pci-meson.c | 4 +--- drivers/pci/controller/dwc/pcie-armada8k.c | 4 +--- drivers/pci/controller/dwc/pcie-artpec6.c | 4 +--- drivers/pci/controller/dwc/pcie-histb.c | 4 +--- drivers/pci/controller/dwc/pcie-kirin.c | 5 +---- drivers/pci/controller/dwc/pcie-spear13xx.c | 4 +--- drivers/pci/controller/pci-tegra.c | 8 ++------ drivers/pci/controller/pci-v3-semi.c | 4 +---
Quoted 8 lines
drivers/pci/controller/pci-xgene-msi.c | 2 -- drivers/pci/controller/pcie-altera-msi.c | 1 - drivers/pci/controller/pcie-altera.c | 4 +--- drivers/pci/controller/pcie-mobiveil.c | 4 +--- drivers/pci/controller/pcie-rockchip-host.c | 12 +++--------- drivers/pci/controller/pcie-tango.c | 4 +--- drivers/pci/controller/pcie-xilinx-nwl.c | 11 ++--------- 19 files changed, 23 insertions(+), 76 deletions(-)
Failed to catch:
drivers/pci/controller/pci-rcar-gen2.c: priv->irq = platform_get_irq(pdev, 0); drivers/pci/controller/pci-rcar-gen2.c- priv->reg = reg; drivers/pci/controller/pci-rcar-gen2.c- priv->dev = dev; drivers/pci/controller/pci-rcar-gen2.c- drivers/pci/controller/pci-rcar-gen2.c- if (priv->irq < 0) {drivers/pci/controller/pci-rcar-gen2.c- dev_err(dev, "no valid
irq found\n");drivers/pci/controller/pci-rcar-gen2.c- return priv->irq;drivers/pci/controller/pci-rcar-gen2.c- }
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH v6 31/57] pci: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydQuoted 3 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
(...)
Quoted 7 lines
While we're here, remove braces on if statements that only have one statement (manually).
Cc Bjorn Helgaas <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>
Yours,
Linus Walleij
PATCH v6 32/57 perf: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 4 +--- drivers/perf/hisilicon/hisi_uncore_hha_pmu.c | 4 +--- drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 4 +--- drivers/perf/qcom_l2_pmu.c | 6 +----- drivers/perf/xgene_pmu.c | 4 +--- 5 files changed, 5 insertions(+), 17 deletions(-)
drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c +1 -3
@@ -217,10 +217,8 @@ static int hisi_ddrc_pmu_init_irq(struct hisi_pmu *ddrc_pmu,/* Read and init IRQ */ irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"DDRC PMU get irq fail; irq:%d\n" , irq); +if (irq <0 )return irq; - } ret = devm_request_irq(&pdev->dev, irq, hisi_ddrc_pmu_isr, IRQF_NOBALANCING | IRQF_NO_THREAD,
drivers/perf/hisilicon/hisi_uncore_hha_pmu.c +1 -3
@@ -207,10 +207,8 @@ static int hisi_hha_pmu_init_irq(struct hisi_pmu *hha_pmu,/* Read and init IRQ */ irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"HHA PMU get irq fail; irq:%d\n" , irq); +if (irq <0 )return irq; - } ret = devm_request_irq(&pdev->dev, irq, hisi_hha_pmu_isr, IRQF_NOBALANCING | IRQF_NO_THREAD,
drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c +1 -3
@@ -206,10 +206,8 @@ static int hisi_l3c_pmu_init_irq(struct hisi_pmu *l3c_pmu,/* Read and init IRQ */ irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"L3C PMU get irq fail; irq:%d\n" , irq); +if (irq <0 )return irq; - } ret = devm_request_irq(&pdev->dev, irq, hisi_l3c_pmu_isr, IRQF_NOBALANCING | IRQF_NO_THREAD,
drivers/perf/qcom_l2_pmu.c +1 -5
@@ -909,12 +909,8 @@ static int l2_cache_pmu_probe_cluster(struct device *dev, void *data) cluster->cluster_id = fw_cluster_id; irq =platform_get_irq (sdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev, -"Failed to get valid irq for cluster %ld\n" , - fw_cluster_id); +if (irq <0 )return irq; - }irq_set_status_flags (irq,IRQ_NOAUTOEN ); cluster->irq = irq;
drivers/perf/xgene_pmu.c +1 -3
@@ -1901,10 +1901,8 @@ static int xgene_pmu_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"No IRQ resource\n" ); +if (irq <0 )return -EINVAL ; - } rc = devm_request_irq(&pdev->dev, irq, xgene_pmu_isr, IRQF_NOBALANCING | IRQF_NO_THREAD,
Signature · 7 lines
Sent by a computer through tubes _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v6 32/57] perf: Remove dev_err() usage after platform_get_irq()
Quoted 32 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>
Quoted 8 lines
While we're here, remove braces on if statements that only have one statement (manually).
Cc Will Deacon <[email protected]>Cc Mark Rutland <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>
Please let me know if you'd rather I route this via the arm-perf tree.
Will
Re: [PATCH v6 32/57] perf: Remove dev_err() usage after platform_get_irq()
Quoting Will Deacon (2019-07-31 01:40:57)
Quoted 10 lines · Stephen Boyd
Quoted 4 lines
Cc Mark Rutland <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>Acked-by Will Deacon <[email protected]>Please let me know if you'd rather I route this via the arm-perf tree.
Yes, please route it through the arm-perf tree as v5.4 material.
PATCH v6 33/57 pinctrl: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/pinctrl/pinctrl-amd.c | 4 +--- drivers/pinctrl/pinctrl-oxnas.c | 4 +--- drivers/pinctrl/pinctrl-pic32.c | 4 +--- drivers/pinctrl/pinctrl-stmfx.c | 4 +--- drivers/pinctrl/qcom/pinctrl-msm.c | 4 +--- drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c | 5 +---- 6 files changed, 6 insertions(+), 19 deletions(-)
drivers/pinctrl/pinctrl-amd.c +1 -3
@@ -861,10 +861,8 @@ static int amd_gpio_probe(struct platform_device *pdev)return -ENOMEM ; irq_base =platform_get_irq (pdev,0 ); -if (irq_base <0 ) { -dev_err (&pdev->dev,"Failed to get gpio IRQ: %d\n" , irq_base); +if (irq_base <0 )return irq_base; - }#ifdef CONFIG_PM_SLEEP gpio_dev->saved_regs = devm_kcalloc(&pdev->dev, amd_pinctrl_desc.npins,
drivers/pinctrl/pinctrl-oxnas.c +1 -3
@@ -1229,10 +1229,8 @@ static int oxnas_gpio_probe(struct platform_device *pdev)return PTR_ERR (bank->reg_base); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"irq get failed\n" ); +if (irq <0 )return irq; - } bank->id = id; bank->gpio_chip.parent = &pdev->dev;
drivers/pinctrl/pinctrl-pic32.c +1 -3
@@ -2222,10 +2222,8 @@ static int pic32_gpio_probe(struct platform_device *pdev)return PTR_ERR (bank->reg_base); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"irq get failed\n" ); +if (irq <0 )return irq; - } bank->clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (bank->clk)) {
drivers/pinctrl/pinctrl-stmfx.c +1 -3
@@ -608,10 +608,8 @@ static int stmfx_pinctrl_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (pctl->dev,"failed to get irq\n" ); +if (irq <=0 )return -ENXIO ; - }mutex_init (&pctl->lock);
drivers/pinctrl/qcom/pinctrl-msm.c +1 -3
@@ -1160,10 +1160,8 @@ int msm_pinctrl_probe(struct platform_device *pdev,msm_pinctrl_setup_pm_reset (pctrl); pctrl->irq =platform_get_irq (pdev,0 ); -if (pctrl->irq <0 ) { -dev_err (&pdev->dev,"No interrupt defined for msmgpio\n" ); +if (pctrl->irq <0 )return pctrl->irq; - } pctrl->desc.owner =THIS_MODULE ; pctrl->desc.pctlops = &msm_pinctrl_ops;
drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c +1 -4
@@ -791,11 +791,8 @@ static int pm8xxx_mpp_probe(struct platform_device *pdev)for (i =0 ; i < pctrl->desc.npins; i++) { pin_data[i].reg =SSBI_REG_ADDR_MPP (i); pin_data[i].irq =platform_get_irq (pdev, i); -if (pin_data[i].irq <0 ) { -dev_err (&pdev->dev, -"missing interrupts for pin %d\n" , i); +if (pin_data[i].irq <0 )return pin_data[i].irq; - } ret =pm8xxx_pin_populate (pctrl, &pin_data[i]);if (ret)
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 33/57] pinctrl: Remove dev_err() usage after platform_get_irq()
Quoted 3 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
(...)
Quoted 7 lines
While we're here, remove braces on if statements that only have one statement (manually).
Cc Linus Walleij <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>
Patch applied to the pinctrl tree!
Nice work.
Yours,
Linus Walleij
PATCH v6 34/57 pinctrl: intel: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/pinctrl/intel/pinctrl-cherryview.c | 4 +--- drivers/pinctrl/intel/pinctrl-intel.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/pinctrl/intel/pinctrl-cherryview.c +1 -3
@@ -1703,10 +1703,8 @@ static int chv_pinctrl_probe(struct platform_device *pdev)return PTR_ERR (pctrl->regs); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get interrupt number\n" ); +if (irq <0 )return irq; - } pctrl->pctldesc = chv_pinctrl_desc; pctrl->pctldesc.name =dev_name (&pdev->dev);
drivers/pinctrl/intel/pinctrl-intel.c +1 -3
@@ -1354,10 +1354,8 @@ static int intel_pinctrl_probe(struct platform_device *pdev, } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get interrupt number\n" ); +if (irq <0 )return irq; - } ret =intel_pinctrl_pm_init (pctrl);if (ret)
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 34/57] pinctrl: intel: Remove dev_err() usage after platform_get_irq()
Quoted 32 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>
Quoted 2 lines
While we're here, remove braces on if statements that only have one statement (manually).
Also, per file, but I will do it myself when applying, thanks!
Quoted 50 lines
Cc Linus Walleij <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Mika Westerberg <[email protected]>Cc Andy Shevchenko <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
drivers/pinctrl/intel/pinctrl-cherryview.c | 4 +--- drivers/pinctrl/intel/pinctrl-intel.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)drivers/pinctrl/intel/pinctrl-cherryview.c +1
-3@@ -1703,10 +1703,8 @@ static int chv_pinctrl_probe(struct platform_device *pdev)return PTR_ERR (pctrl->regs); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get interrupt number\n" ); +if (irq <0 )return irq; - } pctrl->pctldesc = chv_pinctrl_desc; pctrl->pctldesc.name =dev_name (&pdev->dev);drivers/pinctrl/intel/pinctrl-intel.c +1
-3@@ -1354,10 +1354,8 @@ static int intel_pinctrl_probe(struct platform_device *pdev, } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get interrupt number\n" ); +if (irq <0 )return irq; - } ret =intel_pinctrl_pm_init (pctrl);if (ret)Signature · 1 line
Sent by a computer through tubes
Signature · 2 lines
With Best Regards, Andy Shevchenko
Re: [PATCH v6 34/57] pinctrl: intel: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydQuoted 32 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>
Quoted 2 lines
While we're here, remove braces on if statements that only have one statement (manually).
Pushed to my review and testing queue, thanks!
Quoted 50 lines
Cc Linus Walleij <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Mika Westerberg <[email protected]>Cc Andy Shevchenko <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
drivers/pinctrl/intel/pinctrl-cherryview.c | 4 +--- drivers/pinctrl/intel/pinctrl-intel.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)drivers/pinctrl/intel/pinctrl-cherryview.c +1
-3@@ -1703,10 +1703,8 @@ static int chv_pinctrl_probe(struct platform_device *pdev)return PTR_ERR (pctrl->regs); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get interrupt number\n" ); +if (irq <0 )return irq; - } pctrl->pctldesc = chv_pinctrl_desc; pctrl->pctldesc.name =dev_name (&pdev->dev);drivers/pinctrl/intel/pinctrl-intel.c +1
-3@@ -1354,10 +1354,8 @@ static int intel_pinctrl_probe(struct platform_device *pdev, } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get interrupt number\n" ); +if (irq <0 )return irq; - } ret =intel_pinctrl_pm_init (pctrl);if (ret)Signature · 1 line
Sent by a computer through tubes
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH v6 35/57 power: supply: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/power/supply/88pm860x_battery.c | 8 ++------ drivers/power/supply/axp288_charger.c | 4 +--- drivers/power/supply/bd70528-charger.c | 5 +---- drivers/power/supply/da9150-charger.c | 8 ++------ drivers/power/supply/da9150-fg.c | 1 - drivers/power/supply/goldfish_battery.c | 4 +--- drivers/power/supply/jz4740-battery.c | 4 +--- drivers/power/supply/qcom_smbb.c | 5 +---- drivers/power/supply/sc27xx_fuel_gauge.c | 4 +--- 9 files changed, 10 insertions(+), 33 deletions(-)
drivers/power/supply/88pm860x_battery.c +2 -6
@@ -919,16 +919,12 @@ static int pm860x_battery_probe(struct platform_device *pdev)return -ENOMEM ; info->irq_cc =platform_get_irq (pdev,0 ); -if (info->irq_cc <=0 ) { -dev_err (&pdev->dev,"No IRQ resource!\n" ); +if (info->irq_cc <=0 )return -EINVAL ; - } info->irq_batt =platform_get_irq (pdev,1 ); -if (info->irq_batt <=0 ) { -dev_err (&pdev->dev,"No IRQ resource!\n" ); +if (info->irq_batt <=0 )return -EINVAL ; - } info->chip = chip; info->i2c =
drivers/power/supply/axp288_charger.c +1 -3
@@ -825,10 +825,8 @@ static int axp288_charger_probe(struct platform_device *pdev)/* Register charger interrupts */ for (i =0 ; i <CHRG_INTR_END ; i++) { pirq =platform_get_irq (info->pdev, i); -if (pirq <0 ) { -dev_err (&pdev->dev,"Failed to get IRQ: %d\n" , pirq); +if (pirq <0 )return pirq; - } info->irq[i] =regmap_irq_get_virq (info->regmap_irqc, pirq);if (info->irq[i] <0 ) { dev_warn(&info->pdev->dev,
drivers/power/supply/bd70528-charger.c +1 -4
@@ -168,11 +168,8 @@ static int bd70528_get_irqs(struct platform_device *pdev,for (i =0 ; i <ARRAY_SIZE (bd70528_chg_irqs); i++) { irq =platform_get_irq_byname (pdev, bd70528_chg_irqs[i].n); -if (irq <0 ) { -dev_err (&pdev->dev,"Bad IRQ information for %s (%d)\n" , - bd70528_chg_irqs[i].n, irq); +if (irq <0 )return irq; - } ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, bd70528_chg_irqs[i].h, IRQF_ONESHOT,
drivers/power/supply/da9150-charger.c +2 -6
@@ -466,10 +466,8 @@ static int da9150_charger_register_irq(struct platform_device *pdev,int irq, ret; irq =platform_get_irq_byname (pdev, irq_name); -if (irq <0 ) { -dev_err (dev,"Failed to get IRQ CHG_STATUS: %d\n" , irq); +if (irq <0 )return irq; - } ret =request_threaded_irq (irq,NULL , handler,IRQF_ONESHOT , irq_name, charger);
@@ -487,10 +485,8 @@ static void da9150_charger_unregister_irq(struct platform_device *pdev,int irq; irq =platform_get_irq_byname (pdev, irq_name); -if (irq <0 ) { -dev_err (dev,"Failed to get IRQ CHG_STATUS: %d\n" , irq); +if (irq <0 )return ; - }free_irq (irq, charger); }
drivers/power/supply/da9150-fg.c +0 -1
@@ -514,7 +514,6 @@ static int da9150_fg_probe(struct platform_device *pdev)/* Register IRQ */ irq =platform_get_irq_byname (pdev,"FG" );if (irq <0 ) { -dev_err (dev,"Failed to get IRQ FG: %d\n" , irq); ret = irq; goto irq_fail; }
drivers/power/supply/goldfish_battery.c +1 -3
@@ -221,10 +221,8 @@ static int goldfish_battery_probe(struct platform_device *pdev) } data->irq =platform_get_irq (pdev,0 ); -if (data->irq <0 ) { -dev_err (&pdev->dev,"platform_get_irq failed\n" ); +if (data->irq <0 )return -ENODEV ; - } ret = devm_request_irq(&pdev->dev, data->irq, goldfish_battery_interrupt,
drivers/power/supply/jz4740-battery.c +1 -3
@@ -258,10 +258,8 @@ static int jz_battery_probe(struct platform_device *pdev) jz_battery->cell =mfd_get_cell (pdev); jz_battery->irq =platform_get_irq (pdev,0 ); -if (jz_battery->irq <0 ) { -dev_err (&pdev->dev,"Failed to get platform irq: %d\n" , ret); +if (jz_battery->irq <0 )return jz_battery->irq; - } mem =platform_get_resource (pdev,IORESOURCE_MEM ,0 );
drivers/power/supply/qcom_smbb.c +1 -4
@@ -929,11 +929,8 @@ static int smbb_charger_probe(struct platform_device *pdev)int irq; irq =platform_get_irq_byname (pdev, smbb_charger_irqs[i].name); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get irq '%s'\n" , - smbb_charger_irqs[i].name); +if (irq <0 )return irq; - } smbb_charger_irqs[i].handler (irq, chg);
drivers/power/supply/sc27xx_fuel_gauge.c +1 -3
@@ -1030,10 +1030,8 @@ static int sc27xx_fgu_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"no irq resource specified\n" ); +if (irq <0 )return irq; - } ret = devm_request_threaded_irq(data->dev, irq, NULL, sc27xx_fgu_interrupt,
Signature · 1 line
Sent by a computer through tubes
PATCH v6 36/57 pwm: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/pwm/pwm-sti.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pwm/pwm-sti.c +1 -3
@@ -564,10 +564,8 @@ static int sti_pwm_probe(struct platform_device *pdev)return PTR_ERR (pc->regmap); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"Failed to obtain IRQ\n" ); +if (irq <0 )return irq; - } ret =devm_request_irq (&pdev->dev, irq, sti_pwm_interrupt,0 , pdev->name, pc);
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 36/57] pwm: Remove dev_err() usage after platform_get_irq()
Quoted 3 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
Looking at v5.3-rc2 it's not obvious to me that all error paths of platform_get_irq issue an error message. Do I miss something?
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |
Greg Kroah-Hartman
maintainerRe: [PATCH v6 36/57] pwm: Remove dev_err() usage after platform_get_irq()
Quoted 7 lines · Uwe Kleine-König
Quoted 3 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.Looking at v5.3-rc2 it's not obvious to me that all error paths of
platform_get_irqissue an error message. Do I miss something?
The commit is in my driver-core tree at the moment, so this should wait until 5.4-rc1. I woudn't recommend merging it in 5.3-rc as it's not a bugfix.
thanks,
greg k-h
Re: [PATCH v6 36/57] pwm: Remove dev_err() usage after platform_get_irq()
Quoted 6 lines · Greg Kroah-Hartman
Quoted 5 lines · Uwe Kleine-König
Quoted 3 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
Quoted 6 lines
Quoted 2 lines
Looking at v5.3-rc2 it's not obvious to me that all error paths of
platform_get_irqissue an error message. Do I miss something?The commit is in my driver-core tree at the moment, so this should wait until 5.4-rc1. I woudn't recommend merging it in 5.3-rc as it's not a bugfix.
As this is a new change pointing out its id in the commit log of the follow up changes might be beneficial.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH v6 37/57 regulator: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/regulator/da9062-regulator.c | 4 +--- drivers/regulator/da9063-regulator.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/regulator/da9062-regulator.c +1 -3
@@ -1032,10 +1032,8 @@ static int da9062_regulator_probe(struct platform_device *pdev)/* LDOs overcurrent event support */ irq =platform_get_irq_byname (pdev,"LDO_LIM" ); -if (irq <0 ) { -dev_err (&pdev->dev,"Failed to get IRQ.\n" ); +if (irq <0 )return irq; - } regulators->irq_ldo_lim = irq; ret = devm_request_threaded_irq(&pdev->dev, irq,
drivers/regulator/da9063-regulator.c +1 -3
@@ -863,10 +863,8 @@ static int da9063_regulator_probe(struct platform_device *pdev)/* LDOs overcurrent event support */ irq =platform_get_irq_byname (pdev,"LDO_LIM" ); -if (irq <0 ) { -dev_err (&pdev->dev,"Failed to get IRQ.\n" ); +if (irq <0 )return irq; - } ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, da9063_ldo_lim_event,
Signature · 1 line
Sent by a computer through tubes
Mark Brown
maintainerApplied "regulator: Remove dev_err() usage after platform_get_irq()" to the regulator tree
The patch
regulator: Remove dev_err() usage after platform_get_irq()
has been applied to the regulator tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-5.4
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
From 47241933b43dec5b10d067e6e094f4d31a1cf3e7 Mon Sep 17 00:00:00 2001
From: Stephen Boyd <[email protected]>
Date: Tue, 30 Jul 2019 11:15:37 -0700
Subject: [PATCH] regulator: Remove dev_err() usage after platform_get_irq()
We don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
--- drivers/regulator/da9062-regulator.c | 4 +--- drivers/regulator/da9063-regulator.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/regulator/da9062-regulator.c +1 -3
@@ -1032,10 +1032,8 @@ static int da9062_regulator_probe(struct platform_device *pdev)/* LDOs overcurrent event support */ irq =platform_get_irq_byname (pdev,"LDO_LIM" ); -if (irq <0 ) { -dev_err (&pdev->dev,"Failed to get IRQ.\n" ); +if (irq <0 )return irq; - } regulators->irq_ldo_lim = irq; ret = devm_request_threaded_irq(&pdev->dev, irq,
drivers/regulator/da9063-regulator.c +1 -3
@@ -863,10 +863,8 @@ static int da9063_regulator_probe(struct platform_device *pdev)/* LDOs overcurrent event support */ irq =platform_get_irq_byname (pdev,"LDO_LIM" ); -if (irq <0 ) { -dev_err (&pdev->dev,"Failed to get IRQ.\n" ); +if (irq <0 )return irq; - } ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, da9063_ldo_lim_event,
Signature · 1 line
2.20.1
PATCH v6 38/57 remoteproc: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/remoteproc/da8xx_remoteproc.c | 4 +-- drivers/remoteproc/keystone_remoteproc.c | 4 --- drivers/remoteproc/qcom_q6v5.c | 35 ++++-------------------- 3 files changed, 6 insertions(+), 37 deletions(-)
drivers/remoteproc/da8xx_remoteproc.c +1 -3
@@ -249,10 +249,8 @@ static int da8xx_rproc_probe(struct platform_device *pdev)int ret; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"platform_get_irq(pdev, 0) error: %d\n" , irq); +if (irq <0 )return irq; - } irq_data =irq_get_irq_data (irq);if (!irq_data) {
drivers/remoteproc/keystone_remoteproc.c +0 -4
@@ -424,16 +424,12 @@ static int keystone_rproc_probe(struct platform_device *pdev) ksproc->irq_ring =platform_get_irq_byname (pdev,"vring" );if (ksproc->irq_ring <0 ) { ret = ksproc->irq_ring; -dev_err (dev,"failed to get vring interrupt, status = %d\n" , - ret); goto disable_clk; } ksproc->irq_fault =platform_get_irq_byname (pdev,"exception" );if (ksproc->irq_fault <0 ) { ret = ksproc->irq_fault; -dev_err (dev,"failed to get exception interrupt, status = %d\n" , - ret); goto disable_clk; }
drivers/remoteproc/qcom_q6v5.c +5 -30
@@ -187,13 +187,8 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev,init_completion (&q6v5->stop_done); q6v5->wdog_irq =platform_get_irq_byname (pdev,"wdog" ); -if (q6v5->wdog_irq <0 ) { -if (q6v5->wdog_irq != -EPROBE_DEFER ) -dev_err (&pdev->dev, -"failed to retrieve wdog IRQ: %d\n" , - q6v5->wdog_irq); +if (q6v5->wdog_irq <0 )return q6v5->wdog_irq; - } ret = devm_request_threaded_irq(&pdev->dev, q6v5->wdog_irq, NULL, q6v5_wdog_interrupt,
@@ -205,13 +200,8 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev, } q6v5->fatal_irq =platform_get_irq_byname (pdev,"fatal" ); -if (q6v5->fatal_irq <0 ) { -if (q6v5->fatal_irq != -EPROBE_DEFER ) -dev_err (&pdev->dev, -"failed to retrieve fatal IRQ: %d\n" , - q6v5->fatal_irq); +if (q6v5->fatal_irq <0 )return q6v5->fatal_irq; - } ret = devm_request_threaded_irq(&pdev->dev, q6v5->fatal_irq, NULL, q6v5_fatal_interrupt,
@@ -223,13 +213,8 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev, } q6v5->ready_irq =platform_get_irq_byname (pdev,"ready" ); -if (q6v5->ready_irq <0 ) { -if (q6v5->ready_irq != -EPROBE_DEFER ) -dev_err (&pdev->dev, -"failed to retrieve ready IRQ: %d\n" , - q6v5->ready_irq); +if (q6v5->ready_irq <0 )return q6v5->ready_irq; - } ret = devm_request_threaded_irq(&pdev->dev, q6v5->ready_irq, NULL, q6v5_ready_interrupt,
@@ -241,13 +226,8 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev, } q6v5->handover_irq =platform_get_irq_byname (pdev,"handover" ); -if (q6v5->handover_irq <0 ) { -if (q6v5->handover_irq != -EPROBE_DEFER ) -dev_err (&pdev->dev, -"failed to retrieve handover IRQ: %d\n" , - q6v5->handover_irq); +if (q6v5->handover_irq <0 )return q6v5->handover_irq; - } ret = devm_request_threaded_irq(&pdev->dev, q6v5->handover_irq, NULL, q6v5_handover_interrupt,
@@ -260,13 +240,8 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev,disable_irq (q6v5->handover_irq); q6v5->stop_irq =platform_get_irq_byname (pdev,"stop-ack" ); -if (q6v5->stop_irq <0 ) { -if (q6v5->stop_irq != -EPROBE_DEFER ) -dev_err (&pdev->dev, -"failed to retrieve stop-ack IRQ: %d\n" , - q6v5->stop_irq); +if (q6v5->stop_irq <0 )return q6v5->stop_irq; - } ret = devm_request_threaded_irq(&pdev->dev, q6v5->stop_irq, NULL, q6v5_stop_interrupt,
Signature · 1 line
Sent by a computer through tubes
PATCH v6 39/57 rtc: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/rtc/rtc-88pm80x.c | 1 - drivers/rtc/rtc-88pm860x.c | 4 +--- drivers/rtc/rtc-ac100.c | 4 +--- drivers/rtc/rtc-armada38x.c | 5 +---- drivers/rtc/rtc-asm9260.c | 4 +--- drivers/rtc/rtc-at91rm9200.c | 4 +--- drivers/rtc/rtc-at91sam9.c | 4 +--- drivers/rtc/rtc-bd70528.c | 5 +---- drivers/rtc/rtc-davinci.c | 4 +--- drivers/rtc/rtc-jz4740.c | 4 +--- drivers/rtc/rtc-max77686.c | 5 +---- drivers/rtc/rtc-mt7622.c | 1 - drivers/rtc/rtc-pic32.c | 4 +--- drivers/rtc/rtc-pm8xxx.c | 4 +--- drivers/rtc/rtc-puv3.c | 8 ++------ drivers/rtc/rtc-pxa.c | 8 ++------ drivers/rtc/rtc-rk808.c | 6 +----- drivers/rtc/rtc-s3c.c | 8 ++------ drivers/rtc/rtc-sc27xx.c | 4 +--- drivers/rtc/rtc-spear.c | 4 +--- drivers/rtc/rtc-stm32.c | 1 - drivers/rtc/rtc-sun6i.c | 4 +--- drivers/rtc/rtc-sunxi.c | 4 +--- drivers/rtc/rtc-tegra.c | 4 +--- drivers/rtc/rtc-vt8500.c | 4 +--- drivers/rtc/rtc-xgene.c | 4 +--- drivers/rtc/rtc-zynqmp.c | 8 ++------ 27 files changed, 28 insertions(+), 92 deletions(-)
drivers/rtc/rtc-88pm80x.c +0 -1
@@ -264,7 +264,6 @@ static int pm80x_rtc_probe(struct platform_device *pdev)return -ENOMEM ; info->irq =platform_get_irq (pdev,0 );if (info->irq <0 ) { -dev_err (&pdev->dev,"No IRQ resource!\n" ); ret = -EINVAL ; goto out; }
drivers/rtc/rtc-88pm860x.c +1 -3
@@ -328,10 +328,8 @@ static int pm860x_rtc_probe(struct platform_device *pdev)if (!info)return -ENOMEM ; info->irq =platform_get_irq (pdev,0 ); -if (info->irq <0 ) { -dev_err (&pdev->dev,"No IRQ resource!\n" ); +if (info->irq <0 )return info->irq; - } info->chip = chip; info->i2c = (chip->id ==CHIP_PM8607 ) ? chip->client : chip->companion;
drivers/rtc/rtc-ac100.c +1 -3
@@ -578,10 +578,8 @@ static int ac100_rtc_probe(struct platform_device *pdev) chip->regmap = ac100->regmap; chip->irq =platform_get_irq (pdev,0 ); -if (chip->irq <0 ) { -dev_err (&pdev->dev,"No IRQ resource\n" ); +if (chip->irq <0 )return chip->irq; - } chip->rtc =devm_rtc_allocate_device (&pdev->dev);if (IS_ERR (chip->rtc))
drivers/rtc/rtc-armada38x.c +1 -4
@@ -530,11 +530,8 @@ static __init int armada38x_rtc_probe(struct platform_device *pdev)return PTR_ERR (rtc->regs_soc); rtc->irq =platform_get_irq (pdev,0 ); - -if (rtc->irq <0 ) { -dev_err (&pdev->dev,"no irq\n" ); +if (rtc->irq <0 )return rtc->irq; - } rtc->rtc_dev =devm_rtc_allocate_device (&pdev->dev);if (IS_ERR (rtc->rtc_dev))
drivers/rtc/rtc-asm9260.c +1 -3
@@ -257,10 +257,8 @@ static int asm9260_rtc_probe(struct platform_device *pdev)platform_set_drvdata (pdev, priv); irq_alarm =platform_get_irq (pdev,0 ); -if (irq_alarm <0 ) { -dev_err (dev,"No alarm IRQ resource defined\n" ); +if (irq_alarm <0 )return irq_alarm; - } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); priv->iobase =devm_ioremap_resource (dev, res);
drivers/rtc/rtc-at91rm9200.c +1 -3
@@ -378,10 +378,8 @@ static int __init at91_rtc_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"no irq resource defined\n" ); +if (irq <0 )return -ENXIO ; - } at91_rtc_regs =devm_ioremap (&pdev->dev, regs->start,resource_size (regs));
drivers/rtc/rtc-at91sam9.c +1 -3
@@ -342,10 +342,8 @@ static int at91_rtc_probe(struct platform_device *pdev)struct of_phandle_args args; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get interrupt resource\n" ); +if (irq <0 )return irq; - } rtc =devm_kzalloc (&pdev->dev,sizeof (*rtc),GFP_KERNEL );if (!rtc)
drivers/rtc/rtc-bd70528.c +1 -4
@@ -416,11 +416,8 @@ static int bd70528_probe(struct platform_device *pdev) bd_rtc->dev = &pdev->dev; irq =platform_get_irq_byname (pdev,"bd70528-rtc-alm" ); - -if (irq <0 ) { -dev_err (&pdev->dev,"Failed to get irq\n" ); +if (irq <0 )return irq; - }platform_set_drvdata (pdev, bd_rtc);
drivers/rtc/rtc-davinci.c +1 -3
@@ -477,10 +477,8 @@ static int __init davinci_rtc_probe(struct platform_device *pdev)return -ENOMEM ; davinci_rtc->irq =platform_get_irq (pdev,0 ); -if (davinci_rtc->irq <0 ) { -dev_err (dev,"no RTC irq\n" ); +if (davinci_rtc->irq <0 )return davinci_rtc->irq; - } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); davinci_rtc->base =devm_ioremap_resource (dev, res);
drivers/rtc/rtc-jz4740.c +1 -3
@@ -323,10 +323,8 @@ static int jz4740_rtc_probe(struct platform_device *pdev) rtc->type = id->driver_data; rtc->irq =platform_get_irq (pdev,0 ); -if (rtc->irq <0 ) { -dev_err (&pdev->dev,"Failed to get platform irq\n" ); +if (rtc->irq <0 )return -ENOENT ; - } mem =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); rtc->base =devm_ioremap_resource (&pdev->dev, mem);
drivers/rtc/rtc-max77686.c +1 -4
@@ -673,11 +673,8 @@ static int max77686_init_rtc_regmap(struct max77686_rtc_info *info)struct platform_device *pdev =to_platform_device (info->dev); info->rtc_irq =platform_get_irq (pdev,0 ); -if (info->rtc_irq <0 ) { -dev_err (info->dev,"Failed to get rtc interrupts: %d\n" , - info->rtc_irq); +if (info->rtc_irq <0 )return info->rtc_irq; - } }else { info->rtc_irq = parent_i2c->irq; }
drivers/rtc/rtc-mt7622.c +0 -1
@@ -329,7 +329,6 @@ static int mtk_rtc_probe(struct platform_device *pdev) hw->irq =platform_get_irq (pdev,0 );if (hw->irq <0 ) { -dev_err (&pdev->dev,"No IRQ resource\n" ); ret = hw->irq; goto err; }
drivers/rtc/rtc-pic32.c +1 -3
@@ -308,10 +308,8 @@ static int pic32_rtc_probe(struct platform_device *pdev)platform_set_drvdata (pdev, pdata); pdata->alarm_irq =platform_get_irq (pdev,0 ); -if (pdata->alarm_irq <0 ) { -dev_err (&pdev->dev,"no irq for alarm\n" ); +if (pdata->alarm_irq <0 )return pdata->alarm_irq; - } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); pdata->reg_base =devm_ioremap_resource (&pdev->dev, res);
drivers/rtc/rtc-pm8xxx.c +1 -3
@@ -468,10 +468,8 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev) } rtc_dd->rtc_alarm_irq =platform_get_irq (pdev,0 ); -if (rtc_dd->rtc_alarm_irq <0 ) { -dev_err (&pdev->dev,"Alarm IRQ resource absent!\n" ); +if (rtc_dd->rtc_alarm_irq <0 )return -ENXIO ; - } rtc_dd->allow_set_time =of_property_read_bool (pdev->dev.of_node,"allow-set-time" );
drivers/rtc/rtc-puv3.c +2 -6
@@ -186,16 +186,12 @@ static int puv3_rtc_probe(struct platform_device *pdev)/* find the IRQs */ puv3_rtc_tickno =platform_get_irq (pdev,1 ); -if (puv3_rtc_tickno <0 ) { -dev_err (&pdev->dev,"no irq for rtc tick\n" ); +if (puv3_rtc_tickno <0 )return -ENOENT ; - } puv3_rtc_alarmno =platform_get_irq (pdev,0 ); -if (puv3_rtc_alarmno <0 ) { -dev_err (&pdev->dev,"no irq for alarm\n" ); +if (puv3_rtc_alarmno <0 )return -ENOENT ; - }dev_dbg (&pdev->dev,"PKUnity_rtc: tick irq %d, alarm irq %d\n" , puv3_rtc_tickno, puv3_rtc_alarmno);
drivers/rtc/rtc-pxa.c +2 -6
@@ -324,15 +324,11 @@ static int __init pxa_rtc_probe(struct platform_device *pdev) } sa1100_rtc->irq_1hz =platform_get_irq (pdev,0 ); -if (sa1100_rtc->irq_1hz <0 ) { -dev_err (dev,"No 1Hz IRQ resource defined\n" ); +if (sa1100_rtc->irq_1hz <0 )return -ENXIO ; - } sa1100_rtc->irq_alarm =platform_get_irq (pdev,1 ); -if (sa1100_rtc->irq_alarm <0 ) { -dev_err (dev,"No alarm IRQ resource defined\n" ); +if (sa1100_rtc->irq_alarm <0 )return -ENXIO ; - } pxa_rtc->base =devm_ioremap (dev, pxa_rtc->ress->start,resource_size (pxa_rtc->ress));
drivers/rtc/rtc-rk808.c +1 -5
@@ -434,12 +434,8 @@ static int rk808_rtc_probe(struct platform_device *pdev) rk808_rtc->rtc->ops = &rk808_rtc_ops; rk808_rtc->irq =platform_get_irq (pdev,0 ); -if (rk808_rtc->irq <0 ) { -if (rk808_rtc->irq != -EPROBE_DEFER ) -dev_err (&pdev->dev,"Wake up is not possible as irq = %d\n" , - rk808_rtc->irq); +if (rk808_rtc->irq <0 )return rk808_rtc->irq; - }/* request alarm irq of rk808 */ ret = devm_request_threaded_irq(&pdev->dev, rk808_rtc->irq, NULL,
drivers/rtc/rtc-s3c.c +2 -6
@@ -453,10 +453,8 @@ static int s3c_rtc_probe(struct platform_device *pdev)/* find the IRQs */ info->irq_tick =platform_get_irq (pdev,1 ); -if (info->irq_tick <0 ) { -dev_err (&pdev->dev,"no irq for rtc tick\n" ); +if (info->irq_tick <0 )return info->irq_tick; - } info->dev = &pdev->dev; info->data =of_device_get_match_data (&pdev->dev);
@@ -470,10 +468,8 @@ static int s3c_rtc_probe(struct platform_device *pdev)platform_set_drvdata (pdev, info); info->irq_alarm =platform_get_irq (pdev,0 ); -if (info->irq_alarm <0 ) { -dev_err (&pdev->dev,"no irq for alarm\n" ); +if (info->irq_alarm <0 )return info->irq_alarm; - }dev_dbg (&pdev->dev,"s3c2410_rtc: tick irq %d, alarm irq %d\n" , info->irq_tick, info->irq_alarm);
drivers/rtc/rtc-sc27xx.c +1 -3
@@ -614,10 +614,8 @@ static int sprd_rtc_probe(struct platform_device *pdev) } rtc->irq =platform_get_irq (pdev,0 ); -if (rtc->irq <0 ) { -dev_err (&pdev->dev,"failed to get RTC irq number\n" ); +if (rtc->irq <0 )return rtc->irq; - } rtc->rtc =devm_rtc_allocate_device (&pdev->dev);if (IS_ERR (rtc->rtc))
drivers/rtc/rtc-spear.c +1 -3
@@ -358,10 +358,8 @@ static int spear_rtc_probe(struct platform_device *pdev)/* alarm irqs */ irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"no update irq?\n" ); +if (irq <0 )return irq; - } status =devm_request_irq (&pdev->dev, irq, spear_rtc_irq,0 , pdev->name, config);
drivers/rtc/rtc-stm32.c +0 -1
@@ -776,7 +776,6 @@ static int stm32_rtc_probe(struct platform_device *pdev) rtc->irq_alarm =platform_get_irq (pdev,0 );if (rtc->irq_alarm <=0 ) { -dev_err (&pdev->dev,"no alarm irq\n" ); ret = rtc->irq_alarm; goto err; }
drivers/rtc/rtc-sun6i.c +1 -3
@@ -610,10 +610,8 @@ static int sun6i_rtc_probe(struct platform_device *pdev) chip->dev = &pdev->dev; chip->irq =platform_get_irq (pdev,0 ); -if (chip->irq <0 ) { -dev_err (&pdev->dev,"No IRQ resource\n" ); +if (chip->irq <0 )return chip->irq; - } ret =devm_request_irq (&pdev->dev, chip->irq, sun6i_rtc_alarmirq,0 ,dev_name (&pdev->dev), chip);
drivers/rtc/rtc-sunxi.c +1 -3
@@ -442,10 +442,8 @@ static int sunxi_rtc_probe(struct platform_device *pdev)return PTR_ERR (chip->base); chip->irq =platform_get_irq (pdev,0 ); -if (chip->irq <0 ) { -dev_err (&pdev->dev,"No IRQ resource\n" ); +if (chip->irq <0 )return chip->irq; - } ret =devm_request_irq (&pdev->dev, chip->irq, sunxi_rtc_alarmirq,0 ,dev_name (&pdev->dev), chip);if (ret) {
drivers/rtc/rtc-tegra.c +1 -3
@@ -290,10 +290,8 @@ static int tegra_rtc_probe(struct platform_device *pdev)return PTR_ERR (info->base); ret =platform_get_irq (pdev,0 ); -if (ret <=0 ) { -dev_err (&pdev->dev,"failed to get platform IRQ: %d\n" , ret); +if (ret <=0 )return ret; - } info->irq = ret;
drivers/rtc/rtc-vt8500.c +1 -3
@@ -212,10 +212,8 @@ static int vt8500_rtc_probe(struct platform_device *pdev)platform_set_drvdata (pdev, vt8500_rtc); vt8500_rtc->irq_alarm =platform_get_irq (pdev,0 ); -if (vt8500_rtc->irq_alarm <0 ) { -dev_err (&pdev->dev,"No alarm IRQ resource defined\n" ); +if (vt8500_rtc->irq_alarm <0 )return vt8500_rtc->irq_alarm; - } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); vt8500_rtc->regbase =devm_ioremap_resource (&pdev->dev, res);
drivers/rtc/rtc-xgene.c +1 -3
@@ -157,10 +157,8 @@ static int xgene_rtc_probe(struct platform_device *pdev)return PTR_ERR (pdata->rtc); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"No IRQ resource\n" ); +if (irq <0 )return irq; - } ret =devm_request_irq (&pdev->dev, irq, xgene_rtc_interrupt,0 ,dev_name (&pdev->dev), pdata);if (ret) {
drivers/rtc/rtc-zynqmp.c +2 -6
@@ -218,10 +218,8 @@ static int xlnx_rtc_probe(struct platform_device *pdev)return PTR_ERR (xrtcdev->reg_base); xrtcdev->alarm_irq =platform_get_irq_byname (pdev,"alarm" ); -if (xrtcdev->alarm_irq <0 ) { -dev_err (&pdev->dev,"no irq resource\n" ); +if (xrtcdev->alarm_irq <0 )return xrtcdev->alarm_irq; - } ret =devm_request_irq (&pdev->dev, xrtcdev->alarm_irq, xlnx_rtc_interrupt,0 ,dev_name (&pdev->dev), xrtcdev);
@@ -231,10 +229,8 @@ static int xlnx_rtc_probe(struct platform_device *pdev) } xrtcdev->sec_irq =platform_get_irq_byname (pdev,"sec" ); -if (xrtcdev->sec_irq <0 ) { -dev_err (&pdev->dev,"no irq resource\n" ); +if (xrtcdev->sec_irq <0 )return xrtcdev->sec_irq; - } ret =devm_request_irq (&pdev->dev, xrtcdev->sec_irq, xlnx_rtc_interrupt,0 ,dev_name (&pdev->dev), xrtcdev);
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 39/57] rtc: Remove dev_err() usage after platform_get_irq()
Hi Stephen,
Quoted 64 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>While we're here, remove braces on if statements that only have one statement (manually).
Cc Alessandro Zummo <[email protected]>Cc Alexandre Belloni <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
drivers/rtc/rtc-88pm80x.c | 1 - drivers/rtc/rtc-88pm860x.c | 4 +--- drivers/rtc/rtc-ac100.c | 4 +--- drivers/rtc/rtc-armada38x.c | 5 +---- drivers/rtc/rtc-asm9260.c | 4 +--- drivers/rtc/rtc-at91rm9200.c | 4 +--- drivers/rtc/rtc-at91sam9.c | 4 +--- drivers/rtc/rtc-bd70528.c | 5 +---- drivers/rtc/rtc-davinci.c | 4 +--- drivers/rtc/rtc-jz4740.c | 4 +--- drivers/rtc/rtc-max77686.c | 5 +---- drivers/rtc/rtc-mt7622.c | 1 - drivers/rtc/rtc-pic32.c | 4 +--- drivers/rtc/rtc-pm8xxx.c | 4 +--- drivers/rtc/rtc-puv3.c | 8 ++------ drivers/rtc/rtc-pxa.c | 8 ++------ drivers/rtc/rtc-rk808.c | 6 +----- drivers/rtc/rtc-s3c.c | 8 ++------ drivers/rtc/rtc-sc27xx.c | 4 +--- drivers/rtc/rtc-spear.c | 4 +---
Quoted 8 lines
drivers/rtc/rtc-stm32.c | 1 - drivers/rtc/rtc-sun6i.c | 4 +--- drivers/rtc/rtc-sunxi.c | 4 +--- drivers/rtc/rtc-tegra.c | 4 +--- drivers/rtc/rtc-vt8500.c | 4 +--- drivers/rtc/rtc-xgene.c | 4 +--- drivers/rtc/rtc-zynqmp.c | 8 ++------ 27 files changed, 28 insertions(+), 92 deletions(-)
Failed to catch:drivers/rtc/rtc-sh.c: ret = platform_get_irq(pdev, 0);drivers/rtc/rtc-sh.c- if (unlikely(ret <= 0)) {drivers/rtc/rtc-sh.c- dev_err(&pdev->dev, "No IRQ resource\n");drivers/rtc/rtc-sh.c- return -ENOENT;drivers/rtc/rtc-sh.c- }drivers/rtc/rtc-sh.c-
Note that there are two more calls for optional interrupts:
drivers/rtc/rtc-sh.c: rtc->carry_irq = platform_get_irq(pdev, 1); drivers/rtc/rtc-sh.c: rtc->alarm_irq = platform_get_irq(pdev, 2);
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH v6 39/57] rtc: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydQuoted 64 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>While we're here, remove braces on if statements that only have one statement (manually).
Cc Alessandro Zummo <[email protected]>Cc Alexandre Belloni <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
drivers/rtc/rtc-88pm80x.c | 1 - drivers/rtc/rtc-88pm860x.c | 4 +--- drivers/rtc/rtc-ac100.c | 4 +--- drivers/rtc/rtc-armada38x.c | 5 +---- drivers/rtc/rtc-asm9260.c | 4 +--- drivers/rtc/rtc-at91rm9200.c | 4 +--- drivers/rtc/rtc-at91sam9.c | 4 +--- drivers/rtc/rtc-bd70528.c | 5 +---- drivers/rtc/rtc-davinci.c | 4 +--- drivers/rtc/rtc-jz4740.c | 4 +--- drivers/rtc/rtc-max77686.c | 5 +---- drivers/rtc/rtc-mt7622.c | 1 - drivers/rtc/rtc-pic32.c | 4 +--- drivers/rtc/rtc-pm8xxx.c | 4 +--- drivers/rtc/rtc-puv3.c | 8 ++------ drivers/rtc/rtc-pxa.c | 8 ++------ drivers/rtc/rtc-rk808.c | 6 +----- drivers/rtc/rtc-s3c.c | 8 ++------ drivers/rtc/rtc-sc27xx.c | 4 +--- drivers/rtc/rtc-spear.c | 4 +---
Quoted 9 lines
drivers/rtc/rtc-stm32.c | 1 - drivers/rtc/rtc-sun6i.c | 4 +--- drivers/rtc/rtc-sunxi.c | 4 +--- drivers/rtc/rtc-tegra.c | 4 +--- drivers/rtc/rtc-vt8500.c | 4 +--- drivers/rtc/rtc-xgene.c | 4 +--- drivers/rtc/rtc-zynqmp.c | 8 ++------ 27 files changed, 28 insertions(+), 92 deletions(-)
Applied, thanks.
Signature · 3 lines
Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v6 40/57 soc: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/soc/fsl/qbman/bman_portal.c | 4 +--- drivers/soc/fsl/qbman/qman_portal.c | 4 +--- drivers/soc/qcom/smp2p.c | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-)
drivers/soc/fsl/qbman/bman_portal.c +1 -3
@@ -135,10 +135,8 @@ static int bman_portal_probe(struct platform_device *pdev) pcfg->cpu =-1 ; irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (dev,"Can't get %pOF IRQ'\n" , node); +if (irq <=0 ) goto err_ioremap1; - } pcfg->irq = irq; pcfg->addr_virt_ce = memremap(addr_phys[0]->start,
drivers/soc/fsl/qbman/qman_portal.c +1 -3
@@ -275,10 +275,8 @@ static int qman_portal_probe(struct platform_device *pdev) pcfg->channel = val; pcfg->cpu =-1 ; irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (dev,"Can't get %pOF IRQ\n" , node); +if (irq <=0 ) goto err_ioremap1; - } pcfg->irq = irq; pcfg->addr_virt_ce = memremap(addr_phys[0]->start,
drivers/soc/qcom/smp2p.c +1 -3
@@ -474,10 +474,8 @@ static int qcom_smp2p_probe(struct platform_device *pdev) goto report_read_failure; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"unable to acquire smp2p interrupt\n" ); +if (irq <0 )return irq; - } smp2p->mbox_client.dev = &pdev->dev; smp2p->mbox_client.knows_txdone = true;
Signature · 1 line
Sent by a computer through tubes
Re: [PATCH v6 40/57] soc: Remove dev_err() usage after platform_get_irq()
Quoted 32 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>
Quoted 6 lines
While we're here, remove braces on if statements that only have one statement (manually).
Cc Andy Gross <[email protected]>Cc Thierry Reding <[email protected]>Cc Bjorn Andersson <[email protected]>
Quoted 11 lines
Cc Li Yang <[email protected]>Cc Simon Horman <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
drivers/soc/fsl/qbman/bman_portal.c | 4 +--- drivers/soc/fsl/qbman/qman_portal.c | 4 +--- drivers/soc/qcom/smp2p.c | 4 +---
If you had split this in a fsl and a qcom patch I would have just merged the latter.
I don't see a problem with Li taking this patch through the Freescale tree though (or vise versa).
Regards,
Bjorn
Quoted 53 lines
3 files changed, 3 insertions(+), 9 deletions(-)drivers/soc/fsl/qbman/bman_portal.c +1
-3@@ -135,10 +135,8 @@ static int bman_portal_probe(struct platform_device *pdev) pcfg->cpu =-1 ; irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (dev,"Can't get %pOF IRQ'\n" , node); +if (irq <=0 ) goto err_ioremap1; - } pcfg->irq = irq; pcfg->addr_virt_ce = memremap(addr_phys[0]->start,drivers/soc/fsl/qbman/qman_portal.c +1
-3@@ -275,10 +275,8 @@ static int qman_portal_probe(struct platform_device *pdev) pcfg->channel = val; pcfg->cpu =-1 ; irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (dev,"Can't get %pOF IRQ\n" , node); +if (irq <=0 ) goto err_ioremap1; - } pcfg->irq = irq; pcfg->addr_virt_ce = memremap(addr_phys[0]->start,drivers/soc/qcom/smp2p.c +1
-3@@ -474,10 +474,8 @@ static int qcom_smp2p_probe(struct platform_device *pdev) goto report_read_failure; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"unable to acquire smp2p interrupt\n" ); +if (irq <0 )return irq; - } smp2p->mbox_client.dev = &pdev->dev; smp2p->mbox_client.knows_txdone = true;Signature · 1 line
Sent by a computer through tubes
RE: [PATCH v6 40/57] soc: Remove dev_err() usage after platform_get_irq()
Quoted 69 lines
-----Original Message-----
From: Bjorn Andersson <[email protected]>
Sent: Tuesday, July 30, 2019 1:35 PM
To: Stephen Boyd <[email protected]>
Cc: [email protected]; Andy Gross <[email protected]>; Thierry Reding <[email protected]>; Leo Li <[email protected]>; Simon Horman <[email protected]>; Greg Kroah-Hartman <[email protected]>
Subject: Re: [PATCH v6 40/57] soc: Removedev_err()usage afterplatform_get_irq()Quoted 33 lines · Stephen Boyd
We don't need
dev_err()messages whenplatform_get_irq()fails now thatplatform_get_irq()prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.// <smpl>
@@
expression ret;
structplatform_device*E;
@@ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret <= 0 \) )
{
((quoted diff) +0
-4-if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... }|
...
-dev_err(...);
)
...
}
// </smpl>Quoted 6 lines
While we're here, remove braces on if statements that only have one statement (manually).
Cc Andy Gross <[email protected]>Cc Thierry Reding <[email protected]>Cc Bjorn Andersson <[email protected]>Reviewed-by Bjorn Andersson <[email protected]>Quoted 11 lines
Cc Li Yang <[email protected]>Cc Simon Horman <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Stephen Boyd <[email protected]>---
Please apply directly to subsystem trees
drivers/soc/fsl/qbman/bman_portal.c | 4 +--- drivers/soc/fsl/qbman/qman_portal.c | 4 +--- drivers/soc/qcom/smp2p.c | 4 +---
Quoted 5 lines
If you had split this in a fsl and a qcom patch I would have just merged the latter.
I don't see a problem with Li taking this patch through the Freescale tree though (or vise versa).
The patch looks good to me too. I can take it through my tree with your reviewed-by.
Regards,
Leo
Quoted 62 lines
Regards,
Bjorndrivers/soc/fsl/qbman/bman_portal.c static int bman_portal_probe(struct
Quoted 8 lines
3 files changed, 3 insertions(+), 9 deletions(-)drivers/soc/fsl/qbman/bman_portal.c +0
-0@@ -135,10 +135,8 @@ static int bman_portal_probe(struct
platform_device*pdev)drivers/soc/fsl/qbman/qman_portal.c static int qman_portal_probe(struct
Quoted 17 lines
drivers/soc/fsl/qbman/bman_portal.c +1
-3pcfg->cpu =-1 ; irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (dev,"Can't get %pOF IRQ'\n" , node); +if (irq <=0 ) goto err_ioremap1; - } pcfg->irq = irq; pcfg->addr_virt_ce = memremap(addr_phys[0]->start, diff --git
a/drivers/soc/fsl/qbman/qman_portal.cb/drivers/soc/fsl/qbman/qman_portal.c
indexe2186b681d87..991c35a72e00100644drivers/soc/fsl/qbman/qman_portal.c +0
-0@@ -275,10 +275,8 @@ static int qman_portal_probe(struct
platform_device*pdev)drivers/soc/qcom/smp2p.c static int qcom_smp2p_probe(struct
Quoted 16 lines
drivers/soc/fsl/qbman/qman_portal.c +1
-3pcfg->channel = val; pcfg->cpu =-1 ; irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (dev,"Can't get %pOF IRQ\n" , node); +if (irq <=0 ) goto err_ioremap1; - } pcfg->irq = irq; pcfg->addr_virt_ce = memremap(addr_phys[0]->start, diff --git
a/drivers/soc/qcom/smp2p.cb/drivers/soc/qcom/smp2p.cindexc7300d54e444..07183d731d74100644drivers/soc/qcom/smp2p.c +0
-0@@ -474,10 +474,8 @@ static int qcom_smp2p_probe(struct
platform_device*pdev)Quoted 14 lines
drivers/soc/qcom/smp2p.c +1
-4goto report_read_failure; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"unable to acquire smp2p interrupt\n" ); +if (irq <0 )return irq; - } smp2p->mbox_client.dev = &pdev->dev; smp2p->mbox_client.knows_txdone = true; --Sent by a computer through tubes
RE: [PATCH v6 40/57] soc: Remove dev_err() usage after platform_get_irq()
Quoting Leo Li (2019-07-30 14:26:01)
Quoted 3 lines
The patch looks good to me too. I can take it through my tree with your reviewed-by.
I split it for you just in case you want different patches.
Re: [PATCH v6 40/57] soc: Remove dev_err() usage after platform_get_irq()
Quoted 8 lines · Stephen Boyd
Quoting Leo Li (2019-07-30 14:26:01)
Quoted 3 lines
The patch looks good to me too. I can take it through my tree with your reviewed-by.
I split it for you just in case you want different patches.
Thanks. I will take the fsl/nxp part only then.
Regards,
Leo
PATCH v7 1/2 soc: fsl: qbman: Remove dev_err() usage after platform_get_irq()
In reply to Bjorn AnderssonWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
--- drivers/soc/fsl/qbman/bman_portal.c | 4 +--- drivers/soc/fsl/qbman/qman_portal.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/soc/fsl/qbman/bman_portal.c +1 -3
@@ -135,10 +135,8 @@ static int bman_portal_probe(struct platform_device *pdev) pcfg->cpu =-1 ; irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (dev,"Can't get %pOF IRQ'\n" , node); +if (irq <=0 ) goto err_ioremap1; - } pcfg->irq = irq; pcfg->addr_virt_ce = memremap(addr_phys[0]->start,
drivers/soc/fsl/qbman/qman_portal.c +1 -3
@@ -275,10 +275,8 @@ static int qman_portal_probe(struct platform_device *pdev) pcfg->channel = val; pcfg->cpu =-1 ; irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (dev,"Can't get %pOF IRQ\n" , node); +if (irq <=0 ) goto err_ioremap1; - } pcfg->irq = irq; pcfg->addr_virt_ce = memremap(addr_phys[0]->start,
Signature · 1 line
Sent by a computer through tubes
PATCH v7 2/2 soc: qcom: Remove dev_err() usage after platform_get_irq()
In reply to Bjorn AnderssonWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
--- drivers/soc/qcom/smp2p.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/soc/qcom/smp2p.c +1 -3
@@ -474,10 +474,8 @@ static int qcom_smp2p_probe(struct platform_device *pdev) goto report_read_failure; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"unable to acquire smp2p interrupt\n" ); +if (irq <0 )return irq; - } smp2p->mbox_client.dev = &pdev->dev; smp2p->mbox_client.knows_txdone = true;
Signature · 1 line
Sent by a computer through tubes
PATCH v6 41/57 spi: Remove dev_err() usage after platform_get_irq()
In reply to Stephen BoydWe don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(platform_get_irq(E, ...)
|platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one statement (manually).
---
Please apply directly to subsystem trees
drivers/spi/atmel-quadspi.c | 1 - drivers/spi/spi-armada-3700.c | 1 - drivers/spi/spi-bcm2835.c | 1 - drivers/spi/spi-bcm2835aux.c | 1 - drivers/spi/spi-bcm63xx-hsspi.c | 4 +--- drivers/spi/spi-bcm63xx.c | 4 +--- drivers/spi/spi-cadence.c | 1 - drivers/spi/spi-dw-mmio.c | 4 +--- drivers/spi/spi-efm32.c | 4 +--- drivers/spi/spi-ep93xx.c | 4 +--- drivers/spi/spi-fsl-dspi.c | 1 - drivers/spi/spi-fsl-qspi.c | 4 +--- drivers/spi/spi-geni-qcom.c | 4 +--- drivers/spi/spi-lantiq-ssc.c | 12 +++--------- drivers/spi/spi-mt65xx.c | 1 - drivers/spi/spi-npcm-pspi.c | 1 - drivers/spi/spi-nuc900.c | 1 - drivers/spi/spi-nxp-fspi.c | 4 +--- drivers/spi/spi-pic32-sqi.c | 1 - drivers/spi/spi-pic32.c | 12 +++--------- drivers/spi/spi-qcom-qspi.c | 4 +--- drivers/spi/spi-s3c24xx.c | 1 - drivers/spi/spi-sh-msiof.c | 1 - drivers/spi/spi-sh.c | 4 +--- drivers/spi/spi-sifive.c | 1 - drivers/spi/spi-slave-mt27xx.c | 1 - drivers/spi/spi-sprd.c | 4 +--- drivers/spi/spi-stm32-qspi.c | 5 +---- drivers/spi/spi-sun4i.c | 1 - drivers/spi/spi-sun6i.c | 1 - drivers/spi/spi-synquacer.c | 2 -- drivers/spi/spi-ti-qspi.c | 1 - drivers/spi/spi-uniphier.c | 1 - drivers/spi/spi-xlp.c | 4 +--- drivers/spi/spi-zynq-qspi.c | 1 - drivers/spi/spi-zynqmp-gqspi.c | 1 - 36 files changed, 19 insertions(+), 80 deletions(-)
drivers/spi/atmel-quadspi.c +0 -1
@@ -526,7 +526,6 @@ static int atmel_qspi_probe(struct platform_device *pdev)/* Request the IRQ */ irq =platform_get_irq (pdev,0 );if (irq <0 ) { -dev_err (&pdev->dev,"missing IRQ\n" ); err = irq; goto disable_qspick; }
drivers/spi/spi-armada-3700.c +0 -1
@@ -864,7 +864,6 @@ static int a3700_spi_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <0 ) { -dev_err (dev,"could not get irq: %d\n" , irq); ret = -ENXIO ; goto error; }
drivers/spi/spi-bcm2835.c +0 -1
@@ -1015,7 +1015,6 @@ static int bcm2835_spi_probe(struct platform_device *pdev) bs->irq =platform_get_irq (pdev,0 );if (bs->irq <=0 ) { -dev_err (&pdev->dev,"could not get IRQ: %d\n" , bs->irq); err = bs->irq ? bs->irq : -ENODEV ; goto out_controller_put; }
drivers/spi/spi-bcm2835aux.c +0 -1
@@ -540,7 +540,6 @@ static int bcm2835aux_spi_probe(struct platform_device *pdev) bs->irq =platform_get_irq (pdev,0 );if (bs->irq <=0 ) { -dev_err (&pdev->dev,"could not get IRQ: %d\n" , bs->irq); err = bs->irq ? bs->irq : -ENODEV ; goto out_master_put; }
drivers/spi/spi-bcm63xx-hsspi.c +1 -3
@@ -338,10 +338,8 @@ static int bcm63xx_hsspi_probe(struct platform_device *pdev)u32 reg, rate, num_cs =HSSPI_SPI_MAX_CS ; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"no irq: %d\n" , irq); +if (irq <0 )return irq; - } res_mem =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); regs =devm_ioremap_resource (dev, res_mem);
drivers/spi/spi-bcm63xx.c +1 -3
@@ -520,10 +520,8 @@ static int bcm63xx_spi_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (dev,"no irq: %d\n" , irq); +if (irq <0 )return irq; - } clk =devm_clk_get (dev,"spi" );if (IS_ERR (clk)) {
drivers/spi/spi-cadence.c +0 -1
@@ -540,7 +540,6 @@ static int cdns_spi_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <=0 ) { ret = -ENXIO ; -dev_err (&pdev->dev,"irq number is invalid\n" ); goto clk_dis_all; }
drivers/spi/spi-dw-mmio.c +1 -3
@@ -158,10 +158,8 @@ static int dw_spi_mmio_probe(struct platform_device *pdev) } dws->irq =platform_get_irq (pdev,0 ); -if (dws->irq <0 ) { -dev_err (&pdev->dev,"no irq resource?\n" ); +if (dws->irq <0 )return dws->irq;/* -ENXIO */ - } dwsmmio->clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (dwsmmio->clk))
drivers/spi/spi-efm32.c +1 -3
@@ -400,10 +400,8 @@ static int efm32_spi_probe(struct platform_device *pdev) } ret =platform_get_irq (pdev,0 ); -if (ret <=0 ) { -dev_err (&pdev->dev,"failed to get rx irq (%d)\n" , ret); +if (ret <=0 ) goto err; - } ddata->rxirq = ret;
drivers/spi/spi-ep93xx.c +1 -3
@@ -656,10 +656,8 @@ static int ep93xx_spi_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"failed to get irq resources\n" ); +if (irq <0 )return -EBUSY ; - } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (!res) {
drivers/spi/spi-fsl-dspi.c +0 -1
@@ -1105,7 +1105,6 @@ static int dspi_probe(struct platform_device *pdev)dspi_init (dspi); dspi->irq =platform_get_irq (pdev,0 );if (dspi->irq <0 ) { -dev_err (&pdev->dev,"can't get platform irq\n" ); ret = dspi->irq; goto out_clk_put; }
drivers/spi/spi-fsl-qspi.c +1 -3
@@ -860,10 +860,8 @@ static int fsl_qspi_probe(struct platform_device *pdev)/* find the irq */ ret =platform_get_irq (pdev,0 ); -if (ret <0 ) { -dev_err (dev,"failed to get the irq: %d\n" , ret); +if (ret <0 ) goto err_disable_clk; - } ret =devm_request_irq (dev, ret, fsl_qspi_irq_handler,0 , pdev->name, q);
drivers/spi/spi-geni-qcom.c +1 -3
@@ -539,10 +539,8 @@ static int spi_geni_probe(struct platform_device *pdev)struct clk *clk; irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"Err getting IRQ %d\n" , irq); +if (irq <0 )return irq; - } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); base =devm_ioremap_resource (&pdev->dev, res);
drivers/spi/spi-lantiq-ssc.c +3 -9
@@ -819,22 +819,16 @@ static int lantiq_ssc_probe(struct platform_device *pdev) } rx_irq =platform_get_irq_byname (pdev,LTQ_SPI_RX_IRQ_NAME ); -if (rx_irq <0 ) { -dev_err (dev,"failed to get %s\n" ,LTQ_SPI_RX_IRQ_NAME ); +if (rx_irq <0 )return -ENXIO ; - } tx_irq =platform_get_irq_byname (pdev,LTQ_SPI_TX_IRQ_NAME ); -if (tx_irq <0 ) { -dev_err (dev,"failed to get %s\n" ,LTQ_SPI_TX_IRQ_NAME ); +if (tx_irq <0 )return -ENXIO ; - } err_irq =platform_get_irq_byname (pdev,LTQ_SPI_ERR_IRQ_NAME ); -if (err_irq <0 ) { -dev_err (dev,"failed to get %s\n" ,LTQ_SPI_ERR_IRQ_NAME ); +if (err_irq <0 )return -ENXIO ; - } master =spi_alloc_master (dev,sizeof (struct lantiq_ssc_spi ));if (!master)
drivers/spi/spi-mt65xx.c +0 -1
@@ -664,7 +664,6 @@ static int mtk_spi_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <0 ) { -dev_err (&pdev->dev,"failed to get irq (%d)\n" , irq); ret = irq; goto err_put_master; }
drivers/spi/spi-npcm-pspi.c +0 -1
@@ -388,7 +388,6 @@ static int npcm_pspi_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <0 ) { -dev_err (&pdev->dev,"failed to get IRQ\n" ); ret = irq; goto out_disable_clk; }
drivers/spi/spi-nuc900.c +0 -1
@@ -367,7 +367,6 @@ static int nuc900_spi_probe(struct platform_device *pdev) hw->irq =platform_get_irq (pdev,0 );if (hw->irq <0 ) { -dev_err (&pdev->dev,"No IRQ specified\n" ); err = -ENOENT ; goto err_pdata; }
drivers/spi/spi-nxp-fspi.c +1 -3
@@ -1007,10 +1007,8 @@ static int nxp_fspi_probe(struct platform_device *pdev)/* find the irq */ ret =platform_get_irq (pdev,0 ); -if (ret <0 ) { -dev_err (dev,"failed to get the irq: %d\n" , ret); +if (ret <0 ) goto err_disable_clk; - } ret =devm_request_irq (dev, ret, nxp_fspi_irq_handler,0 , pdev->name, f);
drivers/spi/spi-pic32-sqi.c +0 -1
@@ -590,7 +590,6 @@ static int pic32_sqi_probe(struct platform_device *pdev)/* irq */ sqi->irq =platform_get_irq (pdev,0 );if (sqi->irq <0 ) { -dev_err (&pdev->dev,"no irq found\n" ); ret = sqi->irq; goto err_free_master; }
drivers/spi/spi-pic32.c +3 -9
@@ -711,22 +711,16 @@ static int pic32_spi_hw_probe(struct platform_device *pdev,/* get irq resources: err-irq, rx-irq, tx-irq */ pic32s->fault_irq =platform_get_irq_byname (pdev,"fault" ); -if (pic32s->fault_irq <0 ) { -dev_err (&pdev->dev,"fault-irq not found\n" ); +if (pic32s->fault_irq <0 )return pic32s->fault_irq; - } pic32s->rx_irq =platform_get_irq_byname (pdev,"rx" ); -if (pic32s->rx_irq <0 ) { -dev_err (&pdev->dev,"rx-irq not found\n" ); +if (pic32s->rx_irq <0 )return pic32s->rx_irq; - } pic32s->tx_irq =platform_get_irq_byname (pdev,"tx" ); -if (pic32s->tx_irq <0 ) { -dev_err (&pdev->dev,"tx-irq not found\n" ); +if (pic32s->tx_irq <0 )return pic32s->tx_irq; - }/* get clock */ pic32s->clk =devm_clk_get (&pdev->dev,"mck0" );
drivers/spi/spi-qcom-qspi.c +1 -3
@@ -454,10 +454,8 @@ static int qcom_qspi_probe(struct platform_device *pdev) goto exit_probe_master_put; ret =platform_get_irq (pdev,0 ); -if (ret <0 ) { -dev_err (dev,"Failed to get irq %d\n" , ret); +if (ret <0 ) goto exit_probe_master_put; - } ret =devm_request_irq (dev, ret, qcom_qspi_irq,IRQF_TRIGGER_HIGH ,dev_name (dev), ctrl);if (ret) {
drivers/spi/spi-s3c24xx.c +0 -1
@@ -545,7 +545,6 @@ static int s3c24xx_spi_probe(struct platform_device *pdev) hw->irq =platform_get_irq (pdev,0 );if (hw->irq <0 ) { -dev_err (&pdev->dev,"No IRQ specified\n" ); err = -ENOENT ; goto err_no_pdata; }
drivers/spi/spi-sh-msiof.c +0 -1
@@ -1346,7 +1346,6 @@ static int sh_msiof_spi_probe(struct platform_device *pdev) i =platform_get_irq (pdev,0 );if (i <0 ) { -dev_err (&pdev->dev,"cannot get IRQ\n" ); ret = i; goto err1; }
drivers/spi/spi-sh.c +1 -3
@@ -437,10 +437,8 @@ static int spi_sh_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"platform_get_irq error: %d\n" , irq); +if (irq <0 )return irq; - } master =spi_alloc_master (&pdev->dev,sizeof (struct spi_sh_data ));if (master ==NULL ) {
drivers/spi/spi-sifive.c +0 -1
@@ -323,7 +323,6 @@ static int sifive_spi_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <0 ) { -dev_err (&pdev->dev,"Unable to find interrupt\n" ); ret = irq; goto put_master; }
drivers/spi/spi-slave-mt27xx.c +0 -1
@@ -410,7 +410,6 @@ static int mtk_spi_slave_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <0 ) { -dev_err (&pdev->dev,"failed to get irq (%d)\n" , irq); ret = irq; goto err_put_ctlr; }
drivers/spi/spi-sprd.c +1 -3
@@ -843,10 +843,8 @@ static int sprd_spi_irq_init(struct platform_device *pdev, struct sprd_spi *ss)int ret; ss->irq =platform_get_irq (pdev,0 ); -if (ss->irq <0 ) { -dev_err (&pdev->dev,"failed to get irq resource\n" ); +if (ss->irq <0 )return ss->irq; - } ret =devm_request_irq (&pdev->dev, ss->irq, sprd_spi_handle_irq,0 , pdev->name, ss);
drivers/spi/spi-stm32-qspi.c +1 -4
@@ -570,11 +570,8 @@ static int stm32_qspi_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -if (irq != -EPROBE_DEFER ) -dev_err (dev,"IRQ error missing or invalid\n" ); +if (irq <0 )return irq; - } ret =devm_request_irq (dev, irq, stm32_qspi_irq,0 ,dev_name (dev), qspi);
drivers/spi/spi-sun4i.c +0 -1
@@ -449,7 +449,6 @@ static int sun4i_spi_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <0 ) { -dev_err (&pdev->dev,"No spi IRQ specified\n" ); ret = -ENXIO ; goto err_free_master; }
drivers/spi/spi-sun6i.c +0 -1
@@ -456,7 +456,6 @@ static int sun6i_spi_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <0 ) { -dev_err (&pdev->dev,"No spi IRQ specified\n" ); ret = -ENXIO ; goto err_free_master; }
drivers/spi/spi-synquacer.c +0 -2
@@ -670,7 +670,6 @@ static int synquacer_spi_probe(struct platform_device *pdev) rx_irq =platform_get_irq (pdev,0 );if (rx_irq <=0 ) { -dev_err (&pdev->dev,"get rx_irq failed (%d)\n" , rx_irq); ret = rx_irq; goto put_spi; }
@@ -685,7 +684,6 @@ static int synquacer_spi_probe(struct platform_device *pdev) tx_irq =platform_get_irq (pdev,1 );if (tx_irq <=0 ) { -dev_err (&pdev->dev,"get tx_irq failed (%d)\n" , tx_irq); ret = tx_irq; goto put_spi; }
drivers/spi/spi-ti-qspi.c +0 -1
@@ -717,7 +717,6 @@ static int ti_qspi_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <0 ) { -dev_err (&pdev->dev,"no irq resource?\n" ); ret = irq; goto free_master; }
drivers/spi/spi-uniphier.c +0 -1
@@ -454,7 +454,6 @@ static int uniphier_spi_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <0 ) { -dev_err (&pdev->dev,"failed to get IRQ\n" ); ret = irq; goto out_disable_clk; }
drivers/spi/spi-xlp.c +1 -3
@@ -384,10 +384,8 @@ static int xlp_spi_probe(struct platform_device *pdev)return PTR_ERR (xspi->base); irq =platform_get_irq (pdev,0 ); -if (irq <0 ) { -dev_err (&pdev->dev,"no IRQ resource found: %d\n" , irq); +if (irq <0 )return irq; - } err =devm_request_irq (&pdev->dev, irq, xlp_spi_interrupt,0 , pdev->name, xspi);if (err) {
drivers/spi/spi-zynq-qspi.c +0 -1
@@ -671,7 +671,6 @@ static int zynq_qspi_probe(struct platform_device *pdev) xqspi->irq =platform_get_irq (pdev,0 );if (xqspi->irq <=0 ) { ret = -ENXIO ; -dev_err (&pdev->dev,"irq resource not found\n" ); goto remove_master; } ret = devm_request_irq(&pdev->dev, xqspi->irq, zynq_qspi_irq,
drivers/spi/spi-zynqmp-gqspi.c +0 -1
@@ -1077,7 +1077,6 @@ static int zynqmp_qspi_probe(struct platform_device *pdev) xqspi->irq =platform_get_irq (pdev,0 );if (xqspi->irq <=0 ) { ret = -ENXIO ; -dev_err (dev,"irq resource not found\n" ); goto clk_dis_all; } ret = devm_request_irq(&pdev->dev, xqspi->irq, zynqmp_qspi_irq,
Signature · 1 line
Sent by a computer through tubes