lkml.org 
[lkml]   [2017]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] leds: pm8058: Make ledtype pointer sized type
On Thu 30 Nov 16:28 PST 2017, Pavel Machek wrote:

> Hi!
>
> > > > of_device_get_match_data will return PM8058_LED_TYPE_*
> > > > which clearly is a led type identifier.
> > > >
> > > > Thus unsigned long looks reasonable.
> > >
> > > Hmm. Ok. So u32 would actually make even more sense there (because
> > > PM8058_LED_TYPE_* does not really need to be 64-bit), but it would
> > > cause a warning.
> > >
> > > I don't like this. This fix actually makes code waste memory and is
> > > uglier.
> > >
> > > ...but we get a warning fix. So I don't like the patch, but it is an
> > > improvement...
> >
> > I *think* you can get away with (u32)(unsigned long)ptr ...
>
> Yes, that should work. It would actually be my preferred solution.
>

I'm fine with this suggestion, and it silence the warning. I will update
and resend the patch.

Regards,
Bjorn

\
 
 \ /
  Last update: 2017-12-01 08:43    [W:0.164 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site