* [PATCH] perf: arm-ni: Fix attribute_group definition syntax
@ 2024-11-17 10:20 Thomas Weißschuh
2024-11-18 11:55 ` Robin Murphy
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Weißschuh @ 2024-11-17 10:20 UTC (permalink / raw)
To: Robin Murphy, Will Deacon, Mark Rutland
Cc: linux-arm-kernel, linux-kernel, stable, Thomas Weißschuh
The sentinel NULL value does not make sense and is a syntax error in a
structure definition.
Remove it.
Fixes: 4d5a7680f2b4 ("perf: Add driver for Arm NI-700 interconnect PMU")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Cc stable because although this commit is not yet released, it most
likely will be by the time it hits mainline.
---
drivers/perf/arm-ni.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/perf/arm-ni.c b/drivers/perf/arm-ni.c
index 90fcfe693439ef3e18e23c6351433ac3c5ea78b5..fd7a5e60e96302fada29cd44e7bf9c582e93e4ce 100644
--- a/drivers/perf/arm-ni.c
+++ b/drivers/perf/arm-ni.c
@@ -247,7 +247,6 @@ static struct attribute *arm_ni_other_attrs[] = {
static const struct attribute_group arm_ni_other_attr_group = {
.attrs = arm_ni_other_attrs,
- NULL
};
static const struct attribute_group *arm_ni_attr_groups[] = {
---
base-commit: 4a5df37964673effcd9f84041f7423206a5ae5f2
change-id: 20241117-arm-ni-syntax-250a83058529
Best regards,
--
Thomas Weißschuh <linux@weissschuh.net>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] perf: arm-ni: Fix attribute_group definition syntax
2024-11-17 10:20 [PATCH] perf: arm-ni: Fix attribute_group definition syntax Thomas Weißschuh
@ 2024-11-18 11:55 ` Robin Murphy
2024-11-18 12:04 ` Thomas Weißschuh
0 siblings, 1 reply; 3+ messages in thread
From: Robin Murphy @ 2024-11-18 11:55 UTC (permalink / raw)
To: Thomas Weißschuh, Will Deacon, Mark Rutland
Cc: linux-arm-kernel, linux-kernel, stable
On 2024-11-17 10:20 am, Thomas Weißschuh wrote:
> The sentinel NULL value does not make sense and is a syntax error in a
> structure definition.
What error? It's an initialiser following a designator in a structure
*declaration*, and the corresponding bin_attrs member is a pointer, so
NULL is a perfectly appropriate value to initialise it with.
Of course that is redundant when it's static anyway, and indeed wasn't
actually intentional, but it's also not doing any harm - the cosmetic
cleanup is welcome, but is not a stable-worthy fix.
Thanks,
Robin.
> Remove it.
>
> Fixes: 4d5a7680f2b4 ("perf: Add driver for Arm NI-700 interconnect PMU")
> Cc: stable@vger.kernel.org
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
> Cc stable because although this commit is not yet released, it most
> likely will be by the time it hits mainline.
> ---
> drivers/perf/arm-ni.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/perf/arm-ni.c b/drivers/perf/arm-ni.c
> index 90fcfe693439ef3e18e23c6351433ac3c5ea78b5..fd7a5e60e96302fada29cd44e7bf9c582e93e4ce 100644
> --- a/drivers/perf/arm-ni.c
> +++ b/drivers/perf/arm-ni.c
> @@ -247,7 +247,6 @@ static struct attribute *arm_ni_other_attrs[] = {
>
> static const struct attribute_group arm_ni_other_attr_group = {
> .attrs = arm_ni_other_attrs,
> - NULL
> };
>
> static const struct attribute_group *arm_ni_attr_groups[] = {
>
> ---
> base-commit: 4a5df37964673effcd9f84041f7423206a5ae5f2
> change-id: 20241117-arm-ni-syntax-250a83058529
>
> Best regards,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] perf: arm-ni: Fix attribute_group definition syntax
2024-11-18 11:55 ` Robin Murphy
@ 2024-11-18 12:04 ` Thomas Weißschuh
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Weißschuh @ 2024-11-18 12:04 UTC (permalink / raw)
To: Robin Murphy
Cc: Will Deacon, Mark Rutland, linux-arm-kernel, linux-kernel, stable
On 2024-11-18 11:55:17+0000, Robin Murphy wrote:
> On 2024-11-17 10:20 am, Thomas Weißschuh wrote:
> > The sentinel NULL value does not make sense and is a syntax error in a
> > structure definition.
>
> What error? It's an initialiser following a designator in a structure
> *declaration*, and the corresponding bin_attrs member is a pointer, so NULL
> is a perfectly appropriate value to initialise it with.
Yes, you are correct. The warning only occurs in my series which changes
bin_attrs to a union [0] and I got confused due to some missing and
inconsisteny build bot feedback.
> Of course that is redundant when it's static anyway, and indeed wasn't
> actually intentional, but it's also not doing any harm - the cosmetic
> cleanup is welcome, but is not a stable-worthy fix.
Agreed, it's not worthy for stable.
Actually I want to make this patch part of a series, so please ignore
it for now.
> Thanks,
> Robin.
[0] https://lore.kernel.org/lkml/20241115-b4-sysfs-const-bin_attr-group-v1-1-2c9bb12dfc48@weissschuh.net/
> > Remove it.
> >
> > Fixes: 4d5a7680f2b4 ("perf: Add driver for Arm NI-700 interconnect PMU")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> > ---
> > Cc stable because although this commit is not yet released, it most
> > likely will be by the time it hits mainline.
> > ---
> > drivers/perf/arm-ni.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/perf/arm-ni.c b/drivers/perf/arm-ni.c
> > index 90fcfe693439ef3e18e23c6351433ac3c5ea78b5..fd7a5e60e96302fada29cd44e7bf9c582e93e4ce 100644
> > --- a/drivers/perf/arm-ni.c
> > +++ b/drivers/perf/arm-ni.c
> > @@ -247,7 +247,6 @@ static struct attribute *arm_ni_other_attrs[] = {
> > static const struct attribute_group arm_ni_other_attr_group = {
> > .attrs = arm_ni_other_attrs,
> > - NULL
> > };
> > static const struct attribute_group *arm_ni_attr_groups[] = {
> >
> > ---
> > base-commit: 4a5df37964673effcd9f84041f7423206a5ae5f2
> > change-id: 20241117-arm-ni-syntax-250a83058529
> >
> > Best regards,
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-18 12:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-17 10:20 [PATCH] perf: arm-ni: Fix attribute_group definition syntax Thomas Weißschuh
2024-11-18 11:55 ` Robin Murphy
2024-11-18 12:04 ` Thomas Weißschuh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®