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: 5742881 Return-Path: X-Original-To: patchwork-linux-spi@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 4D000BF440 for ; Thu, 29 Jan 2015 14:51:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1FC782017D for ; Thu, 29 Jan 2015 14:51:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3B81C2024F for ; Thu, 29 Jan 2015 14:51:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752162AbbA2OvS (ORCPT ); Thu, 29 Jan 2015 09:51:18 -0500 Received: from mail-lb0-f177.google.com ([209.85.217.177]:51170 "EHLO mail-lb0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752067AbbA2OvR (ORCPT ); Thu, 29 Jan 2015 09:51:17 -0500 Received: by mail-lb0-f177.google.com with SMTP id p9so28872287lbv.8; 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 Cc: Ricardo Ribalda Delgado 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 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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);