From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C99FC433E0 for ; Tue, 2 Feb 2021 22:28:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A615764F9E for ; Tue, 2 Feb 2021 22:28:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A615764F9E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=emHxVfzthMYztsBYnRehwUGBRIQBqUnep4R4MJEwZbY=; b=azrSd/EHCUnilpqX1eqTJls1HW LlPCRvKgX+4m66v1fzdee/C+2iIhH5d/KG8LKOnvfbNQcNADL2bEvej/nuCxKo8tE3qxsa7Hrlcks wm0aeUlYtGwZ3GlCDk0Uzw3419JyKHeXy3ut4hY/Mx5TABXYfzR8mgbKuHOiKr91PT8728khf0Gz/ vfgrsw+trjZIiM938JlGQ+verPcDBfmxXbQaG+tKreZJHHoOLnJpGyUyVfY+6qzcv7n2HsNztqpnB E+nh+10Mw4Xoe/7uTJNwEB7hGJUw7hWjsJjAaJgo9TDGoTqx1OiSZY1CsalXnD8i+AR4oI0Owaw5P 8S3NFndg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l748H-0004Q1-9c; Tue, 02 Feb 2021 22:26:49 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l73zZ-00081J-CQ for linux-arm-kernel@lists.infradead.org; Tue, 02 Feb 2021 22:17:50 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B90261650; Tue, 2 Feb 2021 14:17:48 -0800 (PST) Received: from e120937-lin.home (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9BE0B3F694; Tue, 2 Feb 2021 14:17:46 -0800 (PST) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v6 33/37] firmware: arm_scmi: cleanup unused core xfer wrappers Date: Tue, 2 Feb 2021 22:15:51 +0000 Message-Id: <20210202221555.41167-34-cristian.marussi@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210202221555.41167-1-cristian.marussi@arm.com> References: <20210202221555.41167-1-cristian.marussi@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210202_171749_650581_519B9C3B X-CRM114-Status: GOOD ( 11.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: f.fainelli@gmail.com, vincent.guittot@linaro.org, sudeep.holla@arm.com, thara.gopinath@linaro.org, cristian.marussi@arm.com, james.quinlan@broadcom.com, Jonathan.Cameron@Huawei.com, souvik.chakravarty@arm.com, etienne.carriere@linaro.org, lukasz.luba@arm.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Remove unused core scmi_xfer wrappers now that we have migrated all protocols to the new interface based on protocol handles. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/common.h | 15 ----- drivers/firmware/arm_scmi/driver.c | 91 ------------------------------ 2 files changed, 106 deletions(-) diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h index 86f4fb707145..65db0aefc489 100644 --- a/drivers/firmware/arm_scmi/common.h +++ b/drivers/firmware/arm_scmi/common.h @@ -143,15 +143,6 @@ struct scmi_xfer { struct completion *async_done; }; -void scmi_xfer_put(const struct scmi_handle *h, struct scmi_xfer *xfer); -int scmi_do_xfer(const struct scmi_handle *h, struct scmi_xfer *xfer); -int scmi_do_xfer_with_response(const struct scmi_handle *h, - struct scmi_xfer *xfer); -int scmi_xfer_get_init(const struct scmi_handle *h, u8 msg_id, u8 prot_id, - size_t tx_size, size_t rx_size, struct scmi_xfer **p); -void scmi_reset_rx_to_maxsz(const struct scmi_handle *handle, - struct scmi_xfer *xfer); - struct scmi_xfer_ops; /** @@ -181,11 +172,6 @@ struct scmi_protocol_handle { void *(*get_priv)(const struct scmi_protocol_handle *ph); }; -const struct scmi_protocol_handle * -scmi_map_protocol_handle(const struct scmi_handle *handle, u8 prot_id); - -struct scmi_handle *scmi_map_scmi_handle(const struct scmi_protocol_handle *ph); - /** * struct scmi_xfer_ops - References to the core SCMI xfer operations. * @version_get: Get this version protocol. @@ -220,7 +206,6 @@ scmi_get_revision_area(const struct scmi_protocol_handle *ph); int scmi_handle_put(const struct scmi_handle *handle); struct scmi_handle *scmi_handle_get(struct device *dev); void scmi_set_handle(struct scmi_device *scmi_dev); -int scmi_version_get(const struct scmi_handle *h, u8 protocol, u32 *version); void scmi_setup_protocol_implemented(const struct scmi_protocol_handle *ph, u8 *prot_imp); diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index 2c2bcd64e3b3..0a544463d0a2 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c @@ -349,28 +349,6 @@ void scmi_rx_callback(struct scmi_chan_info *cinfo, u32 msg_hdr) } } -/* Transient code wrapper to ease API migration */ -const struct scmi_protocol_handle * -scmi_map_protocol_handle(const struct scmi_handle *handle, u8 prot_id) -{ - struct scmi_info *info = handle_to_scmi_info(handle); - const struct scmi_protocol_instance *pi; - - mutex_lock(&info->protocols_mtx); - pi = idr_find(&info->protocols, prot_id); - mutex_unlock(&info->protocols_mtx); - - return pi ? &pi->ph : NULL; -} - -/* Transient code wrapper to ease API migration */ -struct scmi_handle *scmi_map_scmi_handle(const struct scmi_protocol_handle *ph) -{ - const struct scmi_protocol_instance *pi = ph_to_pi(ph); - - return (struct scmi_handle *)pi->handle; -} - /** * xfer_put() - Release a transmit message * @@ -386,17 +364,6 @@ static void xfer_put(const struct scmi_protocol_handle *ph, __scmi_xfer_put(&info->tx_minfo, xfer); } -void scmi_xfer_put(const struct scmi_handle *h, struct scmi_xfer *xfer) -{ - const struct scmi_protocol_handle *ph; - - ph = scmi_map_protocol_handle(h, xfer->hdr.protocol_id); - if (!ph) - return; - - return xfer_put(ph, xfer); -} - #define SCMI_MAX_POLL_TO_NS (100 * NSEC_PER_USEC) static bool scmi_xfer_done_no_timeout(struct scmi_chan_info *cinfo, @@ -480,17 +447,6 @@ static int do_xfer(const struct scmi_protocol_handle *ph, return ret; } -int scmi_do_xfer(const struct scmi_handle *h, struct scmi_xfer *xfer) -{ - const struct scmi_protocol_handle *ph; - - ph = scmi_map_protocol_handle(h, xfer->hdr.protocol_id); - if (!ph) - return -EINVAL; - - return do_xfer(ph, xfer); -} - static void reset_rx_to_maxsz(const struct scmi_protocol_handle *ph, struct scmi_xfer *xfer) { @@ -500,18 +456,6 @@ static void reset_rx_to_maxsz(const struct scmi_protocol_handle *ph, xfer->rx.len = info->desc->max_msg_size; } -void scmi_reset_rx_to_maxsz(const struct scmi_handle *handle, - struct scmi_xfer *xfer) -{ - const struct scmi_protocol_handle *ph; - - ph = scmi_map_protocol_handle(handle, xfer->hdr.protocol_id); - if (!ph) - return; - - return reset_rx_to_maxsz(ph, xfer); -} - #define SCMI_MAX_RESPONSE_TIMEOUT (2 * MSEC_PER_SEC) /** @@ -543,18 +487,6 @@ static int do_xfer_with_response(const struct scmi_protocol_handle *ph, return ret; } -int scmi_do_xfer_with_response(const struct scmi_handle *h, - struct scmi_xfer *xfer) -{ - const struct scmi_protocol_handle *ph; - - ph = scmi_map_protocol_handle(h, xfer->hdr.protocol_id); - if (!ph) - return -EINVAL; - - return do_xfer_with_response(ph, xfer); -} - /** * xfer_get_init() - Allocate and initialise one message for transmit * @@ -604,18 +536,6 @@ static int xfer_get_init(const struct scmi_protocol_handle *ph, return 0; } -int scmi_xfer_get_init(const struct scmi_handle *h, u8 msg_id, u8 prot_id, - size_t tx_size, size_t rx_size, struct scmi_xfer **p) -{ - const struct scmi_protocol_handle *ph; - - ph = scmi_map_protocol_handle(h, prot_id); - if (!ph) - return -EINVAL; - - return xfer_get_init(ph, msg_id, tx_size, rx_size, p); -} - /** * version_get() - command to get the revision of the SCMI entity * @@ -646,17 +566,6 @@ static int version_get(const struct scmi_protocol_handle *ph, u32 *version) return ret; } -int scmi_version_get(const struct scmi_handle *h, u8 protocol, u32 *version) -{ - const struct scmi_protocol_handle *ph; - - ph = scmi_map_protocol_handle(h, protocol); - if (!ph) - return -EINVAL; - - return version_get(ph, version); -} - /** * scmi_set_protocol_priv - Set protocol specific data at init time * -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel