* [PATCH] [POWERPC] mpic: fix ambiguous else statement
@ 2008-05-23 14:15 Anton Vorontsov
2008-05-23 17:56 ` Kumar Gala
0 siblings, 1 reply; 3+ messages in thread
From: Anton Vorontsov @ 2008-05-23 14:15 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
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>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] [POWERPC] mpic: fix ambiguous else statement
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 ` [PATCH v2] " Anton Vorontsov
0 siblings, 1 reply; 3+ messages in thread
From: Kumar Gala @ 2008-05-23 17:56 UTC (permalink / raw)
To: Anton Vorontsov; +Cc: linuxppc-dev
On May 23, 2008, at 9:15 AM, Anton Vorontsov wrote:
> This patch fixes following warning introduced by
> commit 475ca391b490a683d66bf19999a8a7a24913f139 (mpic: Deal with =20
> bogus NIRQ
> in Feature Reporting Register):
>
> CC arch/powerpc/sysdev/mpic.o
> arch/powerpc/sysdev/mpic.c: In function =E2=80=98mpic_alloc=E2=80=99:
> arch/powerpc/sysdev/mpic.c:1146: warning: suggest explicit braces to =20=
> avoid ambiguous =E2=80=98else=E2=80=99
>
> 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=3DC in your environment gcc will =20
stop spitting out the funny chars.
- k
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] [POWERPC] mpic: fix ambiguous else statement
2008-05-23 17:56 ` Kumar Gala
@ 2008-05-23 18:40 ` Anton Vorontsov
0 siblings, 0 replies; 3+ messages in thread
From: Anton Vorontsov @ 2008-05-23 18:40 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, Paul Mackerras
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-23 18:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v2] " Anton Vorontsov
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).