From patchwork Tue Sep 18 18:21:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1474131 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 4AA90DF24C for ; Tue, 18 Sep 2012 18:26:44 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TE2TQ-0007Li-Uw; Tue, 18 Sep 2012 18:24:41 +0000 Received: from mail-vb0-f73.google.com ([209.85.212.73]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TE2TK-0007Jo-N4 for linux-arm-kernel@lists.infradead.org; Tue, 18 Sep 2012 18:24:35 +0000 Received: by vbbfs19 with SMTP id fs19so19180vbb.0 for ; Tue, 18 Sep 2012 11:24:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=s6Vzx+C569XX+KWwRDiHMb52dbmIUtYRuzv+blf0j8Q=; b=G9ESjxeJhJF0OTytdFBrDCp/5hhqy+Y8fjjk7JeKUub1ay24VcVaMtfoO6ePEZ4Iy/ POdhQFuS2OSou91tIOxRe/lLy672zfvV3fsQqR3KwIgoG/gwvYmecIfVrLU7xO9mv/eP 2k21gVuWohlyjEpCs386iEfgi2O8dMd+iPcaUv+WDJ+sa8PRqJjXTPpKg4UUAorkJDIz wYrnoefyXqQARH2tvaGfqR0/G54fy/GDBXrpt8Y7GytOWtx9NlP+T/0j4s6denruKXQ+ sGjaJAoIyPrber9UVkcvtS7/+vTlvoMD9/zhtkS3cEfQYKeSecICBY8Spu8ci8LPOOe9 ZBtg== Received: by 10.236.153.6 with SMTP id e6mr463560yhk.20.1347992673225; Tue, 18 Sep 2012 11:24:33 -0700 (PDT) Received: by 10.236.153.6 with SMTP id e6mr463552yhk.20.1347992673176; Tue, 18 Sep 2012 11:24:33 -0700 (PDT) Received: from wpzn3.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id o6si66184yhn.7.2012.09.18.11.24.33 (version=TLSv1/SSLv3 cipher=AES128-SHA); Tue, 18 Sep 2012 11:24:33 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by wpzn3.hot.corp.google.com (Postfix) with ESMTP id 06C7C100047; Tue, 18 Sep 2012 11:24:33 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id ABA2A161AD2; Tue, 18 Sep 2012 11:24:32 -0700 (PDT) From: Simon Glass To: LKML , linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/7] spi: s3c64xx: Fix enum dma_data_direction warning Date: Tue, 18 Sep 2012 11:21:54 -0700 Message-Id: <1347992519-6904-3-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1347992519-6904-1-git-send-email-sjg@chromium.org> References: <1347992519-6904-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQnURwwzHwtlBTk+Cmmp7J3ADpRX0VqkrvYomxCQe03FXyYj2nZ1kozlQRipU0+zDCbudKPP8RkTCppg6FKMQEmpywBVeNhbxh5tOJ5dhX5PQ6eCp9JCWQtIRGq1metSe4+LK7sndvSK4OZDoO75I3ChV6nwHQjOhnoOtEcdSGr13JFqNXBx5wc6lTgSusOz1gIVwZ7oneCpkVu8FZpspQap2SyjnA== X-Spam-Note: CRM114 invocation failed X-Spam-Score: -3.1 (---) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-3.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.73 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Simon Glass , "kgene.kim" , Ben Dooks , Srinivas KANDAGATLA X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org While the effect is harmless, the SPI driver is actually using the wrong enum and this generates warnings: drivers/spi/spi-s3c64xx.c: In function 's3c64xx_spi_dmacb': drivers/spi/spi-s3c64xx.c:268:21: warning: comparison between 'enum dma_data_direction' and 'enum dma_transfer_direction' [-Wenum-compare] drivers/spi/spi-s3c64xx.c:277:21: warning: comparison between 'enum dma_data_direction' and 'enum dma_transfer_direction' [-Wenum-compare] drivers/spi/spi-s3c64xx.c: In function 'prepare_dma': drivers/spi/spi-s3c64xx.c:296:21: warning: comparison between 'enum dma_data_direction' and 'enum dma_transfer_direction' [-Wenum-compare] Signed-off-by: Simon Glass --- drivers/spi/spi-s3c64xx.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 646a765..3152659 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -260,7 +260,7 @@ static void s3c64xx_spi_dmacb(void *data) struct s3c64xx_spi_dma_data *dma = data; unsigned long flags; - if (dma->direction == DMA_DEV_TO_MEM) + if (dma->direction == DMA_FROM_DEVICE) sdd = container_of(data, struct s3c64xx_spi_driver_data, rx_dma); else @@ -269,7 +269,7 @@ static void s3c64xx_spi_dmacb(void *data) spin_lock_irqsave(&sdd->lock, flags); - if (dma->direction == DMA_DEV_TO_MEM) { + if (dma->direction == DMA_FROM_DEVICE) { sdd->state &= ~RXBUSY; if (!(sdd->state & TXBUSY)) complete(&sdd->xfer_completion); @@ -289,7 +289,7 @@ static void prepare_dma(struct s3c64xx_spi_dma_data *dma, struct samsung_dma_prep info; struct samsung_dma_config config; - if (dma->direction == DMA_DEV_TO_MEM) { + if (dma->direction == DMA_FROM_DEVICE) { sdd = container_of((void *)dma, struct s3c64xx_spi_driver_data, rx_dma); config.direction = sdd->rx_dma.direction;