Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2686430imj; Mon, 11 Feb 2019 07:02:19 -0800 (PST) X-Google-Smtp-Source: AHgI3IZslG4aReZCiuEVSn/Q3u0RFGo+ScsNM5u3DDmRBb07aLEvW1w6mjEbUJzkDQSd+nQl3bym X-Received: by 2002:a62:3ac8:: with SMTP id v69mr14893644pfj.150.1549897339531; Mon, 11 Feb 2019 07:02:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549897339; cv=none; d=google.com; s=arc-20160816; b=U5z6SZ1uYkW3ivZMTb6Uk9BYehj7hZvLzKqwdIjZm3r+uBciN7Z/ysm9TbtVM+IGsq ZZtAZq+vA4GbEPgY2i1sfRriZiwaHmoVJAQo5eqSDcMIVoSihjKYq7lbiOJkZ+VTUVQa ZaLeA+zM7k0sX4hReLNVJlFUlGiofu0aOvtlDA4InRllpA6BVZTFS1QvFzFxGWhD7kZ7 90KS/oE3QhHu6D53uXMbbLNgx2MuQ3XU9KkL8GSxZGWdIM0QlMCxZq7FiwIdCORr108o bzzsSb9D/8kKN52oaRvbiWT/nLLDp840UNbdyhQWfeQaB+hIpdb2iNsCJHngw0WtjxaY 069g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YRmtX74Bqn1TpWucHMwGRnZCvm6iuIptn9EdHYWZrRo=; b=oy3d6U5YwVB0AXep0CVlnjBR0Ty+fU9G+haUHN1NeIfgIBAKEG5xKYd25nUbwroTpz yLGg2r8MEhpgkrXZE/XXr5eKOarUvgsSXCWRlws62lPavYduO5fzogDJCzpEX/wtlM3V eL6V/GQsNKF90n4+Z6+e274Kw+82E/1tyPpBeeVk5+hwyNMs04vHBfk1Z8IlEa4khzFs mlRYu3fdieQLUXrIvawBNJFZ6rjeED1xmvxgUHroBrr6wXcSMlB/tHHCnY851cvkUQyn Vw7JGEasQDWHz15S3wBdFWIe1FavYMvacOTDsdtUtdpFdlrulB6xKXq8b3MuhSapHcp/ Oz8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="1Ql/Esuh"; 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 m32si10524091pld.262.2019.02.11.07.01.47; Mon, 11 Feb 2019 07:02:19 -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; dkim=pass header.i=@kernel.org header.s=default header.b="1Ql/Esuh"; 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 S2389666AbfBKPAv (ORCPT + 99 others); Mon, 11 Feb 2019 10:00:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:48794 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390072AbfBKPAt (ORCPT ); Mon, 11 Feb 2019 10:00:49 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 022FC222A7; Mon, 11 Feb 2019 15:00:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549897248; bh=g3Tyt/RJpRvjJqvPXAJ2gQYIu+bAnx68EegKD2ytITc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1Ql/Esuhc7+RIm36Sr5E5CnzFB/A9VlqGvCyXzJpKKdyP2gU222UVYuN0t5g8XfVZ JZu01F4VqIqj2nMdRKj3z4LjeIvu8ngb4Btyt2KpsX7LQT2V9SpNmEk++GBy6SAIzC C6FA0RFkcQ/MB0FSCphR+Dn04HzQ0gtsNM3QJZks= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , Herbert Xu , Sasha Levin Subject: [PATCH 4.14 139/205] crypto: ux500 - Use proper enum in cryp_set_dma_transfer Date: Mon, 11 Feb 2019 15:18:57 +0100 Message-Id: <20190211141837.472851151@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141827.214852402@linuxfoundation.org> References: <20190211141827.214852402@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 9d880c5945c748d8edcac30965f3349a602158c4 ] Clang warns when one enumerated type is implicitly converted to another: drivers/crypto/ux500/cryp/cryp_core.c:559:5: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] direction, DMA_CTRL_ACK); ^~~~~~~~~ drivers/crypto/ux500/cryp/cryp_core.c:583:5: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] direction, ^~~~~~~~~ 2 warnings generated. dmaengine_prep_slave_sg expects an enum from dma_transfer_direction. Because we know the value of the dma_data_direction enum from the switch statement, we can just use the proper value from dma_transfer_direction so there is no more conversion. DMA_TO_DEVICE = DMA_MEM_TO_DEV = 1 DMA_FROM_DEVICE = DMA_DEV_TO_MEM = 2 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/crypto/ux500/cryp/cryp_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/ux500/cryp/cryp_core.c b/drivers/crypto/ux500/cryp/cryp_core.c index 790f7cadc1ed..efebc484e371 100644 --- a/drivers/crypto/ux500/cryp/cryp_core.c +++ b/drivers/crypto/ux500/cryp/cryp_core.c @@ -555,7 +555,7 @@ static int cryp_set_dma_transfer(struct cryp_ctx *ctx, desc = dmaengine_prep_slave_sg(channel, ctx->device->dma.sg_src, ctx->device->dma.sg_src_len, - direction, DMA_CTRL_ACK); + DMA_MEM_TO_DEV, DMA_CTRL_ACK); break; case DMA_FROM_DEVICE: @@ -579,7 +579,7 @@ static int cryp_set_dma_transfer(struct cryp_ctx *ctx, desc = dmaengine_prep_slave_sg(channel, ctx->device->dma.sg_dst, ctx->device->dma.sg_dst_len, - direction, + DMA_DEV_TO_MEM, DMA_CTRL_ACK | DMA_PREP_INTERRUPT); -- 2.19.1