public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [PATCH 5.10] iommu/mediatek: remove redundant comparison
@ 2023-08-24 13:09 Alexandra Diupina
  2023-08-24 13:13 ` Greg Kroah-Hartman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alexandra Diupina @ 2023-08-24 13:09 UTC (permalink / raw)
  To: Joerg Roedel, stable, Greg Kroah-Hartman
  Cc: Alexandra Diupina, Will Deacon, Matthias Brugger, iommu,
	linux-arm-kernel, linux-mediatek, linux-kernel

iommu_device_register always returns 0 in 4.11-5.12, so
we need to remove redundant comparison with 0

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: b16c0170b53c ("iommu/mediatek: Make use of iommu_device_register interface")
Signed-off-by: Alexandra Diupina <adiupina@astralinux.ru>
---
 drivers/iommu/mtk_iommu.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index 051815c9d2bb..208c47218b75 100644
--- a/drivers/iommu/mtk_iommu.c
+++ b/drivers/iommu/mtk_iommu.c
@@ -748,9 +748,7 @@ static int mtk_iommu_probe(struct platform_device *pdev)
 	iommu_device_set_ops(&data->iommu, &mtk_iommu_ops);
 	iommu_device_set_fwnode(&data->iommu, &pdev->dev.of_node->fwnode);
 
-	ret = iommu_device_register(&data->iommu);
-	if (ret)
-		return ret;
+	iommu_device_register(&data->iommu);
 
 	spin_lock_init(&data->tlb_lock);
 	list_add_tail(&data->list, &m4ulist);
-- 
2.30.2


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

* Re: [PATCH] [PATCH 5.10] iommu/mediatek: remove redundant comparison
  2023-08-24 13:09 [PATCH] [PATCH 5.10] iommu/mediatek: remove redundant comparison Alexandra Diupina
@ 2023-08-24 13:13 ` Greg Kroah-Hartman
  2023-08-24 13:13 ` Greg Kroah-Hartman
  2023-08-24 13:15 ` kernel test robot
  2 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2023-08-24 13:13 UTC (permalink / raw)
  To: Alexandra Diupina
  Cc: Joerg Roedel, stable, Will Deacon, Matthias Brugger, iommu,
	linux-arm-kernel, linux-mediatek, linux-kernel

On Thu, Aug 24, 2023 at 04:09:54PM +0300, Alexandra Diupina wrote:
> iommu_device_register always returns 0 in 4.11-5.12, so

What do you mean by "4.11-5.12"?

> we need to remove redundant comparison with 0

Why?

> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: b16c0170b53c ("iommu/mediatek: Make use of iommu_device_register interface")

How is this a fix if it isn't actually changing the code at all?

> Signed-off-by: Alexandra Diupina <adiupina@astralinux.ru>
> ---
>  drivers/iommu/mtk_iommu.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
> index 051815c9d2bb..208c47218b75 100644
> --- a/drivers/iommu/mtk_iommu.c
> +++ b/drivers/iommu/mtk_iommu.c
> @@ -748,9 +748,7 @@ static int mtk_iommu_probe(struct platform_device *pdev)
>  	iommu_device_set_ops(&data->iommu, &mtk_iommu_ops);
>  	iommu_device_set_fwnode(&data->iommu, &pdev->dev.of_node->fwnode);
>  
> -	ret = iommu_device_register(&data->iommu);
> -	if (ret)
> -		return ret;
> +	iommu_device_register(&data->iommu);

This is obviously incorrect, please fix your "tool" that is telling you
to make such a broken change.

Unless your tool wants to create buggy code?  If so, it's succeeding
very well.

greg k-h

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

* Re: [PATCH] [PATCH 5.10] iommu/mediatek: remove redundant comparison
  2023-08-24 13:09 [PATCH] [PATCH 5.10] iommu/mediatek: remove redundant comparison Alexandra Diupina
  2023-08-24 13:13 ` Greg Kroah-Hartman
@ 2023-08-24 13:13 ` Greg Kroah-Hartman
  2023-08-24 13:15 ` kernel test robot
  2 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2023-08-24 13:13 UTC (permalink / raw)
  To: Alexandra Diupina
  Cc: Joerg Roedel, stable, Will Deacon, Matthias Brugger, iommu,
	linux-arm-kernel, linux-mediatek, linux-kernel

On Thu, Aug 24, 2023 at 04:09:54PM +0300, Alexandra Diupina wrote:
> iommu_device_register always returns 0 in 4.11-5.12, so
> we need to remove redundant comparison with 0
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: b16c0170b53c ("iommu/mediatek: Make use of iommu_device_register interface")
> Signed-off-by: Alexandra Diupina <adiupina@astralinux.ru>
> ---
>  drivers/iommu/mtk_iommu.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
> index 051815c9d2bb..208c47218b75 100644
> --- a/drivers/iommu/mtk_iommu.c
> +++ b/drivers/iommu/mtk_iommu.c
> @@ -748,9 +748,7 @@ static int mtk_iommu_probe(struct platform_device *pdev)
>  	iommu_device_set_ops(&data->iommu, &mtk_iommu_ops);
>  	iommu_device_set_fwnode(&data->iommu, &pdev->dev.of_node->fwnode);
>  
> -	ret = iommu_device_register(&data->iommu);
> -	if (ret)
> -		return ret;
> +	iommu_device_register(&data->iommu);
>  
>  	spin_lock_init(&data->tlb_lock);
>  	list_add_tail(&data->list, &m4ulist);
> -- 
> 2.30.2
> 

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

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

* Re: [PATCH] [PATCH 5.10] iommu/mediatek: remove redundant comparison
  2023-08-24 13:09 [PATCH] [PATCH 5.10] iommu/mediatek: remove redundant comparison Alexandra Diupina
  2023-08-24 13:13 ` Greg Kroah-Hartman
  2023-08-24 13:13 ` Greg Kroah-Hartman
@ 2023-08-24 13:15 ` kernel test robot
  2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2023-08-24 13:15 UTC (permalink / raw)
  To: Alexandra Diupina; +Cc: stable, oe-kbuild-all

Hi,

Thanks for your patch.

FYI: kernel test robot notices the stable kernel rule is not satisfied.

Rule: 'Cc: stable@vger.kernel.org' or 'commit <sha1> upstream.'
Subject: [PATCH] [PATCH 5.10] iommu/mediatek: remove redundant comparison
Link: https://lore.kernel.org/stable/20230824130954.29688-1-adiupina%40astralinux.ru

The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html

Please ignore this mail if the patch is not relevant for upstream.

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




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

end of thread, other threads:[~2023-08-24 13:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-24 13:09 [PATCH] [PATCH 5.10] iommu/mediatek: remove redundant comparison Alexandra Diupina
2023-08-24 13:13 ` Greg Kroah-Hartman
2023-08-24 13:13 ` Greg Kroah-Hartman
2023-08-24 13:15 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox