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: 23626 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f69.google.com (mail-pb0-f69.google.com [209.85.160.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 88379203BE for ; Thu, 23 Jan 2014 15:08:36 +0000 (UTC) Received: by mail-pb0-f69.google.com with SMTP id md12sf4489571pbc.0 for ; Thu, 23 Jan 2014 07:08:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe:content-type:content-transfer-encoding; bh=9PmOQitOXUbTAasci+fkgXYrz7Jn+g6ogZf/Y0qIuZo=; b=CaRWO2Xt60S43F5GDvCbXBwHZk4rWaKnFuKedZ0vRtCXMwr3fOCAH4WUCHdTBbAEZk 1T69BWKk1F2jNKp5tYDiqH37Wr47ijvDuRl5c2DCSiUjtTdoCRzhIrXRvPlT51vLHKle kCWiJQIsjaFLetnoWtY/P1zkhaiiRBJPsbuYX+tOir9PANF5GE5I7YU6edtez0BfO0h3 4os9qLqcGuazqdDltD6K1fcZ/k3qLZS4MN7CaFK6KR9Tgz6bQnU2DJsZ45Cg84jNo6jR nItxSBN3JYdzjOkLBCNKHi/sCi5091aJarbd1e3LTDG67v1hBzngTNcDJR2ZLMoz1wA/ UrIg== X-Gm-Message-State: ALoCoQmX7jKGCSwgw+ek0h6y1Dxs1MPiFKCITAtY7epoKT8zjvCW/fOHzQSEwc1bOLxL1RXYqxD/ X-Received: by 10.66.189.163 with SMTP id gj3mr3143599pac.32.1390489715834; Thu, 23 Jan 2014 07:08:35 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.88.100 with SMTP id bf4ls357015qeb.1.gmail; Thu, 23 Jan 2014 07:08:35 -0800 (PST) X-Received: by 10.221.66.132 with SMTP id xq4mr168568vcb.57.1390489715649; Thu, 23 Jan 2014 07:08:35 -0800 (PST) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id w5si6811476vcl.66.2014.01.23.07.08.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 Jan 2014 07:08:35 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.169; Received: by mail-ve0-f169.google.com with SMTP id oy12so1183042veb.0 for ; Thu, 23 Jan 2014 07:08:35 -0800 (PST) X-Received: by 10.220.225.71 with SMTP id ir7mr173944vcb.50.1390489715582; Thu, 23 Jan 2014 07:08:35 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp32972vcz; Thu, 23 Jan 2014 07:08:35 -0800 (PST) X-Received: by 10.180.149.175 with SMTP id ub15mr24981213wib.44.1390489714574; Thu, 23 Jan 2014 07:08:34 -0800 (PST) Received: from mail-we0-f179.google.com (mail-we0-f179.google.com [74.125.82.179]) by mx.google.com with ESMTPS id n18si9329089wij.19.2014.01.23.07.08.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 Jan 2014 07:08:34 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.179 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.179; Received: by mail-we0-f179.google.com with SMTP id w62so1272454wes.24 for ; Thu, 23 Jan 2014 07:08:34 -0800 (PST) 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 Cc: linus.walleij@linaro.org, sameo@linux.intel.com, Lee Jones 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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;