Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3694938imu; Mon, 28 Jan 2019 09:11:04 -0800 (PST) X-Google-Smtp-Source: ALg8bN7pEIifvvTmeuveR2Tb6aZTeOSJGhR2Ub7eHRbCzUCSIl+IztuoQENfWkQJ2VjHqRLlkyT5 X-Received: by 2002:a63:85c6:: with SMTP id u189mr19867139pgd.156.1548695463889; Mon, 28 Jan 2019 09:11:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548695463; cv=none; d=google.com; s=arc-20160816; b=rabBf/zvs+67/I+rbnDk1fPci9AZl0arjCStsvBdaPbLEcst03EB4UBHIll51k66Zh VpGbgstFqkitx2ACsymAv1bBYn1WOqcvOoIn4lfxL9fd/pGh5ymBocTlRdj+L8SCEF3l gAXroFz4GI7DVzs+lPxC+wqbaqQnZTNMK9cxHNIneOY1flJg9Gc4F/Py5yWStx16Zkqu 9+QuE+VUXAb75Verxn09VaRftXbTwrLdDnpw1bzXBExljQiMMAWNiNBnpHbGo2r7/Axu y1PX8VOtr7DEnyOJ3n5a6/mn426UqtOA/cWnzmFD55e5j1fc7D1BvhSHaHh5sEPKIO8J 521w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8dwUOrVcXfV9nVuxRKpK5ZZY25lHCekCHSR8ILQbOCk=; b=PmjDY+C0+oSb6tjPPEOHuQtvH19lzSmkxCWi7bj9cR75vtqEvkKdvYt8ngI/0e8IJ2 4lGIH/9DGUS5MHJD/cYpngJ10i5B5FmvxFEwqtaoJ9yDvaB/VwL4s7VyyqquJMhN6cTC 2Z4t6BxjFzfyhjg13ppZQy14wre04Ekuc7LYWuvym3XEnyPZt4BE3IRo0uAU3LJpFOkL x6C+vWR2PA8oop23vkQUcTvXtmGMfAmKY3glYeG6GksK7B7OUPwIkdzqB9L6MBX8tbmH SluA63SqiV3gSszX7G6inLnATk2OLMZFcq1GQdxEhJ2AF7xF9TFymjq37njM5xw2bCUy HeVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UD3crSs4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1si32925330pfh.96.2019.01.28.09.10.48; Mon, 28 Jan 2019 09:11: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; dkim=pass header.i=@kernel.org header.s=default header.b=UD3crSs4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732741AbfA1QKM (ORCPT + 99 others); Mon, 28 Jan 2019 11:10:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:35770 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732732AbfA1QKK (ORCPT ); Mon, 28 Jan 2019 11:10:10 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B0C8C21738; Mon, 28 Jan 2019 16:10:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691810; bh=74ShYMUvNa6XztpuXX1dwopiHNcWA5LMFoH+zlnCFH0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UD3crSs4blKGwJ8KUIS1MDx5yMofo14O8Xig2e5lvgTCwnimcRKPtmXWnvzlz2n5g EO9mjgfkqW3HBGzB2ahUXtDEuGrFnLxztPitfuTBevofL33Sw3cX/mVPBVJcgF/DFs fOxDluuQnbQbCjs1vgotIlBlzIGqjyBTcYZ3Rsn4= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nathan Chancellor , Herbert Xu , Sasha Levin , linux-crypto@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 224/258] crypto: ux500 - Use proper enum in hash_set_dma_transfer Date: Mon, 28 Jan 2019 10:58:50 -0500 Message-Id: <20190128155924.51521-224-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor [ 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