[RFC PATCH 01/11] dma: amba-pl08x: Use bitmap to pass variant specific quirks

Linus Walleij linus.walleij at linaro.org
Tue Jun 18 03:47:24 EDT 2013


On Mon, Jun 17, 2013 at 8:56 PM, Tomasz Figa <tomasz.figa at gmail.com> wrote:
> On Monday 17 of June 2013 19:48:56 Russell King - ARM Linux wrote:
>> On Sun, Jun 16, 2013 at 10:54:08PM +0200, Tomasz Figa wrote:
>> > Instead of defining new bool field in vendor_data struct for each
>> > quirk, it is more reasonable to use a single flags field and make
>> > each quirk use single bits.
>>
>> Please explain why this is better over the existing system, and why it
>> is not just churn for code modification's sake.
>
> It isn't anything important. I just thought that this is a better solution
> to store more than just two flags. Initially I had more of them added in
> further patches, but final version ended with just one, so this can be
> dropped.

I thought about it yesterday and it basically looks to me that
it tries to outsmart the compiler on how to stuff the flags to save
struct space on the heap and hint that they can be determined
quickly by a & operation, this is like premature optimization.

So please go back to the old system.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list