Received: by 10.213.65.68 with SMTP id h4csp1836247imn; Mon, 19 Mar 2018 14:44:43 -0700 (PDT) X-Google-Smtp-Source: AG47ELsRgNGPP/1GnB3G/qygAyl5sv7oBQRKvIHs8sovlpydU+rem9e2Je4Kg0tKpMiqf9Pah85k X-Received: by 10.99.4.202 with SMTP id 193mr8161510pge.409.1521495883359; Mon, 19 Mar 2018 14:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521495883; cv=none; d=google.com; s=arc-20160816; b=gTms8lsSN1dSmJnQKcv7Rkqn0xvKZdXKKbQSDJ0Z7SC0J/BzJVD7JAx7nt/kGZGT2f yN+QAkTy3M0P3IWasGhq3FZ3rJYjq/kT2S+0P9wZygs+xKs5Kq0aNDZZ05R29KpviNgc zWODVWEFehy7vPTEsVQ8BdnXg5bn94fpKLLpuY0RC40eQPhfSGXCUnXeFdR+mE+9UUdR qM5tGH+DIa6dYU00lYYV6cDK27s5e8gi16qAJARG9gDAkCh16I/WhldCQDipOdbk7Woy +29PODWP+E7U0p3PULOMozn6utKXXaE/I9wCTBYiVx71ymzE41q6vNRRTQcSlUc8OBe9 b4tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:message-id:date:subject:cc :to:from:arc-authentication-results; bh=0FWqqPfRC+Ow7CmQrcUwDfX4fKf03ZONT/j/lLxi49g=; b=sguKyEOfG7xlRYrTGrZjE0XNt4ZQfQfuCR4EcTte2MwD4MK9h0tlNeRcPyqZ/UT509 MOptpZYqSmqFjgtDpB11lhLR3eHMl5H6bRj1h2TFuEooqPGm220iMigxX4A4T8EKeqPV Dn4VhaVSL7/QlXPtORPJENCKhvUKlPupJLlh9WOKZH3Dv4wt797A2N/CCTEgB0ns6rs8 hO2u5qzd6e1XdT4ZAxeyPBIN2/dSkSpzrUySfvvGn0BWQ52fHiNKMMJUuwZ1vaNmyocq MmsYfUn5J41rNu0pUuFpGDDplBEJo6bFoBvI6NqDI457gOmZZjWhBxBb5mbsVYgtPQt7 8NkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=sVML2cmy; 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 c12-v6si136749pll.498.2018.03.19.14.44.29; Mon, 19 Mar 2018 14:44:43 -0700 (PDT) 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=@agner.ch header.s=dkim header.b=sVML2cmy; 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 S934779AbeCSVmo (ORCPT + 99 others); Mon, 19 Mar 2018 17:42:44 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:44572 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933303AbeCSVmk (ORCPT ); Mon, 19 Mar 2018 17:42:40 -0400 Received: from trochilidae.lan (unknown [IPv6:2001:1620:c6e::edf]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 7C5AA5C155D; Mon, 19 Mar 2018 22:42:19 +0100 (CET) From: Stefan Agner To: broonie@kernel.org Cc: geert+renesas@glider.be, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Agner Subject: [PATCH] spi: rspi: use correct enum for DMA transfer direction Date: Mon, 19 Mar 2018 22:42:31 +0100 Message-Id: <20180319214231.15529-1-stefan@agner.ch> X-Mailer: git-send-email 2.16.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1521495739; bh=0FWqqPfRC+Ow7CmQrcUwDfX4fKf03ZONT/j/lLxi49g=; h=From:To:Cc:Subject:Date:Message-Id; b=sVML2cmy89+EwrMmtH9VK4INdJA1/s1czGDpUStDhfGQnNk0XZ5Ykb1Ax9Kuh/AF3areG3+FcuFwEBntGnQo99xQu6iULXzeL9JzmIUYqvSRwhJq5084sRULBtRCWmaOWiielvSjcOZZ6Gtn9Dahc2y8PWJCGusjqtF3c101YnQ= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use enum dma_transfer_direction as required by dmaengine_prep_slave_sg instead of enum dma_data_direction. This fixes two warnings when building with clang: drivers/spi/spi-rspi.c:538:26: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] rx->sgl, rx->nents, DMA_FROM_DEVICE, ^~~~~~~~~~~~~~~ drivers/spi/spi-rspi.c:558:26: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] tx->sgl, tx->nents, DMA_TO_DEVICE, ^~~~~~~~~~~~~ Signed-off-by: Stefan Agner --- drivers/spi/spi-rspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c index 0835a8d88fb8..3e5a31d338fe 100644 --- a/drivers/spi/spi-rspi.c +++ b/drivers/spi/spi-rspi.c @@ -535,7 +535,7 @@ static int rspi_dma_transfer(struct rspi_data *rspi, struct sg_table *tx, /* First prepare and submit the DMA request(s), as this may fail */ if (rx) { desc_rx = dmaengine_prep_slave_sg(rspi->master->dma_rx, - rx->sgl, rx->nents, DMA_FROM_DEVICE, + rx->sgl, rx->nents, DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); if (!desc_rx) { ret = -EAGAIN; @@ -555,7 +555,7 @@ static int rspi_dma_transfer(struct rspi_data *rspi, struct sg_table *tx, if (tx) { desc_tx = dmaengine_prep_slave_sg(rspi->master->dma_tx, - tx->sgl, tx->nents, DMA_TO_DEVICE, + tx->sgl, tx->nents, DMA_DEV_TO_MEM, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); if (!desc_tx) { ret = -EAGAIN; -- 2.16.2