From patchwork Thu Nov 9 09:16:18 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: 118407 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp6341441qgn; Thu, 9 Nov 2017 01:11:58 -0800 (PST) X-Google-Smtp-Source: ABhQp+Qyyn0xrK4UoiBg1KkQQ89yuDtKETINX7lWMkWmakvg+7JBoVPixKBoH0XJweVUdOipX4mO X-Received: by 10.98.200.138 with SMTP id i10mr3475405pfk.222.1510218718479; Thu, 09 Nov 2017 01:11:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510218718; cv=none; d=google.com; s=arc-20160816; b=SQbcDiEkISkKf/qR32uWJaXxbrl5dSW2/QtorFTHIYXxNE2sfUVX0WlvF1rY5x1Eew rKWHLWxoAZPe71HU+nou9vOj12pulHyN9CJJ9yPFUHfHXwK5tqX+UBjo812AJ58vm2xj lYM7EbGX4GTgjzSWPu6rI0KkHJ8NwyvEUKLy6u6A55dkw6pk1/upMkyAsNXYD9hend8b cLv8enuQeBNUGQaezBLZSdRq6DI7QrafPS9LCSoII87eLDNx9BuP+pLAFxSuFdb0dV8W 1LF+UKpDZKIo/2pIKa3BYixQ7nKpCgwkhE9EUzXHJ9mSfEpHA/GZ2t9C7/4+nL1KPFBj GcNA== 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=pIK6X86DXSiuGqJo7PtZmdycuEjEmUxn467+T6vtrfk=; b=WeH2WPpaRs/1Sze/x8Qf3Y0RGU4G/fZqXOkoFe5iu43A5BdB3TJwFjHQxKe4Qn7xiY R2WwMjmFOpCORR48fzd1OANu8+6RO9q1tLyFOwsYkKrb3k4ElYIrCBjjE/cSRz/OlWu1 9pQX6qzAeXcDHEXtCCxBBbE3Hs0D0JHqEsnu2odGU1/xOP4QTkPblwBBSe2FLq+R6klW FeosOh3akEiXEXze0ftxU1MMHNErgu2pMgI8xEjD7oz7eH5vzao0hlvEk+kr87f1dcta jBsei35NsQiJoI8ZhAivbvqS3+HycdMb9aF7f4J2YjstiCW+YxEkvknxBDUbXGFz0VYs fhbA== ARC-Authentication-Results: i=1; mx.google.com; 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 z81si6264247pfl.235.2017.11.09.01.11.58; Thu, 09 Nov 2017 01:11:58 -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; 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 S1754076AbdKIJLz (ORCPT + 25 others); Thu, 9 Nov 2017 04:11:55 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:43678 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754020AbdKIJLt (ORCPT ); Thu, 9 Nov 2017 04:11:49 -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 3B2F81435; Thu, 9 Nov 2017 01:11:49 -0800 (PST) Received: from sugar.kfn.arm.com (unknown [10.45.48.162]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 921573F246; Thu, 9 Nov 2017 01:11:46 -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 v2 10/10] staging: ccree: remove unused cc_base parameter Date: Thu, 9 Nov 2017 09:16:18 +0000 Message-Id: <1510218980-3549-11-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510218980-3549-1-git-send-email-gilad@benyossef.com> References: <1510218980-3549-1-git-send-email-gilad@benyossef.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove a common parameter named cc_base with the pointer to the mapped command registers which was used by the old register access macros that are not longer in use. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c | 2 +- drivers/staging/ccree/ssi_cipher.c | 12 +++++------- drivers/staging/ccree/ssi_driver.c | 3 --- drivers/staging/ccree/ssi_driver.h | 2 +- drivers/staging/ccree/ssi_hash.c | 6 +++--- drivers/staging/ccree/ssi_request_mgr.c | 5 ++--- 6 files changed, 12 insertions(+), 18 deletions(-) -- 2.7.4 diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging/ccree/ssi_aead.c index e036168..9e24783 100644 --- a/drivers/staging/ccree/ssi_aead.c +++ b/drivers/staging/ccree/ssi_aead.c @@ -225,7 +225,7 @@ static int ssi_aead_init(struct crypto_aead *tfm) return -ENOMEM; } -static void ssi_aead_complete(struct device *dev, void *ssi_req, void __iomem *cc_base) +static void ssi_aead_complete(struct device *dev, void *ssi_req) { struct aead_request *areq = (struct aead_request *)ssi_req; struct aead_req_ctx *areq_ctx = aead_request_ctx(areq); diff --git a/drivers/staging/ccree/ssi_cipher.c b/drivers/staging/ccree/ssi_cipher.c index 4d05b4a..b5bb97c 100644 --- a/drivers/staging/ccree/ssi_cipher.c +++ b/drivers/staging/ccree/ssi_cipher.c @@ -67,7 +67,7 @@ struct ssi_ablkcipher_ctx { struct crypto_shash *shash_tfm; }; -static void ssi_ablkcipher_complete(struct device *dev, void *ssi_req, void __iomem *cc_base); +static void ssi_ablkcipher_complete(struct device *dev, void *ssi_req); static int validate_keys_sizes(struct ssi_ablkcipher_ctx *ctx_p, u32 size) { @@ -688,8 +688,7 @@ static int ssi_blkcipher_complete(struct device *dev, struct scatterlist *dst, struct scatterlist *src, unsigned int ivsize, - void *areq, - void __iomem *cc_base) + void *areq) { int completion_error = 0; struct ablkcipher_request *req = (struct ablkcipher_request *)areq; @@ -832,8 +831,7 @@ static int ssi_blkcipher_process( dst); } else { rc = ssi_blkcipher_complete(dev, ctx_p, req_ctx, dst, - src, ivsize, NULL, - ctx_p->drvdata->cc_base); + src, ivsize, NULL); } } @@ -849,7 +847,7 @@ static int ssi_blkcipher_process( return rc; } -static void ssi_ablkcipher_complete(struct device *dev, void *ssi_req, void __iomem *cc_base) +static void ssi_ablkcipher_complete(struct device *dev, void *ssi_req) { struct ablkcipher_request *areq = (struct ablkcipher_request *)ssi_req; struct blkcipher_req_ctx *req_ctx = ablkcipher_request_ctx(areq); @@ -858,7 +856,7 @@ static void ssi_ablkcipher_complete(struct device *dev, void *ssi_req, void __io unsigned int ivsize = crypto_ablkcipher_ivsize(tfm); ssi_blkcipher_complete(dev, ctx_p, req_ctx, areq->dst, areq->src, - ivsize, areq, cc_base); + ivsize, areq); } /* Async wrap functions */ diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c index 7b77f3f..0d5c1a9 100644 --- a/drivers/staging/ccree/ssi_driver.c +++ b/drivers/staging/ccree/ssi_driver.c @@ -199,7 +199,6 @@ int init_cc_regs(struct ssi_drvdata *drvdata, bool is_probe) static int init_cc_resources(struct platform_device *plat_dev) { struct resource *req_mem_cc_regs = NULL; - void __iomem *cc_base = NULL; struct ssi_drvdata *new_drvdata; struct device *dev = &plat_dev->dev; struct device_node *np = dev->of_node; @@ -232,8 +231,6 @@ static int init_cc_resources(struct platform_device *plat_dev) dev_dbg(dev, "CC registers mapped from %pa to 0x%p\n", &req_mem_cc_regs->start, new_drvdata->cc_base); - cc_base = new_drvdata->cc_base; - /* Then IRQ */ new_drvdata->irq = platform_get_irq(plat_dev, 0); if (new_drvdata->irq < 0) { diff --git a/drivers/staging/ccree/ssi_driver.h b/drivers/staging/ccree/ssi_driver.h index 94c755c..f4967ca 100644 --- a/drivers/staging/ccree/ssi_driver.h +++ b/drivers/staging/ccree/ssi_driver.h @@ -100,7 +100,7 @@ #define SSI_MAX_IVGEN_DMA_ADDRESSES 3 struct ssi_crypto_req { - void (*user_cb)(struct device *dev, void *req, void __iomem *cc_base); + void (*user_cb)(struct device *dev, void *req); void *user_arg; dma_addr_t ivgen_dma_addr[SSI_MAX_IVGEN_DMA_ADDRESSES]; /* For the first 'ivgen_dma_addr_len' addresses of this array, diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c index 5485372..472d3b7 100644 --- a/drivers/staging/ccree/ssi_hash.c +++ b/drivers/staging/ccree/ssi_hash.c @@ -357,7 +357,7 @@ static void ssi_hash_unmap_result(struct device *dev, state->digest_result_dma_addr = 0; } -static void ssi_hash_update_complete(struct device *dev, void *ssi_req, void __iomem *cc_base) +static void ssi_hash_update_complete(struct device *dev, void *ssi_req) { struct ahash_request *req = (struct ahash_request *)ssi_req; struct ahash_req_ctx *state = ahash_request_ctx(req); @@ -368,7 +368,7 @@ static void ssi_hash_update_complete(struct device *dev, void *ssi_req, void __i req->base.complete(&req->base, 0); } -static void ssi_hash_digest_complete(struct device *dev, void *ssi_req, void __iomem *cc_base) +static void ssi_hash_digest_complete(struct device *dev, void *ssi_req) { struct ahash_request *req = (struct ahash_request *)ssi_req; struct ahash_req_ctx *state = ahash_request_ctx(req); @@ -384,7 +384,7 @@ static void ssi_hash_digest_complete(struct device *dev, void *ssi_req, void __i req->base.complete(&req->base, 0); } -static void ssi_hash_complete(struct device *dev, void *ssi_req, void __iomem *cc_base) +static void ssi_hash_complete(struct device *dev, void *ssi_req) { struct ahash_request *req = (struct ahash_request *)ssi_req; struct ahash_req_ctx *state = ahash_request_ctx(req); diff --git a/drivers/staging/ccree/ssi_request_mgr.c b/drivers/staging/ccree/ssi_request_mgr.c index 8fa3fc1..e9a09b3 100644 --- a/drivers/staging/ccree/ssi_request_mgr.c +++ b/drivers/staging/ccree/ssi_request_mgr.c @@ -189,7 +189,7 @@ static inline void enqueue_seq( * \param dev * \param dx_compl_h The completion event to signal */ -static void request_mgr_complete(struct device *dev, void *dx_compl_h, void __iomem *cc_base) +static void request_mgr_complete(struct device *dev, void *dx_compl_h) { struct completion *this_compl = dx_compl_h; @@ -491,8 +491,7 @@ static void proc_completions(struct ssi_drvdata *drvdata) #endif /* COMPLETION_DELAY */ if (likely(ssi_req->user_cb)) - ssi_req->user_cb(dev, ssi_req->user_arg, - drvdata->cc_base); + ssi_req->user_cb(dev, ssi_req->user_arg); request_mgr_handle->req_queue_tail = (request_mgr_handle->req_queue_tail + 1) & (MAX_REQUEST_QUEUE_SIZE - 1); dev_dbg(dev, "Dequeue request tail=%u\n", request_mgr_handle->req_queue_tail);