Jiri Slaby (SUSE)
c8d37084e9
EDAC: Remove unused struct members
...
Remove unused
- edac_pci_ctl_info::edac_subsys
- edac_pci_ctl_info::complete
- edac_device_ctl_info::removal_complete
members.
Found by https://github.com/jirislaby/clang-struct .
[ bp: Squash three almost identical trivial patches into one. ]
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org >
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de >
Link: https://lore.kernel.org/r/20240213112051.27715-6-jirislaby@kernel.org
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de >
2024-03-27 18:26:58 +01:00
Jiri Slaby (SUSE)
48bc8869c5
EDAC: Remove dynamic attributes from edac_device_alloc_ctl_info()
...
Dynamic attributes are not passed from any caller of
edac_device_alloc_ctl_info(). Drop this unused/untested functionality
completely.
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org >
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de >
Link: https://lore.kernel.org/r/20240213112051.27715-5-jirislaby@kernel.org
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de >
2024-03-27 18:26:58 +01:00
Jiri Slaby (SUSE)
9186695ef7
EDAC/device: Remove edac_dev_sysfs_block_attribute::store()
...
No one uses this store hook (both BLOCK_ATTR() pass NULL). It actually
never was since its addition in
fd309a9d8e ("drivers/edac: fix leaf sysfs attribute")
so drop it.
Found by https://github.com/jirislaby/clang-struct .
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org >
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de >
Link: https://lore.kernel.org/r/20240213112051.27715-4-jirislaby@kernel.org
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de >
2024-03-27 18:26:57 +01:00
Jiri Slaby (SUSE)
3667a35a50
EDAC/device: Remove edac_dev_sysfs_block_attribute::{block,value}
...
They're unused. And they were never used since their addition in
fd309a9d8e ("drivers/edac: fix leaf sysfs attribute")
Drop it.
Found by https://github.com/jirislaby/clang-struct .
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org >
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de >
Link: https://lore.kernel.org/r/20240213112051.27715-3-jirislaby@kernel.org
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de >
2024-03-27 18:26:57 +01:00
Greg Kroah-Hartman
f36be9ce81
EDAC: constantify the struct bus_type usage
...
In many places in the edac code, struct bus_type pointers are passed
around and then eventually sent to the driver core, which can handle a
constant pointer. So constantify all of the edac usage of these as well
because the data in them is never modified by the edac code either.
Cc: Borislav Petkov <bp@alien8.de >
Cc: Tony Luck <tony.luck@intel.com >
Cc: James Morse <james.morse@arm.com >
Cc: Mauro Carvalho Chehab <mchehab@kernel.org >
Cc: Robert Richter <rric@kernel.org >
Cc: <linux-edac@vger.kernel.org >
Link: https://lore.kernel.org/r/2023121909-tribute-punctuate-4b22@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-01-04 14:34:27 +01:00
Borislav Petkov
9fb9ce392a
EDAC/device: Get rid of the silly one-shot memory allocation in edac_device_alloc_ctl_info()
...
Use boring kzalloc() instead. Add pointers to the different allocated
members in struct edac_device_ctl_info for easier freeing later.
One of the reasons, perhaps, why it was done this way is to be able to
do a single kfree(ctl_info) without having to kfree() the other parts of
the struct too but that is not nearly a sensible reason as to why there
should be this obscure pointer alignment.
There should be no functional changes resulting from this.
Signed-off-by: Borislav Petkov <bp@suse.de >
Link: https://lore.kernel.org/r/20220310095254.1510-4-bp@alien8.de
2022-04-11 11:43:26 +02:00
Mauro Carvalho Chehab
2426999902
EDAC: Fix some kernel-doc markups
...
Kernel-doc markup should use this format:
identifier - description
Correct that and also fix some enums' names in the kernel-doc markup.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org >
Signed-off-by: Borislav Petkov <bp@suse.de >
Link: https://lkml.kernel.org/r/1d291393ba58c7b80908a3fedf02d2f53921ffe9.1603469755.git.mchehab+huawei@kernel.org
2020-11-02 20:33:19 +01:00
Hanna Hawa
9816b4af43
EDAC/device: Rework error logging API
...
Make the main workhorse the "count" functions which can log a @count
of errors. Have the current APIs edac_device_handle_{ce,ue}() call
the _count() variants and this way keep the exported symbols number
unchanged.
[ bp: Rewrite. ]
Signed-off-by: Hanna Hawa <hhhawa@amazon.com >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: benh@amazon.com
Cc: dwmw@amazon.co.uk
Cc: hanochu@amazon.com
Cc: James Morse <james.morse@arm.com >
Cc: jonnyc@amazon.com
Cc: linux-edac <linux-edac@vger.kernel.org >
Cc: Mauro Carvalho Chehab <mchehab@kernel.org >
Cc: ronenk@amazon.com
Cc: talel@amazon.com
Cc: Tony Luck <tony.luck@intel.com >
Link: https://lkml.kernel.org/r/20190923191741.29322-2-hhhawa@amazon.com
2019-10-09 13:01:42 +02:00
Mauro Carvalho Chehab
5336f75499
edac: move documentation from edac_device to edac_core.h
...
Several functions are documented at edac_device.c.
As we'll be including edac_core.h at drivers-api book, move those,
in order for the kernel-doc markups be part of the API
documentation book.
As several of those kernel-doc macros are not in the right format,
fix them.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com >
2016-12-15 08:54:51 -02:00
Mauro Carvalho Chehab
6d8ef24724
edac: move EDAC device definitions to drivers/edac/edac_device.h
...
The edac_core.h header contain data structures and function
definitions for both EDAC MC and EDAC device.
Let's move the devices ones to a separate header file, as part
of a header reorganization.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com >
2016-12-15 08:54:51 -02:00