[PATCH 03/44] lib: param: rename dev_remove_param to param_remove
Ahmad Fatoum
a.fatoum at barebox.org
Mon Aug 11 05:27:43 PDT 2025
The function doesn't take a device argument, so rename it to reflect
that.
Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
common/globalvar.c | 6 +++---
common/partitions/dos.c | 2 +-
common/partitions/efi.c | 2 +-
include/param.h | 4 ++--
lib/parameter.c | 5 ++---
5 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/common/globalvar.c b/common/globalvar.c
index 31b24d594c6d..1ef98f44bc67 100644
--- a/common/globalvar.c
+++ b/common/globalvar.c
@@ -39,7 +39,7 @@ void globalvar_remove(const char *name)
if (fnmatch(name, p->name, 0))
continue;
- dev_remove_param(p);
+ param_remove(p);
}
}
@@ -282,7 +282,7 @@ int nvvar_remove(const char *name)
fname = basprintf("/env/nv/%s", p->name);
- dev_remove_param(p);
+ param_remove(p);
unlink(fname);
free(fname);
@@ -510,7 +510,7 @@ static int globalvar_remove_unqualified(const char *name)
if (!(p->flags & PARAM_GLOBALVAR_UNQUALIFIED))
return -EEXIST;
- dev_remove_param(p);
+ param_remove(p);
return 0;
}
diff --git a/common/partitions/dos.c b/common/partitions/dos.c
index 6204fdabc81f..ce2e21357d52 100644
--- a/common/partitions/dos.c
+++ b/common/partitions/dos.c
@@ -311,7 +311,7 @@ static void dos_partition_free(struct partition_desc *pd)
free(dpart);
}
- dev_remove_param(dpd->disksig.param);
+ param_remove(dpd->disksig.param);
free(pd);
}
diff --git a/common/partitions/efi.c b/common/partitions/efi.c
index d237f734df50..88d8a2d739c4 100644
--- a/common/partitions/efi.c
+++ b/common/partitions/efi.c
@@ -573,7 +573,7 @@ static void efi_partition_free(struct partition_desc *pd)
free(epart);
}
- dev_remove_param(epd->param_guid);
+ param_remove(epd->param_guid);
free(epd->ptes);
free(epd->gpt);
free(epd);
diff --git a/include/param.h b/include/param.h
index 1b0315999e39..856f7a52e1b8 100644
--- a/include/param.h
+++ b/include/param.h
@@ -105,7 +105,7 @@ struct param_d *dev_add_param_file_list(struct device *dev, const char *name,
struct param_d *dev_add_param_fixed(struct device *dev, const char *name,
const char *value);
-void dev_remove_param(struct param_d *p);
+void param_remove(struct param_d *p);
void dev_remove_parameters(struct device *dev);
@@ -232,7 +232,7 @@ static inline struct param_d *dev_add_param_fixed(struct device *dev,
return NULL;
}
-static inline void dev_remove_param(struct param_d *p) {}
+static inline void param_remove(struct param_d *p) {}
static inline void dev_remove_parameters(struct device *dev) {}
diff --git a/lib/parameter.c b/lib/parameter.c
index 39a245242337..b51cee3d0e08 100644
--- a/lib/parameter.c
+++ b/lib/parameter.c
@@ -1006,11 +1006,10 @@ struct param_d *dev_add_param_file_list(struct device *dev, const char *name,
/**
- * dev_remove_param - remove a parameter from a device and free its
- * memory
+ * param_remove - remove a parameter and free its memory
* @param p The parameter
*/
-void dev_remove_param(struct param_d *p)
+void param_remove(struct param_d *p)
{
p->set(p->dev, p, NULL);
list_del(&p->list);
--
2.39.5
More information about the barebox
mailing list