From patchwork Thu Jan 29 14:51:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda Delgado X-Patchwork-Id: 5742921 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7414CBF440 for ; Thu, 29 Jan 2015 14:53:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9647C2021F for ; Thu, 29 Jan 2015 14:53:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C3F4A2018E for ; Thu, 29 Jan 2015 14:53:38 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YGqRa-0000dX-LL; Thu, 29 Jan 2015 14:51:42 +0000 Received: from mail-lb0-x233.google.com ([2a00:1450:4010:c04::233]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YGqRX-0000ZY-BZ for linux-arm-kernel@lists.infradead.org; Thu, 29 Jan 2015 14:51:40 +0000 Received: by mail-lb0-f179.google.com with SMTP id 10so28828842lbg.10 for ; Thu, 29 Jan 2015 06:51:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=YrC2Nny7YUJKl/XocvxJflhuAgtSFHZlXI1nDVJaq8k=; b=F9I2+zTHcxXuGHP2ls0hvlAW7ATC7pqLuROehDhLTX7YncX+lxxsUx492oh5C7kiE8 VohYL8LPajNxhwz326XeK9qPQAEgaG5Y9SICj2IR1DZfe3b7mhPb4B6XbuoLZTGe5CeE R82cV4DOW4sfAtC235RC0vVQhtXJecQyw2wvgixccto4Of7VT5km/he4YtIpeffWidN5 3JtZDrhPWXbazo0NMZx94io8Dd12ikZWqWbQwn0jyvyN44nFhWr9OdNlb+GElV1FZ7vm fmJtoA4heVqj/gSNmdZb2+PhgDuWu6tcGtxxYUYCUH8NWkiPYaxZu/n/UHVjx0ec6svI s/vQ== X-Received: by 10.112.13.103 with SMTP id g7mr1193455lbc.29.1422543076037; Thu, 29 Jan 2015 06:51:16 -0800 (PST) Received: from neopili.qtec.com (cpe.xe-3-0-1-778.vbrnqe10.dk.customer.tdc.net. [80.197.57.18]) by mx.google.com with ESMTPSA id l4sm683546lbc.16.2015.01.29.06.51.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jan 2015 06:51:15 -0800 (PST) From: Ricardo Ribalda Delgado To: Mark Brown , Michal Simek , =?UTF-8?q?S=C3=B6ren=20Brinkmann?= , linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] spi/xilinx: Cast ioread32/iowrite32 function pointers Date: Thu, 29 Jan 2015 15:51:13 +0100 Message-Id: <1422543073-21895-1-git-send-email-ricardo.ribalda@gmail.com> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150129_065140_228316_DA5648E5 X-CRM114-Status: GOOD ( 10.11 ) X-Spam-Score: -0.8 (/) Cc: Ricardo Ribalda Delgado X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP IO functions prototypes may have different argument qualifiers on different architectures. This patch cast the assignment of the function, to match the one defined at iomap.h. Fixes: 99082eab63449f9d spi/xilinx: Remove iowrite/ioread wrappers Reported-by: kbuild test robot Signed-off-by: Ricardo Ribalda Delgado --- drivers/spi/spi-xilinx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c index 0e8962c..418e730 100644 --- a/drivers/spi/spi-xilinx.c +++ b/drivers/spi/spi-xilinx.c @@ -91,7 +91,7 @@ struct xilinx_spi { u8 bytes_per_word; int buffer_size; /* buffer size in words */ u32 cs_inactive; /* Level of the CS pins when inactive*/ - unsigned int (*read_fn)(void __iomem *); + u32 (*read_fn)(void __iomem *); void (*write_fn)(u32, void __iomem *); }; @@ -378,15 +378,15 @@ static int xilinx_spi_probe(struct platform_device *pdev) * Setup little endian helper functions first and try to use them * and check if bit was correctly setup or not. */ - xspi->read_fn = ioread32; - xspi->write_fn = iowrite32; + xspi->read_fn = (u32 (*)(void __iomem *)) ioread32; + xspi->write_fn = (void (*)(u32, void __iomem *)) iowrite32; xspi->write_fn(XSPI_CR_LOOP, xspi->regs + XSPI_CR_OFFSET); tmp = xspi->read_fn(xspi->regs + XSPI_CR_OFFSET); tmp &= XSPI_CR_LOOP; if (tmp != XSPI_CR_LOOP) { - xspi->read_fn = ioread32be; - xspi->write_fn = iowrite32be; + xspi->read_fn = (u32 (*)(void __iomem *)) ioread32be; + xspi->write_fn = (void (*)(u32, void __iomem *)) iowrite32be; } master->bits_per_word_mask = SPI_BPW_MASK(bits_per_word);