From patchwork Tue Aug 7 08:58:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 1284391 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 59F74DF280 for ; Tue, 7 Aug 2012 08:59:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753292Ab2HGI7L (ORCPT ); Tue, 7 Aug 2012 04:59:11 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:48012 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751546Ab2HGI7K (ORCPT ); Tue, 7 Aug 2012 04:59:10 -0400 Received: from epcpsbgm1.samsung.com (mailout1.samsung.com [203.254.224.24]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M8D005SYNL14I40@mailout1.samsung.com> for linux-media@vger.kernel.org; Tue, 07 Aug 2012 17:58:57 +0900 (KST) X-AuditID: cbfee61a-b7f616d000004b7e-f6-5020d8d1cc18 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 77.EE.19326.1D8D0205; Tue, 07 Aug 2012 17:58:57 +0900 (KST) Received: from amdc248.digital.local ([106.116.147.32]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M8D004FYNLXN810@mmp1.samsung.com> for linux-media@vger.kernel.org; Tue, 07 Aug 2012 17:58:57 +0900 (KST) From: Sylwester Nawrocki To: linux-media@vger.kernel.org Cc: sw0312.kim@samsung.com, Sylwester Nawrocki , Heungjun Kim , Kyungmin Park Subject: [PATCH] m5mols: Fix cast warnings from m5mols_[set/get]_ctrl_mode Date: Tue, 07 Aug 2012 10:58:35 +0200 Message-id: <1344329915-4647-1-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.10 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrFJMWRmVeSWpSXmKPExsVy+t9jAd2LNxQCDGb26Vn0bNjK6sDo8XmT XABjFJdNSmpOZllqkb5dAlfGl6eJBZcEKj5+2szawDiVr4uRk0NCwERi/ZUXbBC2mMSFe+uB bC4OIYFFjBJNRzZAOcuZJP4sn88EUsUmYCjRe7SPEcQWEZCXeNJ7A6yIWWA+o8Spa3tZQRLC Al4S7+6+BbNZBFQl7l3vZgexeQVcJfZ9+sUKsU5e4un9PrYJjNwLGBlWMYqmFiQXFCel5xrq FSfmFpfmpesl5+duYgT78JnUDsaVDRaHGAU4GJV4eCfIKgQIsSaWFVfmHmKU4GBWEuE9vBMo xJuSWFmVWpQfX1Sak1p8iFGag0VJnNfY+6u/kEB6YklqdmpqQWoRTJaJg1OqgXF7jYRs0taD 85Zk+fPG7k5+UiywN2nX1It7a6Xda5tOn01/GJBRrf+/9J7a15hvYfxT7hjdbRPzlYlO2tL0 /ZJM0U7+OV5Tl8m27OgOtD0XNW320fgnrP+Z0hcc87llbTOT8bibsOqW7LLH6+bLv3dznWdy J+6D7/fKWzbC1k+s1AW609RfcCuxFGckGmoxFxUnAgD6YpR+3QEAAA== X-TM-AS-MML: No Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fixes following warnings on 64-bit architectures: m5mols.h: In function 'm5mols_set_ctrl_mode': m5mols.h:326:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] m5mols.h: In function 'm5mols_get_ctrl_mode': m5mols.h:331:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/media/video/m5mols/m5mols_controls.c:466:2: warning: cast from pointer to integer of different size Cc: Heungjun Kim Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park --- drivers/media/video/m5mols/m5mols.h | 4 ++-- drivers/media/video/m5mols/m5mols_controls.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/video/m5mols/m5mols.h b/drivers/media/video/m5mols/m5mols.h index bb58991..527e7b2 100644 --- a/drivers/media/video/m5mols/m5mols.h +++ b/drivers/media/video/m5mols/m5mols.h @@ -323,12 +323,12 @@ static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl) static inline void m5mols_set_ctrl_mode(struct v4l2_ctrl *ctrl, unsigned int mode) { - ctrl->priv = (void *)mode; + ctrl->priv = (void *)(uintptr_t)mode; } static inline unsigned int m5mols_get_ctrl_mode(struct v4l2_ctrl *ctrl) { - return (unsigned int)ctrl->priv; + return (unsigned int)(uintptr_t)ctrl->priv; } #endif /* M5MOLS_H */ diff --git a/drivers/media/video/m5mols/m5mols_controls.c b/drivers/media/video/m5mols/m5mols_controls.c index fdbc205..f34429e 100644 --- a/drivers/media/video/m5mols/m5mols_controls.c +++ b/drivers/media/video/m5mols/m5mols_controls.c @@ -463,8 +463,8 @@ static int m5mols_s_ctrl(struct v4l2_ctrl *ctrl) return 0; } - v4l2_dbg(1, m5mols_debug, sd, "%s: %s, val: %d, priv: %#x\n", - __func__, ctrl->name, ctrl->val, (int)ctrl->priv); + v4l2_dbg(1, m5mols_debug, sd, "%s: %s, val: %d, priv: %p\n", + __func__, ctrl->name, ctrl->val, ctrl->priv); if (ctrl_mode && ctrl_mode != info->mode) { ret = m5mols_set_mode(info, ctrl_mode);