diff mbox series

[-next] media: nxp: Remove redundant dev_err()

Message ID 20230727102154.2757410-1-ruanjinjie@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] media: nxp: Remove redundant dev_err() | expand

Commit Message

Jinjie Ruan July 27, 2023, 10:21 a.m. UTC
There is no need to call the dev_err() function directly to print a custom
message when handling an error from platform_get_irq() function as
it is going to display an appropriate error message in case of a failure.

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
---
 drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c      | 1 -
 drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c | 1 -
 2 files changed, 2 deletions(-)

Comments

Laurent Pinchart July 27, 2023, 9:53 a.m. UTC | #1
Hi Ruan,

Thank you for the patch.

On Thu, Jul 27, 2023 at 10:21:54AM +0000, Ruan Jinjie wrote:
> There is no need to call the dev_err() function directly to print a custom
> message when handling an error from platform_get_irq() function as
> it is going to display an appropriate error message in case of a failure.
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c      | 1 -
>  drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
> index 9512c0a61966..b7a720198ce5 100644
> --- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
> +++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
> @@ -2742,7 +2742,6 @@ static int mxc_jpeg_probe(struct platform_device *pdev)
>  	dev_info(&pdev->dev, "choose slot %d\n", jpeg->slot_data.slot);
>  	dec_irq = platform_get_irq(pdev, 0);
>  	if (dec_irq < 0) {
> -		dev_err(&pdev->dev, "Failed to get irq %d\n", dec_irq);
>  		ret = dec_irq;
>  		goto err_irq;
>  	}
> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
> index c4454aa1cb34..65d20e9bae69 100644
> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
> @@ -791,7 +791,6 @@ int mxc_isi_pipe_init(struct mxc_isi_dev *isi, unsigned int id)
>  
>  	irq = platform_get_irq(to_platform_device(isi->dev), id);
>  	if (irq < 0) {
> -		dev_err(pipe->isi->dev, "Failed to get IRQ (%d)\n", irq);
>  		ret = irq;
>  		goto error;
>  	}
Mirela Rabulea Aug. 9, 2023, 9:52 p.m. UTC | #2
> -----Original Message-----
> From: Ruan Jinjie <ruanjinjie@huawei.com>
> Sent: Thursday, July 27, 2023 1:22 PM
> To: Mirela Rabulea <mirela.rabulea@nxp.com>; dl-linux-imx <linux-
> imx@nxp.com>; mchehab@kernel.org; shawnguo@kernel.org;
> s.hauer@pengutronix.de; kernel@pengutronix.de; festevam@gmail.com;
> laurent.pinchart@ideasonboard.com; linux-arm-kernel@lists.infradead.org;
> linux-media@vger.kernel.org; linux-kernel@vger.kernel.org
> Cc: ruanjinjie@huawei.com
> Subject: [PATCH -next] media: nxp: Remove redundant dev_err()
> 
> There is no need to call the dev_err() function directly to print a custom message
> when handling an error from platform_get_irq() function as it is going to display
> an appropriate error message in case of a failure.
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>

Hi,
We have been using "media: imx-jpeg:" in the subject.
Other than that,
Reviewed-by: Mirela Rabulea <mirela.rabulea@nxp.com>

Regards,
Mirela

> ---
>  drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c      | 1 -
>  drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
> b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
> index 9512c0a61966..b7a720198ce5 100644
> --- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
> +++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
> @@ -2742,7 +2742,6 @@ static int mxc_jpeg_probe(struct platform_device
> *pdev)
>         dev_info(&pdev->dev, "choose slot %d\n", jpeg->slot_data.slot);
>         dec_irq = platform_get_irq(pdev, 0);
>         if (dec_irq < 0) {
> -               dev_err(&pdev->dev, "Failed to get irq %d\n", dec_irq);
>                 ret = dec_irq;
>                 goto err_irq;
>         }
> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
> b/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
> index c4454aa1cb34..65d20e9bae69 100644
> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
> @@ -791,7 +791,6 @@ int mxc_isi_pipe_init(struct mxc_isi_dev *isi, unsigned
> int id)
> 
>         irq = platform_get_irq(to_platform_device(isi->dev), id);
>         if (irq < 0) {
> -               dev_err(pipe->isi->dev, "Failed to get IRQ (%d)\n", irq);
>                 ret = irq;
>                 goto error;
>         }
> --
> 2.34.1
diff mbox series

Patch

diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
index 9512c0a61966..b7a720198ce5 100644
--- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
+++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
@@ -2742,7 +2742,6 @@  static int mxc_jpeg_probe(struct platform_device *pdev)
 	dev_info(&pdev->dev, "choose slot %d\n", jpeg->slot_data.slot);
 	dec_irq = platform_get_irq(pdev, 0);
 	if (dec_irq < 0) {
-		dev_err(&pdev->dev, "Failed to get irq %d\n", dec_irq);
 		ret = dec_irq;
 		goto err_irq;
 	}
diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
index c4454aa1cb34..65d20e9bae69 100644
--- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
+++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
@@ -791,7 +791,6 @@  int mxc_isi_pipe_init(struct mxc_isi_dev *isi, unsigned int id)
 
 	irq = platform_get_irq(to_platform_device(isi->dev), id);
 	if (irq < 0) {
-		dev_err(pipe->isi->dev, "Failed to get IRQ (%d)\n", irq);
 		ret = irq;
 		goto error;
 	}