linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.4.14 errors on full build - Y
@ 2001-11-06  4:49 Keith Owens
  2001-11-06  5:16 ` [PATCH] " Robert Love
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Keith Owens @ 2001-11-06  4:49 UTC (permalink / raw)
  To: linux-kernel

Doing a full build of 2.4.14 (everything set to Y where possible), got
the usual collection of errors.  Some of these errors have been around
for weeks, any chance of them getting fixed?

  drivers/net/ppp_deflate.o(.data+0x0): multiple definition of `deflate_copyright'
  fs/jffs2/jffs2.o(.data+0x20): first defined here
  drivers/net/ppp_deflate.o: In function `deflateInit_':
  drivers/net/ppp_deflate.o(.text+0x0): multiple definition of `deflateInit_'
  fs/jffs2/jffs2.o(.text+0xc90): first defined here
  drivers/net/ppp_deflate.o: In function `deflateInit2_':
  Lots more of the same.

  drivers/isdn/tpam/tpam.o: In function `hdlc_decode':
  drivers/isdn/tpam/tpam.o(.text+0x3f50): multiple definition of `hdlc_decode'
  drivers/isdn/hisax/hisax_st5481.o(.text+0x30c0): first defined here
  ld: Warning: size of symbol `hdlc_decode' changed from 832 to 603 in drivers/isdn/tpam/tpam.o

  drivers/isdn/tpam/tpam.o: In function `hdlc_encode':
  drivers/isdn/tpam/tpam.o(.text+0x3d30): multiple definition of `hdlc_encode'
  drivers/isdn/hisax/hisax_st5481.o(.text+0x3400): first defined here
  ld: Warning: size of symbol `hdlc_encode' changed from 1345 to 529 in drivers/isdn/tpam/tpam.o

  drivers/mtd/chips/jedec_probe.o: In function `jedec_probe_init':
  drivers/mtd/chips/jedec_probe.o(.text.init+0x0): multiple definition of `jedec_probe_init'
  drivers/mtd/chips/jedec.o(.text.init+0x0): first defined here

  Everybody's current favourite, loop.o omitted :)

  drivers/block/ps2esdi.c:153: `THIS_MODULE' undeclared here (not in a function)
  drivers/block/ps2esdi.c:153: initializer element is not constant
  drivers/block/ps2esdi.c:153: (near initialization for `ps2esdi_fops.owner')
  drivers/block/ps2esdi.c:157: initializer element is not constant
  drivers/block/ps2esdi.c:157: (near initialization for `ps2esdi_fops')

  In file included from drivers/usb/hpusbscsi.c:13:
  drivers/scsi/scsi.h:402:27: scsi_obsolete.h: No such file or directory
  drivers/usb/hpusbscsi.c: In function `hpusbscsi_scsi_abort':
  drivers/usb/hpusbscsi.c:351: `SCSI_ABORT_PENDING' undeclared (first use in this function)
  drivers/usb/hpusbscsi.c:351: (Each undeclared identifier is reported only once
  drivers/usb/hpusbscsi.c:351: for each function it appears in.)
  drivers/usb/hpusbscsi.c:352: warning: control reaches end of non-void function


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

* [PATCH] Re: 2.4.14 errors on full build - Y
  2001-11-06  4:49 2.4.14 errors on full build - Y Keith Owens
@ 2001-11-06  5:16 ` Robert Love
  2001-11-06  5:22 ` Robert Love
  2001-11-06 14:56 ` David Woodhouse
  2 siblings, 0 replies; 4+ messages in thread
From: Robert Love @ 2001-11-06  5:16 UTC (permalink / raw)
  To: torvalds; +Cc: Keith Owens, linux-kernel

On Mon, 2001-11-05 at 23:49, Keith Owens wrote:
> Doing a full build of 2.4.14 (everything set to Y where possible), got
> the usual collection of errors.  Some of these errors have been around
> for weeks, any chance of them getting fixed?
> [...]
>   drivers/block/ps2esdi.c:153: `THIS_MODULE' undeclared here (not in a function)
>   drivers/block/ps2esdi.c:153: initializer element is not constant
>   drivers/block/ps2esdi.c:153: (near initialization for `ps2esdi_fops.owner')
>   drivers/block/ps2esdi.c:157: initializer element is not constant
>   drivers/block/ps2esdi.c:157: (near initialization for `ps2esdi_fops')

Looks like this is just missing module.h ... simple fix attached. 
Linus, please apply.

diff -urN linux-2.4.14/drivers/block/ps2esdi.c linux/drivers/block/ps2esdi.c 
--- linux-2.4.14/drivers/block/ps2esdi.c	Mon Nov  5 20:11:00 2001
+++ linux/drivers/block/ps2esdi.c	Tue Nov  6 00:14:57 2001
@@ -47,6 +47,7 @@
 #include <linux/mca.h>
 #include <linux/init.h>
 #include <linux/ioport.h>
+#include <linux/module.h>
 
 #include <asm/system.h>
 #include <asm/io.h>


	Robert Love


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

* Re: 2.4.14 errors on full build - Y
  2001-11-06  4:49 2.4.14 errors on full build - Y Keith Owens
  2001-11-06  5:16 ` [PATCH] " Robert Love
@ 2001-11-06  5:22 ` Robert Love
  2001-11-06 14:56 ` David Woodhouse
  2 siblings, 0 replies; 4+ messages in thread
From: Robert Love @ 2001-11-06  5:22 UTC (permalink / raw)
  To: torvalds; +Cc: Keith Owens, linux-kernel

On Mon, 2001-11-05 at 23:49, Keith Owens wrote:
> Doing a full build of 2.4.14 (everything set to Y where possible), got
> the usual collection of errors.  Some of these errors have been around
> for weeks, any chance of them getting fixed?
> [...]
>   drivers/mtd/chips/jedec_probe.o: In function `jedec_probe_init':
>   drivers/mtd/chips/jedec_probe.o(.text.init+0x0): multiple definition of `jedec_probe_init'
>   drivers/mtd/chips/jedec.o(.text.init+0x0): first defined here

Another simple fix...the multiple function declarations should be
static.  Even better, a lot of the duplication between the driver should
be shared but that I shall leave as an exercises for the maintainer. 
Until then, Linus, please apply.

diff -urN linux-2.4.14/drivers/mtd/chips/jedec.c linux/drivers/mtd/chips/jedec.c
--- linux-2.4.14/drivers/mtd/chips/jedec.c	Mon Nov  5 20:11:15 2001
+++ linux/drivers/mtd/chips/jedec.c	Tue Nov  6 00:19:15 2001
@@ -873,7 +873,7 @@
    }
 }
 
-int __init jedec_probe_init(void)
+static int __init jedec_probe_init(void)
 {
 	register_mtd_chip_driver(&jedec_chipdrv);
 	return 0;
diff -urN linux-2.4.14/drivers/mtd/chips/jedec_probe.c linux/drivers/mtd/chips/jedec_probe.c
--- linux-2.4.14/drivers/mtd/chips/jedec_probe.c	Mon Nov  5 20:11:15 2001
+++ linux/drivers/mtd/chips/jedec_probe.c	Tue Nov  6 00:19:16 2001
@@ -422,7 +422,7 @@
 	module: THIS_MODULE
 };
 
-int __init jedec_probe_init(void)
+static int __init jedec_probe_init(void)
 {
 	register_mtd_chip_driver(&jedec_chipdrv);
 	return 0;


	Robert Love


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

* Re: 2.4.14 errors on full build - Y
  2001-11-06  4:49 2.4.14 errors on full build - Y Keith Owens
  2001-11-06  5:16 ` [PATCH] " Robert Love
  2001-11-06  5:22 ` Robert Love
@ 2001-11-06 14:56 ` David Woodhouse
  2 siblings, 0 replies; 4+ messages in thread
From: David Woodhouse @ 2001-11-06 14:56 UTC (permalink / raw)
  To: Robert Love; +Cc: torvalds, Keith Owens, linux-kernel


rml@tech9.net said:
>  Another simple fix...the multiple function declarations should be
> static.  Even better, a lot of the duplication between the driver
> should be shared but that I shall leave as an exercises for the
> maintainer.  Until then, Linus, please apply. 

jedec.c is obsolete and will be going away just as soon as I'm sufficiently 
convinced that jedec_probe.c and the unified flash driver backends are 
actually working for all the hardware in question. You should never need to 
have them both turned on at once. 

Here's the fix, though, which also makes some other stuff static which 
doesn't need to be exported.

Index: include/linux/mtd/jedec.h
===================================================================
RCS file: /home/cvs/mtd/include/linux/mtd/jedec.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- include/linux/mtd/jedec.h	2000/07/04 07:21:51	1.1
+++ include/linux/mtd/jedec.h	2001/11/06 14:37:36	1.2
@@ -7,7 +7,7 @@
  *
  * See the AMD flash databook for information on how to operate the interface.
  *
- * $Id: jedec.h,v 1.1 2000/07/04 07:21:51 jgg Exp $
+ * $Id: jedec.h,v 1.2 2001/11/06 14:37:36 dwmw2 Exp $
  */
 
 #ifndef __LINUX_MTD_JEDEC_H__
@@ -63,7 +63,5 @@
    
    struct jedec_flash_chip chips[MAX_JEDEC_CHIPS];  
 };
-
-extern const struct JEDECTable *jedec_idtoinf(__u8 mfr,__u8 id);
 
 #endif
Index: drivers/mtd/chips/jedec.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/jedec.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- drivers/mtd/chips/jedec.c	2001/10/02 15:05:12	1.11
+++ drivers/mtd/chips/jedec.c	2001/11/06 14:37:35	1.12
@@ -11,7 +11,7 @@
  * not going to guess how to send commands to them, plus I expect they will
  * all speak CFI..
  *
- * $Id: jedec.c,v 1.11 2001/10/02 15:05:12 dwmw2 Exp $
+ * $Id: jedec.c,v 1.12 2001/11/06 14:37:35 dwmw2 Exp $
  */
 
 #include <linux/mtd/jedec.h>
@@ -42,6 +42,7 @@
    {0xC2AD,"Macronix MX29F016",2*1024*1024,64*1024,MTD_CAP_NORFLASH},
    {}};
 
+static const struct JEDECTable *jedec_idtoinf(__u8 mfr,__u8 id);
 static void jedec_sync(struct mtd_info *mtd) {};
 static int jedec_read(struct mtd_info *mtd, loff_t from, size_t len, 
 		      size_t *retlen, u_char *buf);
@@ -249,7 +250,7 @@
 /* Take an array of JEDEC numbers that represent interleved flash chips
    and process them. Check to make sure they are good JEDEC numbers, look
    them up and then add them to the chip list */   
-int handle_jedecs(struct map_info *map,__u8 *Mfg,__u8 *Id,unsigned Count,
+static int handle_jedecs(struct map_info *map,__u8 *Mfg,__u8 *Id,unsigned Count,
 		  unsigned long base,struct jedec_private *priv)
 {
    unsigned I,J;
@@ -336,7 +337,7 @@
 }
 
 /* Lookup the chip information from the JEDEC ID table. */
-const struct JEDECTable *jedec_idtoinf(__u8 mfr,__u8 id)
+static const struct JEDECTable *jedec_idtoinf(__u8 mfr,__u8 id)
 {
    __u16 Id = (mfr << 8) | id;
    unsigned long I = 0;
@@ -873,19 +874,19 @@
    }
 }
 
-int __init jedec_probe_init(void)
+int __init jedec_init(void)
 {
 	register_mtd_chip_driver(&jedec_chipdrv);
 	return 0;
 }
 
-static void __exit jedec_probe_exit(void)
+static void __exit jedec_exit(void)
 {
 	unregister_mtd_chip_driver(&jedec_chipdrv);
 }
 
-module_init(jedec_probe_init);
-module_exit(jedec_probe_exit);
+module_init(jedec_init);
+module_exit(jedec_exit);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Jason Gunthorpe <jgg@deltatee.com> et al.");


--
dwmw2



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

end of thread, other threads:[~2001-11-06 14:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-06  4:49 2.4.14 errors on full build - Y Keith Owens
2001-11-06  5:16 ` [PATCH] " Robert Love
2001-11-06  5:22 ` Robert Love
2001-11-06 14:56 ` David Woodhouse

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).