Messages in this thread | | | Date | Mon, 6 Aug 2012 15:31:16 +0100 | From | Mark Brown <> | Subject | Re: [PATCH] regulator: core: Add intermediate cast to uintptr_t before casting to pointer |
| |
On Mon, Aug 06, 2012 at 12:10:33AM +0800, Axel Lin wrote:
> Either is ok to me. > But the double case looks better to me because the intention is clear. > It seems uintptr_t is less commonly used in drivers code. > Maybe just use (void *)(unsigned long)best_val is better in readability.
Two casts just looks terrible to me to be honest, it'll set off alarm bells any time I glance at the code just from the visual pattern.
| |