Received: by 10.223.176.46 with SMTP id f43csp1472018wra; Wed, 24 Jan 2018 17:43:57 -0800 (PST) X-Google-Smtp-Source: AH8x226Ocpyu2RkxougicR9MtKehJ+9bgCyexUrA04xD2jcVfH6QnbTcjchNz+vMTtCFYr6I311c X-Received: by 10.99.152.84 with SMTP id l20mr12060461pgo.382.1516844637185; Wed, 24 Jan 2018 17:43:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516844637; cv=none; d=google.com; s=arc-20160816; b=zwq6H1vKpPWwaJWcCNtqLvp4ehZ8rj6ElR/tyxNfl9LT8CE6KtcRsUPRO8VGgIe1QQ WbqCYwXCHf/Spq2utzjs0hzoPYv5mWw4IMQNj8AE8zidjMf8wRvPlfDkpgoJQ0TOU3SE B8KlGb+GYS5IveKFLp69wLQhLNKahqFwenrIJ2xzWQVdb5TYeAynKiWwGB1SQ62IuhXg GLGhH48gvWYxeh32vO8ktN3MR4wv/ImefhE3++BaEBDylXY29G9lbe7YDa8b7T57fOxs WqAXc4Wm9SDAHw1VVGmPbxr/KiNM5dpeSMRfj/PXrYW0WeJpUqqoRCZvjhwBc5pj8U0a M1HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-signature :arc-authentication-results; bh=JuyW/8ptAjSDiFVSJHXcNuvDSEh2ALVT9pP1s6qaiJw=; b=wgznDhjE/BO9fQJGOg/LsoJx2O6/c9sQuH/Q4XHaYAiuD1dJYyMM1Z/5bw7u1N0quS NmtnVFckIQZga5RoXhRzqRkVFsNHggs2VWKBQ2UDaivbVTXSiFmtsK220U2MUa6as7WN PnoAPWxJfHSJhupceuZg89kVHv+XqXh8wbrBOSS2U7jDms1QwTszGGQfPa76q4C8v81K tgGy5d0Qo2TdM9YizVkWOs5aRz5tzM6uYBV8AcGT35EOOn505ztODrQdtsdyGlcToqA4 eOoYllXstJ1zSfEgscUBJIbam9zTCsbeJ5A/cIhOM/8VCuae8GvvNWw9coC4p7Bi0wPR WPLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b=Z5/SWPc/; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Zk3zKuLS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n3si854235pgu.208.2018.01.24.17.43.42; Wed, 24 Jan 2018 17:43:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b=Z5/SWPc/; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Zk3zKuLS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752736AbeAYBmK (ORCPT + 99 others); Wed, 24 Jan 2018 20:42:10 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:34663 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752226AbeAYBl2 (ORCPT ); Wed, 24 Jan 2018 20:41:28 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 1B330226E6; Wed, 24 Jan 2018 20:41:28 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Wed, 24 Jan 2018 20:41:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=JuyW/8ptAjSDiFVSJ HXcNuvDSEh2ALVT9pP1s6qaiJw=; b=Z5/SWPc/dIcwSj33cxuXctXaaOo9zAN+7 WCqt7Rk4V6ECFQ7ILNnP7T8aYCggnwsvPzd1wUWib2MiUPMEiTe9rAJYp9wkRJrC 4fkmI1Qfw9sz48rB+TPL0fSrnigop7JhZ2HIYyYcz6opVb7ZxwsQoz+XKDYONody w3IcnprgwC2EzJ6O6MJ0EbEBNapfcGhpUZ4SVsVxO+fM4Jb4kzEaFEDmTOn2rt8J /lpapVVrzUstFaMnunmRqh64+BELadTJYt4umIyLJCMaeu9RQxAJh709NeLOlGIb jY1xjGwu/mt9tg683EKtsVUvDH9/MUWg6uXCJe7X8x0PJW6k/J+Lw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=JuyW/8ptAjSDiFVSJHXcNuvDSEh2ALVT9pP1s6qaiJw=; b=Zk3zKuLS ZOqCXEJjOdafpoLk9XD7Q7xpOhaiqxd3wfm2myuSI2Q7FOz/DUL5LbR9pijOc6H3 DP4XFns7b2RWY01TFH2WwNJpoBDHb0C7g0R2RkwV8ZxK40gsjNXxoGPOt7YmMapa I3eF9fDP3nkRg739i4feCTcPyQvwO7EEdb3gx7lZ5yEFzwNydUQ1srda6Ji2pjp7 zKFWWYWwnMMJGJUtExGnm/5yKHR0OsS0mWlX7eZPQBp/EReP203mO1RLWDY6m7oj XZ+8WZBjwQx9uCMHc6YeKf9PFVePWUAWZJuT1ZKbNvnLl6Lzn1bRBPXplYR2SfGq fAtPsdIHrXQa2g== X-ME-Sender: Received: from indium.zzz.sholland.net (unknown [99.198.199.144]) by mail.messagingengine.com (Postfix) with ESMTPA id EA2097E12E; Wed, 24 Jan 2018 20:41:26 -0500 (EST) From: Samuel Holland To: linux-kernel@vger.kernel.org, Greg Kroah-Hartman Cc: coreboot@coreboot.org, Thierry Escande , Wei-Ning Huang , Julius Werner , Dmitry Torokhov , Guenter Roeck , Samuel Holland Subject: [PATCH 4/5] firmware: coreboot: Remove unused coreboot_table_find Date: Wed, 24 Jan 2018 19:41:19 -0600 Message-Id: <20180125014120.20851-5-samuel@sholland.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180125014120.20851-1-samuel@sholland.org> References: <20180125014120.20851-1-samuel@sholland.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 --- 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