All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: Possible  no longer required cast in the function,usbhs_parse_dt in common.c
       [not found] <55079FF2.6060201@gmail.com>
@ 2015-03-17  3:37 ` Peter Chen
       [not found]   ` <5507A4B3.1020704@gmail.com>
  2015-03-17  7:51   ` gregkh
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Chen @ 2015-03-17  3:37 UTC (permalink / raw)
  To: nick, gregkh
  Cc: balbi, ergei.shtylyov, varkab, yoshihiro.shimoda.uh,
	ulrich.hecht, takeshi.kihara.df, linux-usb, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 965 bytes --]

 
> 
> Greetings All,
> I have been getting the below build warnings:
> drivers/usb/renesas_usbhs/common.c: In function ‘usbhs_parse_dt’:
> drivers/usb/renesas_usbhs/common.c:482:25: warning: cast from pointer to
> integer of different size [-Wpointer-to-int-cast]
> dparam->type = of_id ? (u32)of_id->data : 0;
> After looking into the function I am curious if the hardware is only 32 bit as if
> the supported hardware for this driver is then this cast is no longer required
> and I can send in a patch removing it. Furthermore, sorry for the simple
> question but  I don't have access to the device specs for supported hardware
> so I though it would be better to ask before I send in patch fixing this issue.
> Thanks,
> Nick

Patch is welcome, there will be comment if it is not suitable.

Peter
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Possible  no longer required cast in the function,usbhs_parse_dt in common.c
       [not found]   ` <5507A4B3.1020704@gmail.com>
@ 2015-03-17  3:54     ` Felipe Balbi
       [not found]       ` <5507A5EA.8040509@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Felipe Balbi @ 2015-03-17  3:54 UTC (permalink / raw)
  To: nick
  Cc: Peter Chen, gregkh, balbi, ergei.shtylyov, varkab,
	yoshihiro.shimoda.uh, ulrich.hecht, takeshi.kihara.df, linux-usb,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1153 bytes --]

On Mon, Mar 16, 2015 at 11:51:15PM -0400, nick wrote:
> 
> 
> On 2015-03-16 11:37 PM, Peter Chen wrote:
> >  
> >>
> >> Greetings All,
> >> I have been getting the below build warnings:
> >> drivers/usb/renesas_usbhs/common.c: In function ‘usbhs_parse_dt’:
> >> drivers/usb/renesas_usbhs/common.c:482:25: warning: cast from pointer to
> >> integer of different size [-Wpointer-to-int-cast]
> >> dparam->type = of_id ? (u32)of_id->data : 0;
> >> After looking into the function I am curious if the hardware is only 32 bit as if
> >> the supported hardware for this driver is then this cast is no longer required
> >> and I can send in a patch removing it. Furthermore, sorry for the simple
> >> question but  I don't have access to the device specs for supported hardware
> >> so I though it would be better to ask before I send in patch fixing this issue.
> >> Thanks,
> >> Nick
> > 
> > Patch is welcome, there will be comment if it is not suitable.
> > 
> > Peter
> > 
> I understand that,my question was does the hardware for this driver support 64 bit.

regardless, it shouldn't produce a build warning.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Possible  no longer required cast in the function,usbhs_parse_dt in common.c
       [not found]       ` <5507A5EA.8040509@gmail.com>
@ 2015-03-17  4:13         ` Felipe Balbi
       [not found]         ` <5507A941.6010800@gmail.com>
  1 sibling, 0 replies; 5+ messages in thread
From: Felipe Balbi @ 2015-03-17  4:13 UTC (permalink / raw)
  To: nick
  Cc: balbi, Peter Chen, gregkh, ergei.shtylyov, varkab,
	yoshihiro.shimoda.uh, ulrich.hecht, takeshi.kihara.df, linux-usb,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1592 bytes --]

On Mon, Mar 16, 2015 at 11:56:26PM -0400, nick wrote:
> 
> 
> On 2015-03-16 11:54 PM, Felipe Balbi wrote:
> > On Mon, Mar 16, 2015 at 11:51:15PM -0400, nick wrote:
> >>
> >>
> >> On 2015-03-16 11:37 PM, Peter Chen wrote:
> >>>  
> >>>>
> >>>> Greetings All,
> >>>> I have been getting the below build warnings:
> >>>> drivers/usb/renesas_usbhs/common.c: In function ‘usbhs_parse_dt’:
> >>>> drivers/usb/renesas_usbhs/common.c:482:25: warning: cast from pointer to
> >>>> integer of different size [-Wpointer-to-int-cast]
> >>>> dparam->type = of_id ? (u32)of_id->data : 0;
> >>>> After looking into the function I am curious if the hardware is only 32 bit as if
> >>>> the supported hardware for this driver is then this cast is no longer required
> >>>> and I can send in a patch removing it. Furthermore, sorry for the simple
> >>>> question but  I don't have access to the device specs for supported hardware
> >>>> so I though it would be better to ask before I send in patch fixing this issue.
> >>>> Thanks,
> >>>> Nick
> >>>
> >>> Patch is welcome, there will be comment if it is not suitable.
> >>>
> >>> Peter
> >>>
> >> I understand that,my question was does the hardware for this driver support 64 bit.
> > 
> > regardless, it shouldn't produce a build warning.
> > 
> It does for me.

yes, and I'm saying that's wrong. Regardless of the platform supporting
64bit or not, if the driver is allowed to build in 64bit configurations,
there should be no warnings; if there are, they should be fixed and
patches are very welcome.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Possible  no longer required cast in the function,usbhs_parse_dt in common.c
       [not found]         ` <5507A941.6010800@gmail.com>
@ 2015-03-17  4:14           ` Felipe Balbi
  0 siblings, 0 replies; 5+ messages in thread
From: Felipe Balbi @ 2015-03-17  4:14 UTC (permalink / raw)
  To: nick
  Cc: balbi, Peter Chen, gregkh, ergei.shtylyov, varkab,
	yoshihiro.shimoda.uh, ulrich.hecht, takeshi.kihara.df, linux-usb,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1661 bytes --]

On Tue, Mar 17, 2015 at 12:10:41AM -0400, nick wrote:
> 
> 
> On 2015-03-16 11:56 PM, nick wrote:
> > 
> > 
> > On 2015-03-16 11:54 PM, Felipe Balbi wrote:
> >> On Mon, Mar 16, 2015 at 11:51:15PM -0400, nick wrote:
> >>>
> >>>
> >>> On 2015-03-16 11:37 PM, Peter Chen wrote:
> >>>>  
> >>>>>
> >>>>> Greetings All,
> >>>>> I have been getting the below build warnings:
> >>>>> drivers/usb/renesas_usbhs/common.c: In function ‘usbhs_parse_dt’:
> >>>>> drivers/usb/renesas_usbhs/common.c:482:25: warning: cast from pointer to
> >>>>> integer of different size [-Wpointer-to-int-cast]
> >>>>> dparam->type = of_id ? (u32)of_id->data : 0;
> >>>>> After looking into the function I am curious if the hardware is only 32 bit as if
> >>>>> the supported hardware for this driver is then this cast is no longer required
> >>>>> and I can send in a patch removing it. Furthermore, sorry for the simple
> >>>>> question but  I don't have access to the device specs for supported hardware
> >>>>> so I though it would be better to ask before I send in patch fixing this issue.
> >>>>> Thanks,
> >>>>> Nick
> >>>>
> >>>> Patch is welcome, there will be comment if it is not suitable.
> >>>>
> >>>> Peter
> >>>>
> >>> I understand that,my question was does the hardware for this driver support 64 bit.
> >>
> >> regardless, it shouldn't produce a build warning.
> >>
> > It does for me.
> > Nick
> > 
> After looking more closely it seems me are trying to convert a const
> void to a int. Does the data member need to be const as this may be
> causing the issue.

why would const have anything to do with sizes ?

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Possible  no longer required cast in the function,usbhs_parse_dt in common.c
  2015-03-17  3:37 ` Possible no longer required cast in the function,usbhs_parse_dt in common.c Peter Chen
       [not found]   ` <5507A4B3.1020704@gmail.com>
@ 2015-03-17  7:51   ` gregkh
  1 sibling, 0 replies; 5+ messages in thread
From: gregkh @ 2015-03-17  7:51 UTC (permalink / raw)
  To: Peter Chen
  Cc: nick, balbi, ergei.shtylyov, varkab, yoshihiro.shimoda.uh,
	ulrich.hecht, takeshi.kihara.df, linux-usb, linux-kernel

On Tue, Mar 17, 2015 at 03:37:42AM +0000, Peter Chen wrote:
>  
> > 
> > Greetings All,
> > I have been getting the below build warnings:
> > drivers/usb/renesas_usbhs/common.c: In function ‘usbhs_parse_dt’:
> > drivers/usb/renesas_usbhs/common.c:482:25: warning: cast from pointer to
> > integer of different size [-Wpointer-to-int-cast]
> > dparam->type = of_id ? (u32)of_id->data : 0;
> > After looking into the function I am curious if the hardware is only 32 bit as if
> > the supported hardware for this driver is then this cast is no longer required
> > and I can send in a patch removing it. Furthermore, sorry for the simple
> > question but  I don't have access to the device specs for supported hardware
> > so I though it would be better to ask before I send in patch fixing this issue.
> > Thanks,
> > Nick
> 
> Patch is welcome, there will be comment if it is not suitable.

Sorry, but no, a patch is not welcome from Nick.  You all will note that
Nick is banned from vger.kernel.org and I would recommend that everyone
else on the cc: here also add him to their kill-files.  It will make
your life much easier.

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-17  7:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <55079FF2.6060201@gmail.com>
2015-03-17  3:37 ` Possible no longer required cast in the function,usbhs_parse_dt in common.c Peter Chen
     [not found]   ` <5507A4B3.1020704@gmail.com>
2015-03-17  3:54     ` Felipe Balbi
     [not found]       ` <5507A5EA.8040509@gmail.com>
2015-03-17  4:13         ` Felipe Balbi
     [not found]         ` <5507A941.6010800@gmail.com>
2015-03-17  4:14           ` Felipe Balbi
2015-03-17  7:51   ` gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.