EDAC: Use proper list of struct attribute for attributes
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jan 2022 11:24:00 +0000 (12:24 +0100)
committerBorislav Petkov <bp@suse.de>
Sun, 23 Jan 2022 19:01:25 +0000 (20:01 +0100)
commit11413893a0d0b19df976eb9a2b600ba56802db2f
tree6376b355cf559ff0d74e8b6463684b4ad04645f5
parente783362eb54cd99b2cac8b3a9aeac942e6f6ac07
EDAC: Use proper list of struct attribute for attributes

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...)

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220104112401.1067148-1-gregkh@linuxfoundation.org
drivers/edac/edac_device_sysfs.c
drivers/edac/edac_pci_sysfs.c