]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 May 2026 11:30:41 +0000 (13:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 May 2026 11:30:41 +0000 (13:30 +0200)
added patches:
asoc-intel-avs-replace-strcmp-with-sysfs_streq.patch
drm-amd-fix-set-but-not-used-warnings.patch

queue-6.18/asoc-intel-avs-replace-strcmp-with-sysfs_streq.patch [new file with mode: 0644]
queue-6.18/drm-amd-fix-set-but-not-used-warnings.patch [new file with mode: 0644]
queue-6.18/series

diff --git a/queue-6.18/asoc-intel-avs-replace-strcmp-with-sysfs_streq.patch b/queue-6.18/asoc-intel-avs-replace-strcmp-with-sysfs_streq.patch
new file mode 100644 (file)
index 0000000..82a0787
--- /dev/null
@@ -0,0 +1,61 @@
+From 45e9066f3a487e9e26b842644364d045af054775 Mon Sep 17 00:00:00 2001
+From: Brahmajit Das <listout@listout.xyz>
+Date: Mon, 22 Dec 2025 00:25:31 +0530
+Subject: ASoC: Intel: avs: replace strcmp with sysfs_streq
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Brahmajit Das <listout@listout.xyz>
+
+commit 45e9066f3a487e9e26b842644364d045af054775 upstream.
+
+allmodconfig failes to build with GCC 16 with the following build error
+
+sound/soc/intel/avs/path.c:137:38: error: ‘strcmp’ reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread]
+  137 |         return id->id == id2->id && !strcmp(id->tplg_name, id2->tplg_name);
+      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  ‘avs_condpaths_walk’: events 1-3
+  137 |         return id->id == id2->id && !strcmp(id->tplg_name, id2->tplg_name);
+      |                ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      |                                  |   |
+      |                                  |   (3) warning happens here
+      |                                  (1) when the condition is evaluated to true
+......
+  155 |         if (id->id != path->template->owner->id ||
+      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      |                                                 |
+      |                                                 (2) when the condition is evaluated to false
+  156 |             strcmp(id->tplg_name, path->template->owner->owner->name))
+      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+In file included from sound/soc/intel/avs/path.h:14,
+                 from sound/soc/intel/avs/path.c:15:
+sound/soc/intel/avs/topology.h: In function ‘avs_condpaths_walk’:
+sound/soc/intel/avs/topology.h:152:13: note: at offset 4 into source object ‘id’ of size 4
+  152 |         u32 id;
+      |             ^~
+
+Using the sysfs_streq as an alternative to strcmp helps getting around
+this build failure.
+Please also refer
+https://docs.kernel.org/core-api/kernel-api.html#c.__sysfs_match_string
+
+Signed-off-by: Brahmajit Das <listout@listout.xyz>
+Link: https://patch.msgid.link/20251221185531.6453-1-listout@listout.xyz
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/intel/avs/path.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/soc/intel/avs/path.c
++++ b/sound/soc/intel/avs/path.c
+@@ -134,7 +134,7 @@ static struct avs_tplg_path *avs_condpat
+ static bool avs_tplg_path_template_id_equal(struct avs_tplg_path_template_id *id,
+                                           struct avs_tplg_path_template_id *id2)
+ {
+-      return id->id == id2->id && !strcmp(id->tplg_name, id2->tplg_name);
++      return id->id == id2->id && !sysfs_streq(id->tplg_name, id2->tplg_name);
+ }
+ static struct avs_path *avs_condpath_find_match(struct avs_dev *adev,
diff --git a/queue-6.18/drm-amd-fix-set-but-not-used-warnings.patch b/queue-6.18/drm-amd-fix-set-but-not-used-warnings.patch
new file mode 100644 (file)
index 0000000..5ef458e
--- /dev/null
@@ -0,0 +1,130 @@
+From 46791d147d3ab3262298478106ef2a52fc7192e2 Mon Sep 17 00:00:00 2001
+From: Tiezhu Yang <yangtiezhu@loongson.cn>
+Date: Thu, 16 Oct 2025 14:51:17 +0800
+Subject: drm/amd: Fix set but not used warnings
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Tiezhu Yang <yangtiezhu@loongson.cn>
+
+commit 46791d147d3ab3262298478106ef2a52fc7192e2 upstream.
+
+There are many set but not used warnings under drivers/gpu/drm/amd when
+compiling with the latest upstream mainline GCC:
+
+  drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c:305:18: warning: variable ‘p’ set but not used [-Wunused-but-set-variable=]
+  drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h:103:26: warning: variable ‘internal_reg_offset’ set but not used [-Wunused-but-set-variable=]
+  ...
+  drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h:164:26: warning: variable ‘internal_reg_offset’ set but not used [-Wunused-but-set-variable=]
+  ...
+  drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:445:13: warning: variable ‘pipe_idx’ set but not used [-Wunused-but-set-variable=]
+  drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:875:21: warning: variable ‘pipe_idx’ set but not used [-Wunused-but-set-variable=]
+
+Remove the variables actually not used or add __maybe_unused attribute for
+the variables actually used to fix them, compile tested only.
+
+Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c     |    4 +---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h      |    6 ++++--
+ drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c |    9 +++------
+ 3 files changed, 8 insertions(+), 11 deletions(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
+@@ -302,7 +302,6 @@ void amdgpu_gart_unbind(struct amdgpu_de
+                       int pages)
+ {
+       unsigned t;
+-      unsigned p;
+       int i, j;
+       u64 page_base;
+       /* Starting from VEGA10, system bit must be 0 to mean invalid. */
+@@ -316,8 +315,7 @@ void amdgpu_gart_unbind(struct amdgpu_de
+               return;
+       t = offset / AMDGPU_GPU_PAGE_SIZE;
+-      p = t / AMDGPU_GPU_PAGES_IN_CPU_PAGE;
+-      for (i = 0; i < pages; i++, p++) {
++      for (i = 0; i < pages; i++) {
+               page_base = adev->dummy_page_addr;
+               if (!adev->gart.ptr)
+                       continue;
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h
+@@ -100,7 +100,8 @@
+ #define SOC15_DPG_MODE_OFFSET(ip, inst_idx, reg)                                              \
+       ({                                                                                      \
+-              uint32_t internal_reg_offset, addr;                                             \
++              /* To avoid a -Wunused-but-set-variable warning. */                             \
++              uint32_t internal_reg_offset __maybe_unused, addr;                              \
+               bool video_range, video1_range, aon_range, aon1_range;                          \
+                                                                                               \
+               addr = (adev->reg_offset[ip##_HWIP][inst_idx][reg##_BASE_IDX] + reg);           \
+@@ -161,7 +162,8 @@
+ #define SOC24_DPG_MODE_OFFSET(ip, inst_idx, reg)                                              \
+       ({                                                                                      \
+-              uint32_t internal_reg_offset, addr;                                             \
++              /* To avoid a -Wunused-but-set-variable warning. */                             \
++              uint32_t internal_reg_offset __maybe_unused, addr;                              \
+               bool video_range, video1_range, aon_range, aon1_range;                          \
+                                                                                               \
+               addr = (adev->reg_offset[ip##_HWIP][inst_idx][reg##_BASE_IDX] + reg);           \
+--- a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
++++ b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
+@@ -442,7 +442,6 @@ bool dc_dmub_srv_p_state_delegate(struct
+       int i = 0, k = 0;
+       int ramp_up_num_steps = 1; // TODO: Ramp is currently disabled. Reenable it.
+       uint8_t visual_confirm_enabled;
+-      int pipe_idx = 0;
+       struct dc_stream_status *stream_status = NULL;
+       if (dc == NULL)
+@@ -457,7 +456,7 @@ bool dc_dmub_srv_p_state_delegate(struct
+       cmd.fw_assisted_mclk_switch.config_data.visual_confirm_enabled = visual_confirm_enabled;
+       if (should_manage_pstate) {
+-              for (i = 0, pipe_idx = 0; i < dc->res_pool->pipe_count; i++) {
++              for (i = 0; i < dc->res_pool->pipe_count; i++) {
+                       struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
+                       if (!pipe->stream)
+@@ -472,7 +471,6 @@ bool dc_dmub_srv_p_state_delegate(struct
+                               cmd.fw_assisted_mclk_switch.config_data.vactive_stretch_margin_us = dc->debug.fpo_vactive_margin_us;
+                               break;
+                       }
+-                      pipe_idx++;
+               }
+       }
+@@ -872,7 +870,7 @@ void dc_dmub_setup_subvp_dmub_command(st
+               bool enable)
+ {
+       uint8_t cmd_pipe_index = 0;
+-      uint32_t i, pipe_idx;
++      uint32_t i;
+       uint8_t subvp_count = 0;
+       union dmub_rb_cmd cmd;
+       struct pipe_ctx *subvp_pipes[2];
+@@ -899,7 +897,7 @@ void dc_dmub_setup_subvp_dmub_command(st
+       if (enable) {
+               // For each pipe that is a "main" SUBVP pipe, fill in pipe data for DMUB SUBVP cmd
+-              for (i = 0, pipe_idx = 0; i < dc->res_pool->pipe_count; i++) {
++              for (i = 0; i < dc->res_pool->pipe_count; i++) {
+                       struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
+                       pipe_mall_type = dc_state_get_pipe_subvp_type(context, pipe);
+@@ -922,7 +920,6 @@ void dc_dmub_setup_subvp_dmub_command(st
+                               populate_subvp_cmd_vblank_pipe_info(dc, context, &cmd, pipe, cmd_pipe_index++);
+                       }
+-                      pipe_idx++;
+               }
+               if (subvp_count == 2) {
+                       update_subvp_prefetch_end_to_mall_start(dc, context, &cmd, subvp_pipes);
index 27f3a3a9312ec96268fd3048df62753351fc68ac..89e68be9e3fe4af2a6a6a8b5eaab12cedee211be 100644 (file)
@@ -138,3 +138,5 @@ loongarch-show-cpu-vulnerabilites-correctly.patch
 power-supply-axp288_charger-do-not-cancel-work-before-initializing-it.patch
 hwmon-isl28022-fix-integer-overflow-in-power-calculation-on-32-bit.patch
 fs-prepare-for-adding-lsm-blob-to-backing_file.patch
+drm-amd-fix-set-but-not-used-warnings.patch
+asoc-intel-avs-replace-strcmp-with-sysfs_streq.patch