* [PATCH (set 1) 00/20] Rid W=1 warnings from GPU
@ 2023-08-24 7:36 Lee Jones
2023-08-24 7:36 ` [PATCH 07/20] drm/radeon/radeon_ttm: Remove unused variable 'rbo' from radeon_bo_move() Lee Jones
` (8 more replies)
0 siblings, 9 replies; 25+ messages in thread
From: Lee Jones @ 2023-08-24 7:36 UTC (permalink / raw)
To: lee
Cc: Karol Herbst, nouveau, dri-devel, Mikko Perttunen,
Maíra Canal, Thierry Reding, Laurent Pinchart, Fabio Estevam,
Sumit Semwal, Mario Limonciello, Shashank Sharma, David Airlie,
Michal Simek, amd-gfx, Jonathan Hunter, Luben Tuikov,
Danilo Krummrich, Ben Skeggs, Philipp Zabel, linux-media,
Stanley Yang, Pengutronix Kernel Team, Sascha Hauer,
Maarten Lankhorst, Maxime Ripard, linaro-mm-sig, linux-tegra,
NXP Linux Team, linux-arm-kernel, Hyun Kwon, Thomas Zimmermann,
Pan, Xinhui, linux-kernel, Jerome Glisse, Daniel Vetter,
Alex Deucher, Gourav Samaiya, Shawn Guo, Christian König,
Hawking Zhang
This set is part of a larger effort attempting to clean-up W=1
kernel builds, which are currently overwhelmingly riddled with
niggly little warnings.
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Danilo Krummrich <dakr@redhat.com>
Cc: David Airlie <airlied@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Gourav Samaiya <gsamaiya@nvidia.com>
Cc: Hawking Zhang <Hawking.Zhang@amd.com>
Cc: Hyun Kwon <hyun.kwon@xilinx.com>
Cc: Jerome Glisse <glisse@freedesktop.org>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: Karol Herbst <kherbst@redhat.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linaro-mm-sig@lists.linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-media@vger.kernel.org
Cc: linux-tegra@vger.kernel.org
Cc: Luben Tuikov <luben.tuikov@amd.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: "Maíra Canal" <mairacanal@riseup.net>
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Mikko Perttunen <mperttunen@nvidia.com>
Cc: nouveau@lists.freedesktop.org
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Shashank Sharma <shashank.sharma@amd.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Stanley Yang <Stanley.Yang@amd.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Lee Jones (20):
drm/xlnx/zynqmp_disp: Use correct kerneldoc formatting in zynqmp_disp
drm/nouveau/nvkm/subdev/acr/lsfw: Remove unused variable 'loc'
drm/nouveau/nvkm/subdev/bios/init: Demote a bunch of kernel-doc abuses
drm/nouveau/nvkm/subdev/volt/gk20a: Demote kerneldoc abuses
drm/nouveau/nvkm/engine/gr/gf100: Demote kerneldoc abuse
drm/nouveau/dispnv04/crtc: Demote kerneldoc abuses
drm/radeon/radeon_ttm: Remove unused variable 'rbo' from
radeon_bo_move()
drm/amd/amdgpu/sdma_v6_0: Demote a bunch of half-completed function
headers
drm/tests/drm_kunit_helpers: Place correct function name in the
comment header
drm/scheduler/sched_main: Provide short description of missing param
'result'
drm/amd/amdgpu/amdgpu_doorbell_mgr: Correct misdocumented param
'doorbell_index'
drm/amd/amdgpu/amdgpu_device: Provide suitable description for param
'xcc_id'
drm/tests/drm_kunit_helpers: Correct possible double-entry typo in
'ddrm_kunit_helper_acquire_ctx_alloc'
drm/imx/ipuv3/imx-ldb: Increase buffer size to ensure all possible
values can be stored
drm/tegra/hub: Increase buffer size to ensure all possible values can
be stored
drm/drm_connector: Provide short description of param
'supported_colorspaces'
drm/amd/amdgpu/amdgpu_ras: Increase buffer size to account for all
possible values
drm/drm_gpuva_mgr: Remove set but unused variable 'prev'
drm/amd/amdgpu/amdgpu_sdma: Increase buffer size to account for all
possible values
drm/amd/amdgpu/imu_v11_0: Increase buffer size to ensure all possible
values can be stored
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
.../gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 2 +-
drivers/gpu/drm/amd/amdgpu/imu_v11_0.c | 2 +-
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 8 +-
drivers/gpu/drm/drm_connector.c | 2 +
drivers/gpu/drm/drm_gpuva_mgr.c | 10 +-
drivers/gpu/drm/imx/ipuv3/imx-ldb.c | 2 +-
drivers/gpu/drm/nouveau/dispnv04/crtc.c | 4 +-
.../gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 2 +-
.../gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c | 3 +-
.../gpu/drm/nouveau/nvkm/subdev/bios/init.c | 136 +++++++++---------
.../gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c | 4 +-
drivers/gpu/drm/radeon/radeon_ttm.c | 2 -
drivers/gpu/drm/scheduler/sched_main.c | 1 +
drivers/gpu/drm/tegra/hub.c | 2 +-
drivers/gpu/drm/tests/drm_kunit_helpers.c | 2 +-
drivers/gpu/drm/xlnx/zynqmp_disp.c | 6 +-
19 files changed, 96 insertions(+), 97 deletions(-)
--
2.42.0.rc1.204.g551eb34607-goog
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH 07/20] drm/radeon/radeon_ttm: Remove unused variable 'rbo' from radeon_bo_move()
2023-08-24 7:36 [PATCH (set 1) 00/20] Rid W=1 warnings from GPU Lee Jones
@ 2023-08-24 7:36 ` Lee Jones
2023-08-24 14:53 ` Alex Deucher
2023-08-24 7:36 ` [PATCH 08/20] drm/amd/amdgpu/sdma_v6_0: Demote a bunch of half-completed function headers Lee Jones
` (7 subsequent siblings)
8 siblings, 1 reply; 25+ messages in thread
From: Lee Jones @ 2023-08-24 7:36 UTC (permalink / raw)
To: lee
Cc: Pan, Xinhui, linux-kernel, amd-gfx, Jerome Glisse, dri-devel,
Daniel Vetter, Alex Deucher, David Airlie, Christian König
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/radeon/radeon_ttm.c: In function ‘radeon_bo_move’:
drivers/gpu/drm/radeon/radeon_ttm.c:201:27: warning: variable ‘rbo’ set but not used [-Wunused-but-set-variable]
Signed-off-by: Lee Jones <lee@kernel.org>
---
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Jerome Glisse <glisse@freedesktop.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
---
drivers/gpu/drm/radeon/radeon_ttm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 4eb83ccc4906a..de4e6d78f1e12 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -197,7 +197,6 @@ static int radeon_bo_move(struct ttm_buffer_object *bo, bool evict,
{
struct ttm_resource *old_mem = bo->resource;
struct radeon_device *rdev;
- struct radeon_bo *rbo;
int r;
if (new_mem->mem_type == TTM_PL_TT) {
@@ -210,7 +209,6 @@ static int radeon_bo_move(struct ttm_buffer_object *bo, bool evict,
if (r)
return r;
- rbo = container_of(bo, struct radeon_bo, tbo);
rdev = radeon_get_rdev(bo->bdev);
if (!old_mem || (old_mem->mem_type == TTM_PL_SYSTEM &&
bo->ttm == NULL)) {
--
2.42.0.rc1.204.g551eb34607-goog
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH 08/20] drm/amd/amdgpu/sdma_v6_0: Demote a bunch of half-completed function headers
2023-08-24 7:36 [PATCH (set 1) 00/20] Rid W=1 warnings from GPU Lee Jones
2023-08-24 7:36 ` [PATCH 07/20] drm/radeon/radeon_ttm: Remove unused variable 'rbo' from radeon_bo_move() Lee Jones
@ 2023-08-24 7:36 ` Lee Jones
2023-08-24 7:36 ` [PATCH 11/20] drm/amd/amdgpu/amdgpu_doorbell_mgr: Correct misdocumented param 'doorbell_index' Lee Jones
` (6 subsequent siblings)
8 siblings, 0 replies; 25+ messages in thread
From: Lee Jones @ 2023-08-24 7:36 UTC (permalink / raw)
To: lee
Cc: Pan, Xinhui, linux-kernel, amd-gfx, Sumit Semwal, linaro-mm-sig,
Stanley Yang, dri-devel, Daniel Vetter, Alex Deucher,
David Airlie, Christian König, linux-media
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:248: warning: Function parameter or member 'job' not described in 'sdma_v6_0_ring_emit_ib'
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:248: warning: Function parameter or member 'flags' not described in 'sdma_v6_0_ring_emit_ib'
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:945: warning: Function parameter or member 'timeout' not described in 'sdma_v6_0_ring_test_ib'
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:1124: warning: Function parameter or member 'ring' not described in 'sdma_v6_0_ring_pad_ib'
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:1175: warning: Function parameter or member 'vmid' not described in 'sdma_v6_0_ring_emit_vm_flush'
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:1175: warning: Function parameter or member 'pd_addr' not described in 'sdma_v6_0_ring_emit_vm_flush'
Cc: linaro-mm-sig@lists.linaro.org
---
Signed-off-by: Lee Jones <lee@kernel.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Stanley Yang <Stanley.Yang@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
---
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
index 45be0af2570b2..0e25b6fb13404 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
@@ -234,7 +234,7 @@ static void sdma_v6_0_ring_insert_nop(struct amdgpu_ring *ring, uint32_t count)
amdgpu_ring_write(ring, ring->funcs->nop);
}
-/**
+/*
* sdma_v6_0_ring_emit_ib - Schedule an IB on the DMA engine
*
* @ring: amdgpu ring pointer
@@ -937,7 +937,7 @@ static int sdma_v6_0_ring_test_ring(struct amdgpu_ring *ring)
return r;
}
-/**
+/*
* sdma_v6_0_ring_test_ib - test an IB on the DMA engine
*
* @ring: amdgpu_ring structure holding ring information
@@ -1119,7 +1119,7 @@ static void sdma_v6_0_vm_set_pte_pde(struct amdgpu_ib *ib,
ib->ptr[ib->length_dw++] = count - 1; /* number of entries */
}
-/**
+/*
* sdma_v6_0_ring_pad_ib - pad the IB
* @ib: indirect buffer to fill with padding
* @ring: amdgpu ring pointer
@@ -1168,7 +1168,7 @@ static void sdma_v6_0_ring_emit_pipeline_sync(struct amdgpu_ring *ring)
SDMA_PKT_POLL_REGMEM_DW5_INTERVAL(4)); /* retry count, poll interval */
}
-/**
+/*
* sdma_v6_0_ring_emit_vm_flush - vm flush using sDMA
*
* @ring: amdgpu_ring pointer
--
2.42.0.rc1.204.g551eb34607-goog
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH 11/20] drm/amd/amdgpu/amdgpu_doorbell_mgr: Correct misdocumented param 'doorbell_index'
2023-08-24 7:36 [PATCH (set 1) 00/20] Rid W=1 warnings from GPU Lee Jones
2023-08-24 7:36 ` [PATCH 07/20] drm/radeon/radeon_ttm: Remove unused variable 'rbo' from radeon_bo_move() Lee Jones
2023-08-24 7:36 ` [PATCH 08/20] drm/amd/amdgpu/sdma_v6_0: Demote a bunch of half-completed function headers Lee Jones
@ 2023-08-24 7:36 ` Lee Jones
2023-08-24 8:25 ` Sharma, Shashank
2023-08-24 7:36 ` [PATCH 12/20] drm/amd/amdgpu/amdgpu_device: Provide suitable description for param 'xcc_id' Lee Jones
` (5 subsequent siblings)
8 siblings, 1 reply; 25+ messages in thread
From: Lee Jones @ 2023-08-24 7:36 UTC (permalink / raw)
To: lee
Cc: Shashank Sharma, Pan, Xinhui, linux-kernel, amd-gfx, dri-devel,
Daniel Vetter, Alex Deucher, David Airlie, Christian König
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c:123: warning: Function parameter or member 'doorbell_index' not described in 'amdgpu_doorbell_index_on_bar'
drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c:123: warning: Excess function parameter 'db_index' description in 'amdgpu_doorbell_index_on_bar'
Signed-off-by: Lee Jones <lee@kernel.org>
---
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Shashank Sharma <shashank.sharma@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
---
drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c
index da4be0bbb4466..d0249ada91d30 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c
@@ -113,7 +113,7 @@ void amdgpu_mm_wdoorbell64(struct amdgpu_device *adev, u32 index, u64 v)
*
* @adev: amdgpu_device pointer
* @db_bo: doorbell object's bo
- * @db_index: doorbell relative index in this doorbell object
+ * @doorbell_index: doorbell relative index in this doorbell object
*
* returns doorbell's absolute index in BAR
*/
--
2.42.0.rc1.204.g551eb34607-goog
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH 12/20] drm/amd/amdgpu/amdgpu_device: Provide suitable description for param 'xcc_id'
2023-08-24 7:36 [PATCH (set 1) 00/20] Rid W=1 warnings from GPU Lee Jones
` (2 preceding siblings ...)
2023-08-24 7:36 ` [PATCH 11/20] drm/amd/amdgpu/amdgpu_doorbell_mgr: Correct misdocumented param 'doorbell_index' Lee Jones
@ 2023-08-24 7:36 ` Lee Jones
2023-08-24 14:54 ` Alex Deucher
2023-08-24 7:37 ` [PATCH 17/20] drm/amd/amdgpu/amdgpu_ras: Increase buffer size to account for all possible values Lee Jones
` (4 subsequent siblings)
8 siblings, 1 reply; 25+ messages in thread
From: Lee Jones @ 2023-08-24 7:36 UTC (permalink / raw)
To: lee
Cc: Pan, Xinhui, linux-kernel, amd-gfx, Sumit Semwal, linaro-mm-sig,
dri-devel, Daniel Vetter, Alex Deucher, David Airlie,
Christian König, linux-media
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:516: warning: Function parameter or member 'xcc_id' not described in 'amdgpu_mm_wreg_mmio_rlc'
Signed-off-by: Lee Jones <lee@kernel.org>
---
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index e77f048c99d85..d4f0e4327dd3f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -507,6 +507,7 @@ void amdgpu_device_wreg(struct amdgpu_device *adev,
* @adev: amdgpu_device pointer
* @reg: mmio/rlc register
* @v: value to write
+ * @xcc_id: xcc accelerated compute core id
*
* this function is invoked only for the debugfs register access
*/
--
2.42.0.rc1.204.g551eb34607-goog
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH 17/20] drm/amd/amdgpu/amdgpu_ras: Increase buffer size to account for all possible values
2023-08-24 7:36 [PATCH (set 1) 00/20] Rid W=1 warnings from GPU Lee Jones
` (3 preceding siblings ...)
2023-08-24 7:36 ` [PATCH 12/20] drm/amd/amdgpu/amdgpu_device: Provide suitable description for param 'xcc_id' Lee Jones
@ 2023-08-24 7:37 ` Lee Jones
2023-08-24 14:55 ` Alex Deucher
2023-08-24 7:37 ` [PATCH 19/20] drm/amd/amdgpu/amdgpu_sdma: " Lee Jones
` (3 subsequent siblings)
8 siblings, 1 reply; 25+ messages in thread
From: Lee Jones @ 2023-08-24 7:37 UTC (permalink / raw)
To: lee
Cc: Pan, Xinhui, linux-kernel, amd-gfx, dri-devel, Daniel Vetter,
Alex Deucher, David Airlie, Christian König, Hawking Zhang
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c: In function ‘amdgpu_ras_sysfs_create’:
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1406:20: warning: ‘_err_count’ directive output may be truncated writing 10 bytes into a region of size between 1 and 32 [-Wformat-truncation=]
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1405:9: note: ‘snprintf’ output between 11 and 42 bytes into a destination of size 32
Signed-off-by: Lee Jones <lee@kernel.org>
---
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Hawking Zhang <Hawking.Zhang@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
index ffb49b2d533ad..7999d202c9bc5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
@@ -436,7 +436,7 @@ struct amdgpu_ras {
};
struct ras_fs_data {
- char sysfs_name[32];
+ char sysfs_name[48];
char debugfs_name[32];
};
--
2.42.0.rc1.204.g551eb34607-goog
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH 19/20] drm/amd/amdgpu/amdgpu_sdma: Increase buffer size to account for all possible values
2023-08-24 7:36 [PATCH (set 1) 00/20] Rid W=1 warnings from GPU Lee Jones
` (4 preceding siblings ...)
2023-08-24 7:37 ` [PATCH 17/20] drm/amd/amdgpu/amdgpu_ras: Increase buffer size to account for all possible values Lee Jones
@ 2023-08-24 7:37 ` Lee Jones
2023-08-24 14:56 ` Alex Deucher
2023-08-24 7:37 ` [PATCH 20/20] drm/amd/amdgpu/imu_v11_0: Increase buffer size to ensure all possible values can be stored Lee Jones
` (2 subsequent siblings)
8 siblings, 1 reply; 25+ messages in thread
From: Lee Jones @ 2023-08-24 7:37 UTC (permalink / raw)
To: lee
Cc: Pan, Xinhui, linux-kernel, amd-gfx, dri-devel, Daniel Vetter,
Alex Deucher, David Airlie, Christian König
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c: In function ‘amdgpu_sdma_init_microcode’:
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c:217:64: warning: ‘.bin’ directive output may be truncated writing 4 bytes into a region of size between 0 and 32 [-Wformat-truncation=]
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c:217:17: note: ‘snprintf’ output between 13 and 52 bytes into a destination of size 40
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c:215:66: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=]
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c:215:17: note: ‘snprintf’ output between 12 and 41 bytes into a destination of size 40
Signed-off-by: Lee Jones <lee@kernel.org>
---
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
---
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
index e2b9392d7f0de..572f861e3f706 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
@@ -208,7 +208,7 @@ int amdgpu_sdma_init_microcode(struct amdgpu_device *adev,
const struct sdma_firmware_header_v2_0 *sdma_hdr;
uint16_t version_major;
char ucode_prefix[30];
- char fw_name[40];
+ char fw_name[52];
amdgpu_ucode_ip_version_decode(adev, SDMA0_HWIP, ucode_prefix, sizeof(ucode_prefix));
if (instance == 0)
--
2.42.0.rc1.204.g551eb34607-goog
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH 20/20] drm/amd/amdgpu/imu_v11_0: Increase buffer size to ensure all possible values can be stored
2023-08-24 7:36 [PATCH (set 1) 00/20] Rid W=1 warnings from GPU Lee Jones
` (5 preceding siblings ...)
2023-08-24 7:37 ` [PATCH 19/20] drm/amd/amdgpu/amdgpu_sdma: " Lee Jones
@ 2023-08-24 7:37 ` Lee Jones
2023-08-24 14:57 ` Alex Deucher
2023-08-24 8:59 ` [PATCH (set 1) 00/20] Rid W=1 warnings from GPU Maxime Ripard
2023-08-24 9:03 ` Jani Nikula
8 siblings, 1 reply; 25+ messages in thread
From: Lee Jones @ 2023-08-24 7:37 UTC (permalink / raw)
To: lee
Cc: dri-devel, Pan, Xinhui, linux-kernel, amd-gfx, Mario Limonciello,
Daniel Vetter, Alex Deucher, David Airlie, Christian König
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/amd/amdgpu/imu_v11_0.c: In function ‘imu_v11_0_init_microcode’:
drivers/gpu/drm/amd/amdgpu/imu_v11_0.c:52:54: warning: ‘_imu.bin’ directive output may be truncated writing 8 bytes into a region of size between 4 and 33 [-Wformat-truncation=]
drivers/gpu/drm/amd/amdgpu/imu_v11_0.c:52:9: note: ‘snprintf’ output between 16 and 45 bytes into a destination of size 40
Signed-off-by: Lee Jones <lee@kernel.org>
---
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
---
drivers/gpu/drm/amd/amdgpu/imu_v11_0.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c b/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
index 4ab90c7852c3e..ca123ff553477 100644
--- a/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
@@ -39,7 +39,7 @@ MODULE_FIRMWARE("amdgpu/gc_11_0_4_imu.bin");
static int imu_v11_0_init_microcode(struct amdgpu_device *adev)
{
- char fw_name[40];
+ char fw_name[45];
char ucode_prefix[30];
int err;
const struct imu_firmware_header_v1_0 *imu_hdr;
--
2.42.0.rc1.204.g551eb34607-goog
^ permalink raw reply related [flat|nested] 25+ messages in thread
* RE: [PATCH 11/20] drm/amd/amdgpu/amdgpu_doorbell_mgr: Correct misdocumented param 'doorbell_index'
2023-08-24 7:36 ` [PATCH 11/20] drm/amd/amdgpu/amdgpu_doorbell_mgr: Correct misdocumented param 'doorbell_index' Lee Jones
@ 2023-08-24 8:25 ` Sharma, Shashank
2023-08-24 14:59 ` Alex Deucher
0 siblings, 1 reply; 25+ messages in thread
From: Sharma, Shashank @ 2023-08-24 8:25 UTC (permalink / raw)
To: Lee Jones
Cc: Pan, Xinhui, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
Daniel Vetter, Deucher, Alexander, David Airlie,
Koenig, Christian
[AMD Official Use Only - General]
Reviewed-by: : Shashank Sharma <shashank.sharma@amd.com>
Regards
Shashank
-----Original Message-----
From: Lee Jones <lee@kernel.org>
Sent: Thursday, August 24, 2023 9:37 AM
To: lee@kernel.org
Cc: linux-kernel@vger.kernel.org; Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; David Airlie <airlied@gmail.com>; Daniel Vetter <daniel@ffwll.ch>; Sharma, Shashank <Shashank.Sharma@amd.com>; amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org
Subject: [PATCH 11/20] drm/amd/amdgpu/amdgpu_doorbell_mgr: Correct misdocumented param 'doorbell_index'
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c:123: warning: Function parameter or member 'doorbell_index' not described in 'amdgpu_doorbell_index_on_bar'
drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c:123: warning: Excess function parameter 'db_index' description in 'amdgpu_doorbell_index_on_bar'
Signed-off-by: Lee Jones <lee@kernel.org>
---
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Shashank Sharma <shashank.sharma@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
---
drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c
index da4be0bbb4466..d0249ada91d30 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c
@@ -113,7 +113,7 @@ void amdgpu_mm_wdoorbell64(struct amdgpu_device *adev, u32 index, u64 v)
*
* @adev: amdgpu_device pointer
* @db_bo: doorbell object's bo
- * @db_index: doorbell relative index in this doorbell object
+ * @doorbell_index: doorbell relative index in this doorbell object
*
* returns doorbell's absolute index in BAR
*/
--
2.42.0.rc1.204.g551eb34607-goog
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH (set 1) 00/20] Rid W=1 warnings from GPU
2023-08-24 7:36 [PATCH (set 1) 00/20] Rid W=1 warnings from GPU Lee Jones
` (6 preceding siblings ...)
2023-08-24 7:37 ` [PATCH 20/20] drm/amd/amdgpu/imu_v11_0: Increase buffer size to ensure all possible values can be stored Lee Jones
@ 2023-08-24 8:59 ` Maxime Ripard
2023-08-24 9:03 ` Maxime Ripard
2023-08-24 9:03 ` Jani Nikula
8 siblings, 1 reply; 25+ messages in thread
From: Maxime Ripard @ 2023-08-24 8:59 UTC (permalink / raw)
To: Lee Jones
Cc: Karol Herbst, nouveau, dri-devel, Mikko Perttunen,
Maíra Canal, Thierry Reding, Laurent Pinchart, Fabio Estevam,
Sumit Semwal, Mario Limonciello, Shashank Sharma, David Airlie,
NXP Linux Team, amd-gfx, Jonathan Hunter, Luben Tuikov,
Danilo Krummrich, Ben Skeggs, Philipp Zabel, linux-media,
Stanley Yang, Pengutronix Kernel Team, Sascha Hauer,
Maarten Lankhorst, linaro-mm-sig, linux-tegra, Michal Simek,
linux-arm-kernel, Hyun Kwon, Thomas Zimmermann, Pan, Xinhui,
linux-kernel, Jerome Glisse, Daniel Vetter, Alex Deucher,
Gourav Samaiya, Shawn Guo, Christian König, Hawking Zhang
On Thu, 24 Aug 2023 08:36:45 +0100, Lee Jones wrote:
> This set is part of a larger effort attempting to clean-up W=1
> kernel builds, which are currently overwhelmingly riddled with
> niggly little warnings.
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Danilo Krummrich <dakr@redhat.com>
> Cc: David Airlie <airlied@gmail.com>
> Cc: dri-devel@lists.freedesktop.org
> Cc: Fabio Estevam <festevam@gmail.com>
> Cc: Gourav Samaiya <gsamaiya@nvidia.com>
> Cc: Hawking Zhang <Hawking.Zhang@amd.com>
> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> Cc: Jerome Glisse <glisse@freedesktop.org>
> Cc: Jonathan Hunter <jonathanh@nvidia.com>
> Cc: Karol Herbst <kherbst@redhat.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: linaro-mm-sig@lists.linaro.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-media@vger.kernel.org
> Cc: linux-tegra@vger.kernel.org
> Cc: Luben Tuikov <luben.tuikov@amd.com>
> Cc: Lyude Paul <lyude@redhat.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: "Maíra Canal" <mairacanal@riseup.net>
> Cc: Mario Limonciello <mario.limonciello@amd.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: Mikko Perttunen <mperttunen@nvidia.com>
> Cc: nouveau@lists.freedesktop.org
> Cc: NXP Linux Team <linux-imx@nxp.com>
> Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
> Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: Shashank Sharma <shashank.sharma@amd.com>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Stanley Yang <Stanley.Yang@amd.com>
> Cc: Sumit Semwal <sumit.semwal@linaro.org>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
>
> [...]
Applied to drm/drm-misc (drm-misc-fixes).
Thanks!
Maxime
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH (set 1) 00/20] Rid W=1 warnings from GPU
2023-08-24 8:59 ` [PATCH (set 1) 00/20] Rid W=1 warnings from GPU Maxime Ripard
@ 2023-08-24 9:03 ` Maxime Ripard
2023-08-24 12:10 ` Lee Jones
0 siblings, 1 reply; 25+ messages in thread
From: Maxime Ripard @ 2023-08-24 9:03 UTC (permalink / raw)
To: Lee Jones
Cc: Karol Herbst, nouveau, dri-devel, Mikko Perttunen,
Maíra Canal, Thierry Reding, Laurent Pinchart, Fabio Estevam,
Sumit Semwal, Mario Limonciello, Shashank Sharma, David Airlie,
NXP Linux Team, amd-gfx, Jonathan Hunter, Luben Tuikov,
Danilo Krummrich, Ben Skeggs, Philipp Zabel, linux-media,
Stanley Yang, Pengutronix Kernel Team, Sascha Hauer,
Maarten Lankhorst, linaro-mm-sig, linux-tegra, Michal Simek,
linux-arm-kernel, Hyun Kwon, Thomas Zimmermann, Pan, Xinhui,
linux-kernel, Jerome Glisse, Daniel Vetter, Alex Deucher,
Gourav Samaiya, Shawn Guo, Christian König, Hawking Zhang
[-- Attachment #1: Type: text/plain, Size: 2365 bytes --]
Hi,
On Thu, Aug 24, 2023 at 10:59:54AM +0200, Maxime Ripard wrote:
> On Thu, 24 Aug 2023 08:36:45 +0100, Lee Jones wrote:
> > This set is part of a larger effort attempting to clean-up W=1
> > kernel builds, which are currently overwhelmingly riddled with
> > niggly little warnings.
> >
> > Cc: Alex Deucher <alexander.deucher@amd.com>
> > Cc: amd-gfx@lists.freedesktop.org
> > Cc: Ben Skeggs <bskeggs@redhat.com>
> > Cc: "Christian König" <christian.koenig@amd.com>
> > Cc: Daniel Vetter <daniel@ffwll.ch>
> > Cc: Danilo Krummrich <dakr@redhat.com>
> > Cc: David Airlie <airlied@gmail.com>
> > Cc: dri-devel@lists.freedesktop.org
> > Cc: Fabio Estevam <festevam@gmail.com>
> > Cc: Gourav Samaiya <gsamaiya@nvidia.com>
> > Cc: Hawking Zhang <Hawking.Zhang@amd.com>
> > Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> > Cc: Jerome Glisse <glisse@freedesktop.org>
> > Cc: Jonathan Hunter <jonathanh@nvidia.com>
> > Cc: Karol Herbst <kherbst@redhat.com>
> > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > Cc: linaro-mm-sig@lists.linaro.org
> > Cc: linux-arm-kernel@lists.infradead.org
> > Cc: linux-media@vger.kernel.org
> > Cc: linux-tegra@vger.kernel.org
> > Cc: Luben Tuikov <luben.tuikov@amd.com>
> > Cc: Lyude Paul <lyude@redhat.com>
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Cc: "Maíra Canal" <mairacanal@riseup.net>
> > Cc: Mario Limonciello <mario.limonciello@amd.com>
> > Cc: Maxime Ripard <mripard@kernel.org>
> > Cc: Michal Simek <michal.simek@xilinx.com>
> > Cc: Mikko Perttunen <mperttunen@nvidia.com>
> > Cc: nouveau@lists.freedesktop.org
> > Cc: NXP Linux Team <linux-imx@nxp.com>
> > Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
> > Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
> > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > Cc: Sascha Hauer <s.hauer@pengutronix.de>
> > Cc: Shashank Sharma <shashank.sharma@amd.com>
> > Cc: Shawn Guo <shawnguo@kernel.org>
> > Cc: Stanley Yang <Stanley.Yang@amd.com>
> > Cc: Sumit Semwal <sumit.semwal@linaro.org>
> > Cc: Thierry Reding <thierry.reding@gmail.com>
> > Cc: Thomas Zimmermann <tzimmermann@suse.de>
> >
> > [...]
>
> Applied to drm/drm-misc (drm-misc-fixes).
I got confused with b4 usage, but that wasn't actually applied. Only the
three patches I explicitly mentioned were, sorry for the confusion.
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH (set 1) 00/20] Rid W=1 warnings from GPU
2023-08-24 7:36 [PATCH (set 1) 00/20] Rid W=1 warnings from GPU Lee Jones
` (7 preceding siblings ...)
2023-08-24 8:59 ` [PATCH (set 1) 00/20] Rid W=1 warnings from GPU Maxime Ripard
@ 2023-08-24 9:03 ` Jani Nikula
2023-08-24 9:16 ` Maxime Ripard
2023-08-24 12:07 ` Lee Jones
8 siblings, 2 replies; 25+ messages in thread
From: Jani Nikula @ 2023-08-24 9:03 UTC (permalink / raw)
To: Lee Jones, lee
Cc: Karol Herbst, nouveau, dri-devel, Mikko Perttunen,
Maíra Canal, Thierry Reding, Laurent Pinchart, Sumit Semwal,
Shashank Sharma, Michal Simek, amd-gfx, Jonathan Hunter,
Luben Tuikov, Danilo Krummrich, Ben Skeggs, Stanley Yang,
linux-media, Thomas Zimmermann, Sascha Hauer, Maxime Ripard,
linaro-mm-sig, linux-tegra, NXP Linux Team, linux-arm-kernel,
Hyun Kwon, Pan, Xinhui, linux-kernel, Hawking Zhang,
Jerome Glisse, Pengutronix Kernel Team, Alex Deucher,
Gourav Samaiya, Shawn Guo, Christian König,
Mario Limonciello
On Thu, 24 Aug 2023, Lee Jones <lee@kernel.org> wrote:
> This set is part of a larger effort attempting to clean-up W=1
> kernel builds, which are currently overwhelmingly riddled with
> niggly little warnings.
The next question is, how do we keep it W=1 clean going forward?
Most people don't use W=1 because it's too noisy, so it's a bit of a
catch-22.
In i915, we enable a lot of W=1 warnings using subdir-ccflags-y in our
Makefile. For CI/developer use we also enable kernel-doc warnings by
default.
Should we start enabling some of those warning flags in drm/Makefile to
to keep the entire subsystem warning free?
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH (set 1) 00/20] Rid W=1 warnings from GPU
2023-08-24 9:03 ` Jani Nikula
@ 2023-08-24 9:16 ` Maxime Ripard
2023-08-24 12:07 ` Lee Jones
1 sibling, 0 replies; 25+ messages in thread
From: Maxime Ripard @ 2023-08-24 9:16 UTC (permalink / raw)
To: Jani Nikula
Cc: Karol Herbst, nouveau, dri-devel, Mikko Perttunen,
Maíra Canal, Thierry Reding, Laurent Pinchart, Sumit Semwal,
Shashank Sharma, Lee Jones, Michal Simek, amd-gfx,
Jonathan Hunter, Luben Tuikov, Danilo Krummrich, Ben Skeggs,
Stanley Yang, linux-media, Thomas Zimmermann, Sascha Hauer,
linaro-mm-sig, linux-tegra, NXP Linux Team, linux-arm-kernel,
Hyun Kwon, Pan, Xinhui, linux-kernel, Hawking Zhang,
Jerome Glisse, Pengutronix Kernel Team, Alex Deucher,
Gourav Samaiya, Shawn Guo, Christian König,
Mario Limonciello
[-- Attachment #1: Type: text/plain, Size: 871 bytes --]
On Thu, Aug 24, 2023 at 12:03:20PM +0300, Jani Nikula wrote:
> On Thu, 24 Aug 2023, Lee Jones <lee@kernel.org> wrote:
> > This set is part of a larger effort attempting to clean-up W=1
> > kernel builds, which are currently overwhelmingly riddled with
> > niggly little warnings.
>
> The next question is, how do we keep it W=1 clean going forward?
>
> Most people don't use W=1 because it's too noisy, so it's a bit of a
> catch-22.
>
> In i915, we enable a lot of W=1 warnings using subdir-ccflags-y in our
> Makefile. For CI/developer use we also enable kernel-doc warnings by
> default.
>
> Should we start enabling some of those warning flags in drm/Makefile to
> to keep the entire subsystem warning free?
I think that's a good idea. At least the documentation fixes I just
merged could have been easily caught before submission.
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH (set 1) 00/20] Rid W=1 warnings from GPU
2023-08-24 9:03 ` Jani Nikula
2023-08-24 9:16 ` Maxime Ripard
@ 2023-08-24 12:07 ` Lee Jones
2023-08-24 12:08 ` Lee Jones
` (2 more replies)
1 sibling, 3 replies; 25+ messages in thread
From: Lee Jones @ 2023-08-24 12:07 UTC (permalink / raw)
To: Jani Nikula
Cc: Karol Herbst, nouveau, dri-devel, Mikko Perttunen,
Maíra Canal, Thierry Reding, Laurent Pinchart, Sumit Semwal,
Shashank Sharma, Michal Simek, amd-gfx, Jonathan Hunter,
Luben Tuikov, Danilo Krummrich, Ben Skeggs, Stanley Yang,
linux-media, Thomas Zimmermann, Sascha Hauer, Maxime Ripard,
linaro-mm-sig, linux-tegra, NXP Linux Team, linux-arm-kernel,
Hyun Kwon, Pan, Xinhui, linux-kernel, Hawking Zhang,
Jerome Glisse, Pengutronix Kernel Team, Alex Deucher,
Gourav Samaiya, Shawn Guo, Christian König,
Mario Limonciello
On Thu, 24 Aug 2023, Jani Nikula wrote:
> On Thu, 24 Aug 2023, Lee Jones <lee@kernel.org> wrote:
> > This set is part of a larger effort attempting to clean-up W=1
> > kernel builds, which are currently overwhelmingly riddled with
> > niggly little warnings.
>
> The next question is, how do we keep it W=1 clean going forward?
My plan was to fix them all, then move each warning to W=0.
Arnd recently submitted a set doing just that for a bunch of them.
https://lore.kernel.org/all/20230811140327.3754597-1-arnd@kernel.org/
I like to think a bunch of this is built on top of my previous efforts.
GPU is a particularly tricky though - the warnings seem to come in faster
than I can squash them. Maybe the maintainers can find a way to test
new patches on merge?
> Most people don't use W=1 because it's too noisy, so it's a bit of a
> catch-22.
>
> In i915, we enable a lot of W=1 warnings using subdir-ccflags-y in our
> Makefile. For CI/developer use we also enable kernel-doc warnings by
> default.
>
> Should we start enabling some of those warning flags in drm/Makefile to
> to keep the entire subsystem warning free?
That would we awesome! We'd just need buy-in.
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH (set 1) 00/20] Rid W=1 warnings from GPU
2023-08-24 12:07 ` Lee Jones
@ 2023-08-24 12:08 ` Lee Jones
2023-08-24 12:14 ` Hamza Mahfooz
2023-08-28 16:11 ` Michel Dänzer
2 siblings, 0 replies; 25+ messages in thread
From: Lee Jones @ 2023-08-24 12:08 UTC (permalink / raw)
To: Jani Nikula
Cc: Karol Herbst, nouveau, dri-devel, Mikko Perttunen,
Maíra Canal, Thierry Reding, Laurent Pinchart, Sumit Semwal,
Shashank Sharma, Michal Simek, amd-gfx, Jonathan Hunter,
Luben Tuikov, Danilo Krummrich, Ben Skeggs, Stanley Yang,
linux-media, Thomas Zimmermann, Sascha Hauer, Maxime Ripard,
linaro-mm-sig, linux-tegra, NXP Linux Team, linux-arm-kernel,
Hyun Kwon, Pan, Xinhui, linux-kernel, Hawking Zhang,
Jerome Glisse, Pengutronix Kernel Team, Alex Deucher,
Gourav Samaiya, Shawn Guo, Christian König,
Mario Limonciello
On Thu, 24 Aug 2023, Lee Jones wrote:
> On Thu, 24 Aug 2023, Jani Nikula wrote:
>
> > On Thu, 24 Aug 2023, Lee Jones <lee@kernel.org> wrote:
> > > This set is part of a larger effort attempting to clean-up W=1
> > > kernel builds, which are currently overwhelmingly riddled with
> > > niggly little warnings.
> >
> > The next question is, how do we keep it W=1 clean going forward?
>
> My plan was to fix them all, then move each warning to W=0.
Some history:
- Starting with v5.8-rc1: 18867
- 2020-07-01: 18089
- 2020-07-07: 17288
- 2020-07-17: 15762
- 2020-07-20: 15724
- 2020-07-23: 15116
- 2020-08-12: 15184
- 2020-10-19: 10909
- 2020-11-04: 9385
- 2021-01-04: 5478
- 2021-01-12 4749
- 2021-01-29 4911
- 2021-04-07 3594
- 2021-05-20 2938
- 2021-07-01 2587
- 2023-02-10 2587
- 2023-08-22 1650
> Arnd recently submitted a set doing just that for a bunch of them.
>
> https://lore.kernel.org/all/20230811140327.3754597-1-arnd@kernel.org/
>
> I like to think a bunch of this is built on top of my previous efforts.
>
> GPU is a particularly tricky though - the warnings seem to come in faster
> than I can squash them. Maybe the maintainers can find a way to test
> new patches on merge?
>
> > Most people don't use W=1 because it's too noisy, so it's a bit of a
> > catch-22.
> >
> > In i915, we enable a lot of W=1 warnings using subdir-ccflags-y in our
> > Makefile. For CI/developer use we also enable kernel-doc warnings by
> > default.
> >
> > Should we start enabling some of those warning flags in drm/Makefile to
> > to keep the entire subsystem warning free?
>
> That would we awesome! We'd just need buy-in.
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH (set 1) 00/20] Rid W=1 warnings from GPU
2023-08-24 9:03 ` Maxime Ripard
@ 2023-08-24 12:10 ` Lee Jones
0 siblings, 0 replies; 25+ messages in thread
From: Lee Jones @ 2023-08-24 12:10 UTC (permalink / raw)
To: Maxime Ripard
Cc: Karol Herbst, nouveau, dri-devel, Mikko Perttunen,
Maíra Canal, Thierry Reding, Laurent Pinchart, Fabio Estevam,
Sumit Semwal, Mario Limonciello, Shashank Sharma, David Airlie,
NXP Linux Team, amd-gfx, Jonathan Hunter, Luben Tuikov,
Danilo Krummrich, Ben Skeggs, Philipp Zabel, linux-media,
Stanley Yang, Pengutronix Kernel Team, Sascha Hauer,
Maarten Lankhorst, linaro-mm-sig, linux-tegra, Michal Simek,
linux-arm-kernel, Hyun Kwon, Thomas Zimmermann, Pan, Xinhui,
linux-kernel, Jerome Glisse, Daniel Vetter, Alex Deucher,
Gourav Samaiya, Shawn Guo, Christian König, Hawking Zhang
On Thu, 24 Aug 2023, Maxime Ripard wrote:
> Hi,
>
> On Thu, Aug 24, 2023 at 10:59:54AM +0200, Maxime Ripard wrote:
> > On Thu, 24 Aug 2023 08:36:45 +0100, Lee Jones wrote:
> > > This set is part of a larger effort attempting to clean-up W=1
> > > kernel builds, which are currently overwhelmingly riddled with
> > > niggly little warnings.
> > >
> > > Cc: Alex Deucher <alexander.deucher@amd.com>
> > > Cc: amd-gfx@lists.freedesktop.org
> > > Cc: Ben Skeggs <bskeggs@redhat.com>
> > > Cc: "Christian König" <christian.koenig@amd.com>
> > > Cc: Daniel Vetter <daniel@ffwll.ch>
> > > Cc: Danilo Krummrich <dakr@redhat.com>
> > > Cc: David Airlie <airlied@gmail.com>
> > > Cc: dri-devel@lists.freedesktop.org
> > > Cc: Fabio Estevam <festevam@gmail.com>
> > > Cc: Gourav Samaiya <gsamaiya@nvidia.com>
> > > Cc: Hawking Zhang <Hawking.Zhang@amd.com>
> > > Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> > > Cc: Jerome Glisse <glisse@freedesktop.org>
> > > Cc: Jonathan Hunter <jonathanh@nvidia.com>
> > > Cc: Karol Herbst <kherbst@redhat.com>
> > > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > Cc: linaro-mm-sig@lists.linaro.org
> > > Cc: linux-arm-kernel@lists.infradead.org
> > > Cc: linux-media@vger.kernel.org
> > > Cc: linux-tegra@vger.kernel.org
> > > Cc: Luben Tuikov <luben.tuikov@amd.com>
> > > Cc: Lyude Paul <lyude@redhat.com>
> > > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > > Cc: "Maíra Canal" <mairacanal@riseup.net>
> > > Cc: Mario Limonciello <mario.limonciello@amd.com>
> > > Cc: Maxime Ripard <mripard@kernel.org>
> > > Cc: Michal Simek <michal.simek@xilinx.com>
> > > Cc: Mikko Perttunen <mperttunen@nvidia.com>
> > > Cc: nouveau@lists.freedesktop.org
> > > Cc: NXP Linux Team <linux-imx@nxp.com>
> > > Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
> > > Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
> > > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > > Cc: Sascha Hauer <s.hauer@pengutronix.de>
> > > Cc: Shashank Sharma <shashank.sharma@amd.com>
> > > Cc: Shawn Guo <shawnguo@kernel.org>
> > > Cc: Stanley Yang <Stanley.Yang@amd.com>
> > > Cc: Sumit Semwal <sumit.semwal@linaro.org>
> > > Cc: Thierry Reding <thierry.reding@gmail.com>
> > > Cc: Thomas Zimmermann <tzimmermann@suse.de>
> > >
> > > [...]
> >
> > Applied to drm/drm-misc (drm-misc-fixes).
>
> I got confused with b4 usage, but that wasn't actually applied. Only the
> three patches I explicitly mentioned were, sorry for the confusion.
:)
Thanks Maxime.
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH (set 1) 00/20] Rid W=1 warnings from GPU
2023-08-24 12:07 ` Lee Jones
2023-08-24 12:08 ` Lee Jones
@ 2023-08-24 12:14 ` Hamza Mahfooz
2023-08-24 12:24 ` Lee Jones
2023-08-28 16:11 ` Michel Dänzer
2 siblings, 1 reply; 25+ messages in thread
From: Hamza Mahfooz @ 2023-08-24 12:14 UTC (permalink / raw)
To: Lee Jones, Jani Nikula
Cc: Karol Herbst, nouveau, dri-devel, Mikko Perttunen,
Maíra Canal, Thierry Reding, Laurent Pinchart, Sumit Semwal,
Mario Limonciello, Shashank Sharma, Michal Simek, amd-gfx,
Jonathan Hunter, Luben Tuikov, Danilo Krummrich, Ben Skeggs,
Stanley Yang, linux-media, Pengutronix Kernel Team, Sascha Hauer,
Maxime Ripard, linaro-mm-sig, linux-tegra, NXP Linux Team,
linux-arm-kernel, Hyun Kwon, Pan, Xinhui, linux-kernel,
Jerome Glisse, Thomas Zimmermann, Alex Deucher, Gourav Samaiya,
Shawn Guo, Christian König, Hawking Zhang
On 8/24/23 08:07, Lee Jones wrote:
> On Thu, 24 Aug 2023, Jani Nikula wrote:
>
>> On Thu, 24 Aug 2023, Lee Jones <lee@kernel.org> wrote:
>>> This set is part of a larger effort attempting to clean-up W=1
>>> kernel builds, which are currently overwhelmingly riddled with
>>> niggly little warnings.
>>
>> The next question is, how do we keep it W=1 clean going forward?
>
> My plan was to fix them all, then move each warning to W=0.
>
> Arnd recently submitted a set doing just that for a bunch of them.
>
> https://lore.kernel.org/all/20230811140327.3754597-1-arnd@kernel.org/
>
> I like to think a bunch of this is built on top of my previous efforts.
>
> GPU is a particularly tricky though - the warnings seem to come in faster
> than I can squash them. Maybe the maintainers can find a way to test
> new patches on merge?
I guess on that note, do you know if there is a way to run
`scripts/kernel-doc` on patches instead of whole files? That would make
much easier to block new kernel-doc issues from appearing.
>
>> Most people don't use W=1 because it's too noisy, so it's a bit of a
>> catch-22.
>>
>> In i915, we enable a lot of W=1 warnings using subdir-ccflags-y in our
>> Makefile. For CI/developer use we also enable kernel-doc warnings by
>> default.
>>
>> Should we start enabling some of those warning flags in drm/Makefile to
>> to keep the entire subsystem warning free?
>
> That would we awesome! We'd just need buy-in.
>
--
Hamza
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH (set 1) 00/20] Rid W=1 warnings from GPU
2023-08-24 12:14 ` Hamza Mahfooz
@ 2023-08-24 12:24 ` Lee Jones
0 siblings, 0 replies; 25+ messages in thread
From: Lee Jones @ 2023-08-24 12:24 UTC (permalink / raw)
To: Hamza Mahfooz
Cc: Karol Herbst, nouveau, dri-devel, Mikko Perttunen,
Maíra Canal, Thierry Reding, Laurent Pinchart, Sumit Semwal,
Mario Limonciello, Shashank Sharma, Michal Simek, amd-gfx,
Jonathan Hunter, Luben Tuikov, Danilo Krummrich, Ben Skeggs,
Stanley Yang, linux-media, Pengutronix Kernel Team, Sascha Hauer,
Maxime Ripard, linaro-mm-sig, Jani Nikula, linux-tegra,
NXP Linux Team, linux-arm-kernel, Hyun Kwon, Pan, Xinhui,
linux-kernel, Jerome Glisse, Thomas Zimmermann, Alex Deucher,
Gourav Samaiya, Shawn Guo, Christian König, Hawking Zhang
On Thu, 24 Aug 2023, Hamza Mahfooz wrote:
>
> On 8/24/23 08:07, Lee Jones wrote:
> > On Thu, 24 Aug 2023, Jani Nikula wrote:
> >
> > > On Thu, 24 Aug 2023, Lee Jones <lee@kernel.org> wrote:
> > > > This set is part of a larger effort attempting to clean-up W=1
> > > > kernel builds, which are currently overwhelmingly riddled with
> > > > niggly little warnings.
> > >
> > > The next question is, how do we keep it W=1 clean going forward?
> >
> > My plan was to fix them all, then move each warning to W=0.
> >
> > Arnd recently submitted a set doing just that for a bunch of them.
> >
> > https://lore.kernel.org/all/20230811140327.3754597-1-arnd@kernel.org/
> >
> > I like to think a bunch of this is built on top of my previous efforts.
> >
> > GPU is a particularly tricky though - the warnings seem to come in faster
> > than I can squash them. Maybe the maintainers can find a way to test
> > new patches on merge?
>
> I guess on that note, do you know if there is a way to run
> `scripts/kernel-doc` on patches instead of whole files? That would make
> much easier to block new kernel-doc issues from appearing.
Not off hand.
When I run builds on patches I author, I run them twice concurrently.
Once on the commit I'm basing on and once on the HEAD of my patchset. I
then diff the two. So as long as the number of errors and warnings stay
the same or reduce, we're golden.
Perhaps the same method could be used with `kernel-doc`?
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 07/20] drm/radeon/radeon_ttm: Remove unused variable 'rbo' from radeon_bo_move()
2023-08-24 7:36 ` [PATCH 07/20] drm/radeon/radeon_ttm: Remove unused variable 'rbo' from radeon_bo_move() Lee Jones
@ 2023-08-24 14:53 ` Alex Deucher
0 siblings, 0 replies; 25+ messages in thread
From: Alex Deucher @ 2023-08-24 14:53 UTC (permalink / raw)
To: Lee Jones
Cc: Pan, Xinhui, linux-kernel, dri-devel, Jerome Glisse, amd-gfx,
Daniel Vetter, Alex Deucher, David Airlie, Christian König
Applied. Thanks!
On Thu, Aug 24, 2023 at 3:37 AM Lee Jones <lee@kernel.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/radeon_ttm.c: In function ‘radeon_bo_move’:
> drivers/gpu/drm/radeon/radeon_ttm.c:201:27: warning: variable ‘rbo’ set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Lee Jones <lee@kernel.org>
> ---
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
> Cc: David Airlie <airlied@gmail.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Jerome Glisse <glisse@freedesktop.org>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> ---
> drivers/gpu/drm/radeon/radeon_ttm.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
> index 4eb83ccc4906a..de4e6d78f1e12 100644
> --- a/drivers/gpu/drm/radeon/radeon_ttm.c
> +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
> @@ -197,7 +197,6 @@ static int radeon_bo_move(struct ttm_buffer_object *bo, bool evict,
> {
> struct ttm_resource *old_mem = bo->resource;
> struct radeon_device *rdev;
> - struct radeon_bo *rbo;
> int r;
>
> if (new_mem->mem_type == TTM_PL_TT) {
> @@ -210,7 +209,6 @@ static int radeon_bo_move(struct ttm_buffer_object *bo, bool evict,
> if (r)
> return r;
>
> - rbo = container_of(bo, struct radeon_bo, tbo);
> rdev = radeon_get_rdev(bo->bdev);
> if (!old_mem || (old_mem->mem_type == TTM_PL_SYSTEM &&
> bo->ttm == NULL)) {
> --
> 2.42.0.rc1.204.g551eb34607-goog
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 12/20] drm/amd/amdgpu/amdgpu_device: Provide suitable description for param 'xcc_id'
2023-08-24 7:36 ` [PATCH 12/20] drm/amd/amdgpu/amdgpu_device: Provide suitable description for param 'xcc_id' Lee Jones
@ 2023-08-24 14:54 ` Alex Deucher
0 siblings, 0 replies; 25+ messages in thread
From: Alex Deucher @ 2023-08-24 14:54 UTC (permalink / raw)
To: Lee Jones
Cc: Pan, Xinhui, linux-kernel, dri-devel, Christian König,
linaro-mm-sig, amd-gfx, Daniel Vetter, Alex Deucher, David Airlie,
Sumit Semwal, linux-media
Applied. Thanks!
On Thu, Aug 24, 2023 at 3:38 AM Lee Jones <lee@kernel.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:516: warning: Function parameter or member 'xcc_id' not described in 'amdgpu_mm_wreg_mmio_rlc'
>
> Signed-off-by: Lee Jones <lee@kernel.org>
> ---
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
> Cc: David Airlie <airlied@gmail.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Sumit Semwal <sumit.semwal@linaro.org>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-media@vger.kernel.org
> Cc: linaro-mm-sig@lists.linaro.org
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index e77f048c99d85..d4f0e4327dd3f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -507,6 +507,7 @@ void amdgpu_device_wreg(struct amdgpu_device *adev,
> * @adev: amdgpu_device pointer
> * @reg: mmio/rlc register
> * @v: value to write
> + * @xcc_id: xcc accelerated compute core id
> *
> * this function is invoked only for the debugfs register access
> */
> --
> 2.42.0.rc1.204.g551eb34607-goog
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 17/20] drm/amd/amdgpu/amdgpu_ras: Increase buffer size to account for all possible values
2023-08-24 7:37 ` [PATCH 17/20] drm/amd/amdgpu/amdgpu_ras: Increase buffer size to account for all possible values Lee Jones
@ 2023-08-24 14:55 ` Alex Deucher
0 siblings, 0 replies; 25+ messages in thread
From: Alex Deucher @ 2023-08-24 14:55 UTC (permalink / raw)
To: Lee Jones
Cc: Pan, Xinhui, linux-kernel, dri-devel, amd-gfx, Daniel Vetter,
Alex Deucher, David Airlie, Christian König, Hawking Zhang
Applied. Thanks!
On Thu, Aug 24, 2023 at 3:38 AM Lee Jones <lee@kernel.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c: In function ‘amdgpu_ras_sysfs_create’:
> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1406:20: warning: ‘_err_count’ directive output may be truncated writing 10 bytes into a region of size between 1 and 32 [-Wformat-truncation=]
> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1405:9: note: ‘snprintf’ output between 11 and 42 bytes into a destination of size 32
>
> Signed-off-by: Lee Jones <lee@kernel.org>
> ---
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
> Cc: David Airlie <airlied@gmail.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Hawking Zhang <Hawking.Zhang@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
> index ffb49b2d533ad..7999d202c9bc5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
> @@ -436,7 +436,7 @@ struct amdgpu_ras {
> };
>
> struct ras_fs_data {
> - char sysfs_name[32];
> + char sysfs_name[48];
> char debugfs_name[32];
> };
>
> --
> 2.42.0.rc1.204.g551eb34607-goog
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 19/20] drm/amd/amdgpu/amdgpu_sdma: Increase buffer size to account for all possible values
2023-08-24 7:37 ` [PATCH 19/20] drm/amd/amdgpu/amdgpu_sdma: " Lee Jones
@ 2023-08-24 14:56 ` Alex Deucher
0 siblings, 0 replies; 25+ messages in thread
From: Alex Deucher @ 2023-08-24 14:56 UTC (permalink / raw)
To: Lee Jones
Cc: Pan, Xinhui, linux-kernel, dri-devel, amd-gfx, Daniel Vetter,
Alex Deucher, David Airlie, Christian König
Applied. Thanks!
On Thu, Aug 24, 2023 at 3:38 AM Lee Jones <lee@kernel.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c: In function ‘amdgpu_sdma_init_microcode’:
> drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c:217:64: warning: ‘.bin’ directive output may be truncated writing 4 bytes into a region of size between 0 and 32 [-Wformat-truncation=]
> drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c:217:17: note: ‘snprintf’ output between 13 and 52 bytes into a destination of size 40
> drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c:215:66: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=]
> drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c:215:17: note: ‘snprintf’ output between 12 and 41 bytes into a destination of size 40
>
> Signed-off-by: Lee Jones <lee@kernel.org>
> ---
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
> Cc: David Airlie <airlied@gmail.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
> index e2b9392d7f0de..572f861e3f706 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
> @@ -208,7 +208,7 @@ int amdgpu_sdma_init_microcode(struct amdgpu_device *adev,
> const struct sdma_firmware_header_v2_0 *sdma_hdr;
> uint16_t version_major;
> char ucode_prefix[30];
> - char fw_name[40];
> + char fw_name[52];
>
> amdgpu_ucode_ip_version_decode(adev, SDMA0_HWIP, ucode_prefix, sizeof(ucode_prefix));
> if (instance == 0)
> --
> 2.42.0.rc1.204.g551eb34607-goog
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 20/20] drm/amd/amdgpu/imu_v11_0: Increase buffer size to ensure all possible values can be stored
2023-08-24 7:37 ` [PATCH 20/20] drm/amd/amdgpu/imu_v11_0: Increase buffer size to ensure all possible values can be stored Lee Jones
@ 2023-08-24 14:57 ` Alex Deucher
0 siblings, 0 replies; 25+ messages in thread
From: Alex Deucher @ 2023-08-24 14:57 UTC (permalink / raw)
To: Lee Jones
Cc: Pan, Xinhui, linux-kernel, amd-gfx, dri-devel, Daniel Vetter,
Alex Deucher, David Airlie, Christian König,
Mario Limonciello
Applied. Thanks!
On Thu, Aug 24, 2023 at 3:38 AM Lee Jones <lee@kernel.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/amd/amdgpu/imu_v11_0.c: In function ‘imu_v11_0_init_microcode’:
> drivers/gpu/drm/amd/amdgpu/imu_v11_0.c:52:54: warning: ‘_imu.bin’ directive output may be truncated writing 8 bytes into a region of size between 4 and 33 [-Wformat-truncation=]
> drivers/gpu/drm/amd/amdgpu/imu_v11_0.c:52:9: note: ‘snprintf’ output between 16 and 45 bytes into a destination of size 40
>
> Signed-off-by: Lee Jones <lee@kernel.org>
> ---
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
> Cc: David Airlie <airlied@gmail.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Mario Limonciello <mario.limonciello@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> ---
> drivers/gpu/drm/amd/amdgpu/imu_v11_0.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c b/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
> index 4ab90c7852c3e..ca123ff553477 100644
> --- a/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
> @@ -39,7 +39,7 @@ MODULE_FIRMWARE("amdgpu/gc_11_0_4_imu.bin");
>
> static int imu_v11_0_init_microcode(struct amdgpu_device *adev)
> {
> - char fw_name[40];
> + char fw_name[45];
> char ucode_prefix[30];
> int err;
> const struct imu_firmware_header_v1_0 *imu_hdr;
> --
> 2.42.0.rc1.204.g551eb34607-goog
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 11/20] drm/amd/amdgpu/amdgpu_doorbell_mgr: Correct misdocumented param 'doorbell_index'
2023-08-24 8:25 ` Sharma, Shashank
@ 2023-08-24 14:59 ` Alex Deucher
0 siblings, 0 replies; 25+ messages in thread
From: Alex Deucher @ 2023-08-24 14:59 UTC (permalink / raw)
To: Sharma, Shashank
Cc: Lee Jones, Pan, Xinhui, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
Deucher, Alexander, Koenig, Christian
Applied. Thanks!
On Thu, Aug 24, 2023 at 4:35 AM Sharma, Shashank
<Shashank.Sharma@amd.com> wrote:
>
> [AMD Official Use Only - General]
>
> Reviewed-by: : Shashank Sharma <shashank.sharma@amd.com>
>
> Regards
> Shashank
> -----Original Message-----
> From: Lee Jones <lee@kernel.org>
> Sent: Thursday, August 24, 2023 9:37 AM
> To: lee@kernel.org
> Cc: linux-kernel@vger.kernel.org; Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; David Airlie <airlied@gmail.com>; Daniel Vetter <daniel@ffwll.ch>; Sharma, Shashank <Shashank.Sharma@amd.com>; amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org
> Subject: [PATCH 11/20] drm/amd/amdgpu/amdgpu_doorbell_mgr: Correct misdocumented param 'doorbell_index'
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c:123: warning: Function parameter or member 'doorbell_index' not described in 'amdgpu_doorbell_index_on_bar'
> drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c:123: warning: Excess function parameter 'db_index' description in 'amdgpu_doorbell_index_on_bar'
>
> Signed-off-by: Lee Jones <lee@kernel.org>
> ---
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
> Cc: David Airlie <airlied@gmail.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Shashank Sharma <shashank.sharma@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c
> index da4be0bbb4466..d0249ada91d30 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c
> @@ -113,7 +113,7 @@ void amdgpu_mm_wdoorbell64(struct amdgpu_device *adev, u32 index, u64 v)
> *
> * @adev: amdgpu_device pointer
> * @db_bo: doorbell object's bo
> - * @db_index: doorbell relative index in this doorbell object
> + * @doorbell_index: doorbell relative index in this doorbell object
> *
> * returns doorbell's absolute index in BAR
> */
> --
> 2.42.0.rc1.204.g551eb34607-goog
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH (set 1) 00/20] Rid W=1 warnings from GPU
2023-08-24 12:07 ` Lee Jones
2023-08-24 12:08 ` Lee Jones
2023-08-24 12:14 ` Hamza Mahfooz
@ 2023-08-28 16:11 ` Michel Dänzer
2 siblings, 0 replies; 25+ messages in thread
From: Michel Dänzer @ 2023-08-28 16:11 UTC (permalink / raw)
To: Lee Jones, Jani Nikula
Cc: Karol Herbst, nouveau, dri-devel, Mikko Perttunen,
Maíra Canal, Thierry Reding, Laurent Pinchart, Sumit Semwal,
Mario Limonciello, Shashank Sharma, Michal Simek, amd-gfx,
Jonathan Hunter, Luben Tuikov, Danilo Krummrich, Ben Skeggs,
Stanley Yang, linux-media, Pengutronix Kernel Team, Sascha Hauer,
Maxime Ripard, linaro-mm-sig, linux-tegra, NXP Linux Team,
linux-arm-kernel, Hyun Kwon, Pan, Xinhui, linux-kernel,
Jerome Glisse, Thomas Zimmermann, Alex Deucher, Gourav Samaiya,
Shawn Guo, Christian König, Hawking Zhang
On 8/24/23 14:07, Lee Jones wrote:
> On Thu, 24 Aug 2023, Jani Nikula wrote:
>> On Thu, 24 Aug 2023, Lee Jones <lee@kernel.org> wrote:
>>> This set is part of a larger effort attempting to clean-up W=1
>>> kernel builds, which are currently overwhelmingly riddled with
>>> niggly little warnings.
>>
>> The next question is, how do we keep it W=1 clean going forward?
>
> My plan was to fix them all, then move each warning to W=0.
>
> Arnd recently submitted a set doing just that for a bunch of them.
>
> https://lore.kernel.org/all/20230811140327.3754597-1-arnd@kernel.org/
>
> I like to think a bunch of this is built on top of my previous efforts.
>
> GPU is a particularly tricky though - the warnings seem to come in faster
> than I can squash them. Maybe the maintainers can find a way to test
> new patches on merge?
One approach for this which has proved effective in Mesa and other projects is to make warnings fatal in CI which must pass for any changes to be merged. There is ongoing work toward introducing this for the DRM subsystem, using gitlab.freedesktop.org CI.
--
Earthling Michel Dänzer | https://redhat.com
Libre software enthusiast | Mesa and Xwayland developer
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2023-08-28 16:11 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-24 7:36 [PATCH (set 1) 00/20] Rid W=1 warnings from GPU Lee Jones
2023-08-24 7:36 ` [PATCH 07/20] drm/radeon/radeon_ttm: Remove unused variable 'rbo' from radeon_bo_move() Lee Jones
2023-08-24 14:53 ` Alex Deucher
2023-08-24 7:36 ` [PATCH 08/20] drm/amd/amdgpu/sdma_v6_0: Demote a bunch of half-completed function headers Lee Jones
2023-08-24 7:36 ` [PATCH 11/20] drm/amd/amdgpu/amdgpu_doorbell_mgr: Correct misdocumented param 'doorbell_index' Lee Jones
2023-08-24 8:25 ` Sharma, Shashank
2023-08-24 14:59 ` Alex Deucher
2023-08-24 7:36 ` [PATCH 12/20] drm/amd/amdgpu/amdgpu_device: Provide suitable description for param 'xcc_id' Lee Jones
2023-08-24 14:54 ` Alex Deucher
2023-08-24 7:37 ` [PATCH 17/20] drm/amd/amdgpu/amdgpu_ras: Increase buffer size to account for all possible values Lee Jones
2023-08-24 14:55 ` Alex Deucher
2023-08-24 7:37 ` [PATCH 19/20] drm/amd/amdgpu/amdgpu_sdma: " Lee Jones
2023-08-24 14:56 ` Alex Deucher
2023-08-24 7:37 ` [PATCH 20/20] drm/amd/amdgpu/imu_v11_0: Increase buffer size to ensure all possible values can be stored Lee Jones
2023-08-24 14:57 ` Alex Deucher
2023-08-24 8:59 ` [PATCH (set 1) 00/20] Rid W=1 warnings from GPU Maxime Ripard
2023-08-24 9:03 ` Maxime Ripard
2023-08-24 12:10 ` Lee Jones
2023-08-24 9:03 ` Jani Nikula
2023-08-24 9:16 ` Maxime Ripard
2023-08-24 12:07 ` Lee Jones
2023-08-24 12:08 ` Lee Jones
2023-08-24 12:14 ` Hamza Mahfooz
2023-08-24 12:24 ` Lee Jones
2023-08-28 16:11 ` Michel Dänzer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox