From: "Andrew Isaacson" <adi@broadcom.com>
To: "Ralf Baechle" <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH] casts in TLB macros
Date: Wed, 17 Aug 2005 09:30:02 -0700 [thread overview]
Message-ID: <20050817163002.GO24444@broadcom.com> (raw)
In-Reply-To: <20050817100830.GA2667@linux-mips.org>
On Wed, Aug 17, 2005 at 11:08:30AM +0100, Ralf Baechle wrote:
> 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,
Thank *you* for being smarter than me about the parenthesis...
(The patch I sent out was lacking the outer parens, and I used the
following plan for world domination:
1. notice problem, cut patch
2. go to dinner
3. test compile something unrelated by accident
4. send patch to mailing list
5. profit!)
-andy
next prev parent reply other threads:[~2005-08-17 16:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-17 3:06 [PATCH] casts in TLB macros Andrew Isaacson
2005-08-17 10:02 ` Maciej W. Rozycki
2005-08-17 10:08 ` Ralf Baechle
2005-08-17 16:30 ` Andrew Isaacson [this message]
2005-08-17 16:44 ` Ralf Baechle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050817163002.GO24444@broadcom.com \
--to=adi@broadcom.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.