Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2752704imj; Mon, 11 Feb 2019 07:59:29 -0800 (PST) X-Google-Smtp-Source: AHgI3IYwwvq2GFofOZGsF2HKBUha8S+l84EMpJo67GWnen7rcG2x5oPAYLJ7wYMi3TXZQssjF5ge X-Received: by 2002:a17:902:bc88:: with SMTP id bb8mr8530850plb.12.1549900769883; Mon, 11 Feb 2019 07:59:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549900769; cv=none; d=google.com; s=arc-20160816; b=kUFMTJtvhXsJ5M8EP24rim8wi0eXPyLLuDWRj0hp2F29T0eox+8sNtpBR4SZd/hYsO dgDAIpAQHRmW6qgvZ9aeXSaWJXbrtlTARiXm5+vh8pew4fVRH5raiFU7rSzet/gRyTOj oTxp58R4frx9Rkvhdz5SxDelBXxkCZyGRflGDGnRgKGkgI2LmCMG/KrhB+yBAdKCtYAL rzllS65lzx2BpcncsV1LLdhLgHRVXn8UJaDi4YaFncJzc0pvI/TnK9CYSXxEWKZ+s2uk sK+Ow6qsyjwH0YsZxDrhm/rOR5kAwgbT+Ow3jpEsEb/pnIgGOobN8+QJuStU35ZkscaE eZVA== 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=n3a33y5Zujlafhnrt4e8k8zaKog8RBx47wmpqtcQTaI=; b=oYuZBoYqfiDc1Yk8HgPckv+Z/q+jikN7V+ceucQNQ+VMzvlU3IYf3+SmJ3rh+cWfXc 5Hjc4kRzpE62+s68iSBZCDb4DYETJwr8pbVtTkSi7RTj4wo8b3rE/W2VdKrv+El+YBdk biPV+H+MYfV5ZBWerYadlGz9FFGQXrvkPVWU5O7EgahAb2XAIkDIW/b8xeMrUTG/ayKc DoMKOsW5WbuPNaoST9zs5VzPzEz1hKdFTbOwFSUTZ8hKFdl57lwjNicx1Me5kNKef01P cQQiGSYt1aLMa1DWsBL1fB4CXd3+CdUrtoAXejbEGHIcnAOEjx/lO3kyAZbqXF2MTmP0 92ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fy2WiDba; 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 l15si9077075pff.206.2019.02.11.07.59.12; Mon, 11 Feb 2019 07:59:29 -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=fy2WiDba; 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 S1730588AbfBKOdJ (ORCPT + 99 others); Mon, 11 Feb 2019 09:33:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:40670 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729111AbfBKOdD (ORCPT ); Mon, 11 Feb 2019 09:33:03 -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 70470214DA; Mon, 11 Feb 2019 14:33:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895582; bh=solmUYJmoAXlBx3fcMi3Ik7oo4BWKRqAIJlm0lHO8Bk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fy2WiDbaMpRqIPdp2zfIb/XP/VmEGGPA3hqzz5suQ5kSGKiC7Sb0goSWMJl0DQuv6 TcK93TmCPXnNlqMLSgj0Pwdv5wTj985ReQkNlRdz95aRk+rZbk8YKm8eBtdaeKcxnV OSWC/X4xnOebgBveuajZRbeRW509fqX9TX2VzH0o= 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.20 254/352] crypto: ux500 - Use proper enum in cryp_set_dma_transfer Date: Mon, 11 Feb 2019 15:18:01 +0100 Message-Id: <20190211141903.249657548@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@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.20-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 d2663a4e1f5e..a92a66b1ff46 100644 --- a/drivers/crypto/ux500/cryp/cryp_core.c +++ b/drivers/crypto/ux500/cryp/cryp_core.c @@ -556,7 +556,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: @@ -580,7 +580,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