Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2657361imj; Mon, 11 Feb 2019 06:34:51 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia6ARUHm3KokNXP5ze8oOTkm5YV/LMpB2+WFPndjjKrkj35K/0B+kMYPISd9zU4ccY87msQ X-Received: by 2002:a62:6e07:: with SMTP id j7mr37901780pfc.135.1549895691726; Mon, 11 Feb 2019 06:34:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549895691; cv=none; d=google.com; s=arc-20160816; b=VSC+Z/Kt+BingHXRMniDNV95ksajPfyi9f0JOOH46RFnPZdSR4xFZvRWhUxfa6QAXn 6JtK4ABIX/+urG5DfOlbirjDQjeai4EJAIFIEISKLGXyvdSdYDol7bxpEDSZBjggbVnF B/gzGpdo9zM04bDTxV9NPRetZLgJuzf0rwYnBbHS2LBH3NGqIIAnG5w+5IXcmJRKxAmu 19S88Z4fRjmTpbPxbusTDiIAy68CFf4fUmHUzSwEg/VJppvyAqQ0a2npGT/l/60BsYRG rYJlqG4sf8mCotthuOmhAt3g26Wsczy5PoRPcDSDWz3Zsor3YQ8Thlp0nri6SGqjnbFz webA== 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=FbCYYJHqKboYgaKZSJ/aUnkwdBvGixeH/c9EI4ViGsg=; b=YwMvQIgrkjqiH+QZjZY9a/Q7l84uiH9io45aFIEfSY5Uz7mLXh0ceP/vCAIh6das1+ JQ10Npn00nmoaPoHu3/ZhoG7P0MLd0eRRg8FtBsmgruLIG1BnSVD7x1co5VbiQtxQ5z+ nvNvSLZdNYl3YzIyHo6WImdHuUOv7l+nygIETjD4bSbEcRfodi43C7QPQWYlTcrOMNwO 3bulml3ts+HbGIQ0iseL4D6YgOeX3Bc5f3GeW3lPAjqfQVbZ++nFNWrHq+sazZkLxnY3 w0hhlBtWuUljKDeQSlZTysJUV8aPs3WhcaGNKC77fxFEYzxmSXetTymX+4qUEqWJA4WC CekQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="xqm0HmH/"; 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 5si9619842pgc.290.2019.02.11.06.34.35; Mon, 11 Feb 2019 06:34:51 -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="xqm0HmH/"; 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 S1730599AbfBKOdM (ORCPT + 99 others); Mon, 11 Feb 2019 09:33:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:40728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730017AbfBKOdG (ORCPT ); Mon, 11 Feb 2019 09:33:06 -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 2BA6F21855; Mon, 11 Feb 2019 14:33:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895585; bh=FmIvRkVC8uF4mZIxLheNR5Bn5FATuCRgJCv71nnaKAs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xqm0HmH/0sdd78AVKJ5Ucb8X+mHLgX47cOYjxFqimOLFhp5FdmRodxBeCS8TO5xwI qQqJZq9Ljhf32Le4v/017jEo4YxvhadmxHLSVdn0D5T+ieJr5Ir8JCniV4kxWyi9JF ctLzLapVswZOejq+bt09d5EDHJV8bzn3pVpCH4Z4= 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 255/352] crypto: ux500 - Use proper enum in hash_set_dma_transfer Date: Mon, 11 Feb 2019 15:18:02 +0100 Message-Id: <20190211141903.315110757@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 5ac93f808338f4dd465402e91869702eb87db241 ] Clang warns when one enumerated type is implicitly converted to another: drivers/crypto/ux500/hash/hash_core.c:169:4: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] direction, DMA_CTRL_ACK | DMA_PREP_INTERRUPT); ^~~~~~~~~ 1 warning generated. dmaengine_prep_slave_sg expects an enum from dma_transfer_direction. We know that the only direction supported by this function is DMA_TO_DEVICE because of the check at the top of this function so we can just use the equivalent value from dma_transfer_direction. DMA_TO_DEVICE = DMA_MEM_TO_DEV = 1 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/crypto/ux500/hash/hash_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/ux500/hash/hash_core.c b/drivers/crypto/ux500/hash/hash_core.c index 633321a8dd03..a0bb8a6eec3f 100644 --- a/drivers/crypto/ux500/hash/hash_core.c +++ b/drivers/crypto/ux500/hash/hash_core.c @@ -166,7 +166,7 @@ static int hash_set_dma_transfer(struct hash_ctx *ctx, struct scatterlist *sg, __func__); desc = dmaengine_prep_slave_sg(channel, ctx->device->dma.sg, ctx->device->dma.sg_len, - direction, DMA_CTRL_ACK | DMA_PREP_INTERRUPT); + DMA_MEM_TO_DEV, DMA_CTRL_ACK | DMA_PREP_INTERRUPT); if (!desc) { dev_err(ctx->device->dev, "%s: dmaengine_prep_slave_sg() failed!\n", __func__); -- 2.19.1