From: Randolph Chung <randolph@tausq.org>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: kyle@mcmartin.ca, linux-parisc@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] misplaced parenthesis?
Date: Sat, 16 May 2009 12:14:13 +0800 [thread overview]
Message-ID: <4A0E3D95.5090404@tausq.org> (raw)
In-Reply-To: <4A0DC131.8020606@gmail.com>
This is a bit confusingly written, but your patch does not appear to be
correct.
== has higher precedence than &, so you are basically changing it to:
if (likely(t1 & 1))
it really should be
- if (likely(t1 & (sizeof(unsigned int)-1)) == 0) {
+ if (likely((t1 & (sizeof(unsigned int)-1)) == 0)) {
randolph
Roel Kluin wrote:
> Fix misplaced parenthesis.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> I think this is what was intended? Note that this patch may affect
> profiling.
>
> diff --git a/arch/parisc/lib/memcpy.c b/arch/parisc/lib/memcpy.c
> index bbda909..30207b0 100644
> --- a/arch/parisc/lib/memcpy.c
> +++ b/arch/parisc/lib/memcpy.c
> @@ -405,7 +405,7 @@ byte_copy:
>
> unaligned_copy:
> /* possibly we are aligned on a word, but not on a double... */
> - if (likely(t1 & (sizeof(unsigned int)-1)) == 0) {
> + if (likely(t1 & (sizeof(unsigned int)-1) == 0)) {
> t2 = src & (sizeof(unsigned int) - 1);
>
> if (unlikely(t2 != 0)) {
> --
> To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2009-05-16 4:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-15 19:23 [PATCH] misplaced parenthesis? Roel Kluin
2009-05-16 4:14 ` Randolph Chung [this message]
2009-05-16 5:48 ` Matt Turner
2009-05-18 1:42 ` Randolph Chung
2009-06-23 14:53 ` Randolph Chung
2009-06-25 20:29 ` Andrew Morton
2009-06-26 1:38 ` Randolph Chung
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=4A0E3D95.5090404@tausq.org \
--to=randolph@tausq.org \
--cc=akpm@linux-foundation.org \
--cc=kyle@mcmartin.ca \
--cc=linux-parisc@vger.kernel.org \
--cc=roel.kluin@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox