diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2008-05-06 23:42:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-08 13:46:56 -0400 |
commit | 8b2cc917a02936c3ea7d8da46801c7b7b6233093 (patch) | |
tree | c0aabb03ae6677d9aaeb2367f48c5be60e42c4c4 /drivers/scsi | |
parent | 5be7a4792a31df6f2cd44bfba8da467ea20a0642 (diff) |
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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/dpt_i2o.c | 78 | ||||
-rw-r--r-- | drivers/scsi/dpti.h | 13 |
2 files changed, 36 insertions, 55 deletions
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 0fb5bf4c43ac..8508816f303d 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c | |||
@@ -1967,45 +1967,6 @@ cleanup: | |||
1967 | return rcode; | 1967 | return rcode; |
1968 | } | 1968 | } |
1969 | 1969 | ||
1970 | |||
1971 | /* | ||
1972 | * This routine returns information about the system. This does not effect | ||
1973 | * any logic and if the info is wrong - it doesn't matter. | ||
1974 | */ | ||
1975 | |||
1976 | /* Get all the info we can not get from kernel services */ | ||
1977 | static int adpt_system_info(void __user *buffer) | ||
1978 | { | ||
1979 | sysInfo_S si; | ||
1980 | |||
1981 | memset(&si, 0, sizeof(si)); | ||
1982 | |||
1983 | si.osType = OS_LINUX; | ||
1984 | si.osMajorVersion = 0; | ||
1985 | si.osMinorVersion = 0; | ||
1986 | si.osRevision = 0; | ||
1987 | si.busType = SI_PCI_BUS; | ||
1988 | si.processorFamily = DPTI_sig.dsProcessorFamily; | ||
1989 | |||
1990 | #if defined __i386__ | ||
1991 | adpt_i386_info(&si); | ||
1992 | #elif defined (__ia64__) | ||
1993 | adpt_ia64_info(&si); | ||
1994 | #elif defined(__sparc__) | ||
1995 | adpt_sparc_info(&si); | ||
1996 | #elif defined (__alpha__) | ||
1997 | adpt_alpha_info(&si); | ||
1998 | #else | ||
1999 | si.processorType = 0xff ; | ||
2000 | #endif | ||
2001 | if(copy_to_user(buffer, &si, sizeof(si))){ | ||
2002 | printk(KERN_WARNING"dpti: Could not copy buffer TO user\n"); | ||
2003 | return -EFAULT; | ||
2004 | } | ||
2005 | |||
2006 | return 0; | ||
2007 | } | ||
2008 | |||
2009 | #if defined __ia64__ | 1970 | #if defined __ia64__ |
2010 | static void adpt_ia64_info(sysInfo_S* si) | 1971 | static void adpt_ia64_info(sysInfo_S* si) |
2011 | { | 1972 | { |
@@ -2016,7 +1977,6 @@ static void adpt_ia64_info(sysInfo_S* si) | |||
2016 | } | 1977 | } |
2017 | #endif | 1978 | #endif |
2018 | 1979 | ||
2019 | |||
2020 | #if defined __sparc__ | 1980 | #if defined __sparc__ |
2021 | static void adpt_sparc_info(sysInfo_S* si) | 1981 | static void adpt_sparc_info(sysInfo_S* si) |
2022 | { | 1982 | { |
@@ -2026,7 +1986,6 @@ static void adpt_sparc_info(sysInfo_S* si) | |||
2026 | si->processorType = PROC_ULTRASPARC; | 1986 | si->processorType = PROC_ULTRASPARC; |
2027 | } | 1987 | } |
2028 | #endif | 1988 | #endif |
2029 | |||
2030 | #if defined __alpha__ | 1989 | #if defined __alpha__ |
2031 | static void adpt_alpha_info(sysInfo_S* si) | 1990 | static void adpt_alpha_info(sysInfo_S* si) |
2032 | { | 1991 | { |
@@ -2038,7 +1997,6 @@ static void adpt_alpha_info(sysInfo_S* si) | |||
2038 | #endif | 1997 | #endif |
2039 | 1998 | ||
2040 | #if defined __i386__ | 1999 | #if defined __i386__ |
2041 | |||
2042 | static void adpt_i386_info(sysInfo_S* si) | 2000 | static void adpt_i386_info(sysInfo_S* si) |
2043 | { | 2001 | { |
2044 | // This is all the info we need for now | 2002 | // This is all the info we need for now |
@@ -2059,9 +2017,45 @@ static void adpt_i386_info(sysInfo_S* si) | |||
2059 | break; | 2017 | break; |
2060 | } | 2018 | } |
2061 | } | 2019 | } |
2020 | #endif | ||
2021 | |||
2022 | /* | ||
2023 | * This routine returns information about the system. This does not effect | ||
2024 | * any logic and if the info is wrong - it doesn't matter. | ||
2025 | */ | ||
2062 | 2026 | ||
2027 | /* Get all the info we can not get from kernel services */ | ||
2028 | static int adpt_system_info(void __user *buffer) | ||
2029 | { | ||
2030 | sysInfo_S si; | ||
2031 | |||
2032 | memset(&si, 0, sizeof(si)); | ||
2033 | |||
2034 | si.osType = OS_LINUX; | ||
2035 | si.osMajorVersion = 0; | ||
2036 | si.osMinorVersion = 0; | ||
2037 | si.osRevision = 0; | ||
2038 | si.busType = SI_PCI_BUS; | ||
2039 | si.processorFamily = DPTI_sig.dsProcessorFamily; | ||
2040 | |||
2041 | #if defined __i386__ | ||
2042 | adpt_i386_info(&si); | ||
2043 | #elif defined (__ia64__) | ||
2044 | adpt_ia64_info(&si); | ||
2045 | #elif defined(__sparc__) | ||
2046 | adpt_sparc_info(&si); | ||
2047 | #elif defined (__alpha__) | ||
2048 | adpt_alpha_info(&si); | ||
2049 | #else | ||
2050 | si.processorType = 0xff ; | ||
2063 | #endif | 2051 | #endif |
2052 | if (copy_to_user(buffer, &si, sizeof(si))){ | ||
2053 | printk(KERN_WARNING"dpti: Could not copy buffer TO user\n"); | ||
2054 | return -EFAULT; | ||
2055 | } | ||
2064 | 2056 | ||
2057 | return 0; | ||
2058 | } | ||
2065 | 2059 | ||
2066 | static int adpt_ioctl(struct inode *inode, struct file *file, uint cmd, | 2060 | static int adpt_ioctl(struct inode *inode, struct file *file, uint cmd, |
2067 | ulong arg) | 2061 | ulong arg) |
diff --git a/drivers/scsi/dpti.h b/drivers/scsi/dpti.h index 924cd5a51676..337746d46043 100644 --- a/drivers/scsi/dpti.h +++ b/drivers/scsi/dpti.h | |||
@@ -316,19 +316,6 @@ static int adpt_close(struct inode *inode, struct file *file); | |||
316 | static void adpt_delay(int millisec); | 316 | static void adpt_delay(int millisec); |
317 | #endif | 317 | #endif |
318 | 318 | ||
319 | #if defined __ia64__ | ||
320 | static void adpt_ia64_info(sysInfo_S* si); | ||
321 | #endif | ||
322 | #if defined __sparc__ | ||
323 | static void adpt_sparc_info(sysInfo_S* si); | ||
324 | #endif | ||
325 | #if defined __alpha__ | ||
326 | static void adpt_sparc_info(sysInfo_S* si); | ||
327 | #endif | ||
328 | #if defined __i386__ | ||
329 | static void adpt_i386_info(sysInfo_S* si); | ||
330 | #endif | ||
331 | |||
332 | #define PRINT_BUFFER_SIZE 512 | 319 | #define PRINT_BUFFER_SIZE 512 |
333 | 320 | ||
334 | #define HBA_FLAGS_DBG_FLAGS_MASK 0xffff0000 // Mask for debug flags | 321 | #define HBA_FLAGS_DBG_FLAGS_MASK 0xffff0000 // Mask for debug flags |