From patchwork Thu Jan 31 10:12:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 2071891 Return-Path: X-Original-To: patchwork-spi-devel-general@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by patchwork2.kernel.org (Postfix) with ESMTP id 978BEDF2E5 for ; Thu, 31 Jan 2013 10:13:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1U0r8m-0004im-BI; Thu, 31 Jan 2013 10:13:08 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1U0r8k-0004if-N9 for spi-devel-general@lists.sourceforge.net; Thu, 31 Jan 2013 10:13:06 +0000 Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of free-electrons.com designates 94.23.35.102 as permitted sender) client-ip=94.23.35.102; envelope-from=maxime.ripard@free-electrons.com; helo=mail.free-electrons.com; Received: from mail.free-electrons.com ([94.23.35.102]) by sog-mx-3.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1U0r8j-0004wJ-Ug for spi-devel-general@lists.sourceforge.net; Thu, 31 Jan 2013 10:13:06 +0000 Received: by mail.free-electrons.com (Postfix, from userid 106) id 0153C3BA9; Thu, 31 Jan 2013 11:13:00 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.3.2 Received: from localhost (col31-4-88-188-83-94.fbx.proxad.net [88.188.83.94]) by mail.free-electrons.com (Postfix) with ESMTPSA id A0F303B7E; Thu, 31 Jan 2013 11:13:00 +0100 (CET) From: Maxime Ripard To: Mark Brown Subject: [PATCH] spi: spi-gpio: fix compilation warning on 64 bits systems Date: Thu, 31 Jan 2013 11:12:56 +0100 Message-Id: <1359627176-22706-1-git-send-email-maxime.ripard@free-electrons.com> X-Mailer: git-send-email 1.7.10.4 X-Spam-Score: -1.6 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.1 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-Headers-End: 1U0r8j-0004wJ-Ug Cc: spi-devel-general@lists.sourceforge.net, linux-kernel@vger.kernel.org, Brian Lilly X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: spi-devel-general-bounces@lists.sourceforge.net SPI_GPIO_NO_MOSI and SPI_GPIO_NO_MISO flags are type casted to unsigned long, yet, they are to be stored in an unsigned int field in the spi_gpio_platform_data structure. This leads to the following warning during compilation on 64 bits systems: warning: large integer implicitly truncated to unsigned type [-Woverflow] Signed-off-by: Maxime Ripard Reported-by: Fengguang Wu --- include/linux/spi/spi_gpio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/spi/spi_gpio.h b/include/linux/spi/spi_gpio.h index 369b3d7..1634ce3 100644 --- a/include/linux/spi/spi_gpio.h +++ b/include/linux/spi/spi_gpio.h @@ -62,8 +62,8 @@ */ struct spi_gpio_platform_data { unsigned sck; - unsigned mosi; - unsigned miso; + unsigned long mosi; + unsigned long miso; u16 num_chipselect; };