[PATCH v5 1/4] EDAC/loongson: Rename driver-local symbols

From: Qunqin Zhao

Date: Mon Oct 26 2026 - 05:14:35 EST


From: Qunqin Zhao <zhaoqunqin@xxxxxxxxxxx>

Remove the "edac_" prefix from driver-local definitions to keep the
edac_ namespace reserved for EDAC core functions.

Rename edac_check(), edac_probe() and edac_remove() to check(), probe()
and remove(), respectively, and rename struct loongson_edac_pvt,
loongson_edac_driver and loongson_edac_acpi_match to loongson_pvt,
loongson_driver and loongson_acpi_match, respectively. The shorter
names are unambiguous since they are all file-local.

Signed-off-by: Qunqin Zhao <zhaoqunqin@xxxxxxxxxxx>
---
drivers/edac/loongson_edac.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/edac/loongson_edac.c b/drivers/edac/loongson_edac.c
index 3ed4d34a336..d9bc33dda7e 100644
--- a/drivers/edac/loongson_edac.c
+++ b/drivers/edac/loongson_edac.c
@@ -13,7 +13,7 @@

#define ECC_CS_COUNT_REG 0x18

-struct loongson_edac_pvt {
+struct loongson_pvt {
void __iomem *ecc_base;

/*
@@ -27,7 +27,7 @@ struct loongson_edac_pvt {

static int read_ecc(struct mem_ctl_info *mci)
{
- struct loongson_edac_pvt *pvt = mci->pvt_info;
+ struct loongson_pvt *pvt = mci->pvt_info;
u64 ecc;
int cs;

@@ -41,9 +41,9 @@ static int read_ecc(struct mem_ctl_info *mci)
return cs;
}

-static void edac_check(struct mem_ctl_info *mci)
+static void check(struct mem_ctl_info *mci)
{
- struct loongson_edac_pvt *pvt = mci->pvt_info;
+ struct loongson_pvt *pvt = mci->pvt_info;
int new, add;

new = read_ecc(mci);
@@ -74,13 +74,13 @@ static void dimm_config_init(struct mem_ctl_info *mci)

static void pvt_init(struct mem_ctl_info *mci, void __iomem *vbase)
{
- struct loongson_edac_pvt *pvt = mci->pvt_info;
+ struct loongson_pvt *pvt = mci->pvt_info;

pvt->ecc_base = vbase;
pvt->last_ce_count = read_ecc(mci);
}

-static int edac_probe(struct platform_device *pdev)
+static int probe(struct platform_device *pdev)
{
struct edac_mc_layer layers[2];
struct mem_ctl_info *mci;
@@ -98,7 +98,7 @@ static int edac_probe(struct platform_device *pdev)
layers[1].size = 1;
layers[1].is_virt_csrow = true;
mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers,
- sizeof(struct loongson_edac_pvt));
+ sizeof(struct loongson_pvt));
if (mci == NULL)
return -ENOMEM;

@@ -112,7 +112,7 @@ static int edac_probe(struct platform_device *pdev)
mci->ctl_page_to_phys = NULL;
mci->pdev = &pdev->dev;
mci->error_desc.grain = 8;
- mci->edac_check = edac_check;
+ mci->edac_check = check;

pvt_init(mci, vbase);
dimm_config_init(mci);
@@ -128,7 +128,7 @@ static int edac_probe(struct platform_device *pdev)
return 0;
}

-static void edac_remove(struct platform_device *pdev)
+static void remove(struct platform_device *pdev)
{
struct mem_ctl_info *mci = edac_mc_del_mc(&pdev->dev);

@@ -136,21 +136,21 @@ static void edac_remove(struct platform_device *pdev)
edac_mc_free(mci);
}

-static const struct acpi_device_id loongson_edac_acpi_match[] = {
+static const struct acpi_device_id loongson_acpi_match[] = {
{ .id = "LOON0010" },
{ }
};
-MODULE_DEVICE_TABLE(acpi, loongson_edac_acpi_match);
+MODULE_DEVICE_TABLE(acpi, loongson_acpi_match);

-static struct platform_driver loongson_edac_driver = {
- .probe = edac_probe,
- .remove = edac_remove,
+static struct platform_driver loongson_driver = {
+ .probe = probe,
+ .remove = remove,
.driver = {
.name = "loongson-mc-edac",
- .acpi_match_table = loongson_edac_acpi_match,
+ .acpi_match_table = loongson_acpi_match,
},
};
-module_platform_driver(loongson_edac_driver);
+module_platform_driver(loongson_driver);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Zhao Qunqin <zhaoqunqin@xxxxxxxxxxx>");
--
2.47.2