lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220316081839.22093-1-miles.chen@mediatek.com>
Date:   Wed, 16 Mar 2022 16:18:39 +0800
From:   Miles Chen <miles.chen@...iatek.com>
To:     <yang.lee@...ux.alibaba.com>
CC:     <abaci@...ux.alibaba.com>, <andrew-ct.chen@...iatek.com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <linux-media@...r.kernel.org>,
        <linux-mediatek@...ts.infradead.org>, <matthias.bgg@...il.com>,
        <mchehab@...nel.org>, <tiffany.lin@...iatek.com>
Subject: Re: [PATCH -next] media: platform: Remove unnecessary print function dev_err()

Hi Yang,

>The print function dev_err() is redundant because platform_get_irq()
>already prints an error.
>
>Eliminate the follow coccicheck warnings:
>./drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c:119:2-9:
>line 119 is redundant because platform_get_irq() already prints an error
>./drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c:103:2-9:
>line 103 is redundant because platform_get_irq() already prints an error
>
>Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
>Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
>---
> drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c | 4 +---
> drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c  | 4 +---
> 2 files changed, 2 insertions(+), 6 deletions(-)
>
>diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c
>index 48dad9bb13d2..df7b25e9cbc8 100644
>--- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c
>+++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c
>@@ -115,10 +115,8 @@ static int mtk_vcodec_init_dec_resources(struct mtk_vcodec_dev *dev)
> 		return 0;
> 
> 	dev->dec_irq = platform_get_irq(pdev, 0);
>-	if (dev->dec_irq < 0) {
>-		dev_err(&pdev->dev, "failed to get irq number");
>+	if (dev->dec_irq < 0)
> 		return dev->dec_irq;
>-	}
> 

Thanks for the patch, 
Yihao has submitted a patch to fix mtk_vcodec_init_dec_resources() [1]
[1] https://lore.kernel.org/lkml/20220310023645.10082-1-hanyihao@vivo.com/

> 	irq_set_status_flags(dev->dec_irq, IRQ_NOAUTOEN);
> 	ret = devm_request_irq(&pdev->dev, dev->dec_irq,
>diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c
>index 8d2a641d92f1..5f07313676bb 100644
>--- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c
>+++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c
>@@ -99,10 +99,8 @@ static int mtk_vdec_hw_init_irq(struct mtk_vdec_hw_dev *dev)
> 	int ret;
> 
> 	dev->dec_irq = platform_get_irq(pdev, 0);
>-	if (dev->dec_irq < 0) {
>-		dev_err(&pdev->dev, "Failed to get irq resource");
>+	if (dev->dec_irq < 0)
> 		return dev->dec_irq;
>-	}
> 
> 	irq_set_status_flags(dev->dec_irq, IRQ_NOAUTOEN);
> 	ret = devm_request_irq(&pdev->dev, dev->dec_irq,

Would you mind submitting mtk_vdec_hw_init_irq() part by another patch?

Thanks,
Miles

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ