Messages in this thread | | | Date | Sun, 29 Jul 2012 21:39:36 +0100 | From | Mark Brown <> | Subject | Re: [PATCH] regulator: core: Fix argument to _notifier_call_chain call |
| |
On Sun, Jul 29, 2012 at 03:53:16PM +0800, Axel Lin wrote: > Pass the address of best_val rather than the value of best_val for the third > argument to _notifier_call_chain(). > > This fixes 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: cast to pointer from integer of different size [-Wint-to-pointer-cast]
No, this isn't a good idea - you're fixing a warning by changing the semantics to be something obscure and not terribly helpful. Just add a cast if your compiler is getting upset.
| |