Patch 1 is a bugfix. All other patches are small cleanups.
Hint about another nvmem bugfix at [0].
[0] https://lore.kernel.org/lkml/20240619-nvmem-cell-sysfs-perm-v1-1-e5b7882fdfa...
Signed-off-by: Thomas Weißschuh linux@weissschuh.net --- Thomas Weißschuh (5): nvmem: core: only change name to fram for current attribute nvmem: core: mark bin_attr_nvmem_eeprom_compat as const nvmem: core: add single sysfs group nvmem: core: remove global nvmem_cells_group nvmem: core: drop unnecessary range checks in sysfs callbacks
drivers/nvmem/core.c | 52 +++++++++++++--------------------------------------- 1 file changed, 13 insertions(+), 39 deletions(-) --- base-commit: e5b3efbe1ab1793bb49ae07d56d0973267e65112 change-id: 20240620-nvmem-compat-name-79474e8a0569
Best regards,
bin_attr_nvmem_eeprom_compat is the template from which all future compat attributes are created. Changing it means to change all subsquent compat attributes, too.
Instead only use the "fram" name for the currently registered attribute.
Fixes: fd307a4ad332 ("nvmem: prepare basics for FRAM support") Cc: stable@vger.kernel.org Signed-off-by: Thomas Weißschuh linux@weissschuh.net --- drivers/nvmem/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index e1ec3b7200d7..1285300ed239 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -396,10 +396,9 @@ static int nvmem_sysfs_setup_compat(struct nvmem_device *nvmem, if (!config->base_dev) return -EINVAL;
- if (config->type == NVMEM_TYPE_FRAM) - bin_attr_nvmem_eeprom_compat.attr.name = "fram"; - nvmem->eeprom = bin_attr_nvmem_eeprom_compat; + if (config->type == NVMEM_TYPE_FRAM) + nvmem->eeprom.attr.name = "fram"; nvmem->eeprom.attr.mode = nvmem_bin_attr_get_umode(nvmem); nvmem->eeprom.size = nvmem->size; #ifdef CONFIG_DEBUG_LOCK_ALLOC
On Thu, 20 Jun 2024 18:00:32 +0200, Thomas Weißschuh wrote:
Patch 1 is a bugfix. All other patches are small cleanups.
Hint about another nvmem bugfix at [0].
[0] https://lore.kernel.org/lkml/20240619-nvmem-cell-sysfs-perm-v1-1-e5b7882fdfa...
[...]
Applied, thanks!
[1/5] nvmem: core: only change name to fram for current attribute commit: 92e57866c8eeefd00ee0c05232b5134e11a66298
Best regards,
On Thu, 20 Jun 2024 18:00:32 +0200, Thomas Weißschuh wrote:
Patch 1 is a bugfix. All other patches are small cleanups.
Hint about another nvmem bugfix at [0].
[0] https://lore.kernel.org/lkml/20240619-nvmem-cell-sysfs-perm-v1-1-e5b7882fdfa...
[...]
Applied, thanks!
[2/5] nvmem: core: mark bin_attr_nvmem_eeprom_compat as const commit: 178a9aea2c5db8328757fdea66922bda0236e95c [3/5] nvmem: core: add single sysfs group commit: 80026ea9fdc22bbc8bfa9b41f54baba314bacc55 [4/5] nvmem: core: remove global nvmem_cells_group commit: e76590d9faf8c058df9faf0b6513f055beb84b57 [5/5] nvmem: core: drop unnecessary range checks in sysfs callbacks commit: 050e51c214c5bbe5ffd9e7f5927ccdcd2da18fe3
Best regards,
On 2024-06-22 11:49:25+0000, Srinivas Kandagatla wrote:
On Thu, 20 Jun 2024 18:00:32 +0200, Thomas Weißschuh wrote:
Patch 1 is a bugfix. All other patches are small cleanups.
Hint about another nvmem bugfix at [0].
[0] https://lore.kernel.org/lkml/20240619-nvmem-cell-sysfs-perm-v1-1-e5b7882fdfa...
[...]
Applied, thanks!
Thanks!
[2/5] nvmem: core: mark bin_attr_nvmem_eeprom_compat as const commit: 178a9aea2c5db8328757fdea66922bda0236e95c
Please note that patch 2 has a dependency on patch 1. In the current state this will probably lead to build errors in linux-next, as nvmem-fixes is not part of linux-next.
I should have mentioned that.
In theory patch 2 could even be squashed into patch 1, as it really is mostly an extension of it.
[3/5] nvmem: core: add single sysfs group commit: 80026ea9fdc22bbc8bfa9b41f54baba314bacc55 [4/5] nvmem: core: remove global nvmem_cells_group commit: e76590d9faf8c058df9faf0b6513f055beb84b57 [5/5] nvmem: core: drop unnecessary range checks in sysfs callbacks commit: 050e51c214c5bbe5ffd9e7f5927ccdcd2da18fe3
linux-stable-mirror@lists.linaro.org