From: "José Pekkarinen" <jose.pekkarinen@foxhound.fi>
To: evan.quan@amd.com, alexander.deucher@amd.com,
christian.koenig@amd.com, Xinhui.Pan@amd.com,
skhan@linuxfoundation.org
Cc: "José Pekkarinen" <jose.pekkarinen@foxhound.fi>,
airlied@gmail.com, daniel@ffwll.ch, sunran001@208suo.com,
lijo.lazar@amd.com, colin.i.king@gmail.com,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org,
linux-kernel-mentees@lists.linux.dev
Subject: [PATCH] drm/amd/pm: replace 1-element arrays with flexible-array members
Date: Wed, 8 Nov 2023 08:55:39 +0200 [thread overview]
Message-ID: <20231108065539.14223-1-jose.pekkarinen@foxhound.fi> (raw)
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@foxhound.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
next reply other threads:[~2023-11-08 7:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-08 6:55 José Pekkarinen [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-11-08 6:54 [PATCH] drm/amd/pm: replace 1-element arrays with flexible-array members José Pekkarinen
2023-11-08 7:29 ` Greg KH
2023-11-09 8:43 ` José Pekkarinen
2023-11-09 9:06 ` Greg KH
2023-11-09 11:54 ` José Pekkarinen
2023-11-09 15:40 ` Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231108065539.14223-1-jose.pekkarinen@foxhound.fi \
--to=jose.pekkarinen@foxhound.fi \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=colin.i.king@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=evan.quan@amd.com \
--cc=lijo.lazar@amd.com \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=sunran001@208suo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).