linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ata: omit superfluous error message
@ 2020-04-20 13:53 ` Tang Bin
  2020-06-01 10:13   ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 2+ messages in thread
From: Tang Bin @ 2020-04-20 13:53 UTC (permalink / raw)
  To: axboe, b.zolnierkie; +Cc: linux-ide, linux-kernel, Tang Bin

In the probe function, when get irq failed, the function
platform_get_irq() logs an error message, so remove
redundant message here.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
 drivers/ata/pata_rb532_cf.c | 4 +---
 drivers/ata/sata_highbank.c | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c
index 479c4b29b..dcde84f57 100644
--- a/drivers/ata/pata_rb532_cf.c
+++ b/drivers/ata/pata_rb532_cf.c
@@ -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)) {
diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c
index ad3893c62..efd1925a9 100644
--- a/drivers/ata/sata_highbank.c
+++ b/drivers/ata/sata_highbank.c
@@ -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) {
-- 
2.20.1.windows.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ata: omit superfluous error message
  2020-04-20 13:53 ` [PATCH] ata: omit superfluous error message Tang Bin
@ 2020-06-01 10:13   ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-06-01 10:13 UTC (permalink / raw)
  To: Tang Bin; +Cc: axboe, linux-ide, linux-kernel


Hi,

On 4/20/20 3:53 PM, Tang Bin wrote:
> In the probe function, when get irq failed, the function
> platform_get_irq() logs an error message, so remove
> redundant message here.

platform_get_irq() doesn't log an error message for -EPROBE_DEFER
case so the conversion shouldn't be done automatically for device
drivers which don't support deferred probing (i.e. pata_rb532_cf &
sata_highbank).

Unless there is a proof that -PROBE_DEFER can't happen for these
two drivers this patch shouldn't be applied.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
> ---
>  drivers/ata/pata_rb532_cf.c | 4 +---
>  drivers/ata/sata_highbank.c | 4 +---
>  2 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c
> index 479c4b29b..dcde84f57 100644
> --- a/drivers/ata/pata_rb532_cf.c
> +++ b/drivers/ata/pata_rb532_cf.c
> @@ -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)) {
> diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c
> index ad3893c62..efd1925a9 100644
> --- a/drivers/ata/sata_highbank.c
> +++ b/drivers/ata/sata_highbank.c
> @@ -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) {
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-01 10:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200420135215eucas1p2f807c43a232564804dc864db55bd09a8@eucas1p2.samsung.com>
2020-04-20 13:53 ` [PATCH] ata: omit superfluous error message Tang Bin
2020-06-01 10:13   ` Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).