All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] db1550: useless memset() call
@ 2005-09-22 11:32 kbaidarov
  2005-09-30 22:19 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: kbaidarov @ 2005-09-22 11:32 UTC (permalink / raw)
  To: linux-mips

[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

I've try kernel without memset() on the board - is ok, board boot.
All drivers works fine. Than I grep the kernel sources:

[root@windmill linux]# grep -nri "memset(irq_desc" arch/
arch/mips/au1000/common/irq.c:449:      memset(irq_desc, 0, sizeof(irq_desc));
arch/mips/ite-boards/generic/irq.c:184:        memset(irq_desc, 0, sizeof(irq_desc));
[root@windmill linux]#

Only 2 matches! Does we needs memset() at all?
And if some one try to initialize irq_desc from start_kernel() before arch_init_irq() call, then following arch_init_irq() call discard all that initialization.


[-- Attachment #2: lm_db1550_irq_desc.patch --]
[-- Type: text/x-patch, Size: 582 bytes --]

Description:
Removes useless memset() call.
Signed-off-by: Konstantin Baydarov<kbaidarov@dev.rtsoft.ru>

Index: linux_up/linux/arch/mips/au1000/common/irq.c
===================================================================
--- linux_up.orig/linux/arch/mips/au1000/common/irq.c
+++ linux_up/linux/arch/mips/au1000/common/irq.c
@@ -446,7 +446,6 @@ void __init arch_init_irq(void)
 	extern int au1xxx_ic0_nr_irqs;
 
 	cp0_status = read_c0_status();
-	memset(irq_desc, 0, sizeof(irq_desc));
 	set_except_vector(0, au1000_IRQ);
 
 	/* Initialize interrupt controllers to a safe state.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] db1550: useless memset() call
  2005-09-22 11:32 [patch] db1550: useless memset() call kbaidarov
@ 2005-09-30 22:19 ` Ralf Baechle
  0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2005-09-30 22:19 UTC (permalink / raw)
  To: kbaidarov; +Cc: linux-mips

On Thu, Sep 22, 2005 at 03:32:02PM +0400, kbaidarov wrote:

> I've try kernel without memset() on the board - is ok, board boot.
> All drivers works fine. Than I grep the kernel sources:
> 
> [root@windmill linux]# grep -nri "memset(irq_desc" arch/
> arch/mips/au1000/common/irq.c:449:      memset(irq_desc, 0, 
> sizeof(irq_desc));
> arch/mips/ite-boards/generic/irq.c:184:        memset(irq_desc, 0, 
> sizeof(irq_desc));
> [root@windmill linux]#
> 
> Only 2 matches! Does we needs memset() at all?
> And if some one try to initialize irq_desc from start_kernel() before 
> arch_init_irq() call, then following arch_init_irq() call discard all that 
> initialization.

Exactly, so the initialization is wrong, so I'm removing both calls.

Thanks,

  Ralf

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-10-03 10:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-22 11:32 [patch] db1550: useless memset() call kbaidarov
2005-09-30 22:19 ` Ralf Baechle

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.