drivers/scsi/dpt_i2o.c: fix build on alpha

alpha:

drivers/scsi/dpt_i2o.c:1997: error: implicit declaration of function 'adpt_alpha_info'
drivers/scsi/dpt_i2o.c: At top level:
drivers/scsi/dpt_i2o.c:2032: warning: conflicting types for 'adpt_alpha_info'
drivers/scsi/dpt_i2o.c:2032: error: static declaration of 'adpt_alpha_info' follows non-static declaration
drivers/scsi/dpt_i2o.c:1997: error: previous implicit declaration of 'adpt_alpha_info' was here

Due to a copy-n-paste error in drivers/scsi/dpti.h.

Fix that up and remove some of the many daft static-declarations-in-a-header
which this driver enjoys.

Cc: Miquel van Smoorenburg <miquels@cistron.nl>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Andrew Morton 2008-05-06 20:42:42 -07:00 committed by Linus Torvalds
parent 5be7a4792a
commit 8b2cc917a0
2 changed files with 37 additions and 56 deletions

View File

@ -1967,6 +1967,57 @@ cleanup:
return rcode;
}
#if defined __ia64__
static void adpt_ia64_info(sysInfo_S* si)
{
// This is all the info we need for now
// We will add more info as our new
// managmenent utility requires it
si->processorType = PROC_IA64;
}
#endif
#if defined __sparc__
static void adpt_sparc_info(sysInfo_S* si)
{
// This is all the info we need for now
// We will add more info as our new
// managmenent utility requires it
si->processorType = PROC_ULTRASPARC;
}
#endif
#if defined __alpha__
static void adpt_alpha_info(sysInfo_S* si)
{
// This is all the info we need for now
// We will add more info as our new
// managmenent utility requires it
si->processorType = PROC_ALPHA;
}
#endif
#if defined __i386__
static void adpt_i386_info(sysInfo_S* si)
{
// This is all the info we need for now
// We will add more info as our new
// managmenent utility requires it
switch (boot_cpu_data.x86) {
case CPU_386:
si->processorType = PROC_386;
break;
case CPU_486:
si->processorType = PROC_486;
break;
case CPU_586:
si->processorType = PROC_PENTIUM;
break;
default: // Just in case
si->processorType = PROC_PENTIUM;
break;
}
}
#endif
/*
* This routine returns information about the system. This does not effect
@ -1998,7 +2049,7 @@ static int adpt_system_info(void __user *buffer)
#else
si.processorType = 0xff ;
#endif
if(copy_to_user(buffer, &si, sizeof(si))){
if (copy_to_user(buffer, &si, sizeof(si))){
printk(KERN_WARNING"dpti: Could not copy buffer TO user\n");
return -EFAULT;
}
@ -2006,63 +2057,6 @@ static int adpt_system_info(void __user *buffer)
return 0;
}
#if defined __ia64__
static void adpt_ia64_info(sysInfo_S* si)
{
// This is all the info we need for now
// We will add more info as our new
// managmenent utility requires it
si->processorType = PROC_IA64;
}
#endif
#if defined __sparc__
static void adpt_sparc_info(sysInfo_S* si)
{
// This is all the info we need for now
// We will add more info as our new
// managmenent utility requires it
si->processorType = PROC_ULTRASPARC;
}
#endif
#if defined __alpha__
static void adpt_alpha_info(sysInfo_S* si)
{
// This is all the info we need for now
// We will add more info as our new
// managmenent utility requires it
si->processorType = PROC_ALPHA;
}
#endif
#if defined __i386__
static void adpt_i386_info(sysInfo_S* si)
{
// This is all the info we need for now
// We will add more info as our new
// managmenent utility requires it
switch (boot_cpu_data.x86) {
case CPU_386:
si->processorType = PROC_386;
break;
case CPU_486:
si->processorType = PROC_486;
break;
case CPU_586:
si->processorType = PROC_PENTIUM;
break;
default: // Just in case
si->processorType = PROC_PENTIUM;
break;
}
}
#endif
static int adpt_ioctl(struct inode *inode, struct file *file, uint cmd,
ulong arg)
{

View File

@ -316,19 +316,6 @@ static int adpt_close(struct inode *inode, struct file *file);
static void adpt_delay(int millisec);
#endif
#if defined __ia64__
static void adpt_ia64_info(sysInfo_S* si);
#endif
#if defined __sparc__
static void adpt_sparc_info(sysInfo_S* si);
#endif
#if defined __alpha__
static void adpt_sparc_info(sysInfo_S* si);
#endif
#if defined __i386__
static void adpt_i386_info(sysInfo_S* si);
#endif
#define PRINT_BUFFER_SIZE 512
#define HBA_FLAGS_DBG_FLAGS_MASK 0xffff0000 // Mask for debug flags