]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
iommu: Remove dev_err() usage after platform_get_irq()
authorStephen Boyd <swboyd@chromium.org>
Tue, 30 Jul 2019 18:15:22 +0000 (11:15 -0700)
committerJoerg Roedel <jroedel@suse.de>
Fri, 9 Aug 2019 15:33:19 +0000 (17:33 +0200)
commit086f9efae7e96ac2c829d33ca3d513caa3bbb225
treec9f6db26d381ca4c8b2e9e0cedb6ece38355888f
parente21a712a9685488f5ce80495b37b9fdbe96c230d
iommu: 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).

Cc: Joerg Roedel <joro@8bytes.org>
Cc: iommu@lists.linux-foundation.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/exynos-iommu.c
drivers/iommu/msm_iommu.c
drivers/iommu/qcom_iommu.c