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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 1 Dec 2017 08:56:01 +0000
From:   Lee Jones <lee.jones@...aro.org>
To:     Pavel Machek <pavel@....cz>
Cc:     Bjorn Andersson <bjorn.andersson@...aro.org>,
        Richard Purdie <rpurdie@...ys.net>,
        Jacek Anaszewski <jacek.anaszewski@...il.com>,
        linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org,
        Linus Walleij <linus.walleij@...aro.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Linux-Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: [PATCH v2] leds: pm8058: Silence pointer to integer size warning

On Fri, 01 Dec 2017, Pavel Machek wrote:

> On Fri 2017-12-01 07:57:15, Lee Jones wrote:
> > On Thu, 30 Nov 2017, Bjorn Andersson wrote:
> > > -	led->ledtype = (u32)of_device_get_match_data(&pdev->dev);
> > > +	led->ledtype = (u32)(unsigned long)of_device_get_match_data(&pdev->dev);
> > 
> > Wouldn't (u32)(void *) be even more correct?
> > 
> > ... if the compiler will let you get away with it.
> 
> Afaict that would still produce the warning. of_device_get_match_data
> already returns void *.

Just tested.  It actually still suffers from the original error.

warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ