Re: [PATCH v2 1/2] EDAC: use proper list of struct attribute for attributes

From: Borislav Petkov
Date: Sun Jan 23 2022 - 14:19:42 EST


On Tue, Jan 04, 2022 at 12:24:00PM +0100, Greg Kroah-Hartman wrote:
> The edac sysfs code is doing some crazy casting of the list of
> attributes that is not necessary at all. Instead, properly point to the
> correct attribute structure in the lists, which removes the need to cast
> anything and the code is now properly typesafe (as much as sysfs
> attribute logic is typesafe...)
>
> Cc: Borislav Petkov <bp@xxxxxxxxx>
> Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
> Cc: Tony Luck <tony.luck@xxxxxxxxx>
> Cc: James Morse <james.morse@xxxxxxx>
> Cc: Robert Richter <rric@xxxxxxxxxx>
> Cc: linux-edac@xxxxxxxxxxxxxxx
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> ---
> v2: do the same thing in edac_pci_sysfs.c
>
> drivers/edac/edac_device_sysfs.c | 28 ++++++++++++++--------------
> drivers/edac/edac_pci_sysfs.c | 24 ++++++++++++------------
> 2 files changed, 26 insertions(+), 26 deletions(-)

Both applied, thanks.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette