All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <monstr@monstr.eu>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 4/7] microblaze: intc: Coding style cleanup
Date: Mon,  6 Aug 2012 09:46:36 +0200	[thread overview]
Message-ID: <1344239199-11445-4-git-send-email-monstr@monstr.eu> (raw)
In-Reply-To: <1344239199-11445-1-git-send-email-monstr@monstr.eu>

Just coding style cleanup.
Remove unneeded externs.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Acked-by: Simon Glass <sjg@chromium.org>

--
v2: Rebase - depends on previous intc patch
---
 arch/microblaze/cpu/interrupts.c |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c
index 08f6bad..7f2ee64 100644
--- a/arch/microblaze/cpu/interrupts.c
+++ b/arch/microblaze/cpu/interrupts.c
@@ -32,15 +32,12 @@
 
 #undef DEBUG_INT
 
-extern void microblaze_disable_interrupts (void);
-extern void microblaze_enable_interrupts (void);
-
-void enable_interrupts (void)
+void enable_interrupts(void)
 {
 	MSRSET(0x2);
 }
 
-int disable_interrupts (void)
+int disable_interrupts(void)
 {
 	unsigned int msr;
 
@@ -58,20 +55,21 @@ microblaze_intc_t *intc;
 /* default handler */
 static void def_hdlr(void)
 {
-	puts ("def_hdlr\n");
+	puts("def_hdlr\n");
 }
 
 static void enable_one_interrupt(int irq)
 {
 	int mask;
 	int offset = 1;
+
 	offset <<= irq;
 	mask = intc->ier;
 	intc->ier = (mask | offset);
 #ifdef DEBUG_INT
-	printf ("Enable one interrupt irq %x - mask %x,ier %x\n", offset, mask,
+	printf("Enable one interrupt irq %x - mask %x,ier %x\n", offset, mask,
 		intc->ier);
-	printf ("INTC isr %x, ier %x, iar %x, mer %x\n", intc->isr, intc->ier,
+	printf("INTC isr %x, ier %x, iar %x, mer %x\n", intc->isr, intc->ier,
 		intc->iar, intc->mer);
 #endif
 }
@@ -80,13 +78,14 @@ static void disable_one_interrupt(int irq)
 {
 	int mask;
 	int offset = 1;
+
 	offset <<= irq;
 	mask = intc->ier;
 	intc->ier = (mask & ~offset);
 #ifdef DEBUG_INT
-	printf ("Disable one interrupt irq %x - mask %x,ier %x\n", irq, mask,
+	printf("Disable one interrupt irq %x - mask %x,ier %x\n", irq, mask,
 		intc->ier);
-	printf ("INTC isr %x, ier %x, iar %x, mer %x\n", intc->isr, intc->ier,
+	printf("INTC isr %x, ier %x, iar %x, mer %x\n", intc->isr, intc->ier,
 		intc->iar, intc->mer);
 #endif
 }
@@ -94,9 +93,10 @@ static void disable_one_interrupt(int irq)
 int install_interrupt_handler(int irq, interrupt_handler_t *hdlr, void *arg)
 {
 	struct irq_action *act;
+
 	/* irq out of range */
 	if ((irq < 0) || (irq > irq_no)) {
-		puts ("IRQ out of range\n");
+		puts("IRQ out of range\n");
 		return -1;
 	}
 	act = &vecs[irq];
@@ -124,7 +124,7 @@ static void intc_init(void)
 	/* XIntc_Start - hw_interrupt enable and all interrupt enable */
 	intc->mer = 0x3;
 #ifdef DEBUG_INT
-	printf ("INTC isr %x, ier %x, iar %x, mer %x\n", intc->isr, intc->ier,
+	printf("INTC isr %x, ier %x, iar %x, mer %x\n", intc->isr, intc->ier,
 		intc->iar, intc->mer);
 #endif
 }
@@ -159,7 +159,7 @@ int interrupts_init(void)
 	return 0;
 }
 
-void interrupt_handler (void)
+void interrupt_handler(void)
 {
 	int irqs = intc->ivr;	/* find active interrupt */
 	int mask = 1;
-- 
1.7.0.4

  parent reply	other threads:[~2012-08-06  7:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-06  7:46 [U-Boot] [PATCH v2 1/7] microblaze: Add support for device tree driven board configuration Michal Simek
2012-08-06  7:46 ` [U-Boot] [PATCH v2 2/7] microblaze: board: Remove compilation warning Michal Simek
2012-08-07 20:10   ` Stephan Linz
2012-08-06  7:46 ` [U-Boot] [PATCH v2 3/7] microblaze: intc: Registering interrupt should return value Michal Simek
2012-08-07 20:10   ` Stephan Linz
2012-08-08  8:27     ` Michal Simek
2012-08-08 17:47       ` Stephan Linz
2012-08-06  7:46 ` Michal Simek [this message]
2012-08-07 20:10   ` [U-Boot] [PATCH v2 4/7] microblaze: intc: Coding style cleanup Stephan Linz
2012-08-06  7:46 ` [U-Boot] [PATCH v2 5/7] microblaze: timer: Prepare for device-tree initialization Michal Simek
2012-08-07 20:10   ` Stephan Linz
2012-08-08  8:27     ` Michal Simek
2012-08-06  7:46 ` [U-Boot] [PATCH v2 6/7] microblaze: Clean microblaze initialization Michal Simek
2012-08-07 20:10   ` Stephan Linz
2012-08-06  7:46 ` [U-Boot] [PATCH v2 7/7] microblaze: board: Use bi_flashstart instead of CONFIG_SYS_FLASH_BASE Michal Simek
2012-08-07 20:10   ` Stephan Linz
2012-08-07 20:10 ` [U-Boot] [PATCH v2 1/7] microblaze: Add support for device tree driven board configuration Stephan Linz
2012-08-10  7:16   ` Michal Simek

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=1344239199-11445-4-git-send-email-monstr@monstr.eu \
    --to=monstr@monstr.eu \
    --cc=u-boot@lists.denx.de \
    /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.