Skip to contentSkip to conversation

linux-next: build warnings after merge of the drm-misc tree

PATCH In review Stephen Rothwell 4 participants 4 messages Jan 15, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the drm-misc tree, today's linux-next build (x86_64 allmodconfig) produced this warning:

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c: In function 'amdgpu_display_user_framebuffer_create':
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:929:24: warning: unused variable 'adev' [-Wunused-variable]
929 | struct amdgpu_device *adev = drm_to_adev(dev);
| ^~~~

Introduced by commit

8f66090b7bb7 ("drm/amdgpu: Remove references to struct drm_device.pdev")

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c: In function 'amdgpu_device_resize_fb_bar':
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1109:6: warning: unused variable 'space_needed' [-Wunused-variable]

 1109 |  u64 space_needed = roundup_pow_of_two(adev->gmc.real_vram_size);
      |      ^~~~~~~~~~~~

Introduced by commit

453f617a30aa ("drm/amdgpu: Resize BAR0 to the maximum available size, even if it doesn't cover VRAM")

Signature · 2 lines
Cheers,
Stephen Rothwell

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#1 lore raw

PATCH 1/1 drm/amdgpu: Remove unused variable

Remove unused adev variable

Fixes 8f66090b7bb7 ("drm/amdgpu: Remove references to struct drm_device.pdev")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +0 -1
index 0150a51b65ef..f764803c53a4 100644
@@ -926,7 +926,6 @@ amdgpu_display_user_framebuffer_create(struct drm_device *dev,
 				       struct drm_file *file_priv,
 				       const struct drm_mode_fb_cmd2 *mode_cmd)
 {
-	struct amdgpu_device *adev = drm_to_adev(dev);
 	struct drm_gem_object *obj;
 	struct amdgpu_framebuffer *amdgpu_fb;
 	int ret;
Signature · 6 lines
2.29.2

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#2 lore raw

Re: [PATCH] drm/amdgpu: Remove unused variable

Quoted 6 lines · Nirmoy Das

Remove unused adev variable

Fixes 8f66090b7bb7 ("drm/amdgpu: Remove references to struct drm_device.pdev")
Quoted 19 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +0 -2
index 0150a51b65ef..f764803c53a4 100644
@@ -926,7 +926,6 @@ amdgpu_display_user_framebuffer_create(struct drm_device *dev,
                                       struct drm_file *file_priv,
                                       const struct drm_mode_fb_cmd2 *mode_cmd)
 {
-       struct amdgpu_device *adev = drm_to_adev(dev);
        struct drm_gem_object *obj;
        struct amdgpu_framebuffer *amdgpu_fb;
        int ret;
--

2.29.2

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to Stephen Rothwell

Hi Stephen,

Quoted 5 lines · Stephen Rothwell

Hi all,

After merging the drm-misc tree, today's linux-next build (x86_64 allmodconfig) produced this warning:

Quoted 8 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c: In function 'amdgpu_display_user_framebuffer_create':
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:929:24: warning: unused variable 'adev' [-Wunused-variable]
929 | struct amdgpu_device *adev = drm_to_adev(dev);
| ^~~~

Introduced by commit

8f66090b7bb7 ("drm/amdgpu: Remove references to struct drm_device.pdev")

I just sent a patch for this.

Quoted 9 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c: In function 'amdgpu_device_resize_fb_bar':
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1109:6: warning: unused variable 'space_needed' [-Wunused-variable]

  1109 |  u64 space_needed = roundup_pow_of_two(adev->gmc.real_vram_size);
       |      ^~~~~~~~~~~~

Introduced by commit

453f617a30aa ("drm/amdgpu: Resize BAR0 to the maximum available size, even if it doesn't cover VRAM")

We have a fix already merged in drm-misc-next for this.

Thanks,

Nirmoy

Quoted 1 line

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel