All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Subject: [PATCH v2] [POWERPC] mpic: fix ambiguous else statement
Date: Fri, 23 May 2008 22:40:00 +0400	[thread overview]
Message-ID: <20080523184000.GA354@polina.dev.rtsoft.ru> (raw)
In-Reply-To: <6C9CC80B-8422-4612-BDFF-22DC245F2179@kernel.crashing.org>

This patch fixes following warning introduced by
commit 475ca391b490a683d66bf19999a8a7a24913f139 (mpic: Deal with bogus NIRQ
in Feature Reporting Register):

  CC      arch/powerpc/sysdev/mpic.o
arch/powerpc/sysdev/mpic.c: In function 'mpic_alloc':
arch/powerpc/sysdev/mpic.c:1146: warning: suggest explicit braces to avoid ambiguous 'else'

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
---

On Fri, May 23, 2008 at 12:56:08PM -0500, Kumar Gala wrote:
>
> On May 23, 2008, at 9:15 AM, Anton Vorontsov wrote:
>
>> This patch fixes following warning introduced by
>> commit 475ca391b490a683d66bf19999a8a7a24913f139 (mpic: Deal with bogus 
>> NIRQ
>> in Feature Reporting Register):
>>
>>  CC      arch/powerpc/sysdev/mpic.o
>> arch/powerpc/sysdev/mpic.c: In function ‘mpic_alloc’:
>> arch/powerpc/sysdev/mpic.c:1146: warning: suggest explicit braces to  
>> avoid ambiguous ‘else’
>>
>> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
>
> Acked-by: Kumar Gala <galak@kernel.crashing.org>
>
> as pointed at to me if you set LANG=C in your environment gcc will stop 
> spitting out the funny chars.

Ok, resending with Ack and non-unicode gcc warning. Also Cc'ing Paul
(forgot last time).

 arch/powerpc/sysdev/mpic.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index f99f81a..a281341 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1143,13 +1143,14 @@ struct mpic * __init mpic_alloc(struct device_node *node,
 	greg_feature = mpic_read(mpic->gregs, MPIC_INFO(GREG_FEATURE_0));
 	mpic->num_cpus = ((greg_feature & MPIC_GREG_FEATURE_LAST_CPU_MASK)
 			  >> MPIC_GREG_FEATURE_LAST_CPU_SHIFT) + 1;
-	if (isu_size == 0)
+	if (isu_size == 0) {
 		if (flags & MPIC_BROKEN_FRR_NIRQS)
 			mpic->num_sources = mpic->irq_count;
 		else
 			mpic->num_sources =
 				((greg_feature & MPIC_GREG_FEATURE_LAST_SRC_MASK)
 				 >> MPIC_GREG_FEATURE_LAST_SRC_SHIFT) + 1;
+	}
 
 	/* Map the per-CPU registers */
 	for (i = 0; i < mpic->num_cpus; i++) {
-- 
1.5.5.1

      reply	other threads:[~2008-05-23 18:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-23 14:15 [PATCH] [POWERPC] mpic: fix ambiguous else statement Anton Vorontsov
2008-05-23 17:56 ` Kumar Gala
2008-05-23 18:40   ` Anton Vorontsov [this message]

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=20080523184000.GA354@polina.dev.rtsoft.ru \
    --to=avorontsov@ru.mvista.com \
    --cc=galak@kernel.crashing.org \
    --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 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.