From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-ia64@vger.kernel.org, Fenghua Yu <fenghua.yu@intel.com>,
Tony Luck <tony.luck@intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org,
Julia Lawall <julia.lawall@lip6.fr>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: [PATCH 2/5] IA64-IRQ: Delete unnecessary braces
Date: Fri, 26 Aug 2016 18:03:35 +0000 [thread overview]
Message-ID: <cdcb21f4-c5d8-0d53-6cc4-e819f2e57258@users.sourceforge.net> (raw)
In-Reply-To: <349bbfb4-bada-628e-2981-ca2a315299fc@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 26 Aug 2016 18:40:16 +0200
Do not use curly brackets at a few source code places
where a single statement should be sufficient.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
arch/ia64/sn/kernel/irq.c | 25 +++++++++----------------
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c
index c7f9eea..9862a97 100644
--- a/arch/ia64/sn/kernel/irq.c
+++ b/arch/ia64/sn/kernel/irq.c
@@ -127,9 +127,8 @@ struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *sn_irq_info,
struct sn_pcibus_provider *pci_provider;
bridge = (u64) sn_irq_info->irq_bridge;
- if (!bridge) {
+ if (!bridge)
return NULL; /* irq is not a device interrupt */
- }
local_nasid = NASID_GET(bridge);
@@ -274,10 +273,9 @@ void sn_irq_init(void)
ia64_first_device_vector = IA64_SN2_FIRST_DEVICE_VECTOR;
ia64_last_device_vector = IA64_SN2_LAST_DEVICE_VECTOR;
- for (i = 0; i < NR_IRQS; i++) {
+ for (i = 0; i < NR_IRQS; i++)
if (irq_get_chip(i) = &no_irq_chip)
irq_set_chip(i, &irq_type_sn);
- }
}
static void register_intr_pda(struct sn_irq_info *sn_irq_info)
@@ -285,10 +283,8 @@ static void register_intr_pda(struct sn_irq_info *sn_irq_info)
int irq = sn_irq_info->irq_irq;
int cpu = sn_irq_info->irq_cpuid;
- if (pdacpu(cpu)->sn_last_irq < irq) {
+ if (pdacpu(cpu)->sn_last_irq < irq)
pdacpu(cpu)->sn_last_irq = irq;
- }
-
if (pdacpu(cpu)->sn_first_irq = 0 || pdacpu(cpu)->sn_first_irq > irq)
pdacpu(cpu)->sn_first_irq = irq;
}
@@ -304,15 +300,15 @@ static void unregister_intr_pda(struct sn_irq_info *sn_irq_info)
if (pdacpu(cpu)->sn_last_irq = irq) {
foundmatch = 0;
for (i = pdacpu(cpu)->sn_last_irq - 1;
- i && !foundmatch; i--) {
+ i && !foundmatch;
+ i--)
list_for_each_entry_rcu(tmp_irq_info,
sn_irq_lh[i],
- list) {
+ list)
if (tmp_irq_info->irq_cpuid = cpu) {
foundmatch = 1;
break;
}
- }
}
pdacpu(cpu)->sn_last_irq = i;
}
@@ -440,7 +436,7 @@ static void sn_check_intr(int irq, struct sn_irq_info *sn_irq_info)
pdi_pcibus_info;
regval = pcireg_intr_status_get(pcibus_info);
- if (!ia64_get_irr(irq_to_vector(irq))) {
+ if (!ia64_get_irr(irq_to_vector(irq)))
if (!test_bit(irq, pda->sn_in_service_ivecs)) {
regval &= 0xff;
if (sn_irq_info->irq_int_bit & regval &
@@ -449,7 +445,6 @@ static void sn_check_intr(int irq, struct sn_irq_info *sn_irq_info)
sn_call_force_intr_provider(sn_irq_info);
}
}
- }
sn_irq_info->irq_last_intr = regval;
}
@@ -462,11 +457,9 @@ void sn_lb_int_war_check(void)
return;
rcu_read_lock();
- for (i = pda->sn_first_irq; i <= pda->sn_last_irq; i++) {
- list_for_each_entry_rcu(sn_irq_info, sn_irq_lh[i], list) {
+ for (i = pda->sn_first_irq; i <= pda->sn_last_irq; i++)
+ list_for_each_entry_rcu(sn_irq_info, sn_irq_lh[i], list)
sn_check_intr(i, sn_irq_info);
- }
- }
rcu_read_unlock();
}
--
2.9.3
next prev parent reply other threads:[~2016-08-26 18:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-26 18:00 [PATCH 0/5] IA64: Fine-tuning for some function implementations SF Markus Elfring
2016-08-26 18:02 ` [PATCH 1/5] IA64-IRQ: Use kmalloc_array() in sn_irq_lh_init() SF Markus Elfring
2016-08-26 19:57 ` Julia Lawall
2016-08-26 21:02 ` Joe Perches
2016-08-27 7:02 ` SF Markus Elfring
2016-08-28 0:40 ` Joe Perches
2016-08-28 7:37 ` SF Markus Elfring
2016-08-28 9:28 ` [PATCH 1/5] " Julia Lawall
2016-08-28 18:33 ` Joe Perches
2016-08-27 6:20 ` SF Markus Elfring
2016-08-26 20:18 ` [PATCH 1/5] " kbuild test robot
2016-08-27 8:48 ` walter harms
2016-08-26 18:03 ` SF Markus Elfring [this message]
2016-08-26 20:27 ` [PATCH 2/5] IA64-IRQ: Delete unnecessary braces kbuild test robot
2016-08-26 18:04 ` [PATCH 3/5] ia64/mm/tlb: Fix indentation in ia64_global_tlb_purge() SF Markus Elfring
2016-08-26 18:05 ` [PATCH 4/5] ia64/mm/tlb: Use kmalloc_array() in ia64_itr_entry() SF Markus Elfring
2016-08-26 18:06 ` [PATCH 5/5] ia64/mm/tlb: Delete unnecessary braces SF Markus Elfring
2016-08-26 20:42 ` kbuild test robot
2016-08-27 7:29 ` SF Markus Elfring
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=cdcb21f4-c5d8-0d53-6cc4-e819f2e57258@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=fenghua.yu@intel.com \
--cc=julia.lawall@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=tony.luck@intel.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;
as well as URLs for NNTP newsgroup(s).