]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
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 73221ca53b7dd040ee7ed91c5b537fab24189b24..0b152926f75b3cbc9a3679cd63be0154f4620626 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 84a6eb3f677deb49b4ecc288c11265720ad67582..23a33db07edc9fb1495c6b89846025947210f2a6 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 244244f3df80ef8869ba17a1c00db6f8f472f810..478d79a6e2461cd3d864dfb64414f68a9bed3242 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 5d86f649db4b53fe000b022fbaf77c297d5883e4..3f9fb9e05b799975193f7dcafd9e564c5bfbd2cf 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 f9b16eb8ef8ef7faff7704f781889955d8cf39fa..69fb6084232eaba558d9d7fe93a13e08c17c0ae8 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 3d2307d0ce4989125bb0a5f047960d7e924cb022..e5a78df80d72ffb5ff0b0fe57c5539c18307334f 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 7b870b83119950bb2b8b79f4bb0e6f10fae3f74c..a09aa19ad379632a4aa1dcaed2e91853e9180dde 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 94f4931d3d44238b2039caa963b20fbfcf3d6c2e..b5566ef8d4f3fecc703bf684b893be8cf93f4e70 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;