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]
Message-ID: <1343701316.7557.1.camel@phoenix>
Date:	Tue, 31 Jul 2012 10:21:56 +0800
From:	Axel Lin <axel.lin@...il.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	Liam Girdwood <lrg@...com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] regulator: core: Add intermediate cast to uintptr_t
 before casting to pointer

於 一,2012-07-30 於 16:33 +0100,Mark Brown 提到:
> On Mon, Jul 30, 2012 at 07:47:13AM +0800, Axel Lin wrote:
> 
> >  		_notifier_call_chain(rdev, REGULATOR_EVENT_VOLTAGE_CHANGE,
> > -				     (void *)best_val);
> > +				     (void *)(uintptr_t)best_val);
> 
> This also looks problematic, you should never need to cast a pointer to
> or from void.

If I remove the cast to (void *), I got below build warning:

  CC      drivers/regulator/core.o
drivers/regulator/core.c: In function '_regulator_do_set_voltage':
drivers/regulator/core.c:2183:10: warning: passing argument 3 of
'_notifier_call_chain' makes pointer from integer without a cast
[enabled by default]
drivers/regulator/core.c:94:13: note: expected 'void *' but argument is
of type 'long unsigned int'

( Sorry, I forgot to reply-all so I send the mail again )
Axel

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ