All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/nouveau:  Remove unused variable ret
@ 2021-03-19  8:40 ` Jiapeng Chong
  0 siblings, 0 replies; 4+ messages in thread
From: Jiapeng Chong @ 2021-03-19  8:40 UTC (permalink / raw)
  To: bskeggs; +Cc: Jiapeng Chong, airlied, nouveau, linux-kernel, dri-devel

Fix the following coccicheck warnings:

./drivers/gpu/drm/nouveau/nouveau_bios.c:2048:5-8: Unneeded variable:
"ret". Return "0" on line 2061.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/gpu/drm/nouveau/nouveau_bios.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
index e8c445e..41b78e9 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bios.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
@@ -2045,7 +2045,6 @@ static bool NVInitVBIOS(struct drm_device *dev)
 {
 	struct nouveau_drm *drm = nouveau_drm(dev);
 	struct nvbios *bios = &drm->vbios;
-	int ret = 0;
 
 	/* Reset the BIOS head to 0. */
 	bios->state.crtchead = 0;
@@ -2058,7 +2057,7 @@ static bool NVInitVBIOS(struct drm_device *dev)
 		bios->fp.lvds_init_run = false;
 	}
 
-	return ret;
+	return 0;
 }
 
 static bool
-- 
1.8.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH] drm/nouveau:  Remove unused variable ret
@ 2021-03-19  8:40 ` Jiapeng Chong
  0 siblings, 0 replies; 4+ messages in thread
From: Jiapeng Chong @ 2021-03-19  8:40 UTC (permalink / raw)
  To: bskeggs; +Cc: airlied, daniel, dri-devel, nouveau, linux-kernel, Jiapeng Chong

Fix the following coccicheck warnings:

./drivers/gpu/drm/nouveau/nouveau_bios.c:2048:5-8: Unneeded variable:
"ret". Return "0" on line 2061.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/gpu/drm/nouveau/nouveau_bios.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
index e8c445e..41b78e9 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bios.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
@@ -2045,7 +2045,6 @@ static bool NVInitVBIOS(struct drm_device *dev)
 {
 	struct nouveau_drm *drm = nouveau_drm(dev);
 	struct nvbios *bios = &drm->vbios;
-	int ret = 0;
 
 	/* Reset the BIOS head to 0. */
 	bios->state.crtchead = 0;
@@ -2058,7 +2057,7 @@ static bool NVInitVBIOS(struct drm_device *dev)
 		bios->fp.lvds_init_run = false;
 	}
 
-	return ret;
+	return 0;
 }
 
 static bool
-- 
1.8.3.1


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

* [PATCH] drm/nouveau: remove unused variable ret
@ 2024-07-29 12:36 Jani Nikula
  2024-07-29 13:08 ` Danilo Krummrich
  0 siblings, 1 reply; 4+ messages in thread
From: Jani Nikula @ 2024-07-29 12:36 UTC (permalink / raw)
  To: dri-devel
  Cc: jani.nikula, Ben Skeggs, Danilo Krummrich, Karol Herbst,
	Lyude Paul, Danilo Krummrich, nouveau

Fix build with CONFIG_NOUVEAU_PLATFORM_DRIVER enabled:

../drivers/gpu/drm/nouveau/nouveau_platform.c: In function ‘nouveau_platform_probe’:
../drivers/gpu/drm/nouveau/nouveau_platform.c:29:13: error: unused variable ‘ret’ [-Werror=unused-variable]
   29 |         int ret;
      |             ^~~

Fixes: 961ae5f9807b ("drm/nouveau: handle pci/tegra drm_dev_{alloc, register} from common code")
Cc: Ben Skeggs <bskeggs@nvidia.com>
Cc: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>

---

Cc: Karol Herbst <kherbst@redhat.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Danilo Krummrich <dakr@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
---
 drivers/gpu/drm/nouveau/nouveau_platform.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_platform.c b/drivers/gpu/drm/nouveau/nouveau_platform.c
index 3194b110eff8..829fdc6e4031 100644
--- a/drivers/gpu/drm/nouveau/nouveau_platform.c
+++ b/drivers/gpu/drm/nouveau/nouveau_platform.c
@@ -26,7 +26,6 @@ static int nouveau_platform_probe(struct platform_device *pdev)
 	const struct nvkm_device_tegra_func *func;
 	struct nvkm_device *device = NULL;
 	struct drm_device *drm;
-	int ret;
 
 	func = of_device_get_match_data(&pdev->dev);
 
-- 
2.39.2


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

* Re: [PATCH] drm/nouveau: remove unused variable ret
  2024-07-29 12:36 [PATCH] drm/nouveau: remove unused variable ret Jani Nikula
@ 2024-07-29 13:08 ` Danilo Krummrich
  0 siblings, 0 replies; 4+ messages in thread
From: Danilo Krummrich @ 2024-07-29 13:08 UTC (permalink / raw)
  To: Jani Nikula
  Cc: dri-devel, Ben Skeggs, Danilo Krummrich, Karol Herbst, Lyude Paul,
	nouveau

Hi Jani,

On Mon, Jul 29, 2024 at 03:36:24PM +0300, Jani Nikula wrote:
> Fix build with CONFIG_NOUVEAU_PLATFORM_DRIVER enabled:
> 
> ../drivers/gpu/drm/nouveau/nouveau_platform.c: In function ‘nouveau_platform_probe’:
> ../drivers/gpu/drm/nouveau/nouveau_platform.c:29:13: error: unused variable ‘ret’ [-Werror=unused-variable]
>    29 |         int ret;
>       |             ^~~
> 
> Fixes: 961ae5f9807b ("drm/nouveau: handle pci/tegra drm_dev_{alloc, register} from common code")
> Cc: Ben Skeggs <bskeggs@nvidia.com>
> Cc: Danilo Krummrich <dakr@kernel.org>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Thanks for fixing this, applied to drm-misc-next.

> 
> ---
> 
> Cc: Karol Herbst <kherbst@redhat.com>
> Cc: Lyude Paul <lyude@redhat.com>
> Cc: Danilo Krummrich <dakr@redhat.com>
> Cc: dri-devel@lists.freedesktop.org
> Cc: nouveau@lists.freedesktop.org
> ---
>  drivers/gpu/drm/nouveau/nouveau_platform.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nouveau_platform.c b/drivers/gpu/drm/nouveau/nouveau_platform.c
> index 3194b110eff8..829fdc6e4031 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_platform.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_platform.c
> @@ -26,7 +26,6 @@ static int nouveau_platform_probe(struct platform_device *pdev)
>  	const struct nvkm_device_tegra_func *func;
>  	struct nvkm_device *device = NULL;
>  	struct drm_device *drm;
> -	int ret;
>  
>  	func = of_device_get_match_data(&pdev->dev);
>  
> -- 
> 2.39.2
> 


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

end of thread, other threads:[~2024-07-29 13:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-29 12:36 [PATCH] drm/nouveau: remove unused variable ret Jani Nikula
2024-07-29 13:08 ` Danilo Krummrich
  -- strict thread matches above, loose matches on Subject: below --
2021-03-19  8:40 [PATCH] drm/nouveau: Remove " Jiapeng Chong
2021-03-19  8:40 ` Jiapeng Chong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.