[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20231108065539.14223-1-jose.pekkarinen@foxhound.fi>
Date: Wed, 8 Nov 2023 08:55:39 +0200
From: José Pekkarinen <jose.pekkarinen@...hound.fi>
To: evan.quan@....com, alexander.deucher@....com,
christian.koenig@....com, Xinhui.Pan@....com,
skhan@...uxfoundation.org
Cc: José Pekkarinen <jose.pekkarinen@...hound.fi>,
airlied@...il.com, daniel@...ll.ch, sunran001@...suo.com,
lijo.lazar@....com, colin.i.king@...il.com,
amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, linux-kernel-mentees@...ts.linux.dev
Subject: [PATCH] drm/amd/pm: replace 1-element arrays with flexible-array members
While the structures affected seems to be unused along the driver the
following patch will care of replacing their members to flexible array,
removing the following warnings:
drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h:169:47-54: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)
drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h:174:47-54: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)
drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h:179:48-55: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)
drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h:184:47-54: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)
drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h:518:32-39: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)
Signed-off-by: José Pekkarinen <jose.pekkarinen@...hound.fi>
---
drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h b/drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h
index 81650727a5de..082d0bb79277 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h
+++ b/drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h
@@ -166,22 +166,22 @@ struct phm_phase_shedding_limits_table {
struct phm_vceclock_voltage_dependency_table {
uint8_t count; /* Number of entries. */
- struct phm_vceclock_voltage_dependency_record entries[1]; /* Dynamically allocate count entries. */
+ struct phm_vceclock_voltage_dependency_record entries[]; /* Dynamically allocate count entries. */
};
struct phm_uvdclock_voltage_dependency_table {
uint8_t count; /* Number of entries. */
- struct phm_uvdclock_voltage_dependency_record entries[1]; /* Dynamically allocate count entries. */
+ struct phm_uvdclock_voltage_dependency_record entries[]; /* Dynamically allocate count entries. */
};
struct phm_samuclock_voltage_dependency_table {
uint8_t count; /* Number of entries. */
- struct phm_samuclock_voltage_dependency_record entries[1]; /* Dynamically allocate count entries. */
+ struct phm_samuclock_voltage_dependency_record entries[]; /* Dynamically allocate count entries. */
};
struct phm_acpclock_voltage_dependency_table {
uint32_t count; /* Number of entries. */
- struct phm_acpclock_voltage_dependency_record entries[1]; /* Dynamically allocate count entries. */
+ struct phm_acpclock_voltage_dependency_record entries[]; /* Dynamically allocate count entries. */
};
struct phm_vce_clock_voltage_dependency_table {
--
2.39.2
Powered by blists - more mailing lists