Skip to content

EDAC: Remove edac_align_ptr()

Borislav Petkov linux-edac lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5EDAC/mc: Get rid of silly one-shot struct allocation in edac_mc_alloc()drivers/edac/edac_mc.c+13 -280 replies
2/5EDAC/pci: Get rid of the silly one-shot memory allocation in edac_pci_alloc_ctl_info()drivers/edac/edac_pci.c+12 -130 replies
3/5EDAC/device: Get rid of the silly one-shot memory allocation in edac_device_alloc_ctl_info()drivers/edac/edac_device.c drivers/edac/edac_device.h drivers/edac/edac_device_sysfs.c+57 -710 replies
4/5EDAC/device: Sanitize edac_device_alloc_ctl_info() definitiondrivers/edac/edac_device.c+16 -160 replies
5/5EDAC/mc: Get rid of edac_align_ptr()drivers/edac/edac_mc.c drivers/edac/edac_module.h+0 -570 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] EDAC: Remove edac_align_ptr()

From: Borislav Petkov <[email protected]>

Hi,

this edac_align_ptr() thing was part of the original EDAC upstreaming effort in 2006:

da9bb1d27b21 ("[PATCH] EDAC: core EDAC support code")

Comment above the usage says:

"Everything is kmalloc'ed as one big chunk - more efficient."

but I don't think that "efficiency" is measurable anymore. Then, 15+ years ago probably.

So get rid of it in favor of simple kzalloc() allocations for the couple of structures needed at each call site.

It boots fine here with amd64_edac but I'd greatly appreciate testing with other EDAC drivers.

Thx!

Borislav Petkov (5):
EDAC/mc: Get rid of silly one-shot struct allocation in

    edac_mc_alloc()

EDAC/pci: Get rid of the silly one-shot memory allocation in
edac_pci_alloc_ctl_info()
EDAC/device: Get rid of the silly one-shot memory allocation in
edac_device_alloc_ctl_info()
EDAC/device: Sanitize edac_device_alloc_ctl_info() definition EDAC/mc: Get rid of edac_align_ptr()

 drivers/edac/edac_device.c       | 135 +++++++++++++------------------
 drivers/edac/edac_device.h       |  14 ++++
 drivers/edac/edac_device_sysfs.c |   5 +-
 drivers/edac/edac_mc.c           |  96 +++-------------------
 drivers/edac/edac_module.h       |   2 -
 drivers/edac/edac_pci.c          |  25 +++---
 6 files changed, 95 insertions(+), 182 deletions(-)
Signature · 1 line
2.29.2