2020-04-15 21:37:13

by Tang Bin

[permalink] [raw]
Subject: [PATCH] ipmi:bt-bmc: Delete superfluous dev_warm() in bt_bmc_config_irq()

The priority of dev_warm() is higher than dev_info(),so if the
function bt_bmc_probe() uses dev_info() to print error message,
the dev_warm() is redundant.Thus should be removed.

Signed-off-by: Tang Bin <[email protected]>
Signed-off-by: Shengju Zhang <[email protected]>
---
drivers/char/ipmi/bt-bmc.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c
index cd0349bff..1d4bf5c65 100644
--- a/drivers/char/ipmi/bt-bmc.c
+++ b/drivers/char/ipmi/bt-bmc.c
@@ -406,7 +406,6 @@ static int bt_bmc_config_irq(struct bt_bmc *bt_bmc,
rc = devm_request_irq(dev, bt_bmc->irq, bt_bmc_irq, IRQF_SHARED,
DEVICE_NAME, bt_bmc);
if (rc < 0) {
- dev_warn(dev, "Unable to request IRQ %d\n", bt_bmc->irq);
bt_bmc->irq = 0;
return rc;
}
--
2.20.1.windows.1




2020-04-15 21:55:43

by Corey Minyard

[permalink] [raw]
Subject: Re: [PATCH] ipmi:bt-bmc: Delete superfluous dev_warm() in bt_bmc_config_irq()

On Tue, Apr 14, 2020 at 10:19:51PM +0800, Tang Bin wrote:
> The priority of dev_warm() is higher than dev_info(),so if the
> function bt_bmc_probe() uses dev_info() to print error message,
> the dev_warm() is redundant.Thus should be removed.

Actually, this needs to be left in. That error is not just a that irqs
were not configured, that's an error that something else went wrong.


-corey

>
> Signed-off-by: Tang Bin <[email protected]>
> Signed-off-by: Shengju Zhang <[email protected]>
> ---
> drivers/char/ipmi/bt-bmc.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c
> index cd0349bff..1d4bf5c65 100644
> --- a/drivers/char/ipmi/bt-bmc.c
> +++ b/drivers/char/ipmi/bt-bmc.c
> @@ -406,7 +406,6 @@ static int bt_bmc_config_irq(struct bt_bmc *bt_bmc,
> rc = devm_request_irq(dev, bt_bmc->irq, bt_bmc_irq, IRQF_SHARED,
> DEVICE_NAME, bt_bmc);
> if (rc < 0) {
> - dev_warn(dev, "Unable to request IRQ %d\n", bt_bmc->irq);
> bt_bmc->irq = 0;
> return rc;
> }
> --
> 2.20.1.windows.1
>
>
>

2020-04-15 22:01:00

by Tang Bin

[permalink] [raw]
Subject: Re: [PATCH] ipmi:bt-bmc: Delete superfluous dev_warm() inbt_bmc_config_irq()

Hi Corey:

On 2020/4/15 3:44, Corey Minyard wrote:
> On Tue, Apr 14, 2020 at 10:19:51PM +0800, Tang Bin wrote:
>> The priority of dev_warm() is higher than dev_info(),so if the
>> function bt_bmc_probe() uses dev_info() to print error message,
>> the dev_warm() is redundant.Thus should be removed.
> Actually, this needs to be left in. That error is not just a that irqs
> were not configured, that's an error that something else went wrong.

Oh ,It's my fault.

I had read the previous email with you again, and mistook it as that you
agreed with my point of view. I feel humiliated now.

Thanks,

Tang Bin