]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
infiniband: Remove dev_err() usage after platform_get_irq()
authorStephen Boyd <swboyd@chromium.org>
Tue, 30 Jul 2019 18:15:20 +0000 (11:15 -0700)
committerDoug Ledford <dledford@redhat.com>
Wed, 31 Jul 2019 15:51:57 +0000 (11:51 -0400)
commitcb560f5fd951cea1e5f4afd2820b1c0deb75dcb1
treec8137764b09c33f994ef45aef527dea08a6694d4
parent16e9111e9ee3edfcf6df120080378afc620cb4d3
infiniband: 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: Doug Ledford <dledford@redhat.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: linux-rdma@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20190730181557.90391-21-swboyd@chromium.org
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hns/hns_roce_hw_v1.c