Thread (6 messages) 6 messages, 3 authors, 2013-06-13

Re: [PATCH v2 06/11] ARM:stixxxx: Add STiH415 SOC support

From: Srinivas KANDAGATLA <hidden>
Date: 2013-06-11 06:54:42
Also in: linux-arm-kernel, linux-serial, lkml

On 11/06/13 00:19, Russell King - ARM Linux wrote:
On Mon, Jun 10, 2013 at 12:46:59PM +0100, Srinivas KANDAGATLA wrote:
quoted
quoted
quoted
quoted
    +       aux_ctrl = (0x1 << L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT) |
    +               (0x1 << L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT) |
    +               (0x1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) |
    +               (way_size << L2X0_AUX_CTRL_WAY_SIZE_SHIFT);



#include <linux/bitops.h>
Linus Walleij would write use  BIT() here
I will use BIT() macro.
Without checking those fields... BIT() is only appropriate if you're
really talking about single bits.  If you have a field of more than a
single bit which you happen to be setting to '1' then it's not
appropriate to use BIT().
You are right, It does not make sense to use BIT() macro for field which
has more than 1 bit. I think using mix of both BIT() and the old style
will make code look bit confusing to reader, Also no other mach code in
the kernel use BIT while configuring L2 controller. So am going to drop
the idea of using BIT here and leave the code as it is.

Thanks,
srini
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help