From: Samuel Holland <samuel@sholland.org>
To: linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: coreboot@coreboot.org,
Thierry Escande <thierry.escande@collabora.com>,
Wei-Ning Huang <wnhuang@google.com>,
Julius Werner <jwerner@chromium.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Guenter Roeck <linux@roeck-us.net>,
Samuel Holland <samuel@sholland.org>
Subject: [PATCH 4/5] firmware: coreboot: Remove unused coreboot_table_find
Date: Wed, 24 Jan 2018 19:41:19 -0600 [thread overview]
Message-ID: <20180125014120.20851-5-samuel@sholland.org> (raw)
In-Reply-To: <20180125014120.20851-1-samuel@sholland.org>
Now that all users of the coreboot_table_find function have been updated
to hang off the coreboot table bus instead, remove it.
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
drivers/firmware/google/coreboot_table.c | 43 --------------------------------
drivers/firmware/google/coreboot_table.h | 3 ---
2 files changed, 46 deletions(-)
diff --git a/drivers/firmware/google/coreboot_table.c b/drivers/firmware/google/coreboot_table.c
index 04fc08e81744..19db5709ae28 100644
--- a/drivers/firmware/google/coreboot_table.c
+++ b/drivers/firmware/google/coreboot_table.c
@@ -97,49 +97,6 @@ void coreboot_driver_unregister(struct coreboot_driver *driver)
}
EXPORT_SYMBOL(coreboot_driver_unregister);
-/*
- * This function parses the coreboot table for an entry that contains the base
- * address of the given entry tag. The coreboot table consists of a header
- * directly followed by a number of small, variable-sized entries, which each
- * contain an identifying tag and their length as the first two fields.
- */
-int coreboot_table_find(int tag, void *data, size_t data_size)
-{
- struct coreboot_table_header header;
- struct coreboot_table_entry entry;
- void *ptr_entry;
- int i;
-
- if (!ptr_header)
- return -EPROBE_DEFER;
-
- memcpy_fromio(&header, ptr_header, sizeof(header));
-
- if (strncmp(header.signature, "LBIO", sizeof(header.signature))) {
- pr_warn("coreboot_table: coreboot table missing or corrupt!\n");
- return -ENODEV;
- }
-
- ptr_entry = (void *)ptr_header + header.header_bytes;
-
- for (i = 0; i < header.table_entries; i++) {
- memcpy_fromio(&entry, ptr_entry, sizeof(entry));
- if (entry.tag == tag) {
- if (data_size < entry.size)
- return -EINVAL;
-
- memcpy_fromio(data, ptr_entry, entry.size);
-
- return 0;
- }
-
- ptr_entry += entry.size;
- }
-
- return -ENOENT;
-}
-EXPORT_SYMBOL(coreboot_table_find);
-
int coreboot_table_init(struct device *dev, void __iomem *ptr)
{
int i, ret;
diff --git a/drivers/firmware/google/coreboot_table.h b/drivers/firmware/google/coreboot_table.h
index 88e6a1c06028..26a3f3f3ac9c 100644
--- a/drivers/firmware/google/coreboot_table.h
+++ b/drivers/firmware/google/coreboot_table.h
@@ -69,9 +69,6 @@ int coreboot_driver_register(struct coreboot_driver *driver);
/* Unregister a driver that uses the data from a coreboot table. */
void coreboot_driver_unregister(struct coreboot_driver *driver);
-/* Retrieve coreboot table entry with tag *tag* and copy it to data */
-int coreboot_table_find(int tag, void *data, size_t data_size);
-
/* Initialize coreboot table module given a pointer to iomem */
int coreboot_table_init(struct device *dev, void __iomem *ptr);
--
2.13.6
next prev parent reply other threads:[~2018-01-25 1:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-25 1:41 [PATCH 0/5] coreboot table bus and framebuffer driver Samuel Holland
2018-01-25 1:41 ` [PATCH 1/5] firmware: coreboot: Expose the coreboot table as a bus Samuel Holland
2018-01-25 1:41 ` [PATCH 2/5] firmware: memconsole: Probe via coreboot bus Samuel Holland
2018-01-25 1:41 ` [PATCH 3/5] firmware: vpd: " Samuel Holland
2018-01-25 1:41 ` Samuel Holland [this message]
2018-01-25 1:41 ` [PATCH 5/5] firmware: coreboot: Add coreboot framebuffer driver Samuel Holland
2018-03-14 18:08 ` [PATCH 0/5] coreboot table bus and " Greg Kroah-Hartman
2018-03-14 21:18 ` Julius Werner
2018-03-14 21:22 ` Julius Werner
2018-04-23 11:37 ` Greg Kroah-Hartman
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=20180125014120.20851-5-samuel@sholland.org \
--to=samuel@sholland.org \
--cc=coreboot@coreboot.org \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jwerner@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=thierry.escande@collabora.com \
--cc=wnhuang@google.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®