From patchwork Sun Jan 7 12:14:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 123648 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp1546971qgn; Sun, 7 Jan 2018 04:16:21 -0800 (PST) X-Google-Smtp-Source: ACJfBoueTnG0UZEfmChb5ywOEyHVqxi6cxJNFAfr9I9yhh2da/Ghl6KHCz/ZKzWqRiBx7Fkyf9B2 X-Received: by 10.99.110.130 with SMTP id j124mr3337244pgc.172.1515327381872; Sun, 07 Jan 2018 04:16:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515327381; cv=none; d=google.com; s=arc-20160816; b=piK88XBvED50n57AAeGfR4hSUDth14ASZtYkf/phb9Bb5KMJYgEbEIt7C3ncdaMKFV Bo+azrtuMB+A7MWfAoRYnro91sIl8T7FDR2PtD3DPOyMWL2o+lmCvO0Jhk1hGtOG0DFe Y6PrdNx1MmVK4YzZsAswUpTdEasBB36lf8zTX+iBOM4IBdhgQA9u9O0ImlT+ikBHRl9H PYug+YBL3snRa5PxYiP5VC5bBJ2ON919vzIzA9QQci/N2IwOvWJXqIFPxwRU2mM6e3Iu PIE1u5BADCLr1A7G0Tq7hSBwSuB6Vc2XPCUVLsO13Sn7LIj+5juBApqxfuwR17JG+NRl NtUQ== 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=PuFXnQ50oYSkEF8PgY9eyPdAvtaoiQVQWEQ/qOIXUqU=; b=awCjNyUUYpJz2AYRy0UsOJ8i8xfpgWHMtvaxp0aEcBnB0geNFLMSWRBsqtdVGd8yir /+Jlv3y/7Iz3vx/e4lwzHwt30CiRBjNbPT0ZFY6dxdPU8qVeWtta1s++nSpCEoqoXNQD Hl983evag3vguNzUNOduJdL2H5z0hsLxYVcAe8l4XQ98TtPcVNpbZPLniRhHPqTVy8e0 TkkSvVpuWxCUxSoFowmMc596PRtOApa74O4kYshD0sdozdSP7DI1G0Ngy8r10FJKt0b1 JNJCGDr72QM76TyEtziRcesu+cnNsDGKvF1KqQkhufG5b2d65XSdiWHrJ7UGwkoiw1oj PsKw== 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 x13si6929905pfk.293.2018.01.07.04.16.21; Sun, 07 Jan 2018 04:16:21 -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 S1753899AbeAGMQU (ORCPT + 28 others); Sun, 7 Jan 2018 07:16:20 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:57420 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752852AbeAGMQS (ORCPT ); Sun, 7 Jan 2018 07:16:18 -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 D43221435; Sun, 7 Jan 2018 04:16:17 -0800 (PST) Received: from localhost.localdomain (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 05A4D3F581; Sun, 7 Jan 2018 04:16:15 -0800 (PST) From: Gilad Ben-Yossef To: Greg Kroah-Hartman Cc: Ofir Drang , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org Subject: [PATCH v3 04/27] staging: ccree: remove GFP_DMA flag from mem allocs Date: Sun, 7 Jan 2018 12:14:15 +0000 Message-Id: <1515327285-8948-5-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515327285-8948-1-git-send-email-gilad@benyossef.com> References: <1515327285-8948-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 bogus GFP_DMA flag from memory allocations. ccree driver does not operate over an ISA or similar limited bus. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_cipher.c | 2 +- drivers/staging/ccree/ssi_hash.c | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) -- 2.7.4 diff --git a/drivers/staging/ccree/ssi_cipher.c b/drivers/staging/ccree/ssi_cipher.c index 6178d38..496eb19 100644 --- a/drivers/staging/ccree/ssi_cipher.c +++ b/drivers/staging/ccree/ssi_cipher.c @@ -166,7 +166,7 @@ static int cc_cipher_init(struct crypto_tfm *tfm) ctx_p->drvdata = cc_alg->drvdata; /* Allocate key buffer, cache line aligned */ - ctx_p->user.key = kmalloc(max_key_buf_size, GFP_KERNEL | GFP_DMA); + ctx_p->user.key = kmalloc(max_key_buf_size, GFP_KERNEL); if (!ctx_p->user.key) return -ENOMEM; diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c index 3c28904..f178ffa 100644 --- a/drivers/staging/ccree/ssi_hash.c +++ b/drivers/staging/ccree/ssi_hash.c @@ -132,29 +132,27 @@ static int cc_map_req(struct device *dev, struct ahash_req_ctx *state, struct cc_hw_desc desc; int rc = -ENOMEM; - state->buff0 = kzalloc(CC_MAX_HASH_BLCK_SIZE, GFP_KERNEL | GFP_DMA); + state->buff0 = kzalloc(CC_MAX_HASH_BLCK_SIZE, GFP_KERNEL); if (!state->buff0) goto fail0; - state->buff1 = kzalloc(CC_MAX_HASH_BLCK_SIZE, GFP_KERNEL | GFP_DMA); + state->buff1 = kzalloc(CC_MAX_HASH_BLCK_SIZE, GFP_KERNEL); if (!state->buff1) goto fail_buff0; state->digest_result_buff = kzalloc(CC_MAX_HASH_DIGEST_SIZE, - GFP_KERNEL | GFP_DMA); + GFP_KERNEL); if (!state->digest_result_buff) goto fail_buff1; - state->digest_buff = kzalloc(ctx->inter_digestsize, - GFP_KERNEL | GFP_DMA); + state->digest_buff = kzalloc(ctx->inter_digestsize, GFP_KERNEL); if (!state->digest_buff) goto fail_digest_result_buff; dev_dbg(dev, "Allocated digest-buffer in context ctx->digest_buff=@%p\n", state->digest_buff); if (ctx->hw_mode != DRV_CIPHER_XCBC_MAC) { - state->digest_bytes_len = kzalloc(HASH_LEN_SIZE, - GFP_KERNEL | GFP_DMA); + state->digest_bytes_len = kzalloc(HASH_LEN_SIZE, GFP_KERNEL); if (!state->digest_bytes_len) goto fail1; @@ -164,8 +162,7 @@ static int cc_map_req(struct device *dev, struct ahash_req_ctx *state, state->digest_bytes_len = NULL; } - state->opad_digest_buff = kzalloc(ctx->inter_digestsize, - GFP_KERNEL | GFP_DMA); + state->opad_digest_buff = kzalloc(ctx->inter_digestsize, GFP_KERNEL); if (!state->opad_digest_buff) goto fail2;