Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp13844pja; Fri, 22 Nov 2019 02:49:01 -0800 (PST) X-Google-Smtp-Source: APXvYqyggoVIfxCtaHRqBV+eL6KGk/OpREsJ9/OdWZV+heGFNDaltQaXk0VmBfJXPA+CeHQbwi8z X-Received: by 2002:a50:f058:: with SMTP id u24mr246510edl.288.1574419741332; Fri, 22 Nov 2019 02:49:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574419741; cv=none; d=google.com; s=arc-20160816; b=X1y7vJr2q5hI7MtruwhKkifJt/nJy4vY5cnRebmrQ+c/8VVJUzSPS9IQ/ozRRKID/y cvzKl+qL2oN/dkN8fX2aftSAFM6cs6WmqFRfBInlHA6CTBfrZVVt5X6qSDFjaftyMp1p vpmjaLWEd4u47O6Ai3iwMuyaQSKwKWg/QYzeBr+mrChyYgWR99ZUEbdXcyKS4vkY4Yjh b2QB63f4bWl5L6kGbYYxs6Dekd8Ml9Qwtgw6CDx29+xyM/c8XEsYnNCvu0vAxrvejtKk cxOA6X2Ge0FBqvpDh1hOy3Gu2wv2z8thEYTpR8GtkYlEjbmNAj63T8BghPw6bUOJB7YR Sz2Q== 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=en+yaeiCPlf02l28mnj+hjLhoUpwTMTOW9WVtpOXGgU=; b=C2xJ0/bp266Jq9qMkwzx2NZREr5crbDYXKaQVIQC4MM5ICkQ3qmNT9JStVYnpm59M1 Dild6cjdX9outGvIFcdUxSJp3L/aorfEpcdYOVyfpxgUvKtbWgXwT9eaDJvHOwClFx4n p992+icaA3a4VfCRvqtIKBb8PKcDHlKt0kclZLbb0WlzSJBk9qz2WRI6wnFDHkTt2YyO e7rloDffWzylw3sgSkFBQDWubNvA3ZpjoJ4wwjyfxHeMx6Uboa81+yqkpBqlKxXuWVlI OHKkTHcQmUQDtDm0GWdDRzvAfVkYd+UmYBtRzzPqb7EpDhsJTjvuuVcnbD2Y6WKFd19g LUvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nicBKheN; 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 rl7si3976579ejb.340.2019.11.22.02.48.37; Fri, 22 Nov 2019 02:49:01 -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=nicBKheN; 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 S1729744AbfKVKrN (ORCPT + 99 others); Fri, 22 Nov 2019 05:47:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:54930 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728876AbfKVKrK (ORCPT ); Fri, 22 Nov 2019 05:47:10 -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 3C5372072D; Fri, 22 Nov 2019 10:47:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574419629; bh=l51evxqU8zJCOrGtKLHrLz9etFFXDJe12qIraGCuN0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nicBKheNa4gLazAWllnTzu87dnug6/8faKTSWLeFKx0SgrGTlRZnb4M5Y6BKlBWbU ZzJjeR2qZfA2kbLygygKpAxrz2GoTytX9nW7rdOFJCKcT8tKNa89kgmfLNgZPF5S8A dAxwcbYiWss8JPkZcXQnjZUvv7n1ddLjUu5sdrRU= 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.9 179/222] ata: ep93xx: Use proper enums for directions Date: Fri, 22 Nov 2019 11:28:39 +0100 Message-Id: <20191122100915.325927049@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100830.874290814@linuxfoundation.org> References: <20191122100830.874290814@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 bd6b089c67a3a..634c814cbeda4 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