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

[S390] Get rid of a bunch of sparse warnings again.

Also removes a bunch of ^L in drivers/s390/cio/cmf.c

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Heiko Carstens and committed by
Martin Schwidefsky
364c8558 f5360106

+62 -34
+1 -6
arch/s390/kernel/audit.c
··· 2 2 #include <linux/types.h> 3 3 #include <linux/audit.h> 4 4 #include <asm/unistd.h> 5 + #include "audit.h" 5 6 6 7 static unsigned dir_class[] = { 7 8 #include <asm-generic/audit_dir_write.h> ··· 41 40 int audit_classify_syscall(int abi, unsigned syscall) 42 41 { 43 42 #ifdef CONFIG_COMPAT 44 - extern int s390_classify_syscall(unsigned); 45 43 if (abi == AUDIT_ARCH_S390) 46 44 return s390_classify_syscall(syscall); 47 45 #endif ··· 61 61 static int __init audit_classes_init(void) 62 62 { 63 63 #ifdef CONFIG_COMPAT 64 - extern __u32 s390_dir_class[]; 65 - extern __u32 s390_write_class[]; 66 - extern __u32 s390_read_class[]; 67 - extern __u32 s390_chattr_class[]; 68 - extern __u32 s390_signal_class[]; 69 64 audit_register_class(AUDIT_CLASS_WRITE_32, s390_write_class); 70 65 audit_register_class(AUDIT_CLASS_READ_32, s390_read_class); 71 66 audit_register_class(AUDIT_CLASS_DIR_WRITE_32, s390_dir_class);
+15
arch/s390/kernel/audit.h
··· 1 + #ifndef __ARCH_S390_KERNEL_AUDIT_H 2 + #define __ARCH_S390_KERNEL_AUDIT_H 3 + 4 + #include <linux/types.h> 5 + 6 + #ifdef CONFIG_COMPAT 7 + extern int s390_classify_syscall(unsigned); 8 + extern __u32 s390_dir_class[]; 9 + extern __u32 s390_write_class[]; 10 + extern __u32 s390_read_class[]; 11 + extern __u32 s390_chattr_class[]; 12 + extern __u32 s390_signal_class[]; 13 + #endif /* CONFIG_COMPAT */ 14 + 15 + #endif /* __ARCH_S390_KERNEL_AUDIT_H */
+1
arch/s390/kernel/compat_audit.c
··· 1 1 #undef __s390x__ 2 2 #include <asm/unistd.h> 3 + #include "audit.h" 3 4 4 5 unsigned s390_dir_class[] = { 5 6 #include <asm-generic/audit_dir_write.h>
+1 -2
drivers/s390/char/con3270.c
··· 22 22 #include <asm/ebcdic.h> 23 23 24 24 #include "raw3270.h" 25 + #include "tty3270.h" 25 26 #include "ctrlchar.h" 26 27 27 28 #define CON3270_OUTPUT_BUFFER_SIZE 1024 ··· 507 506 con3270_set_timer(cp, HZ/10); 508 507 spin_unlock_irqrestore(&cp->view.lock,flags); 509 508 } 510 - 511 - extern struct tty_driver *tty3270_driver; 512 509 513 510 static struct tty_driver * 514 511 con3270_device(struct console *c, int *index)
+2 -3
drivers/s390/char/sclp.c
··· 93 93 #define SCLP_RETRY_INTERVAL 30 94 94 95 95 static void sclp_process_queue(void); 96 + static void __sclp_make_read_req(void); 96 97 static int sclp_init_mask(int calculate); 97 98 static int sclp_init(void); 98 99 ··· 116 115 return 0; 117 116 } 118 117 119 - static inline void __sclp_make_read_req(void); 120 118 121 119 static void 122 120 __sclp_queue_read_req(void) ··· 318 318 } 319 319 320 320 /* Prepare read event data request. Called while sclp_lock is locked. */ 321 - static inline void 322 - __sclp_make_read_req(void) 321 + static void __sclp_make_read_req(void) 323 322 { 324 323 struct sccb_header *sccb; 325 324
+6 -3
drivers/s390/char/tty3270.c
··· 25 25 #include <asm/ebcdic.h> 26 26 #include <asm/uaccess.h> 27 27 28 - 29 28 #include "raw3270.h" 29 + #include "tty3270.h" 30 30 #include "keyboard.h" 31 31 32 32 #define TTY3270_CHAR_BUF_SIZE 256 ··· 1338 1338 static void 1339 1339 tty3270_goto_xy(struct tty3270 *tp, int cx, int cy) 1340 1340 { 1341 - tp->cx = min_t(int, tp->view.cols - 1, max_t(int, 0, cx)); 1342 - cy = min_t(int, tp->view.rows - 3, max_t(int, 0, cy)); 1341 + int max_cx = max(0, cx); 1342 + int max_cy = max(0, cy); 1343 + 1344 + tp->cx = min_t(int, tp->view.cols - 1, max_cx); 1345 + cy = min_t(int, tp->view.rows - 3, max_cy); 1343 1346 if (cy != tp->cy) { 1344 1347 tty3270_convert_line(tp, tp->cy); 1345 1348 tp->cy = cy;
+16
drivers/s390/char/tty3270.h
··· 1 + /* 2 + * drivers/s390/char/tty3270.h 3 + * 4 + * Copyright IBM Corp. 2007 5 + * 6 + */ 7 + 8 + #ifndef __DRIVERS_S390_CHAR_TTY3270_H 9 + #define __DRIVERS_S390_CHAR_TTY3270_H 10 + 11 + #include <linux/tty.h> 12 + #include <linux/tty_driver.h> 13 + 14 + extern struct tty_driver *tty3270_driver; 15 + 16 + #endif /* __DRIVERS_S390_CHAR_TTY3270_H */
+6 -2
drivers/s390/cio/chp.c
··· 140 140 char *buf, loff_t off, size_t count) 141 141 { 142 142 struct channel_path *chp; 143 + struct device *device; 143 144 unsigned int size; 144 145 145 - chp = to_channelpath(container_of(kobj, struct device, kobj)); 146 + device = container_of(kobj, struct device, kobj); 147 + chp = to_channelpath(device); 146 148 if (!chp->cmg_chars) 147 149 return 0; 148 150 ··· 195 193 { 196 194 struct channel_path *chp; 197 195 struct channel_subsystem *css; 196 + struct device *device; 198 197 unsigned int size; 199 198 200 - chp = to_channelpath(container_of(kobj, struct device, kobj)); 199 + device = container_of(kobj, struct device, kobj); 200 + chp = to_channelpath(device); 201 201 css = to_css(chp->dev.parent); 202 202 203 203 size = sizeof(struct cmg_entry);
+1 -3
drivers/s390/cio/cmf.c
··· 489 489 .num_channels = 1024, 490 490 }; 491 491 492 - 493 492 /* ****** old style CMB handling ********/ 494 493 495 494 /* ··· 811 812 .align = align_cmb, 812 813 .attr_group = &cmf_attr_group, 813 814 }; 814 - 815 + 815 816 /* ******** extended cmb handling ********/ 816 817 817 818 /** ··· 1078 1079 .align = align_cmbe, 1079 1080 .attr_group = &cmf_attr_group_ext, 1080 1081 }; 1081 - 1082 1082 1083 1083 static ssize_t cmb_show_attr(struct device *dev, char *buf, enum cmb_index idx) 1084 1084 {
+5 -5
drivers/s390/scsi/zfcp_dbf.c
··· 19 19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 20 */ 21 21 22 - #include <asm/debug.h> 23 22 #include <linux/ctype.h> 23 + #include <asm/debug.h> 24 24 #include "zfcp_ext.h" 25 25 26 26 static u32 dbfsize = 4; ··· 35 35 zfcp_dbf_stck(char *out_buf, const char *label, unsigned long long stck) 36 36 { 37 37 unsigned long long sec; 38 - struct timespec xtime; 38 + struct timespec dbftime; 39 39 int len = 0; 40 40 41 41 stck -= 0x8126d60e46000000LL - (0x3c26700LL * 1000000 * 4096); 42 42 sec = stck >> 12; 43 43 do_div(sec, 1000000); 44 - xtime.tv_sec = sec; 44 + dbftime.tv_sec = sec; 45 45 stck -= (sec * 1000000) << 12; 46 - xtime.tv_nsec = ((stck * 1000) >> 12); 46 + dbftime.tv_nsec = ((stck * 1000) >> 12); 47 47 len += sprintf(out_buf + len, "%-24s%011lu:%06lu\n", 48 - label, xtime.tv_sec, xtime.tv_nsec); 48 + label, dbftime.tv_sec, dbftime.tv_nsec); 49 49 50 50 return len; 51 51 }
+8 -10
drivers/s390/scsi/zfcp_erp.c
··· 54 54 static int zfcp_erp_strategy_statechange(int, u32, struct zfcp_adapter *, 55 55 struct zfcp_port *, 56 56 struct zfcp_unit *, int); 57 - static inline int zfcp_erp_strategy_statechange_detected(atomic_t *, u32); 57 + static int zfcp_erp_strategy_statechange_detected(atomic_t *, u32); 58 58 static int zfcp_erp_strategy_followup_actions(int, struct zfcp_adapter *, 59 59 struct zfcp_port *, 60 60 struct zfcp_unit *, int); ··· 106 106 static void zfcp_erp_action_ready(struct zfcp_erp_action *); 107 107 static int zfcp_erp_action_exists(struct zfcp_erp_action *); 108 108 109 - static inline void zfcp_erp_action_to_ready(struct zfcp_erp_action *); 110 - static inline void zfcp_erp_action_to_running(struct zfcp_erp_action *); 109 + static void zfcp_erp_action_to_ready(struct zfcp_erp_action *); 110 + static void zfcp_erp_action_to_running(struct zfcp_erp_action *); 111 111 112 112 static void zfcp_erp_memwait_handler(unsigned long); 113 113 ··· 952 952 * action gets an appropriate flag and will be processed 953 953 * accordingly 954 954 */ 955 - void zfcp_erp_timeout_handler(unsigned long data) 955 + static void zfcp_erp_timeout_handler(unsigned long data) 956 956 { 957 957 struct zfcp_erp_action *erp_action = (struct zfcp_erp_action *) data; 958 958 struct zfcp_adapter *adapter = erp_action->adapter; ··· 1491 1491 return retval; 1492 1492 } 1493 1493 1494 - static inline int 1494 + static int 1495 1495 zfcp_erp_strategy_statechange_detected(atomic_t * target_status, u32 erp_status) 1496 1496 { 1497 1497 return ··· 2001 2001 * returns: 0 - successful setup 2002 2002 * !0 - failed setup 2003 2003 */ 2004 - int 2004 + static int 2005 2005 zfcp_erp_adapter_strategy_open_qdio(struct zfcp_erp_action *erp_action) 2006 2006 { 2007 2007 int retval; ··· 3248 3248 zfcp_erp_action_dismiss(&unit->erp_action); 3249 3249 } 3250 3250 3251 - static inline void 3252 - zfcp_erp_action_to_running(struct zfcp_erp_action *erp_action) 3251 + static void zfcp_erp_action_to_running(struct zfcp_erp_action *erp_action) 3253 3252 { 3254 3253 struct zfcp_adapter *adapter = erp_action->adapter; 3255 3254 ··· 3257 3258 list_move(&erp_action->list, &erp_action->adapter->erp_running_head); 3258 3259 } 3259 3260 3260 - static inline void 3261 - zfcp_erp_action_to_ready(struct zfcp_erp_action *erp_action) 3261 + static void zfcp_erp_action_to_ready(struct zfcp_erp_action *erp_action) 3262 3262 { 3263 3263 struct zfcp_adapter *adapter = erp_action->adapter; 3264 3264