diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2007-10-12 10:11:35 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-10-12 10:13:06 -0400 |
commit | 364c85584e030f7cfc25e9d27ca893dee6f4bf8e (patch) | |
tree | bbf5bee7acc36e586031fa5bd67adf3216eb084c | |
parent | f5360106422302e8eed4d07ea8daf81ec19ca345 (diff) |
[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>
-rw-r--r-- | arch/s390/kernel/audit.c | 7 | ||||
-rw-r--r-- | arch/s390/kernel/audit.h | 15 | ||||
-rw-r--r-- | arch/s390/kernel/compat_audit.c | 1 | ||||
-rw-r--r-- | drivers/s390/char/con3270.c | 3 | ||||
-rw-r--r-- | drivers/s390/char/sclp.c | 5 | ||||
-rw-r--r-- | drivers/s390/char/tty3270.c | 9 | ||||
-rw-r--r-- | drivers/s390/char/tty3270.h | 16 | ||||
-rw-r--r-- | drivers/s390/cio/chp.c | 8 | ||||
-rw-r--r-- | drivers/s390/cio/cmf.c | 4 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_dbf.c | 10 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_erp.c | 18 |
11 files changed, 62 insertions, 34 deletions
diff --git a/arch/s390/kernel/audit.c b/arch/s390/kernel/audit.c index d1c76fe10f29..f4932c22ebe4 100644 --- a/arch/s390/kernel/audit.c +++ b/arch/s390/kernel/audit.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include <linux/types.h> | 2 | #include <linux/types.h> |
3 | #include <linux/audit.h> | 3 | #include <linux/audit.h> |
4 | #include <asm/unistd.h> | 4 | #include <asm/unistd.h> |
5 | #include "audit.h" | ||
5 | 6 | ||
6 | static unsigned dir_class[] = { | 7 | static unsigned dir_class[] = { |
7 | #include <asm-generic/audit_dir_write.h> | 8 | #include <asm-generic/audit_dir_write.h> |
@@ -40,7 +41,6 @@ int audit_classify_arch(int arch) | |||
40 | int audit_classify_syscall(int abi, unsigned syscall) | 41 | int audit_classify_syscall(int abi, unsigned syscall) |
41 | { | 42 | { |
42 | #ifdef CONFIG_COMPAT | 43 | #ifdef CONFIG_COMPAT |
43 | extern int s390_classify_syscall(unsigned); | ||
44 | if (abi == AUDIT_ARCH_S390) | 44 | if (abi == AUDIT_ARCH_S390) |
45 | return s390_classify_syscall(syscall); | 45 | return s390_classify_syscall(syscall); |
46 | #endif | 46 | #endif |
@@ -61,11 +61,6 @@ int audit_classify_syscall(int abi, unsigned syscall) | |||
61 | static int __init audit_classes_init(void) | 61 | static int __init audit_classes_init(void) |
62 | { | 62 | { |
63 | #ifdef CONFIG_COMPAT | 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 | audit_register_class(AUDIT_CLASS_WRITE_32, s390_write_class); | 64 | audit_register_class(AUDIT_CLASS_WRITE_32, s390_write_class); |
70 | audit_register_class(AUDIT_CLASS_READ_32, s390_read_class); | 65 | audit_register_class(AUDIT_CLASS_READ_32, s390_read_class); |
71 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, s390_dir_class); | 66 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, s390_dir_class); |
diff --git a/arch/s390/kernel/audit.h b/arch/s390/kernel/audit.h new file mode 100644 index 000000000000..12b56f4b5a73 --- /dev/null +++ b/arch/s390/kernel/audit.h | |||
@@ -0,0 +1,15 @@ | |||
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 */ | ||
diff --git a/arch/s390/kernel/compat_audit.c b/arch/s390/kernel/compat_audit.c index 0569f5126e49..d6487bf879e5 100644 --- a/arch/s390/kernel/compat_audit.c +++ b/arch/s390/kernel/compat_audit.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #undef __s390x__ | 1 | #undef __s390x__ |
2 | #include <asm/unistd.h> | 2 | #include <asm/unistd.h> |
3 | #include "audit.h" | ||
3 | 4 | ||
4 | unsigned s390_dir_class[] = { | 5 | unsigned s390_dir_class[] = { |
5 | #include <asm-generic/audit_dir_write.h> | 6 | #include <asm-generic/audit_dir_write.h> |
diff --git a/drivers/s390/char/con3270.c b/drivers/s390/char/con3270.c index fd3479119eb4..0b040557db02 100644 --- a/drivers/s390/char/con3270.c +++ b/drivers/s390/char/con3270.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <asm/ebcdic.h> | 22 | #include <asm/ebcdic.h> |
23 | 23 | ||
24 | #include "raw3270.h" | 24 | #include "raw3270.h" |
25 | #include "tty3270.h" | ||
25 | #include "ctrlchar.h" | 26 | #include "ctrlchar.h" |
26 | 27 | ||
27 | #define CON3270_OUTPUT_BUFFER_SIZE 1024 | 28 | #define CON3270_OUTPUT_BUFFER_SIZE 1024 |
@@ -507,8 +508,6 @@ con3270_write(struct console *co, const char *str, unsigned int count) | |||
507 | spin_unlock_irqrestore(&cp->view.lock,flags); | 508 | spin_unlock_irqrestore(&cp->view.lock,flags); |
508 | } | 509 | } |
509 | 510 | ||
510 | extern struct tty_driver *tty3270_driver; | ||
511 | |||
512 | static struct tty_driver * | 511 | static struct tty_driver * |
513 | con3270_device(struct console *c, int *index) | 512 | con3270_device(struct console *c, int *index) |
514 | { | 513 | { |
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index fa62e6944057..25629b92dec3 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c | |||
@@ -93,6 +93,7 @@ static volatile enum sclp_mask_state_t { | |||
93 | #define SCLP_RETRY_INTERVAL 30 | 93 | #define SCLP_RETRY_INTERVAL 30 |
94 | 94 | ||
95 | static void sclp_process_queue(void); | 95 | static void sclp_process_queue(void); |
96 | static void __sclp_make_read_req(void); | ||
96 | static int sclp_init_mask(int calculate); | 97 | static int sclp_init_mask(int calculate); |
97 | static int sclp_init(void); | 98 | static int sclp_init(void); |
98 | 99 | ||
@@ -115,7 +116,6 @@ sclp_service_call(sclp_cmdw_t command, void *sccb) | |||
115 | return 0; | 116 | return 0; |
116 | } | 117 | } |
117 | 118 | ||
118 | static inline void __sclp_make_read_req(void); | ||
119 | 119 | ||
120 | static void | 120 | static void |
121 | __sclp_queue_read_req(void) | 121 | __sclp_queue_read_req(void) |
@@ -318,8 +318,7 @@ sclp_read_cb(struct sclp_req *req, void *data) | |||
318 | } | 318 | } |
319 | 319 | ||
320 | /* Prepare read event data request. Called while sclp_lock is locked. */ | 320 | /* Prepare read event data request. Called while sclp_lock is locked. */ |
321 | static inline void | 321 | static void __sclp_make_read_req(void) |
322 | __sclp_make_read_req(void) | ||
323 | { | 322 | { |
324 | struct sccb_header *sccb; | 323 | struct sccb_header *sccb; |
325 | 324 | ||
diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c index bc33068b9ce2..70b1980a08b6 100644 --- a/drivers/s390/char/tty3270.c +++ b/drivers/s390/char/tty3270.c | |||
@@ -25,8 +25,8 @@ | |||
25 | #include <asm/ebcdic.h> | 25 | #include <asm/ebcdic.h> |
26 | #include <asm/uaccess.h> | 26 | #include <asm/uaccess.h> |
27 | 27 | ||
28 | |||
29 | #include "raw3270.h" | 28 | #include "raw3270.h" |
29 | #include "tty3270.h" | ||
30 | #include "keyboard.h" | 30 | #include "keyboard.h" |
31 | 31 | ||
32 | #define TTY3270_CHAR_BUF_SIZE 256 | 32 | #define TTY3270_CHAR_BUF_SIZE 256 |
@@ -1338,8 +1338,11 @@ tty3270_getpar(struct tty3270 *tp, int ix) | |||
1338 | static void | 1338 | static void |
1339 | tty3270_goto_xy(struct tty3270 *tp, int cx, int cy) | 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)); | 1341 | int max_cx = max(0, cx); |
1342 | cy = min_t(int, tp->view.rows - 3, max_t(int, 0, cy)); | 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 | if (cy != tp->cy) { | 1346 | if (cy != tp->cy) { |
1344 | tty3270_convert_line(tp, tp->cy); | 1347 | tty3270_convert_line(tp, tp->cy); |
1345 | tp->cy = cy; | 1348 | tp->cy = cy; |
diff --git a/drivers/s390/char/tty3270.h b/drivers/s390/char/tty3270.h new file mode 100644 index 000000000000..799da57f0390 --- /dev/null +++ b/drivers/s390/char/tty3270.h | |||
@@ -0,0 +1,16 @@ | |||
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 */ | ||
diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c index 3d49919a4517..42c1f4659adb 100644 --- a/drivers/s390/cio/chp.c +++ b/drivers/s390/cio/chp.c | |||
@@ -140,9 +140,11 @@ static ssize_t chp_measurement_chars_read(struct kobject *kobj, | |||
140 | char *buf, loff_t off, size_t count) | 140 | char *buf, loff_t off, size_t count) |
141 | { | 141 | { |
142 | struct channel_path *chp; | 142 | struct channel_path *chp; |
143 | struct device *device; | ||
143 | unsigned int size; | 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 | if (!chp->cmg_chars) | 148 | if (!chp->cmg_chars) |
147 | return 0; | 149 | return 0; |
148 | 150 | ||
@@ -193,9 +195,11 @@ static ssize_t chp_measurement_read(struct kobject *kobj, | |||
193 | { | 195 | { |
194 | struct channel_path *chp; | 196 | struct channel_path *chp; |
195 | struct channel_subsystem *css; | 197 | struct channel_subsystem *css; |
198 | struct device *device; | ||
196 | unsigned int size; | 199 | unsigned int size; |
197 | 200 | ||
198 | chp = to_channelpath(container_of(kobj, struct device, kobj)); | 201 | device = container_of(kobj, struct device, kobj); |
202 | chp = to_channelpath(device); | ||
199 | css = to_css(chp->dev.parent); | 203 | css = to_css(chp->dev.parent); |
200 | 204 | ||
201 | size = sizeof(struct cmg_entry); | 205 | size = sizeof(struct cmg_entry); |
diff --git a/drivers/s390/cio/cmf.c b/drivers/s390/cio/cmf.c index 6ef0ab895477..b960f66843e4 100644 --- a/drivers/s390/cio/cmf.c +++ b/drivers/s390/cio/cmf.c | |||
@@ -489,7 +489,6 @@ static struct cmb_area cmb_area = { | |||
489 | .num_channels = 1024, | 489 | .num_channels = 1024, |
490 | }; | 490 | }; |
491 | 491 | ||
492 | |||
493 | /* ****** old style CMB handling ********/ | 492 | /* ****** old style CMB handling ********/ |
494 | 493 | ||
495 | /* | 494 | /* |
@@ -812,7 +811,7 @@ static struct cmb_operations cmbops_basic = { | |||
812 | .align = align_cmb, | 811 | .align = align_cmb, |
813 | .attr_group = &cmf_attr_group, | 812 | .attr_group = &cmf_attr_group, |
814 | }; | 813 | }; |
815 | 814 | ||
816 | /* ******** extended cmb handling ********/ | 815 | /* ******** extended cmb handling ********/ |
817 | 816 | ||
818 | /** | 817 | /** |
@@ -1079,7 +1078,6 @@ static struct cmb_operations cmbops_extended = { | |||
1079 | .align = align_cmbe, | 1078 | .align = align_cmbe, |
1080 | .attr_group = &cmf_attr_group_ext, | 1079 | .attr_group = &cmf_attr_group_ext, |
1081 | }; | 1080 | }; |
1082 | |||
1083 | 1081 | ||
1084 | static ssize_t cmb_show_attr(struct device *dev, char *buf, enum cmb_index idx) | 1082 | static ssize_t cmb_show_attr(struct device *dev, char *buf, enum cmb_index idx) |
1085 | { | 1083 | { |
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c index 5f3212440f68..ffa3bf756943 100644 --- a/drivers/s390/scsi/zfcp_dbf.c +++ b/drivers/s390/scsi/zfcp_dbf.c | |||
@@ -19,8 +19,8 @@ | |||
19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <asm/debug.h> | ||
23 | #include <linux/ctype.h> | 22 | #include <linux/ctype.h> |
23 | #include <asm/debug.h> | ||
24 | #include "zfcp_ext.h" | 24 | #include "zfcp_ext.h" |
25 | 25 | ||
26 | static u32 dbfsize = 4; | 26 | static u32 dbfsize = 4; |
@@ -35,17 +35,17 @@ static int | |||
35 | zfcp_dbf_stck(char *out_buf, const char *label, unsigned long long stck) | 35 | zfcp_dbf_stck(char *out_buf, const char *label, unsigned long long stck) |
36 | { | 36 | { |
37 | unsigned long long sec; | 37 | unsigned long long sec; |
38 | struct timespec xtime; | 38 | struct timespec dbftime; |
39 | int len = 0; | 39 | int len = 0; |
40 | 40 | ||
41 | stck -= 0x8126d60e46000000LL - (0x3c26700LL * 1000000 * 4096); | 41 | stck -= 0x8126d60e46000000LL - (0x3c26700LL * 1000000 * 4096); |
42 | sec = stck >> 12; | 42 | sec = stck >> 12; |
43 | do_div(sec, 1000000); | 43 | do_div(sec, 1000000); |
44 | xtime.tv_sec = sec; | 44 | dbftime.tv_sec = sec; |
45 | stck -= (sec * 1000000) << 12; | 45 | stck -= (sec * 1000000) << 12; |
46 | xtime.tv_nsec = ((stck * 1000) >> 12); | 46 | dbftime.tv_nsec = ((stck * 1000) >> 12); |
47 | len += sprintf(out_buf + len, "%-24s%011lu:%06lu\n", | 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 | return len; | 50 | return len; |
51 | } | 51 | } |
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index d8cd75ce2d9a..16b4418ab257 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c | |||
@@ -54,7 +54,7 @@ static int zfcp_erp_strategy_check_adapter(struct zfcp_adapter *, int); | |||
54 | static int zfcp_erp_strategy_statechange(int, u32, struct zfcp_adapter *, | 54 | static int zfcp_erp_strategy_statechange(int, u32, struct zfcp_adapter *, |
55 | struct zfcp_port *, | 55 | struct zfcp_port *, |
56 | struct zfcp_unit *, int); | 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 | static int zfcp_erp_strategy_followup_actions(int, struct zfcp_adapter *, | 58 | static int zfcp_erp_strategy_followup_actions(int, struct zfcp_adapter *, |
59 | struct zfcp_port *, | 59 | struct zfcp_port *, |
60 | struct zfcp_unit *, int); | 60 | struct zfcp_unit *, int); |
@@ -106,8 +106,8 @@ static void zfcp_erp_action_cleanup(int, struct zfcp_adapter *, | |||
106 | static void zfcp_erp_action_ready(struct zfcp_erp_action *); | 106 | static void zfcp_erp_action_ready(struct zfcp_erp_action *); |
107 | static int zfcp_erp_action_exists(struct zfcp_erp_action *); | 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 *); | 109 | static void zfcp_erp_action_to_ready(struct zfcp_erp_action *); |
110 | static inline void zfcp_erp_action_to_running(struct zfcp_erp_action *); | 110 | static void zfcp_erp_action_to_running(struct zfcp_erp_action *); |
111 | 111 | ||
112 | static void zfcp_erp_memwait_handler(unsigned long); | 112 | static void zfcp_erp_memwait_handler(unsigned long); |
113 | 113 | ||
@@ -952,7 +952,7 @@ zfcp_erp_memwait_handler(unsigned long data) | |||
952 | * action gets an appropriate flag and will be processed | 952 | * action gets an appropriate flag and will be processed |
953 | * accordingly | 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 | struct zfcp_erp_action *erp_action = (struct zfcp_erp_action *) data; | 957 | struct zfcp_erp_action *erp_action = (struct zfcp_erp_action *) data; |
958 | struct zfcp_adapter *adapter = erp_action->adapter; | 958 | struct zfcp_adapter *adapter = erp_action->adapter; |
@@ -1491,7 +1491,7 @@ zfcp_erp_strategy_statechange(int action, | |||
1491 | return retval; | 1491 | return retval; |
1492 | } | 1492 | } |
1493 | 1493 | ||
1494 | static inline int | 1494 | static int |
1495 | zfcp_erp_strategy_statechange_detected(atomic_t * target_status, u32 erp_status) | 1495 | zfcp_erp_strategy_statechange_detected(atomic_t * target_status, u32 erp_status) |
1496 | { | 1496 | { |
1497 | return | 1497 | return |
@@ -2001,7 +2001,7 @@ zfcp_erp_adapter_strategy_generic(struct zfcp_erp_action *erp_action, int close) | |||
2001 | * returns: 0 - successful setup | 2001 | * returns: 0 - successful setup |
2002 | * !0 - failed setup | 2002 | * !0 - failed setup |
2003 | */ | 2003 | */ |
2004 | int | 2004 | static int |
2005 | zfcp_erp_adapter_strategy_open_qdio(struct zfcp_erp_action *erp_action) | 2005 | zfcp_erp_adapter_strategy_open_qdio(struct zfcp_erp_action *erp_action) |
2006 | { | 2006 | { |
2007 | int retval; | 2007 | int retval; |
@@ -3248,8 +3248,7 @@ static void zfcp_erp_action_dismiss_unit(struct zfcp_unit *unit) | |||
3248 | zfcp_erp_action_dismiss(&unit->erp_action); | 3248 | zfcp_erp_action_dismiss(&unit->erp_action); |
3249 | } | 3249 | } |
3250 | 3250 | ||
3251 | static inline void | 3251 | static void zfcp_erp_action_to_running(struct zfcp_erp_action *erp_action) |
3252 | zfcp_erp_action_to_running(struct zfcp_erp_action *erp_action) | ||
3253 | { | 3252 | { |
3254 | struct zfcp_adapter *adapter = erp_action->adapter; | 3253 | struct zfcp_adapter *adapter = erp_action->adapter; |
3255 | 3254 | ||
@@ -3258,8 +3257,7 @@ zfcp_erp_action_to_running(struct zfcp_erp_action *erp_action) | |||
3258 | list_move(&erp_action->list, &erp_action->adapter->erp_running_head); | 3257 | list_move(&erp_action->list, &erp_action->adapter->erp_running_head); |
3259 | } | 3258 | } |
3260 | 3259 | ||
3261 | static inline void | 3260 | static void zfcp_erp_action_to_ready(struct zfcp_erp_action *erp_action) |
3262 | zfcp_erp_action_to_ready(struct zfcp_erp_action *erp_action) | ||
3263 | { | 3261 | { |
3264 | struct zfcp_adapter *adapter = erp_action->adapter; | 3262 | struct zfcp_adapter *adapter = erp_action->adapter; |
3265 | 3263 | ||