From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Ivan T. Ivanov" Subject: Re: [PATCH 1/3] usb: phy: msm: cast to unsigned long int Date: Sat, 03 May 2014 09:56:32 +0300 Message-ID: <1399100192.7131.2.camel@violet> References: <1398875916-14461-1-git-send-email-balbi@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1398875916-14461-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org> Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Felipe Balbi Cc: tim.bird-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linux USB Mailing List List-Id: linux-arm-msm@vger.kernel.org On Wed, 2014-04-30 at 11:38 -0500, Felipe Balbi wrote: > this solves the following build warning found when > running compile tests. >=20 > drivers/usb/phy/phy-msm-usb.c: In function =E2=80=98msm_otg_read_dt=E2= =80=99: > 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 =3D (int) id->data; > ^ > Signed-off-by: Felipe Balbi > --- >=20 > all patches are on top of Ivan's 20 patch series. >=20 > drivers/usb/phy/phy-msm-usb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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_devi= ce *pdev, struct msm_otg *motg) > motg->pdata =3D pdata; > =20 > id =3D of_match_device(msm_otg_dt_match, &pdev->dev); > - pdata->phy_type =3D (int) id->data; > + pdata->phy_type =3D (unsigned long int) id->data; Probably cast to enum msm_usb_phy_type will be better. Regards, Ivan > =20 > motg->link_rst =3D devm_reset_control_get(&pdev->dev, "link"); > if (IS_ERR(motg->link_rst)) -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html