Re: [tip:perf/core] bitops: Provide compile timeHWEIGHT{8,16,32,64}

From: Linus Torvalds
Date: Fri Jan 29 2010 - 11:26:03 EST




On Fri, 29 Jan 2010, Peter Zijlstra wrote:
>
> *sigh* and here I though it being placed right next to hweight_long()
> which uses the arch hweightN() would be clue enough.

No. People who add new uses may be copying old uses, without looking at
the definition.

Also, people who _change_ uses may be changing a value that used to be a
constant into a variable when something is made more dynamic. At which
point it really makes sense to have a function that requires a constant to
_check_ that it gets a constant.

> If people are so clueless, who says they'll read a comment.. but sure I
> guess I can add one.

The comment nobody cares about. But surprisingly crap code generation?
That's bad.

> Subject: bitops: Dummyify the compile-time hweight versions
>
> Because it seems allowed to not think and write kernel code.

I would suggest you look in the mirror at some point.

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