2002-10-31 12:31:52

by Adrian Bunk

[permalink] [raw]
Subject: ieee1394/sbp2.c doesn't compile in 2.5.45


FYI:

<-- snip -->

gcc -Wp,-MD,drivers/ieee1394/.sbp2.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
-march=k6 -Iarch/i386/mach-generic -nostdinc -iwithprefix include
-DKBUILD_BASENAME=sbp2 -c -o drivers/ieee1394/sbp2.o
drivers/ieee1394/sbp2.c
In file included from drivers/ieee1394/sbp2.c:349:
drivers/ieee1394/sbp2.h:555: parse error before `*'
drivers/ieee1394/sbp2.h:555: warning: function declaration isn't a prototype
drivers/ieee1394/sbp2.c: In function `sbp2scsi_biosparam':
drivers/ieee1394/sbp2.c:3155: `capacity' undeclared (first use in this function)
drivers/ieee1394/sbp2.c:3155: (Each undeclared identifier is reported only once
drivers/ieee1394/sbp2.c:3155: for each function it appears in.)
drivers/ieee1394/sbp2.c:3149: warning: `cylinders' might be used uninitialized in this function
make[2]: *** [drivers/ieee1394/sbp2.o] Error 1

<-- snip -->


cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed




2002-10-31 22:23:22

by Douglas Gilbert

[permalink] [raw]
Subject: Re: ieee1394/sbp2.c doesn't compile in 2.5.45

--- linux/drivers/ieee1394/sbp2.h 2002-10-26 03:11:32.000000000 +1000
+++ linux/drivers/ieee1394/sbp2.h2544bk3fix 2002-10-31 11:27:25.000000000 +1100
@@ -552,7 +552,8 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,28)
static int sbp2scsi_biosparam (Scsi_Disk *disk, kdev_t dev, int geom[]);
#else
-static int sbp2scsi_biosparam (Scsi_Disk *disk, struct block_device *dev, int geom[]);
+static int sbp2scsi_biosparam (struct scsi_device *sdev,
+ struct block_device *dev, sector_t capacy, int geom[]);
#endif
static int sbp2scsi_abort (Scsi_Cmnd *SCpnt);
static int sbp2scsi_reset (Scsi_Cmnd *SCpnt);
--- linux/drivers/ieee1394/sbp2.c 2002-10-31 09:22:50.000000000 +1100
+++ linux/drivers/ieee1394/sbp2.c2544bk3fix 2002-10-31 11:30:20.000000000 +1100
@@ -3137,14 +3137,14 @@
/*
* Called by scsi stack to get bios parameters (used by fdisk, and at boot).
*/
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,44)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,43)
static int sbp2scsi_biosparam (struct scsi_device *sdev,
- struct block_device *dev, sector_t capacy, int geom[])
+ struct block_device *dev, sector_t capacity, int geom[])
{
#else
static int sbp2scsi_biosparam (Scsi_Disk *disk, kdev_t dev, int geom[])
{
- sector_t capacy = disk->capacity;
+ sector_t capacity = disk->capacity;
#endif
int heads, sectors, cylinders;


Attachments:
sbp2_2544bk3.diff (1.32 kB)