Re: [PATCH] casts in TLB macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 16, 2005 at 08:06:08PM -0700, Andrew Isaacson wrote:

> Fix three cases where macro arguments are not parenthesized, leading to
> incorrect operator precedence when called with an expression as the
> argument.  This causes incorrect evaluation of
>     write_c0_entrylo0(pte_val(*ptep++) >> 6)
> when pte_t is 64 bits - the pte value is cast to (unsigned int) first,
> then the shift is done, losing the top 32 bits.
> 
> Also, this does not add an extra set of parentheses surrounding the
> (cast)(value) pair, as there's no danger of precedence problems to avoid
> given the high precedence of the cast operator and that this is the
> terminal macro in this macro trail.

Thanks, applied,

  Ralf


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux