Received: by 10.213.65.68 with SMTP id h4csp1853684imn; Mon, 19 Mar 2018 15:17:13 -0700 (PDT) X-Google-Smtp-Source: AG47ELt5ey4lXaPccBlXw514QIFe083JOpwnslQe6zwvHrQrlEZkUqHjebCbd5kNyId7JpP3y6G7 X-Received: by 10.98.201.70 with SMTP id k67mr8364807pfg.141.1521497833085; Mon, 19 Mar 2018 15:17:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521497833; cv=none; d=google.com; s=arc-20160816; b=AILoz/Ezvsi6T5fzGDvagEYd+Qbk0hLl1GrIf/FvYyuxvyXFLUXfx2nWuQH4nJwy76 X6UaJek7xl5bGDk2rq0WlsC0HOoBZjnNgYKDCJD62r2DYsY9+Wnoht2ywZi/ansZohQr qa9byrwZ83BILwnCJey8D8LVQDxG6PCpcstRnXHJTuKG0Tdq7Vv7IKbMSxrqV4kxEAnY UBjKMm1vyno1iS9GPsxwTTrIl3NQmj7ytesLv0Cjr2Oy65BwA3y5O7P0EpmLoK1VJHKF g1Vmkge0yb/jNl5loLD+WBN7U1N5chgnWH8dli+RNxYCLImLU1I96jlmDL399zZXmGXy 5ijQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:user-agent:message-id :references:in-reply-to:subject:cc:to:from:date :content-transfer-encoding:mime-version:arc-authentication-results; bh=db95v4iy8Q/wg4KdUajrbiE690PCQDJPrFmn6A2QV4Y=; b=NRdwZ/N5Kwhdsmmu046YQWfJKuVETOw9Ph9eCmmfexnkPPPUK2IGYOueN3YaA5ua9M 3McmUBNd3TyvUTGmMcUO4dWkL06xCZuIaw7vQ7rX4KTzbiZKp4Ffe7QR0Pi0aPFYSW5I 58I6eQzGzwU2lpZ0L8XRk99da0yjLPy1fmsOkqRdnp4je9YaYIrTfYwByqYws/7JxhrX ZgYBrENHfdEnC33F/w+H0qyMFTxPs+2dlbuRaea767oLwci5Uc/9kEjBNjBT37GCjwOu 77vpgJDRJYSeaWtfskh4+LMAI8ajnrzz7Wwzreg20SVt0uc3RS7dAGm8lHpbMaHmcmq7 E4aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=nfN2XuoA; 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 i35-v6si206088plg.48.2018.03.19.15.16.59; Mon, 19 Mar 2018 15:17:13 -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=nfN2XuoA; 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 S972373AbeCSWOT (ORCPT + 99 others); Mon, 19 Mar 2018 18:14:19 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:44984 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S972327AbeCSWON (ORCPT ); Mon, 19 Mar 2018 18:14:13 -0400 Received: from webmail.kmu-office.ch (unknown [IPv6:2a02:418:6a02::a3]) by mail.kmu-office.ch (Postfix) with ESMTPSA id BF5495C1BC4; Mon, 19 Mar 2018 23:13:51 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Date: Mon, 19 Mar 2018 23:14:11 +0100 From: Stefan Agner To: broonie@kernel.org Cc: geert+renesas@glider.be, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] spi: rspi: use correct enum for DMA transfer direction In-Reply-To: <20180319214231.15529-1-stefan@agner.ch> References: <20180319214231.15529-1-stefan@agner.ch> Message-ID: <8da7711094622e4c84316ce1d5a96d0c@agner.ch> X-Sender: stefan@agner.ch User-Agent: Roundcube Webmail/1.3.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1521497631; bh=db95v4iy8Q/wg4KdUajrbiE690PCQDJPrFmn6A2QV4Y=; h=MIME-Version:Content-Type:Content-Transfer-Encoding:Date:From:To:Cc:Subject:In-Reply-To:References:Message-ID; b=nfN2XuoAvP/8s7L1f8QnU/ffR2lsNe+L2fJ3XGCRby3/m1nn1Lf9AytU3h/NJWyfiaNdZCcQwIp2ovV0GUv3zFNV4Uxq7jNTCHlH+oG4TDb+tNbEp735NfUlx8zkyB1EzaDZDvi1D6UuCJVrGV/TO5I1p/9e/FvmS1ITVFhx1iQ= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19.03.2018 22:42, Stefan Agner wrote: > 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, > ^~~~~~~~~~~~~ > Please ignore this patch, I managed to mix up the direction. Will send a v2. -- Stefan > 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;