Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andrew Morton and committed by
Linus Torvalds
8b2cc917 5be7a479

+37 -56
+37 -43
drivers/scsi/dpt_i2o.c
··· 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 { ··· 1977 2016 } 1978 2017 #endif 1979 2018 1980 - 1981 2019 #if defined __sparc__ 1982 2020 static void adpt_sparc_info(sysInfo_S* si) 1983 2021 { ··· 1986 2026 si->processorType = PROC_ULTRASPARC; 1987 2027 } 1988 2028 #endif 1989 - 1990 2029 #if defined __alpha__ 1991 2030 static void adpt_alpha_info(sysInfo_S* si) 1992 2031 { ··· 1997 2038 #endif 1998 2039 1999 2040 #if defined __i386__ 2000 - 2001 2041 static void adpt_i386_info(sysInfo_S* si) 2002 2042 { 2003 2043 // This is all the info we need for now ··· 2017 2059 break; 2018 2060 } 2019 2061 } 2020 - 2021 2062 #endif 2022 2063 2064 + /* 2065 + * This routine returns information about the system. This does not effect 2066 + * any logic and if the info is wrong - it doesn't matter. 2067 + */ 2068 + 2069 + /* Get all the info we can not get from kernel services */ 2070 + static int adpt_system_info(void __user *buffer) 2071 + { 2072 + sysInfo_S si; 2073 + 2074 + memset(&si, 0, sizeof(si)); 2075 + 2076 + si.osType = OS_LINUX; 2077 + si.osMajorVersion = 0; 2078 + si.osMinorVersion = 0; 2079 + si.osRevision = 0; 2080 + si.busType = SI_PCI_BUS; 2081 + si.processorFamily = DPTI_sig.dsProcessorFamily; 2082 + 2083 + #if defined __i386__ 2084 + adpt_i386_info(&si); 2085 + #elif defined (__ia64__) 2086 + adpt_ia64_info(&si); 2087 + #elif defined(__sparc__) 2088 + adpt_sparc_info(&si); 2089 + #elif defined (__alpha__) 2090 + adpt_alpha_info(&si); 2091 + #else 2092 + si.processorType = 0xff ; 2093 + #endif 2094 + if (copy_to_user(buffer, &si, sizeof(si))){ 2095 + printk(KERN_WARNING"dpti: Could not copy buffer TO user\n"); 2096 + return -EFAULT; 2097 + } 2098 + 2099 + return 0; 2100 + } 2023 2101 2024 2102 static int adpt_ioctl(struct inode *inode, struct file *file, uint cmd, 2025 2103 ulong arg)
-13
drivers/scsi/dpti.h
··· 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