From patchwork Sun Jan 19 03:49:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunyan Zhang X-Patchwork-Id: 11340515 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E0E1F109A for ; Sun, 19 Jan 2020 03:50:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AAEF92081E for ; Sun, 19 Jan 2020 03:50:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="t4mtc3am" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726046AbgASDuG (ORCPT ); Sat, 18 Jan 2020 22:50:06 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:45430 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725980AbgASDuF (ORCPT ); Sat, 18 Jan 2020 22:50:05 -0500 Received: by mail-pf1-f196.google.com with SMTP id 2so13994764pfg.12; Sat, 18 Jan 2020 19:50:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uZ5T5UfJAQJwU5MzOJB4Yvh3UEefL9B9keDh3VxMHPs=; b=t4mtc3amxopGywAWkZqoZtv/mHuTlllXRwI6sX52MewkHrKOOI5+rZHWRrRto3WjKN cj5X3IhWIJ4WdVCLuF9sPjhXYbvIBM6XzylDFE9F0a7Vlj4ya/4D3B+Ujz5HVBFI52n3 iTPmt/c50xoQjhjXxke0+rNJGMmhkLowBvoXzUDmqJi6BW/tgC1mtBzsc3Z0NEdZC+sd eeve8wGELp/UuiA4PiEz7x8IePkw3biEhYlOMGUg7HXxGQYFhDrWjnc3BhhrU602FBYM QM1wx6Emk7X35rYg6alUeDnM8tLKB/C/WLmWOTTb8pqSQ8YlXODVVspdgtrp0lqrzmYS wGGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uZ5T5UfJAQJwU5MzOJB4Yvh3UEefL9B9keDh3VxMHPs=; b=gBVizkjPAII6TzmMC1pvNIDxlgLQnwNg6K4TYysjqpVq47xZAMJkXxKXceyesXI+Yp 6QgyPclIr2kAdHug41bmEx2sp8Z2NfOOTTqPvSCaBqCSTcenBjnwuoynEs2E2QeTF7ic qmfDW7mgj+lqU7Xjvf903luoNVeMwcCNet7GgxgN9xAxsNN76Gug3OXbLnV27xbBEnoT WUi7WvEmhBhMl8YwyhZTDnGswrcolAgdzKkK+gJ/yIZiHX15Sf4na0khlKVNE4lujjH7 YCNHwnWe3O3y6lrmVrwl2aVaOk8dFC1Lb7k97wYumzg0WAp9t0cVmUAZIN0TRHLfJt5I oxaQ== X-Gm-Message-State: APjAAAXW2E342+5IRW6sr6yvyIfzHVcgJUuoRObvZy/UZbyehaF+1Rq0 ULdoSj9AGZE3PW+oc3GgOV0= X-Google-Smtp-Source: APXvYqzSlkpFIebImLyEI/U5zYhbjiRWFjKvEXDA8jNQCknif976ZwYQmGZnZs1hBpLhRizaVyPAuw== X-Received: by 2002:a65:4206:: with SMTP id c6mr54128856pgq.46.1579405805266; Sat, 18 Jan 2020 19:50:05 -0800 (PST) Received: from ubt.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id 144sm36126980pfc.124.2020.01.18.19.50.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jan 2020 19:50:04 -0800 (PST) From: Chunyan Zhang X-Google-Original-From: Chunyan Zhang To: Ulf Hansson , Adrian Hunter Cc: linux-mmc@vger.kernel.org, Faiz Abbas , Chunyan Zhang , linux-kernel@vger.kernel.org, Chunyan Zhang , kbuild test robot Subject: [PATCH] mmc: sdhci: fix an issue of mixing different types Date: Sun, 19 Jan 2020 11:49:02 +0800 Message-Id: <20200119034902.20688-1-zhang.chunyan@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Fix an issue reported by sparse, since different type of parameter is used on calling dmaengine_prep_slave_sg(). Fixes: 36e1da441fec (mmc: sdhci: add support for using external DMA devices) Reported-by: kbuild test robot Signed-off-by: Chunyan Zhang Reviewed-by: Nathan Chancellor --- drivers/mmc/host/sdhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 30b5a624b50e..4503009f993b 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1235,8 +1235,8 @@ static int sdhci_external_dma_setup(struct sdhci_host *host, return -EINVAL; desc = dmaengine_prep_slave_sg(chan, data->sg, data->sg_len, - mmc_get_dma_dir(data), - DMA_PREP_INTERRUPT | DMA_CTRL_ACK); + (enum dma_transfer_direction) mmc_get_dma_dir(data), + DMA_PREP_INTERRUPT | DMA_CTRL_ACK); if (!desc) return -EINVAL;