linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [PATCH] [POWERPC] Invalid semicolon after if statement
Date: Thu, 16 Aug 2007 09:22:05 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.62.0708160920010.6037@pademelon.sonytel.be> (raw)
In-Reply-To: <Pine.LNX.4.64.0708151644090.15670@kivilampi-30.cs.helsinki.fi>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 1810 bytes --]

On Thu, 16 Aug 2007, [ISO-8859-1] Ilpo Järvinen wrote:
> A similar fix to netfilter from Eric Dumazet inspired me to
> look around a bit by using some grep/sed stuff as looking for
> this kind of bugs seemed easy to automate. This is one of them
> I found where it looks like this semicolon is not valid.
> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
> ---
> 
> ...Since I'm not familiar with these parts of the kernel, you might know 
> better than I do if this is stuff is valid...
> 
>  arch/powerpc/mm/hash_utils_64.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
> index f178957..a47151e 100644
> --- a/arch/powerpc/mm/hash_utils_64.c
> +++ b/arch/powerpc/mm/hash_utils_64.c
> @@ -795,7 +795,7 @@ void hash_preload(struct mm_struct *mm, unsigned long ea,
>  
>  #ifdef CONFIG_PPC_MM_SLICES
>  	/* We only prefault standard pages for now */
> -	if (unlikely(get_slice_psize(mm, ea) != mm->context.user_psize));
> +	if (unlikely(get_slice_psize(mm, ea) != mm->context.user_psize))
>  		return;
>  #endif

Interestingly the test has `unlikely'. So the bug showed up in the `likely'
case...

With kind regards,
 
Geert Uytterhoeven
Software Architect

Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
 
Phone:    +32 (0)2 700 8453	
Fax:      +32 (0)2 700 8622	
E-mail:   Geert.Uytterhoeven@sonycom.com	
Internet: http://www.sony-europe.com/
 	
Sony Network and Software Technology Center Europe	
A division of Sony Service Centre (Europe) N.V.	
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium	
VAT BE 0413.825.160 · RPR Brussels	
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619

  reply	other threads:[~2007-08-16  7:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-15 22:03 [PATCH] [POWERPC] Invalid semicolon after if statement Ilpo Järvinen
2007-08-16  7:22 ` Geert Uytterhoeven [this message]
2007-08-16  8:08 ` Michael Ellerman
2007-08-16 14:03   ` Segher Boessenkool
2007-08-16 16:40     ` Andreas Schwab
2007-08-16 23:08       ` Michael Ellerman

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=Pine.LNX.4.62.0708160920010.6037@pademelon.sonytel.be \
    --to=geert.uytterhoeven@sonycom.com \
    --cc=ilpo.jarvinen@helsinki.fi \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).