From patchwork Mon Jan 1 12:06:31 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: 123035 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp7795186qgn; Mon, 1 Jan 2018 04:08:03 -0800 (PST) X-Google-Smtp-Source: ACJfBotkPHVEkrxeK+7XQq4X9VDnMvdWl0KNpDK2HXvMpxPNWjWvIV3FzD1GZd94pWXM3T8SwOQ+ X-Received: by 10.84.253.135 with SMTP id a7mr41680753plm.395.1514808483390; Mon, 01 Jan 2018 04:08:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514808483; cv=none; d=google.com; s=arc-20160816; b=MEpnogVMvW9hV5A22+OK52J54DaaGdVtFqGKvK1YJ1+UCKpYJ8UOt8AcF+mVejewvR EitrmC6wncmkYexQS0rkJGvEY+BWV19X0rs3CEaEfLE4ru9YK2gCjy9bsaHE8OD/j9Bm rGkyesnVKmOSpSlVCMM+ntPZ8ISL67zGkFsoPGTbdUGjPznNYVJ4ctoRkPsNsNATGet/ YxBTf8siKWYFBYN1ZDJ3SiZoLueU2VrYUG8YH4Y0xNwsAOrIpo7rFf5PyXOIPqq7/IhR zXSjePjDib7KxTz63PQWJ5yoBJxu7AcYKrbzreyXqj9v+4W0vCoTZMRHgfX2+wob4wKA sDvw== 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=qXkqfQlfqS1S2YduXHXlEFxnVNVBQiNLaTCmsb7XcWs=; b=xUQouWKTmaBlWiTD0kHvTE2YXFKeJwTiiGgXE8++B8F00UBOoHfqG/ffMzSZzEn9cS c8PM6bFJyThScbzIa1L8GZVog70Eu7ZitORVkNn9kwre0QxQhgihwQQrfll6M+iVbo0b cdFDGORhEEdngsIJDKBAAqficurNWrSFq/uDQpH+LiQNj+qYOp+wrAp8/V4lL83zPZPs +09oid8d0QguPEo00wDON3CgHXJpIYK4P1MIsyM9UJo9Os/CoLYsvs3OuO5zBQZYGoaf ppc35g/0DKOUsfMBnAjHt0rWH6oxjidoX4asQXubF7JBsqbHGP/XorbYJAarZOomFHI9 sv1A== 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 o76si32283760pfg.10.2018.01.01.04.08.03; Mon, 01 Jan 2018 04:08:03 -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 S1751394AbeAAMH6 (ORCPT + 28 others); Mon, 1 Jan 2018 07:07:58 -0500 Received: from foss.arm.com ([217.140.101.70]:59060 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751366AbeAAMHz (ORCPT ); Mon, 1 Jan 2018 07:07:55 -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 97F8A80D; Mon, 1 Jan 2018 04:07:55 -0800 (PST) Received: from sugar.kfn.arm.com (unknown [10.45.48.158]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E429E3F41F; Mon, 1 Jan 2018 04:07:53 -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 04/26] staging: ccree: remove GFP_DMA flag from mem allocs Date: Mon, 1 Jan 2018 12:06:31 +0000 Message-Id: <1514808421-21993-5-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514808421-21993-1-git-send-email-gilad@benyossef.com> References: <1514808421-21993-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 00140b4..4adf1f6 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 1ed794f..085a69a 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;