Re: [PATCH] drm/amd/pm: replace 1-element arrays with flexible-array members

2023-11-09 Thread Alex Deucher
On Thu, Nov 9, 2023 at 7:14 AM José Pekkarinen wrote: > > On 2023-11-09 11:06, Greg KH wrote: > > On Thu, Nov 09, 2023 at 10:43:50AM +0200, José Pekkarinen wrote: > >> On 2023-11-08 09:29, Greg KH wrote: > >> > On Wed, Nov 08, 2023 at 08:54:35AM +0200, José Pekkarinen wrote: > >> > > The following

Re: [PATCH] drm/amd/pm: replace 1-element arrays with flexible-array members

2023-11-09 Thread José Pekkarinen
On 2023-11-09 11:06, Greg KH wrote: On Thu, Nov 09, 2023 at 10:43:50AM +0200, José Pekkarinen wrote: On 2023-11-08 09:29, Greg KH wrote: > On Wed, Nov 08, 2023 at 08:54:35AM +0200, José Pekkarinen wrote: > > The following case seems to be safe to be replaced with a flexible > > array > > to clea

Re: [PATCH] drm/amd/pm: replace 1-element arrays with flexible-array members

2023-11-09 Thread Greg KH
On Thu, Nov 09, 2023 at 10:43:50AM +0200, José Pekkarinen wrote: > On 2023-11-08 09:29, Greg KH wrote: > > On Wed, Nov 08, 2023 at 08:54:35AM +0200, José Pekkarinen wrote: > > > The following case seems to be safe to be replaced with a flexible > > > array > > > to clean up the added coccinelle war

Re: [PATCH] drm/amd/pm: replace 1-element arrays with flexible-array members

2023-11-09 Thread José Pekkarinen
On 2023-11-08 09:29, Greg KH wrote: On Wed, Nov 08, 2023 at 08:54:35AM +0200, José Pekkarinen wrote: The following case seems to be safe to be replaced with a flexible array to clean up the added coccinelle warning. This patch will just do it. drivers/gpu/drm/amd/pm/powerplay/smumgr/smu8_smumg

Re: [PATCH] drm/amd/pm: replace 1-element arrays with flexible-array members

2023-11-07 Thread Greg KH
On Wed, Nov 08, 2023 at 08:54:35AM +0200, José Pekkarinen wrote: > The following case seems to be safe to be replaced with a flexible array > to clean up the added coccinelle warning. This patch will just do it. > > drivers/gpu/drm/amd/pm/powerplay/smumgr/smu8_smumgr.h:76:38-63: WARNING use > fle

[PATCH] drm/amd/pm: replace 1-element arrays with flexible-array members

2023-11-07 Thread José Pekkarinen
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

[PATCH] drm/amd/pm: replace 1-element arrays with flexible-array members

2023-11-07 Thread José Pekkarinen
The following case seems to be safe to be replaced with a flexible array to clean up the added coccinelle warning. This patch will just do it. drivers/gpu/drm/amd/pm/powerplay/smumgr/smu8_smumgr.h:76:38-63: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process

[PATCH] drm/amd/pm: Replace 1-element arrays with flexible array members

2023-08-31 Thread Samuel Holland
Since commit df8fc4e934c1 ("kbuild: Enable -fstrict-flex-arrays=3"), UBSAN_BOUNDS no longer pretends 1-element arrays are unbounded. The bounds check is tripped in smu7_get_pp_table_entry_callback_func_v1(), while reading from mclk_dep_table. For consistency, fix all affected struct definitions in

RE: [PATCH] drm/amd/pm: Replace 1-element arrays with flexible array members

2023-08-30 Thread Deucher, Alexander
.freedesktop.org; dri- > de...@lists.freedesktop.org; linux-ker...@vger.kernel.org > Subject: [PATCH] drm/amd/pm: Replace 1-element arrays with flexible array > members > > Since commit df8fc4e934c1 ("kbuild: Enable -fstrict-flex-arrays=3"), > UBSAN_BOUNDS no longer pretends 1-element