From patchwork Thu Aug 24 07:49:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 110874 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp5286351qge; Thu, 24 Aug 2017 00:49:16 -0700 (PDT) X-Received: by 10.98.163.72 with SMTP id s69mr5511295pfe.234.1503560956301; Thu, 24 Aug 2017 00:49:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503560956; cv=none; d=google.com; s=arc-20160816; b=uMxNSCz6ROOegVMU3I5idhFUsqIV0t8L0fsGAoC4Q57X5RgYhJ5SLQcIuXT3HiA9Ci s17fukgaT2o9RqnRj+9u/jOqjo5o5JZO+TwMG4NVp7i5hj/5kuIPiBhbLbT5jNrAOHrt psw7ZPHj1xAWGpQq/eJTFcKP9BocxU4P18XhOgWMDxUkiawFfd8/dxGhIWkvym9lB192 PoLKERrjhwX/+cGP9Ov8CNIVdY2BTZUSFFGXO2D9nKS/fNp0xYTy9XqlUQGhMS7MhRMu Y2Ojnkd2+5W4Jv2PVlMy7Xpn5z+lvxuye8H+QnszBsOSFORUFyw8oRjACgbwXu6oM8+b /XkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature:arc-authentication-results; bh=yw9J0TXrxUnBf5C5hDy5xo1F9zrQcxGGRnnMnB9/S3Y=; b=fGSmxt+M91jJn9So/tnRH8qOsO0zAaWOBOyai3NDGmZGMPUqikbaahkZ9Wctj+C5vQ MWilrcvNGlfImHyEHbXrlC9pMMpQr61097dSTGYHkg43/b7IREvijxErlwJCMhIjt+SP JP5LRCY0Vb3taL3U2G/5cXJtnev45h+uLfQXdLT8YMRs573zzq4Bvpz3MP4+mnVxnyKy Ino6TY+IBJi4UUfE4RmCbbpte0oeyx38UoQRyn8XwAS2Nb/2/yVHDCDQFAn3e92c+BqI vZBl600z/hi9os1j3lQv2xeooYijMpppi2Ud0aLYRUtOsZCi9eIjpo8ecUmFRAGFBVSx 6S1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=hhj81Efi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si2371986pgb.188.2017.08.24.00.49.16; Thu, 24 Aug 2017 00:49:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=hhj81Efi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751353AbdHXHtN (ORCPT + 26 others); Thu, 24 Aug 2017 03:49:13 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:62759 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751135AbdHXHtL (ORCPT ); Thu, 24 Aug 2017 03:49:11 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id v7O7nBjp003178; Thu, 24 Aug 2017 02:49:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1503560951; bh=v1UDA05FP7pKf5MaVCdiDVWrd6VcRgNsWkqKpi7zqAc=; h=From:To:CC:Subject:Date; b=hhj81EfiDoi4bV0lCxiGC/F6gL+y1GqiyAabQvrE/MYw3aiUwcfiff1EPskXW8oZ8 xoLRrCqG6a2r3OgXrX7gwC8hwH8mVfW4gRnBsp5z1BlNHmXooNvjeH8yaz7afvC9kp oZcDX0FejkepjJ1tv63npNedXOWenNMLU64XpVB0= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v7O7nBgi023151; Thu, 24 Aug 2017 02:49:11 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Thu, 24 Aug 2017 02:49:10 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Thu, 24 Aug 2017 02:49:10 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v7O7n9iL020850; Thu, 24 Aug 2017 02:49:09 -0500 From: Kishon Vijay Abraham I To: CC: , Subject: [PATCH] phy: ralink: fix 64-bit build warning Date: Thu, 24 Aug 2017 13:19:08 +0530 Message-ID: <20170824074908.10719-1-kishon@ti.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann Casting between an 'int' and a pointer causes a warning on 64-bit architectures in compile-testing this driver: drivers/phy/ralink/phy-ralink-usb.c: In function 'ralink_usb_phy_probe': drivers/phy/ralink/phy-ralink-usb.c:195:13: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] This changes the code to cast to uintptr_t instead. This is guaranteed to do what we want on all architectures and avoids the warning. Fixes: 2411a736ff09 ("phy: ralink-usb: add driver for Mediatek/Ralink") Acked-by: John Crispin Tested-by Harvey Hunt Reviewed-by Harvey Hunt Signed-off-by: Arnd Bergmann Signed-off-by: Kishon Vijay Abraham I --- drivers/phy/ralink/phy-ralink-usb.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) -- 2.11.0 diff --git a/drivers/phy/ralink/phy-ralink-usb.c b/drivers/phy/ralink/phy-ralink-usb.c index d19088c0ce5c..4fea31f8ac1c 100644 --- a/drivers/phy/ralink/phy-ralink-usb.c +++ b/drivers/phy/ralink/phy-ralink-usb.c @@ -160,18 +160,18 @@ static struct phy_ops ralink_usb_phy_ops = { static const struct of_device_id ralink_usb_phy_of_match[] = { { .compatible = "ralink,rt3352-usbphy", - .data = (void *) (RT_CLKCFG1_UPHY1_CLK_EN | - RT_CLKCFG1_UPHY0_CLK_EN) + .data = (void *)(uintptr_t)(RT_CLKCFG1_UPHY1_CLK_EN | + RT_CLKCFG1_UPHY0_CLK_EN) }, { .compatible = "mediatek,mt7620-usbphy", - .data = (void *) (MT7620_CLKCFG1_UPHY1_CLK_EN | - MT7620_CLKCFG1_UPHY0_CLK_EN) + .data = (void *)(uintptr_t)(MT7620_CLKCFG1_UPHY1_CLK_EN | + MT7620_CLKCFG1_UPHY0_CLK_EN) }, { .compatible = "mediatek,mt7628-usbphy", - .data = (void *) (MT7620_CLKCFG1_UPHY1_CLK_EN | - MT7620_CLKCFG1_UPHY0_CLK_EN) }, + .data = (void *)(uintptr_t)(MT7620_CLKCFG1_UPHY1_CLK_EN | + MT7620_CLKCFG1_UPHY0_CLK_EN) }, { }, }; MODULE_DEVICE_TABLE(of, ralink_usb_phy_of_match); @@ -192,7 +192,7 @@ static int ralink_usb_phy_probe(struct platform_device *pdev) if (!phy) return -ENOMEM; - phy->clk = (u32) match->data; + phy->clk = (uintptr_t)match->data; phy->base = NULL; phy->sysctl = syscon_regmap_lookup_by_phandle(dev->of_node, "ralink,sysctl");