[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120806143115.GL16861@opensource.wolfsonmicro.com>
Date: Mon, 6 Aug 2012 15:31:16 +0100
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Axel Lin <axel.lin@...il.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
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.
--
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