From: Felipe Balbi Subject: Re: [PATCH 1/3] usb: phy: msm: cast to unsigned long int Date: Mon, 5 May 2014 10:30:33 -0500 Message-ID: <20140505153033.GB17875@saruman.home> References: <1398875916-14461-1-git-send-email-balbi@ti.com> <1399100192.7131.2.camel@violet> <20140505150331.GA17875@saruman.home> Reply-To: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kXdP64Ggrk/fb43R" Return-path: 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 Content-Disposition: inline In-Reply-To: <20140505150331.GA17875@saruman.home> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Felipe Balbi Cc: "Ivan T. Ivanov" , tim.bird@sonymobile.com, linux-arm-msm@vger.kernel.org, Linux USB Mailing List --kXdP64Ggrk/fb43R Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. > > >=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; > >=20 > > Probably cast to enum msm_usb_phy_type will be better. >=20 > will do. commit fe8ef54c824e5b01192462ef82861e65f57d299c Author: Felipe Balbi Date: Wed Apr 30 11:33:04 2014 -0500 usb: phy: msm: cast to unsigned long int =20 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 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 *pd= ev, 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 (enum msm_usb_phy_type) id->data; =20 motg->link_rst =3D devm_reset_control_get(&pdev->dev, "link"); if (IS_ERR(motg->link_rst)) --=20 balbi --kXdP64Ggrk/fb43R Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJTZ66YAAoJEIaOsuA1yqREvT4P/0RVs7D7i6BtH6c9uZKze06d DreLrtR+LagfT5HtoTxiXliWo44mmR8wX+fncKjjo8pWs7Lz7/ldph9v7PvUyDka V/8BzsfyY2m3NDMqCCY9a6Fq3rskAUZZTG+oaT+mLRU19g46/1Ch6zX/T0fjh/Rw vrVQv3UIPkM5hiFEjMxDvAADIYyyqGNh9iyVC8U1wQUWWLL1EHphGv/oPXl4BiYU vhgQ+P8kdKPhuh0KFwK/xRzQQ5R8g+5XunzR6VR/sDF63FITtDYfwEMqcelPxmwI xPWBUjsZLErepFVMyA/HZ5xA9IVmHxAPWwksTQ9SBgTgFgWN/FjaImxPsnCtbKar Z3pE9ZS03HJxIonWnLUy8Btks+KZ0BUk94bBBTnLmJbVJvvITFvupE3WwKbWOGue HiTyiKmYoH9NTHHeK+EWILO/AEk6WR7D7dL3kNqbVndTh9C4+cbN3SaPk4YfKbxc MKkcSgTZq4nKjxHXG1CktqHcuwYMLOfjfIg4LcQbJ90sgSMvliM0fTp9LjyFAWZw Mlm/dLEkJf16UF7z4XuGJ9tMmd5vMAEWeuGA5Hk1AUSzosVYcThXBEvBafp9v4is JMIo+5v0A6hW82Vlx/YzPmhLIhCOkUPUYr94+w9QzihVYyOYC08NViA67TIvPzJZ nX2pfXVTs1SRxpIjXfsc =QKFW -----END PGP SIGNATURE----- --kXdP64Ggrk/fb43R--