From patchwork Thu Jan 23 15:05:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 313630 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0956E2C008F for ; Fri, 24 Jan 2014 02:09:56 +1100 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W6Lu7-00046O-8l; Thu, 23 Jan 2014 15:09:15 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W6Lu2-0003gB-3J; Thu, 23 Jan 2014 15:09:10 +0000 Received: from mail-wg0-f50.google.com ([74.125.82.50]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W6Ltp-0003dO-W2 for linux-arm-kernel@lists.infradead.org; Thu, 23 Jan 2014 15:08:58 +0000 Received: by mail-wg0-f50.google.com with SMTP id l18so1635033wgh.29 for ; Thu, 23 Jan 2014 07:08:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-type:content-transfer-encoding; bh=9PmOQitOXUbTAasci+fkgXYrz7Jn+g6ogZf/Y0qIuZo=; b=ObEzg4XGSP5xEqXRhxxUFSdc6242X7vf9vdYr9gtOQEosBh7sZdKyqkoxePFVedi0u JZbcIyKXLQPZCmkzmY1rGUC0KUbj4E5c65FMPcPp2CA6HIzi413QBRmm5dco+Ky73YnI F822GMIQoGUHyjCNsvt8IrpHOF5PZbAb0A0lX0c8jTks30V+KHnO3hDRCQmd7qJWnGa4 VTfxVWwGReLPUIQ53WIMj9kNsfdOSxbamhM+aBzDXt677beD+DthSWZw1IXtSSDns9bW 7ybQNLnTGS/sV0ciE93SlQGxrcNHkco4hzefXSkhfVFA/e0VuYFoQPbbnYFHvfEJND+m e7iw== X-Gm-Message-State: ALoCoQlu/eeGyDxw35SvYi6CEBJcE6ocE1q4uRbT982Dsby6eljbFN9KVL2Wq08/+pttb6/twREZ X-Received: by 10.180.13.33 with SMTP id e1mr19255852wic.38.1390489714007; Thu, 23 Jan 2014 07:08:34 -0800 (PST) Received: from localhost.localdomain ([80.76.198.141]) by mx.google.com with ESMTPSA id co15sm23021599wjb.12.2014.01.23.07.08.31 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 Jan 2014 07:08:33 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] mfd: max8997: Naturalise cross-architecture discrepancies Date: Thu, 23 Jan 2014 15:05:53 +0000 Message-Id: <1390489556-9434-1-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.3.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140123_100858_166327_1AA0B8B3 X-CRM114-Status: GOOD ( 12.41 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.50 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 2.5 SUSPICIOUS_RECIPS Similar addresses in recipient list -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linus.walleij@linaro.org, Lee Jones , sameo@linux.intel.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org If we compile the MAX8997 for a 64bit architecture we receive the following warnings: drivers/mfd/max8997.c: In function ‘max8997_i2c_get_driver_data’: drivers/mfd/max8997.c:173:10: warning: cast from pointer to integer of different size return (int)match->data; ^ Signed-off-by: Lee Jones --- drivers/mfd/max8997.c | 6 +++--- include/linux/mfd/max8997-private.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c index be88a3b..5adede0 100644 --- a/drivers/mfd/max8997.c +++ b/drivers/mfd/max8997.c @@ -164,15 +164,15 @@ static struct max8997_platform_data *max8997_i2c_parse_dt_pdata( return pd; } -static inline int max8997_i2c_get_driver_data(struct i2c_client *i2c, +static inline unsigned long max8997_i2c_get_driver_data(struct i2c_client *i2c, const struct i2c_device_id *id) { if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) { const struct of_device_id *match; match = of_match_node(max8997_pmic_dt_match, i2c->dev.of_node); - return (int)match->data; + return (unsigned long)match->data; } - return (int)id->driver_data; + return id->driver_data; } static int max8997_i2c_probe(struct i2c_client *i2c, diff --git a/include/linux/mfd/max8997-private.h b/include/linux/mfd/max8997-private.h index ad1ae7f..78c76cd 100644 --- a/include/linux/mfd/max8997-private.h +++ b/include/linux/mfd/max8997-private.h @@ -387,7 +387,7 @@ struct max8997_dev { struct i2c_client *muic; /* slave addr 0x4a */ struct mutex iolock; - int type; + unsigned long type; struct platform_device *battery; /* battery control (not fuel gauge) */ int irq;