public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] (-mm) drivers/pci/msi: explicit declaration of msi_register
@ 2006-03-14 21:01 Jun'ichi Nomura
  2006-03-14 21:45 ` Andrew Morton
  2006-03-14 21:57 ` Adrian Bunk
  0 siblings, 2 replies; 23+ messages in thread
From: Jun'ichi Nomura @ 2006-03-14 21:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-ia64, Greg KH, maule, Andrew Morton

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

Hello,

In 2.6.16-rc6-mm1, I've seen tons of compiler warnings on ia64:

include2/asm/msi.h: In function `ia64_msi_init':
include2/asm/msi.h:23: warning: implicit declaration of function `msi_register'
In file included from include2/asm/machvec.h:408,
                 from include2/asm/io.h:70,
                 from include2/asm/smp.h:20,
                 from /build/rc6/source/include/linux/smp.h:22,

The problem is that msi_register() is used in ia64_msi_init()
without declaration.
Since ia64_msi_init() is a part of machine vector, most of files
hit this warning and may hide other important messages.

Other than ia64, i386 and x86_64 have similar msi.h.
But they are not affected since include/asm/msi.h isn't
included without drivers/pci/pci.h where msi_register() is
declared.

The attached patch fixes this specific problem.
Proper fix might be moving the declaration in common header
but including something from machvec.h causes a lot of other
problems, so it would be nice if someone have better idea on this.

Thanks,
-- 
Jun'ichi Nomura, NEC Solutions (America), Inc.

[-- Attachment #2: explicit-declaration-of-msi-register.patch --]
[-- Type: text/x-patch, Size: 956 bytes --]

Declare msi_register() in msi.h.

The patch is especially necessary for ia64 on which most of files
emit compiler warnings like below:
  include2/asm/msi.h: In function `ia64_msi_init':
  include2/asm/msi.h:23: warning: implicit declaration of function `msi_register'
  In file included from include2/asm/machvec.h:408,
                 from include2/asm/io.h:70,
                 from include2/asm/smp.h:20,
                 from /build/rc6/source/include/linux/smp.h:22,

Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>

--- linux-2.6.16-rc6-mm1.orig/include/asm-ia64/msi.h	2006-03-14 13:54:11.000000000 -0500
+++ linux-2.6.16-rc6-mm1/include/asm-ia64/msi.h	2006-03-14 14:05:26.000000000 -0500
@@ -15,6 +15,7 @@ static inline void set_intr_gate (int nr
 #define MSI_TARGET_CPU_SHIFT	4
 
 extern struct msi_ops msi_apic_ops;
+extern int msi_register(struct msi_ops *);
 
 /* default ia64 msi init routine */
 static inline int ia64_msi_init(void)

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

end of thread, other threads:[~2006-03-17  1:18 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-14 21:01 [PATCH] (-mm) drivers/pci/msi: explicit declaration of msi_register Jun'ichi Nomura
2006-03-14 21:45 ` Andrew Morton
2006-03-14 21:59   ` Greg KH
2006-03-14 22:25     ` Matthew Wilcox
2006-03-15  0:51   ` Jun'ichi Nomura
2006-03-15 23:55     ` Greg KH
2006-03-16 15:19       ` Jun'ichi Nomura
2006-03-16 18:19         ` Mark Maule
2006-03-16 19:32           ` Jun'ichi Nomura
2006-03-16 19:41             ` Mark Maule
2006-03-16 23:28               ` Greg KH
2006-03-16 23:37                 ` Roland Dreier
2006-03-16 23:45                   ` Grant Grundler
2006-03-16 23:47                   ` Greg KH
2006-03-16 23:41           ` Grant Grundler
2006-03-16 23:49             ` Greg KH
2006-03-17  0:41               ` Grant Grundler
2006-03-17  1:18                 ` Mark Maule
2006-03-16 15:29       ` Jun'ichi Nomura
2006-03-14 21:57 ` Adrian Bunk
2006-03-14 23:55   ` Jun'ichi Nomura
2006-03-15  0:09     ` Mark Maule
2006-03-15  1:04       ` Jun'ichi Nomura

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox