All of lore.kernel.org
 help / color / mirror / Atom feed
From: linux@treblig.org
To: srinivas.kandagatla@linaro.org
Cc: corbet@lwn.net, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Dr. David Alan Gilbert" <linux@treblig.org>
Subject: [PATCH 2/3] nvmem: core: Remove nvmem_(add|del)_cell_table
Date: Fri, 21 Feb 2025 01:58:40 +0000	[thread overview]
Message-ID: <20250221015841.209458-3-linux@treblig.org> (raw)
In-Reply-To: <20250221015841.209458-1-linux@treblig.org>

From: "Dr. David Alan Gilbert" <linux@treblig.org>

nvmem_del_cell_table() was added in 2018's
commit b985f4cba6db ("nvmem: add support for cell info")
but remained unused.

nvmem_add_cell_table() was also added in that commit, however
it's last use was removed in 2022 by
commit 2af4fcc0d357 ("ARM: davinci: remove unused board support")

Remove them.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
 Documentation/driver-api/nvmem.rst |  2 --
 drivers/nvmem/core.c               | 26 --------------------------
 include/linux/nvmem-provider.h     |  5 -----
 3 files changed, 33 deletions(-)

diff --git a/Documentation/driver-api/nvmem.rst b/Documentation/driver-api/nvmem.rst
index 595ee207d199..27534d5e8fba 100644
--- a/Documentation/driver-api/nvmem.rst
+++ b/Documentation/driver-api/nvmem.rst
@@ -76,8 +76,6 @@ nvmem_cell_table struct::
 	.ncells			= ARRAY_SIZE(foo_nvmem_cells),
   };
 
-  nvmem_add_cell_table(&foo_nvmem_cell_table);
-
 Additionally it is possible to create nvmem cell lookup entries and register
 them with the nvmem framework from machine code as shown in the example below::
 
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index fd8f148b8aad..90fbfc00950e 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -2069,32 +2069,6 @@ int nvmem_device_write(struct nvmem_device *nvmem,
 }
 EXPORT_SYMBOL_GPL(nvmem_device_write);
 
-/**
- * nvmem_add_cell_table() - register a table of cell info entries
- *
- * @table: table of cell info entries
- */
-void nvmem_add_cell_table(struct nvmem_cell_table *table)
-{
-	mutex_lock(&nvmem_cell_mutex);
-	list_add_tail(&table->node, &nvmem_cell_tables);
-	mutex_unlock(&nvmem_cell_mutex);
-}
-EXPORT_SYMBOL_GPL(nvmem_add_cell_table);
-
-/**
- * nvmem_del_cell_table() - remove a previously registered cell info table
- *
- * @table: table of cell info entries
- */
-void nvmem_del_cell_table(struct nvmem_cell_table *table)
-{
-	mutex_lock(&nvmem_cell_mutex);
-	list_del(&table->node);
-	mutex_unlock(&nvmem_cell_mutex);
-}
-EXPORT_SYMBOL_GPL(nvmem_del_cell_table);
-
 /**
  * nvmem_add_cell_lookups() - register a list of cell lookup entries
  *
diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h
index 515676ebe598..20c9fbd45b24 100644
--- a/include/linux/nvmem-provider.h
+++ b/include/linux/nvmem-provider.h
@@ -190,9 +190,6 @@ void nvmem_unregister(struct nvmem_device *nvmem);
 struct nvmem_device *devm_nvmem_register(struct device *dev,
 					 const struct nvmem_config *cfg);
 
-void nvmem_add_cell_table(struct nvmem_cell_table *table);
-void nvmem_del_cell_table(struct nvmem_cell_table *table);
-
 int nvmem_add_one_cell(struct nvmem_device *nvmem,
 		       const struct nvmem_cell_info *info);
 
@@ -223,8 +220,6 @@ devm_nvmem_register(struct device *dev, const struct nvmem_config *c)
 	return nvmem_register(c);
 }
 
-static inline void nvmem_add_cell_table(struct nvmem_cell_table *table) {}
-static inline void nvmem_del_cell_table(struct nvmem_cell_table *table) {}
 static inline int nvmem_add_one_cell(struct nvmem_device *nvmem,
 				     const struct nvmem_cell_info *info)
 {
-- 
2.48.1


  parent reply	other threads:[~2025-02-21  1:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-21  1:58 [PATCH 0/3] Remove nvmem deadcode linux
2025-02-21  1:58 ` [PATCH 1/3] nvmem: core: Remove unused nvmem_device_cell_(read|write) linux
2025-02-21  1:58 ` linux [this message]
2025-02-21  1:58 ` [PATCH 3/3] nvmem: core: Remove remains of nvmem_cell_table linux
2025-04-02 17:44 ` [PATCH 0/3] Remove nvmem deadcode Dr. David Alan Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250221015841.209458-3-linux@treblig.org \
    --to=linux@treblig.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.