From patchwork Tue Dec 12 14:53:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 121543 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4225208qgn; Tue, 12 Dec 2017 06:56:52 -0800 (PST) X-Google-Smtp-Source: ACJfBos1A2AJ5hlcf+jMExY+kJY9H8L/x/zsgegB7X196udQpucJqqKNZXfkOSfqNOJyTw8VqiiJ X-Received: by 10.84.241.15 with SMTP id a15mr2589255pll.103.1513090612462; Tue, 12 Dec 2017 06:56:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513090612; cv=none; d=google.com; s=arc-20160816; b=o6Hm7rMfFhlCpuw/FD/D24IvcP8P1ZyZiJSg7nmPNwkqSpfKdgI35msYh+nS89baWA KB/OIIrU+6yZA9n9ox/COb2P+0hJuh2eMeq3XAhatzanYoKv+goari42/TAMO8AEyJky qnpGVzPWhKUXFbYrtKYfr6jdD6ZzNCWEgrzhxKeCSGopdUhb0Dsu0aDQl6qtHYflKxy5 zcpdVJP+ichp9LCW+E3SDM/JqUoQN+YWW4YNVA1zsq+liGU/lp/iVu/kfFPuF+sOgMrO 0rr72RgoNWep8P8FKajkusjO4MSvweNx8ShGECtZPw3Tt89QqHryXUoj7ZWTL98D05pC HL7w== 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:arc-authentication-results; bh=NFhnh2E1A/dZu3Yx7neVzozuk1cRQxcmsmk2CF+YJ4k=; b=qqQIN9hekTNu9mXUHoFiawvLkdUjDts+K9zZBjIfGjT4NxTppQWeCdFN8iiO809Iwa 8anOHI36fnlfj+bklRYGtXwjNlcCPt/T55wskuHMCq0Zt1EZB9LhG6Hfi6Ju8gGSjBPF m5C5WTDquD0lkgXbz9tnIgwAF9OOm/LfMY26vTWjYDkGGHCS1gf4E2T8CpgcuddarCAi 7wlSMaS2eblNyJ3b/sIfxig4dq9gEmXZgWCvrY/TqfIYvFUCTESPE+MMzkQdrtWJENtX iB2NcaGYU92IG2lqcwfYA0N8HjDrH8fsxE4DDBPFZ9uBMtVArVuL5AIQ+BdEcnrND1Wp tRgA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 d3si11534267pgq.709.2017.12.12.06.56.52; Tue, 12 Dec 2017 06:56:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752711AbdLLO4u (ORCPT + 1 other); Tue, 12 Dec 2017 09:56:50 -0500 Received: from foss.arm.com ([217.140.101.70]:45266 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752306AbdLLO4s (ORCPT ); Tue, 12 Dec 2017 09:56:48 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 93DA51529; Tue, 12 Dec 2017 06:56:48 -0800 (PST) Received: from sugar.kfn.arm.com (unknown [10.45.48.196]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E04043F318; Tue, 12 Dec 2017 06:56:45 -0800 (PST) From: Gilad Ben-Yossef To: Greg Kroah-Hartman Cc: Ofir Drang , linux-crypto@vger.kernel.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 24/24] staging: ccree: fix FIPS mgr naming convention Date: Tue, 12 Dec 2017 14:53:10 +0000 Message-Id: <1513090395-7938-25-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513090395-7938-1-git-send-email-gilad@benyossef.com> References: <1513090395-7938-1-git-send-email-gilad@benyossef.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org The FIPS manager files were using a naming convention which was inconsistent (ssi vs. cc) and often too long. Make the code more readable by switching to a simpler, consistent naming convention. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 6 +++--- drivers/staging/ccree/ssi_fips.c | 4 ++-- drivers/staging/ccree/ssi_fips.h | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) -- 2.7.4 diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c index 6e7a396..28cfbb4 100644 --- a/drivers/staging/ccree/ssi_driver.c +++ b/drivers/staging/ccree/ssi_driver.c @@ -307,7 +307,7 @@ static int init_cc_resources(struct platform_device *plat_dev) } #endif - rc = ssi_fips_init(new_drvdata); + rc = cc_fips_init(new_drvdata); if (rc) { dev_err(dev, "CC_FIPS_INIT failed 0x%x\n", rc); goto post_sysfs_err; @@ -393,7 +393,7 @@ static int init_cc_resources(struct platform_device *plat_dev) post_sram_mgr_err: cc_sram_mgr_fini(new_drvdata); post_fips_init_err: - ssi_fips_fini(new_drvdata); + cc_fips_fini(new_drvdata); post_sysfs_err: #ifdef ENABLE_CC_SYSFS ssi_sysfs_fini(); @@ -424,7 +424,7 @@ static void cleanup_cc_resources(struct platform_device *plat_dev) cc_buffer_mgr_fini(drvdata); cc_req_mgr_fini(drvdata); cc_sram_mgr_fini(drvdata); - ssi_fips_fini(drvdata); + cc_fips_fini(drvdata); #ifdef ENABLE_CC_SYSFS ssi_sysfs_fini(); #endif diff --git a/drivers/staging/ccree/ssi_fips.c b/drivers/staging/ccree/ssi_fips.c index 036215f..a1d7782 100644 --- a/drivers/staging/ccree/ssi_fips.c +++ b/drivers/staging/ccree/ssi_fips.c @@ -51,7 +51,7 @@ void cc_set_ree_fips_status(struct cc_drvdata *drvdata, bool status) cc_iowrite(drvdata, CC_REG(HOST_GPR0), val); } -void ssi_fips_fini(struct cc_drvdata *drvdata) +void cc_fips_fini(struct cc_drvdata *drvdata) { struct cc_fips_handle *fips_h = drvdata->fips_handle; @@ -105,7 +105,7 @@ static void fips_dsr(unsigned long devarg) } /* The function called once at driver entry point .*/ -int ssi_fips_init(struct cc_drvdata *p_drvdata) +int cc_fips_init(struct cc_drvdata *p_drvdata) { struct cc_fips_handle *fips_h; struct device *dev = drvdata_to_dev(p_drvdata); diff --git a/drivers/staging/ccree/ssi_fips.h b/drivers/staging/ccree/ssi_fips.h index 5eed9f6..8321dde 100644 --- a/drivers/staging/ccree/ssi_fips.h +++ b/drivers/staging/ccree/ssi_fips.h @@ -27,19 +27,19 @@ enum cc_fips_status { CC_FIPS_SYNC_STATUS_RESERVE32B = S32_MAX }; -int ssi_fips_init(struct cc_drvdata *p_drvdata); -void ssi_fips_fini(struct cc_drvdata *drvdata); +int cc_fips_init(struct cc_drvdata *p_drvdata); +void cc_fips_fini(struct cc_drvdata *drvdata); void fips_handler(struct cc_drvdata *drvdata); void cc_set_ree_fips_status(struct cc_drvdata *drvdata, bool ok); #else /* CONFIG_CRYPTO_FIPS */ -static inline int ssi_fips_init(struct cc_drvdata *p_drvdata) +static inline int cc_fips_init(struct cc_drvdata *p_drvdata) { return 0; } -static inline void ssi_fips_fini(struct cc_drvdata *drvdata) {} +static inline void cc_fips_fini(struct cc_drvdata *drvdata) {} static inline void cc_set_ree_fips_status(struct cc_drvdata *drvdata, bool ok) {} static inline void fips_handler(struct cc_drvdata *drvdata) {}