From patchwork Fri Aug 1 16:44:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 34733 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 67C2B20540 for ; Fri, 1 Aug 2014 17:23:45 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id rl12sf22048310iec.1 for ; Fri, 01 Aug 2014 10:23:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:date :message-id:subject:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=nxSAHu54n4cj+4MVqdxI2FvNtWEnHz3JsfwFmloBq7M=; b=KsIjvmh7sQnvNqPEJuj6ymon3hRyLNZamgD1ZDBd2rh6+9VhK7xkpItfk9PbBbiaZL 3m92C6gSWbDstHuMXAxxeMu0qMxHLAVSF93SP/woD8kLpzieazHG607eHwnIhwfOl2rp kRnfmk7WeslaJszns/81ixtpEBgefNjZTy4ohkI23WqCT78ZI51cLhLNc95Z5afWpQM2 9/C5nKf6DR+t3vRKKpwGg31Yc2c7r7naJTtT6ejsCwZsJmEtmpp0f40EoUMdvGP/hbMN DpuC64sOqjEnVs18hz7iWcyaeheXxnQ0PBNuqEk5SWbfsJerhYmYK+vlATwQZ1JnKocd nF8w== X-Gm-Message-State: ALoCoQlaROTNcpZMQd3wrW4h8iPGBSLNp4n0+5m5U7GDNyaU8Z2KKW1dkuYBtw4ApROF8Y7zBJ6f X-Received: by 10.50.126.37 with SMTP id mv5mr2571856igb.7.1406913825003; Fri, 01 Aug 2014 10:23:45 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.93.198 with SMTP id d64ls1509893qge.30.gmail; Fri, 01 Aug 2014 10:23:44 -0700 (PDT) X-Received: by 10.220.59.65 with SMTP id k1mr8105664vch.22.1406913824910; Fri, 01 Aug 2014 10:23:44 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id d7si7919193vcy.33.2014.08.01.10.23.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 01 Aug 2014 10:23:44 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id hy4so7014720vcb.36 for ; Fri, 01 Aug 2014 10:23:44 -0700 (PDT) X-Received: by 10.220.15.8 with SMTP id i8mr8121385vca.45.1406913824837; Fri, 01 Aug 2014 10:23:44 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp126963vcb; Fri, 1 Aug 2014 10:23:44 -0700 (PDT) X-Received: by 10.70.138.75 with SMTP id qo11mr8020959pdb.40.1406913823999; Fri, 01 Aug 2014 10:23:43 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zg10si10513157pac.107.2014.08.01.10.23.43 for ; Fri, 01 Aug 2014 10:23:43 -0700 (PDT) Received-SPF: none (google.com: linux-spi-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754865AbaHARXn (ORCPT + 2 others); Fri, 1 Aug 2014 13:23:43 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:39958 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750851AbaHARXn (ORCPT ); Fri, 1 Aug 2014 13:23:43 -0400 Received: from 94.197.121.167.threembb.co.uk ([94.197.121.167] helo=finisterre) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XDGYK-0006gZ-JC; Fri, 01 Aug 2014 17:23:41 +0000 Received: from broonie by finisterre with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1XDFwJ-0003DA-J8; Fri, 01 Aug 2014 17:44:19 +0100 From: Mark Brown To: Nicolas Ferre Cc: linux-spi@vger.kernel.org, linaro-kernel@lists.linaro.org, Mark Brown Date: Fri, 1 Aug 2014 17:44:18 +0100 Message-Id: <1406911458-12311-1-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 2.0.0 X-SA-Exim-Connect-IP: 94.197.121.167 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mezzanine.sirena.org.uk X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, TVD_RCVD_IP autolearn=ham version=3.3.2 Subject: [PATCH] spi/ateml: Fix pointer to int conversion warnings on 64 bit builds X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-spi-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: broonie@kernel.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Mark Brown On 64 bit systems integers are generally still 32 bit but long values and pointers are usually 64 bit. GCC warns when casting a 64 bit pointer into a 32 bit integer so cast to a long instead in order to avoid warnings. Signed-off-by: Mark Brown --- drivers/spi/spi-atmel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index 1fb90dd..113c83f 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@ -1012,7 +1012,7 @@ static int atmel_spi_setup(struct spi_device *spi) csr |= SPI_BF(DLYBCT, 0); /* chipselect must have been muxed as GPIO (e.g. in board setup) */ - npcs_pin = (unsigned int)spi->controller_data; + npcs_pin = (unsigned long)spi->controller_data; if (gpio_is_valid(spi->cs_gpio)) npcs_pin = spi->cs_gpio; @@ -1247,7 +1247,7 @@ msg_done: static void atmel_spi_cleanup(struct spi_device *spi) { struct atmel_spi_device *asd = spi->controller_state; - unsigned gpio = (unsigned) spi->controller_data; + unsigned gpio = (unsigned long) spi->controller_data; if (!asd) return;