From patchwork Wed Jan 3 13:35:11 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: 123302 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp10180612qgn; Wed, 3 Jan 2018 05:36:49 -0800 (PST) X-Google-Smtp-Source: ACJfBovAM5NsnGEFeNm5BF1bLMwLcRbNfVNonwO5LPL7jHstK7GqB1QSSy+aqMAw8qvGGkBxh9mx X-Received: by 10.99.47.1 with SMTP id v1mr1240701pgv.162.1514986608915; Wed, 03 Jan 2018 05:36:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514986608; cv=none; d=google.com; s=arc-20160816; b=RAf0y6cYzrn3aGsjeTCNbzIjHoZQRSk1ADYYWhBFmr7W/O4GDEI7T2PBgoWMT8L52w YGWuM4j1EvO8Vbfm5sE6ClSF1KIcyvZwj3K+lCQnI2Qk+R67UewXcYCu4zeSajXQMD4x 4KlhotiH1nhy20tYQ4bhsYuU0xMurhPb9FqiuIgQBdeKUcrWI9bQ/E6x4/hp+YIjW0ev f+PDLs/sdOEzlR1bYgYEEU/QDVKCH6uiBnJmzxh9+XUbd8cPAAcZNkQlF+p/wFzxueaK tgIzzGFs2pEKYJNo8JGNUmIlxCPEOjZC1rNcJTbv2EdKNPDrVpM5JH2OLZvHWrpQhoyQ BMHw== 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=hrN5IIziJTDLly8pSS2Fcg3KFQlIVIcmovJqNF2tCbI=; b=TYUiZZKrFPkb9B7ZaBTU17ckW67V2awkAzHbrXOJoYvyt9GEO8Zyb8NMv+xjN3SoZI kf64EdYBQBeD5XCX8HOzoCn7FCbzaTZRuyhZZTMI7LlxdxFfPaha+cDHEnT/kaHQyWjm 39R7rbXsbzeuuZSTujw+LibI8acl02tYr9TOej/gkr7W+Kqpf1t94ufpWpjCm6ixZ9Dx Gaa+kKYK2asDfusPSjEvvyYJzsg4lR1XOx1pvzvidjgsSTiT3k6QUxyhaibCUbEoEJXo mBE/Ih2x7PyG1ElRelCUWDCDMwRC964qB+hOPU81ZfDciTXkavk0E99EUljsKgkpkp5T FeYg== 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 m11si702062pln.823.2018.01.03.05.36.48; Wed, 03 Jan 2018 05:36:48 -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 S1752907AbeACNgp (ORCPT + 28 others); Wed, 3 Jan 2018 08:36:45 -0500 Received: from foss.arm.com ([217.140.101.70]:50000 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751677AbeACNgm (ORCPT ); Wed, 3 Jan 2018 08:36:42 -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 844451529; Wed, 3 Jan 2018 05:36:42 -0800 (PST) Received: from sugar.kfn.arm.com (unknown [10.45.48.137]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0006B3F24A; Wed, 3 Jan 2018 05:36:40 -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 v2 04/27] staging: ccree: remove GFP_DMA flag from mem allocs Date: Wed, 3 Jan 2018 13:35:11 +0000 Message-Id: <1514986544-5888-5-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514986544-5888-1-git-send-email-gilad@benyossef.com> References: <1514986544-5888-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 71d3e79..479186f 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 c409dcd..a6702cf 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;