From patchwork Wed Jan 15 01:42:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: y@samsung.com X-Patchwork-Id: 3489321 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DB97EC02DC for ; Wed, 15 Jan 2014 01:27:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F07A6201BA for ; Wed, 15 Jan 2014 01:27:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B29BF2016C for ; Wed, 15 Jan 2014 01:27:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751953AbaAOB1s (ORCPT ); Tue, 14 Jan 2014 20:27:48 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:32961 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751841AbaAOB1s (ORCPT ); Tue, 14 Jan 2014 20:27:48 -0500 MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MZF00MQP5EA0Q60@mailout4.samsung.com>; Wed, 15 Jan 2014 10:27:46 +0900 (KST) X-AuditID: cbfee61a-b7fb26d00000724f-07-52d5e41223b6 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 67.0F.29263.214E5D25; Wed, 15 Jan 2014 10:27:46 +0900 (KST) Content-transfer-encoding: 8BIT Received: from localhost.localdomain ([12.23.120.139]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MZF002U85E2BPQ0@mmp1.samsung.com>; Wed, 15 Jan 2014 10:27:46 +0900 (KST) From: y@samsung.com To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Pankaj Dubey , Kukjin Kim , Wolfram Sang , linux-i2c@vger.kernel.org Subject: [PATCH v2] drivers: i2c: silence a compile warning in i2c-s3c2410.c Date: Wed, 15 Jan 2014 10:42:42 +0900 Message-id: <1389750162-5765-1-git-send-email-y@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <20140114190910.GE10340@katana> References: <20140114190910.GE10340@katana> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrHLMWRmVeSWpSXmKPExsVy+t9jAV2hJ1eDDHac1bXoXXCVzWLT42us Fh1/vzBazDi/j8li0dYv7BYrT8xidmDz2Lyk3qNvyypGj5OnnrB4fN4kF8ASxWWTkpqTWZZa pG+XwJXx5dFq5oKVfBUnXl5mb2D8w93FyMkhIWAi0XdiAzOELSZx4d56ti5GLg4hgUWMEtub Z4MleAUEJX5MvsfSxcjBwSwgL3HkUjZImFlAXWLSvEXMEPVtTBL3DrYyg9SwCQhLTD2gBVIj IuAtMfnMX3aQGmaBCYwSE/+8YQJJCAv4SLx4fJcNxGYRUJWYtHciG8QuG4lnR5qZQOZICChI zJlkAxLmFNCRmN40gxXEFhLQlpja08UygVFgFpLrZiFcNwvJdQsYmVcxiqYWJBcUJ6XnGuoV J+YWl+al6yXn525iBIfyM6kdjCsbLA4xCnAwKvHw/gi/GiTEmlhWXJl7iFGCg1lJhFe+HijE m5JYWZValB9fVJqTWnyIUZqDRUmc90CrdaCQQHpiSWp2ampBahFMlomDU6qBsadQy8LNLEHW nr1t/xvm+X4rnCZmOMbLts79eWrv3+J/izkj1jpNrzkX+U+hWUh1R3KMs/O5W1s1mHt0lHgb uqu+9dmcClu59Zee6xRuxds2wSG2JhMKZUPTD4vn9wX3BAWeqsifJttSvFV5f7ytulZyW83G qbeiGUpT5q65XjL1kKjM76dKLMUZiYZazEXFiQDjw9hrYQIAAA== Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Pankaj Dubey If used 64 bit compiler GCC warns that: drivers/i2c/busses/i2c-s3c2410.c: In function ‘s3c24xx_get_device_quirks’: drivers/i2c/busses/i2c-s3c2410.c:168:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] This patch fixes this by converting "unsigned int" to "kernel_ulong_t". CC: Kukjin Kim CC: Wolfram Sang CC: linux-i2c@vger.kernel.org Signed-off-by: Pankaj Dubey --- Changes since v1: - using "kernel_ulong_t" instead of "unsigned long" for consistency. - take care of formatting issues as pointed by Wolfram Sang. drivers/i2c/busses/i2c-s3c2410.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index bf8fb94..168de17 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -101,7 +101,7 @@ enum s3c24xx_i2c_state { struct s3c24xx_i2c { wait_queue_head_t wait; - unsigned int quirks; + kernel_ulong_t quirks; unsigned int suspended:1; struct i2c_msg *msg; @@ -160,12 +160,12 @@ MODULE_DEVICE_TABLE(of, s3c24xx_i2c_match); * Get controller type either from device tree or platform device variant. */ -static inline unsigned int s3c24xx_get_device_quirks(struct platform_device *pdev) +static inline kernel_ulong_t s3c24xx_get_device_quirks(struct platform_device *pdev) { if (pdev->dev.of_node) { const struct of_device_id *match; match = of_match_node(s3c24xx_i2c_match, pdev->dev.of_node); - return (unsigned int)match->data; + return (kernel_ulong_t)match->data; } return platform_get_device_id(pdev)->driver_data;