From patchwork Mon May 5 15:30:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 4115621 Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EB3FC9F271 for ; Mon, 5 May 2014 15:30:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 58E1A20211 for ; Mon, 5 May 2014 15:30:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9F129201F5 for ; Mon, 5 May 2014 15:30:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753719AbaEEPao (ORCPT ); Mon, 5 May 2014 11:30:44 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:55564 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752904AbaEEPao (ORCPT ); Mon, 5 May 2014 11:30:44 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s45FUcTo017692; Mon, 5 May 2014 10:30:38 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s45FUbiJ011036; Mon, 5 May 2014 10:30:37 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Mon, 5 May 2014 10:30:37 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s45FUa5g009621; Mon, 5 May 2014 10:30:37 -0500 Date: Mon, 5 May 2014 10:30:33 -0500 From: Felipe Balbi To: Felipe Balbi CC: "Ivan T. Ivanov" , , , Linux USB Mailing List Subject: Re: [PATCH 1/3] usb: phy: msm: cast to unsigned long int Message-ID: <20140505153033.GB17875@saruman.home> Reply-To: References: <1398875916-14461-1-git-send-email-balbi@ti.com> <1399100192.7131.2.camel@violet> <20140505150331.GA17875@saruman.home> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140505150331.GA17875@saruman.home> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, 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 On Mon, May 05, 2014 at 10:03:31AM -0500, Felipe Balbi wrote: > On Sat, May 03, 2014 at 09:56:32AM +0300, Ivan T. Ivanov wrote: > > On Wed, 2014-04-30 at 11:38 -0500, Felipe Balbi wrote: > > > this solves the following build warning found when > > > running compile tests. > > > > > > drivers/usb/phy/phy-msm-usb.c: In function ‘msm_otg_read_dt’: > > > drivers/usb/phy/phy-msm-usb.c:1459:20: warning: cast from pointer \ > > > to integer of different size [-Wpointer-to-int-cast] > > > pdata->phy_type = (int) id->data; > > > ^ > > > Signed-off-by: Felipe Balbi > > > --- > > > > > > all patches are on top of Ivan's 20 patch series. > > > > > > drivers/usb/phy/phy-msm-usb.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c > > > index 9dc7918..c9963c8 100644 > > > --- a/drivers/usb/phy/phy-msm-usb.c > > > +++ b/drivers/usb/phy/phy-msm-usb.c > > > @@ -1456,7 +1456,7 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg) > > > motg->pdata = pdata; > > > > > > id = of_match_device(msm_otg_dt_match, &pdev->dev); > > > - pdata->phy_type = (int) id->data; > > > + pdata->phy_type = (unsigned long int) id->data; > > > > Probably cast to enum msm_usb_phy_type will be better. > > will do. commit fe8ef54c824e5b01192462ef82861e65f57d299c Author: Felipe Balbi Date: Wed Apr 30 11:33:04 2014 -0500 usb: phy: msm: cast to unsigned long int this solves the following build warning found when running compile tests. drivers/usb/phy/phy-msm-usb.c: In function ‘msm_otg_read_dt’: drivers/usb/phy/phy-msm-usb.c:1459:20: warning: cast from pointer \ to integer of different size [-Wpointer-to-int-cast] pdata->phy_type = (int) id->data; ^ Signed-off-by: Felipe Balbi diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c index 9dc7918..591b406 100644 --- a/drivers/usb/phy/phy-msm-usb.c +++ b/drivers/usb/phy/phy-msm-usb.c @@ -1456,7 +1456,7 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg) motg->pdata = pdata; id = of_match_device(msm_otg_dt_match, &pdev->dev); - pdata->phy_type = (int) id->data; + pdata->phy_type = (enum msm_usb_phy_type) id->data; motg->link_rst = devm_reset_control_get(&pdev->dev, "link"); if (IS_ERR(motg->link_rst))