Commit 8b2cc917a02936c3ea7d8da46801c7b7b6233093
Committed by
Linus Torvalds
1 parent
5be7a4792a
Exists in
master
and in
7 other branches
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>
Showing 2 changed files with 36 additions and 55 deletions Side-by-side Diff
drivers/scsi/dpt_i2o.c
... | ... | @@ -1967,45 +1967,6 @@ |
1967 | 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 | 1970 | #if defined __ia64__ |
2010 | 1971 | static void adpt_ia64_info(sysInfo_S* si) |
2011 | 1972 | { |
... | ... | @@ -2016,7 +1977,6 @@ |
2016 | 1977 | } |
2017 | 1978 | #endif |
2018 | 1979 | |
2019 | - | |
2020 | 1980 | #if defined __sparc__ |
2021 | 1981 | static void adpt_sparc_info(sysInfo_S* si) |
2022 | 1982 | { |
... | ... | @@ -2026,7 +1986,6 @@ |
2026 | 1986 | si->processorType = PROC_ULTRASPARC; |
2027 | 1987 | } |
2028 | 1988 | #endif |
2029 | - | |
2030 | 1989 | #if defined __alpha__ |
2031 | 1990 | static void adpt_alpha_info(sysInfo_S* si) |
2032 | 1991 | { |
... | ... | @@ -2038,7 +1997,6 @@ |
2038 | 1997 | #endif |
2039 | 1998 | |
2040 | 1999 | #if defined __i386__ |
2041 | - | |
2042 | 2000 | static void adpt_i386_info(sysInfo_S* si) |
2043 | 2001 | { |
2044 | 2002 | // This is all the info we need for now |
2045 | 2003 | |
2046 | 2004 | |
2047 | 2005 | |
... | ... | @@ -2059,9 +2017,45 @@ |
2059 | 2017 | break; |
2060 | 2018 | } |
2061 | 2019 | } |
2020 | +#endif | |
2062 | 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 | + */ | |
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 | 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 | 2060 | static int adpt_ioctl(struct inode *inode, struct file *file, uint cmd, |
2067 | 2061 | ulong arg) |
drivers/scsi/dpti.h
... | ... | @@ -316,19 +316,6 @@ |
316 | 316 | static void adpt_delay(int millisec); |
317 | 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 | 319 | #define PRINT_BUFFER_SIZE 512 |
333 | 320 | |
334 | 321 | #define HBA_FLAGS_DBG_FLAGS_MASK 0xffff0000 // Mask for debug flags |