drm/amd/display: Fix Compiler warnings in dmub
authorGaghik Khachatrian <gaghik.khachatrian@amd.com>
Sat, 7 Mar 2026 23:37:04 +0000 (18:37 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 30 Mar 2026 19:12:41 +0000 (15:12 -0400)
[Why]
Resolve compiler warnings by marking unused parameters explicitly.

[How]
In .c and .h files, keep parameter names in signatures and add a
line with`(void)param;`  inside the function body

Preserved function signatures and avoids breaking code paths that
may reference the parameter under conditional compilation.

Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Signed-off-by: Gaghik Khachatrian <gaghik.khachatrian@amd.com>
Signed-off-by: Chuanyu Tseng <chuanyu.tseng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn20.c
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn30.c
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn401.c
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42.c
drivers/gpu/drm/amd/display/dmub/src/dmub_reg.c

index 73221ca..0b15292 100644 (file)
@@ -194,6 +194,7 @@ void dmub_dcn20_setup_windows(struct dmub_srv *dmub,
                              const struct dmub_window *cw6,
                              const struct dmub_window *region6)
 {
+       (void)region6;
        union dmub_addr offset;
        uint64_t fb_base, fb_offset;
 
@@ -396,6 +397,7 @@ union dmub_fw_boot_status dmub_dcn20_get_fw_boot_status(struct dmub_srv *dmub)
 
 void dmub_dcn20_enable_dmub_boot_options(struct dmub_srv *dmub, const struct dmub_srv_hw_params *params)
 {
+       (void)params;
        union dmub_fw_boot_options boot_options = {0};
 
        REG_WRITE(DMCUB_SCRATCH14, boot_options.all);
index 84a6eb3..23a33db 100644 (file)
@@ -127,6 +127,7 @@ void dmub_dcn30_setup_windows(struct dmub_srv *dmub,
                              const struct dmub_window *cw6,
                              const struct dmub_window *region6)
 {
+       (void)region6;
        union dmub_addr offset;
 
        /* sienna_cichlid  has hardwired virtual addressing for CW2-CW7 */
index 244244f..478d79a 100644 (file)
@@ -195,6 +195,8 @@ void dmub_dcn31_setup_windows(struct dmub_srv *dmub,
                              const struct dmub_window *cw6,
                              const struct dmub_window *region6)
 {
+       (void)cw2;
+       (void)region6;
        union dmub_addr offset;
 
        offset = cw3->offset;
index 5d86f64..3f9fb9e 100644 (file)
@@ -237,6 +237,8 @@ void dmub_dcn32_setup_windows(struct dmub_srv *dmub,
                const struct dmub_window *cw6,
                const struct dmub_window *region6)
 {
+       (void)cw2;
+       (void)region6;
        union dmub_addr offset;
 
        offset = cw3->offset;
index f9b16eb..69fb608 100644 (file)
@@ -222,6 +222,7 @@ void dmub_dcn35_setup_windows(struct dmub_srv *dmub,
                              const struct dmub_window *cw6,
                              const struct dmub_window *region6)
 {
+       (void)cw2;
        union dmub_addr offset;
 
        offset = cw3->offset;
index 3d2307d..e5a78df 100644 (file)
@@ -213,6 +213,7 @@ void dmub_dcn401_setup_windows(struct dmub_srv *dmub,
                const struct dmub_window *cw6,
                const struct dmub_window *region6)
 {
+       (void)cw2;
        union dmub_addr offset;
 
        offset = cw3->offset;
index 7b870b8..a09aa19 100644 (file)
@@ -229,6 +229,7 @@ void dmub_dcn42_setup_windows(struct dmub_srv *dmub,
                              const struct dmub_window *cw6,
                              const struct dmub_window *region6)
 {
+       (void)cw2;
        union dmub_addr offset;
 
        offset = cw3->offset;
index 94f4931..b5566ef 100644 (file)
@@ -45,6 +45,7 @@ static void set_reg_field_values(struct dmub_reg_value_masks *field_value_mask,
                                 uint32_t mask1, uint32_t field_value1,
                                 va_list ap)
 {
+       (void)addr;
        uint32_t shift, mask, field_value;
        int i = 1;