Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp44624pja; Fri, 22 Nov 2019 03:14:27 -0800 (PST) X-Google-Smtp-Source: APXvYqy7FA41vy9usk7VS09dO+Bepr0rMF/utk7Hmo9xfJhEfRqJUEJSGHU/ixXW8JaJX9j90ZJW X-Received: by 2002:a17:906:90c3:: with SMTP id v3mr1950301ejw.30.1574421266922; Fri, 22 Nov 2019 03:14:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574421266; cv=none; d=google.com; s=arc-20160816; b=hnTMjsezl+uzLOrzvRmxfYtFBY4Bb3LrKPZbbcBTN9Krgu7p+JHvBDu8VPxR66SLMp +zqMJmUHgRVBhEL0M4v1NwXpLegDFQCQXmqUza4jw6JqF/SMovYErximMELzUgMN5DzC GYL5Z4bMfZWnPdeQd57TJ8hUgHct5UMUd1p6NFdQjsJva9aWPZy1ygnPq4fxm7nN4YIr jPLD+/6ZTvcNXbOJ3zYukFscQC28Vy9M2/kl2zqufJMJDxZHYEyMxQ5hvVi/f7tAmc0A Tn8/Rw6Mk41BWji/kqab3lPsc88Z26up63krTuxQQR4fqAw85xhigugXU937rfC/PzUm +Xcw== 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=0ysBXSX6agXjrMb/nPY+izkNxc177YNqoVVVLLrsfZ4=; b=bJElEaAGN3cy0uqeUPEi5bjv3MVFCmsL3siE8MOSmu8WEP4q7IroUxbPLnFD5m1rzU CPJmWj2Pwf8SNsiircKVu0ZtrP29uw+sBpmrWFpBOw8itzpbHDOyvj7n7JuLVdzCPZ6p J4lK9FJYc4KhTvTZv4IcuSGScFIkk7ZxfwLL3X6ZyqMI4XEjIF1LuCHuQ6in1Ro/rpVO dOnFarhxgqLwWnuf5ZSRrKHrZ8CuKtTapRqho08yYO/w/nF+T17P8+jsCm3oQJTaVsl/ M/KZiJAZ4B8dhKKNgzuJZXGxYB4hzOa/nnGWIwrnuEzSLOtSicEKLLp5Ao9dhgipDWKW E61A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ypX87GbC; 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 v11si4708884edl.371.2019.11.22.03.14.02; Fri, 22 Nov 2019 03:14:26 -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=ypX87GbC; 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 S1728213AbfKVLAP (ORCPT + 99 others); Fri, 22 Nov 2019 06:00:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:52126 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730215AbfKVLAN (ORCPT ); Fri, 22 Nov 2019 06:00:13 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 80D4E2073B; Fri, 22 Nov 2019 11:00:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574420413; bh=EaemQSMRjOoOZA9hgJ+Xxl+flpaibVvlHklLcHHBV1Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ypX87GbCVuBinC+CRqa/galefcrqSgoPoEEJqMBra5KrBlQ+pcGMkPTUsI9zQiiAz 6MhALTYW1fWgv4ovurRrl+Ula9H+oaNaVQdcqLyUIkKd3vmSVZjP8SNp7CT1H2Hujm cjWPTjHYjUOl+wIcmDseG1OTDrtFSOhuFAnOqP2w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bartlomiej Zolnierkiewicz , Nathan Chancellor , Jens Axboe , Sasha Levin Subject: [PATCH 4.19 098/220] ata: ep93xx: Use proper enums for directions Date: Fri, 22 Nov 2019 11:27:43 +0100 Message-Id: <20191122100919.794046625@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100912.732983531@linuxfoundation.org> References: <20191122100912.732983531@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Nathan Chancellor [ Upstream commit 6adde4a36f1b6a562a1057fbb1065007851050e7 ] Clang warns when one enumerated type is implicitly converted to another. drivers/ata/pata_ep93xx.c:662:36: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] drv_data->dma_rx_data.direction = DMA_FROM_DEVICE; ~ ^~~~~~~~~~~~~~~ drivers/ata/pata_ep93xx.c:670:36: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] drv_data->dma_tx_data.direction = DMA_TO_DEVICE; ~ ^~~~~~~~~~~~~ drivers/ata/pata_ep93xx.c:681:19: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] conf.direction = DMA_FROM_DEVICE; ~ ^~~~~~~~~~~~~~~ drivers/ata/pata_ep93xx.c:692:19: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] conf.direction = DMA_TO_DEVICE; ~ ^~~~~~~~~~~~~ Use the equivalent valued enums from the expected type so that Clang no longer warns about a conversion. DMA_TO_DEVICE = DMA_MEM_TO_DEV = 1 DMA_FROM_DEVICE = DMA_DEV_TO_MEM = 2 Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Nathan Chancellor Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- drivers/ata/pata_ep93xx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c index 0a550190955ad..cc6d06c1b2c70 100644 --- a/drivers/ata/pata_ep93xx.c +++ b/drivers/ata/pata_ep93xx.c @@ -659,7 +659,7 @@ static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data) * start of new transfer. */ drv_data->dma_rx_data.port = EP93XX_DMA_IDE; - drv_data->dma_rx_data.direction = DMA_FROM_DEVICE; + drv_data->dma_rx_data.direction = DMA_DEV_TO_MEM; drv_data->dma_rx_data.name = "ep93xx-pata-rx"; drv_data->dma_rx_channel = dma_request_channel(mask, ep93xx_pata_dma_filter, &drv_data->dma_rx_data); @@ -667,7 +667,7 @@ static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data) return; drv_data->dma_tx_data.port = EP93XX_DMA_IDE; - drv_data->dma_tx_data.direction = DMA_TO_DEVICE; + drv_data->dma_tx_data.direction = DMA_MEM_TO_DEV; drv_data->dma_tx_data.name = "ep93xx-pata-tx"; drv_data->dma_tx_channel = dma_request_channel(mask, ep93xx_pata_dma_filter, &drv_data->dma_tx_data); @@ -678,7 +678,7 @@ static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data) /* Configure receive channel direction and source address */ memset(&conf, 0, sizeof(conf)); - conf.direction = DMA_FROM_DEVICE; + conf.direction = DMA_DEV_TO_MEM; conf.src_addr = drv_data->udma_in_phys; conf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; if (dmaengine_slave_config(drv_data->dma_rx_channel, &conf)) { @@ -689,7 +689,7 @@ static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data) /* Configure transmit channel direction and destination address */ memset(&conf, 0, sizeof(conf)); - conf.direction = DMA_TO_DEVICE; + conf.direction = DMA_MEM_TO_DEV; conf.dst_addr = drv_data->udma_out_phys; conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; if (dmaengine_slave_config(drv_data->dma_tx_channel, &conf)) { -- 2.20.1