lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 30 Nov 2017 21:10:52 -0800
From:   Bjorn Andersson <bjorn.andersson@...aro.org>
To:     Pavel Machek <pavel@....cz>
Cc:     Stephen Rothwell <sfr@...b.auug.org.au>,
        Jacek Anaszewski <jacek.anaszewski@...il.com>,
        Richard Purdie <rpurdie@...ys.net>, linux-leds@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Linus Walleij <linus.walleij@...aro.org>,
        Lee Jones <lee.jones@...aro.org>,
        Linux-Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: [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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ