aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUrsula Braun <ursula.braun@de.ibm.com>2015-09-18 10:06:52 -0400
committerDavid S. Miller <davem@davemloft.net>2015-09-21 19:03:04 -0400
commit91e60eb60bdf078fc58b8d2fd1ac12f3c09bb893 (patch)
treef7a4f4801941ddbed1ae567b56121ec2db1492f4
parent4d7def2a12386dbf56443016114c187df50e3442 (diff)
s390/iucv: do not use arrays as argument
The iucv code uses arrays as arguments. Even though this does not really cause a problem, it could be misleading, since the compiler turns array arguments into just a pointer argument. To be more precise this patch changes the array arguments into pointers. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/s390/char/monreader.c4
-rw-r--r--drivers/s390/char/vmlogrdr.c8
-rw-r--r--drivers/s390/net/netiucv.c21
-rw-r--r--drivers/s390/net/smsgiucv.c5
-rw-r--r--drivers/tty/hvc/hvc_iucv.c10
-rw-r--r--include/net/iucv/iucv.h20
-rw-r--r--net/iucv/af_iucv.c9
-rw-r--r--net/iucv/iucv.c12
8 files changed, 43 insertions, 46 deletions
diff --git a/drivers/s390/char/monreader.c b/drivers/s390/char/monreader.c
index b7d60306b0bc..fc94bfdceb95 100644
--- a/drivers/s390/char/monreader.c
+++ b/drivers/s390/char/monreader.c
@@ -229,7 +229,7 @@ static struct mon_msg *mon_next_message(struct mon_private *monpriv)
229/****************************************************************************** 229/******************************************************************************
230 * IUCV handler * 230 * IUCV handler *
231 *****************************************************************************/ 231 *****************************************************************************/
232static void mon_iucv_path_complete(struct iucv_path *path, u8 ipuser[16]) 232static void mon_iucv_path_complete(struct iucv_path *path, u8 *ipuser)
233{ 233{
234 struct mon_private *monpriv = path->private; 234 struct mon_private *monpriv = path->private;
235 235
@@ -237,7 +237,7 @@ static void mon_iucv_path_complete(struct iucv_path *path, u8 ipuser[16])
237 wake_up(&mon_conn_wait_queue); 237 wake_up(&mon_conn_wait_queue);
238} 238}
239 239
240static void mon_iucv_path_severed(struct iucv_path *path, u8 ipuser[16]) 240static void mon_iucv_path_severed(struct iucv_path *path, u8 *ipuser)
241{ 241{
242 struct mon_private *monpriv = path->private; 242 struct mon_private *monpriv = path->private;
243 243
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c
index 9bb48d70957c..799c1524c779 100644
--- a/drivers/s390/char/vmlogrdr.c
+++ b/drivers/s390/char/vmlogrdr.c
@@ -99,8 +99,8 @@ static const struct file_operations vmlogrdr_fops = {
99}; 99};
100 100
101 101
102static void vmlogrdr_iucv_path_complete(struct iucv_path *, u8 ipuser[16]); 102static void vmlogrdr_iucv_path_complete(struct iucv_path *, u8 *ipuser);
103static void vmlogrdr_iucv_path_severed(struct iucv_path *, u8 ipuser[16]); 103static void vmlogrdr_iucv_path_severed(struct iucv_path *, u8 *ipuser);
104static void vmlogrdr_iucv_message_pending(struct iucv_path *, 104static void vmlogrdr_iucv_message_pending(struct iucv_path *,
105 struct iucv_message *); 105 struct iucv_message *);
106 106
@@ -160,7 +160,7 @@ static struct cdev *vmlogrdr_cdev = NULL;
160static int recording_class_AB; 160static int recording_class_AB;
161 161
162 162
163static void vmlogrdr_iucv_path_complete(struct iucv_path *path, u8 ipuser[16]) 163static void vmlogrdr_iucv_path_complete(struct iucv_path *path, u8 *ipuser)
164{ 164{
165 struct vmlogrdr_priv_t * logptr = path->private; 165 struct vmlogrdr_priv_t * logptr = path->private;
166 166
@@ -171,7 +171,7 @@ static void vmlogrdr_iucv_path_complete(struct iucv_path *path, u8 ipuser[16])
171} 171}
172 172
173 173
174static void vmlogrdr_iucv_path_severed(struct iucv_path *path, u8 ipuser[16]) 174static void vmlogrdr_iucv_path_severed(struct iucv_path *path, u8 *ipuser)
175{ 175{
176 struct vmlogrdr_priv_t * logptr = path->private; 176 struct vmlogrdr_priv_t * logptr = path->private;
177 u8 reason = (u8) ipuser[8]; 177 u8 reason = (u8) ipuser[8];
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c
index 33f7040d711d..0ba3a2f81750 100644
--- a/drivers/s390/net/netiucv.c
+++ b/drivers/s390/net/netiucv.c
@@ -149,12 +149,11 @@ static struct device_driver netiucv_driver = {
149 .pm = &netiucv_pm_ops, 149 .pm = &netiucv_pm_ops,
150}; 150};
151 151
152static int netiucv_callback_connreq(struct iucv_path *, 152static int netiucv_callback_connreq(struct iucv_path *, u8 *, u8 *);
153 u8 ipvmid[8], u8 ipuser[16]); 153static void netiucv_callback_connack(struct iucv_path *, u8 *);
154static void netiucv_callback_connack(struct iucv_path *, u8 ipuser[16]); 154static void netiucv_callback_connrej(struct iucv_path *, u8 *);
155static void netiucv_callback_connrej(struct iucv_path *, u8 ipuser[16]); 155static void netiucv_callback_connsusp(struct iucv_path *, u8 *);
156static void netiucv_callback_connsusp(struct iucv_path *, u8 ipuser[16]); 156static void netiucv_callback_connres(struct iucv_path *, u8 *);
157static void netiucv_callback_connres(struct iucv_path *, u8 ipuser[16]);
158static void netiucv_callback_rx(struct iucv_path *, struct iucv_message *); 157static void netiucv_callback_rx(struct iucv_path *, struct iucv_message *);
159static void netiucv_callback_txdone(struct iucv_path *, struct iucv_message *); 158static void netiucv_callback_txdone(struct iucv_path *, struct iucv_message *);
160 159
@@ -556,8 +555,8 @@ static void netiucv_callback_connack(struct iucv_path *path, u8 ipuser[16])
556 fsm_event(conn->fsm, CONN_EVENT_CONN_ACK, conn); 555 fsm_event(conn->fsm, CONN_EVENT_CONN_ACK, conn);
557} 556}
558 557
559static int netiucv_callback_connreq(struct iucv_path *path, 558static int netiucv_callback_connreq(struct iucv_path *path, u8 *ipvmid,
560 u8 ipvmid[8], u8 ipuser[16]) 559 u8 *ipuser)
561{ 560{
562 struct iucv_connection *conn = path->private; 561 struct iucv_connection *conn = path->private;
563 struct iucv_event ev; 562 struct iucv_event ev;
@@ -587,21 +586,21 @@ static int netiucv_callback_connreq(struct iucv_path *path,
587 return rc; 586 return rc;
588} 587}
589 588
590static void netiucv_callback_connrej(struct iucv_path *path, u8 ipuser[16]) 589static void netiucv_callback_connrej(struct iucv_path *path, u8 *ipuser)
591{ 590{
592 struct iucv_connection *conn = path->private; 591 struct iucv_connection *conn = path->private;
593 592
594 fsm_event(conn->fsm, CONN_EVENT_CONN_REJ, conn); 593 fsm_event(conn->fsm, CONN_EVENT_CONN_REJ, conn);
595} 594}
596 595
597static void netiucv_callback_connsusp(struct iucv_path *path, u8 ipuser[16]) 596static void netiucv_callback_connsusp(struct iucv_path *path, u8 *ipuser)
598{ 597{
599 struct iucv_connection *conn = path->private; 598 struct iucv_connection *conn = path->private;
600 599
601 fsm_event(conn->fsm, CONN_EVENT_CONN_SUS, conn); 600 fsm_event(conn->fsm, CONN_EVENT_CONN_SUS, conn);
602} 601}
603 602
604static void netiucv_callback_connres(struct iucv_path *path, u8 ipuser[16]) 603static void netiucv_callback_connres(struct iucv_path *path, u8 *ipuser)
605{ 604{
606 struct iucv_connection *conn = path->private; 605 struct iucv_connection *conn = path->private;
607 606
diff --git a/drivers/s390/net/smsgiucv.c b/drivers/s390/net/smsgiucv.c
index d8f990b6b332..a851d34c642b 100644
--- a/drivers/s390/net/smsgiucv.c
+++ b/drivers/s390/net/smsgiucv.c
@@ -49,7 +49,7 @@ static DEFINE_SPINLOCK(smsg_list_lock);
49static LIST_HEAD(smsg_list); 49static LIST_HEAD(smsg_list);
50static int iucv_path_connected; 50static int iucv_path_connected;
51 51
52static int smsg_path_pending(struct iucv_path *, u8 ipvmid[8], u8 ipuser[16]); 52static int smsg_path_pending(struct iucv_path *, u8 *, u8 *);
53static void smsg_message_pending(struct iucv_path *, struct iucv_message *); 53static void smsg_message_pending(struct iucv_path *, struct iucv_message *);
54 54
55static struct iucv_handler smsg_handler = { 55static struct iucv_handler smsg_handler = {
@@ -57,8 +57,7 @@ static struct iucv_handler smsg_handler = {
57 .message_pending = smsg_message_pending, 57 .message_pending = smsg_message_pending,
58}; 58};
59 59
60static int smsg_path_pending(struct iucv_path *path, u8 ipvmid[8], 60static int smsg_path_pending(struct iucv_path *path, u8 *ipvmid, u8 *ipuser)
61 u8 ipuser[16])
62{ 61{
63 if (strncmp(ipvmid, "*MSG ", 8) != 0) 62 if (strncmp(ipvmid, "*MSG ", 8) != 0)
64 return -EINVAL; 63 return -EINVAL;
diff --git a/drivers/tty/hvc/hvc_iucv.c b/drivers/tty/hvc/hvc_iucv.c
index bb809cf36617..8b70a1627356 100644
--- a/drivers/tty/hvc/hvc_iucv.c
+++ b/drivers/tty/hvc/hvc_iucv.c
@@ -88,8 +88,8 @@ struct iucv_tty_buffer {
88}; 88};
89 89
90/* IUCV callback handler */ 90/* IUCV callback handler */
91static int hvc_iucv_path_pending(struct iucv_path *, u8[8], u8[16]); 91static int hvc_iucv_path_pending(struct iucv_path *, u8 *, u8 *);
92static void hvc_iucv_path_severed(struct iucv_path *, u8[16]); 92static void hvc_iucv_path_severed(struct iucv_path *, u8 *);
93static void hvc_iucv_msg_pending(struct iucv_path *, struct iucv_message *); 93static void hvc_iucv_msg_pending(struct iucv_path *, struct iucv_message *);
94static void hvc_iucv_msg_complete(struct iucv_path *, struct iucv_message *); 94static void hvc_iucv_msg_complete(struct iucv_path *, struct iucv_message *);
95 95
@@ -782,8 +782,8 @@ static int hvc_iucv_filter_connreq(u8 ipvmid[8])
782 * 782 *
783 * Locking: struct hvc_iucv_private->lock 783 * Locking: struct hvc_iucv_private->lock
784 */ 784 */
785static int hvc_iucv_path_pending(struct iucv_path *path, 785static int hvc_iucv_path_pending(struct iucv_path *path, u8 *ipvmid,
786 u8 ipvmid[8], u8 ipuser[16]) 786 u8 *ipuser)
787{ 787{
788 struct hvc_iucv_private *priv, *tmp; 788 struct hvc_iucv_private *priv, *tmp;
789 u8 wildcard[9] = "lnxhvc "; 789 u8 wildcard[9] = "lnxhvc ";
@@ -881,7 +881,7 @@ out_path_handled:
881 * 881 *
882 * Locking: struct hvc_iucv_private->lock 882 * Locking: struct hvc_iucv_private->lock
883 */ 883 */
884static void hvc_iucv_path_severed(struct iucv_path *path, u8 ipuser[16]) 884static void hvc_iucv_path_severed(struct iucv_path *path, u8 *ipuser)
885{ 885{
886 struct hvc_iucv_private *priv = path->private; 886 struct hvc_iucv_private *priv = path->private;
887 887
diff --git a/include/net/iucv/iucv.h b/include/net/iucv/iucv.h
index 0894ced31957..b867b0cf79e8 100644
--- a/include/net/iucv/iucv.h
+++ b/include/net/iucv/iucv.h
@@ -141,14 +141,14 @@ struct iucv_handler {
141 * called is the order of the registration of the iucv handlers 141 * called is the order of the registration of the iucv handlers
142 * to the base code. 142 * to the base code.
143 */ 143 */
144 int (*path_pending)(struct iucv_path *, u8 ipvmid[8], u8 ipuser[16]); 144 int (*path_pending)(struct iucv_path *, u8 *ipvmid, u8 *ipuser);
145 /* 145 /*
146 * The path_complete function is called after an iucv interrupt 146 * The path_complete function is called after an iucv interrupt
147 * type 0x02 has been received for a path that has been established 147 * type 0x02 has been received for a path that has been established
148 * for this handler with iucv_path_connect and got accepted by the 148 * for this handler with iucv_path_connect and got accepted by the
149 * peer with iucv_path_accept. 149 * peer with iucv_path_accept.
150 */ 150 */
151 void (*path_complete)(struct iucv_path *, u8 ipuser[16]); 151 void (*path_complete)(struct iucv_path *, u8 *ipuser);
152 /* 152 /*
153 * The path_severed function is called after an iucv interrupt 153 * The path_severed function is called after an iucv interrupt
154 * type 0x03 has been received. The communication peer shutdown 154 * type 0x03 has been received. The communication peer shutdown
@@ -156,20 +156,20 @@ struct iucv_handler {
156 * remaining messages can be received until a iucv_path_sever 156 * remaining messages can be received until a iucv_path_sever
157 * shuts down the other end of the path as well. 157 * shuts down the other end of the path as well.
158 */ 158 */
159 void (*path_severed)(struct iucv_path *, u8 ipuser[16]); 159 void (*path_severed)(struct iucv_path *, u8 *ipuser);
160 /* 160 /*
161 * The path_quiesced function is called after an icuv interrupt 161 * The path_quiesced function is called after an icuv interrupt
162 * type 0x04 has been received. The communication peer has quiesced 162 * type 0x04 has been received. The communication peer has quiesced
163 * the path. Delivery of messages is stopped until iucv_path_resume 163 * the path. Delivery of messages is stopped until iucv_path_resume
164 * has been called. 164 * has been called.
165 */ 165 */
166 void (*path_quiesced)(struct iucv_path *, u8 ipuser[16]); 166 void (*path_quiesced)(struct iucv_path *, u8 *ipuser);
167 /* 167 /*
168 * The path_resumed function is called after an icuv interrupt 168 * The path_resumed function is called after an icuv interrupt
169 * type 0x05 has been received. The communication peer has resumed 169 * type 0x05 has been received. The communication peer has resumed
170 * the path. 170 * the path.
171 */ 171 */
172 void (*path_resumed)(struct iucv_path *, u8 ipuser[16]); 172 void (*path_resumed)(struct iucv_path *, u8 *ipuser);
173 /* 173 /*
174 * The message_pending function is called after an icuv interrupt 174 * The message_pending function is called after an icuv interrupt
175 * type 0x06 or type 0x07 has been received. A new message is 175 * type 0x06 or type 0x07 has been received. A new message is
@@ -256,7 +256,7 @@ static inline void iucv_path_free(struct iucv_path *path)
256 * Returns the result of the CP IUCV call. 256 * Returns the result of the CP IUCV call.
257 */ 257 */
258int iucv_path_accept(struct iucv_path *path, struct iucv_handler *handler, 258int iucv_path_accept(struct iucv_path *path, struct iucv_handler *handler,
259 u8 userdata[16], void *private); 259 u8 *userdata, void *private);
260 260
261/** 261/**
262 * iucv_path_connect 262 * iucv_path_connect
@@ -274,7 +274,7 @@ int iucv_path_accept(struct iucv_path *path, struct iucv_handler *handler,
274 * Returns the result of the CP IUCV call. 274 * Returns the result of the CP IUCV call.
275 */ 275 */
276int iucv_path_connect(struct iucv_path *path, struct iucv_handler *handler, 276int iucv_path_connect(struct iucv_path *path, struct iucv_handler *handler,
277 u8 userid[8], u8 system[8], u8 userdata[16], 277 u8 *userid, u8 *system, u8 *userdata,
278 void *private); 278 void *private);
279 279
280/** 280/**
@@ -287,7 +287,7 @@ int iucv_path_connect(struct iucv_path *path, struct iucv_handler *handler,
287 * 287 *
288 * Returns the result from the CP IUCV call. 288 * Returns the result from the CP IUCV call.
289 */ 289 */
290int iucv_path_quiesce(struct iucv_path *path, u8 userdata[16]); 290int iucv_path_quiesce(struct iucv_path *path, u8 *userdata);
291 291
292/** 292/**
293 * iucv_path_resume: 293 * iucv_path_resume:
@@ -299,7 +299,7 @@ int iucv_path_quiesce(struct iucv_path *path, u8 userdata[16]);
299 * 299 *
300 * Returns the result from the CP IUCV call. 300 * Returns the result from the CP IUCV call.
301 */ 301 */
302int iucv_path_resume(struct iucv_path *path, u8 userdata[16]); 302int iucv_path_resume(struct iucv_path *path, u8 *userdata);
303 303
304/** 304/**
305 * iucv_path_sever 305 * iucv_path_sever
@@ -310,7 +310,7 @@ int iucv_path_resume(struct iucv_path *path, u8 userdata[16]);
310 * 310 *
311 * Returns the result from the CP IUCV call. 311 * Returns the result from the CP IUCV call.
312 */ 312 */
313int iucv_path_sever(struct iucv_path *path, u8 userdata[16]); 313int iucv_path_sever(struct iucv_path *path, u8 *userdata);
314 314
315/** 315/**
316 * iucv_message_purge 316 * iucv_message_purge
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
index 918151c11348..fcb2752419c6 100644
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -95,11 +95,10 @@ static void afiucv_hs_callback_txnotify(struct sk_buff *, enum iucv_tx_notify);
95/* Call Back functions */ 95/* Call Back functions */
96static void iucv_callback_rx(struct iucv_path *, struct iucv_message *); 96static void iucv_callback_rx(struct iucv_path *, struct iucv_message *);
97static void iucv_callback_txdone(struct iucv_path *, struct iucv_message *); 97static void iucv_callback_txdone(struct iucv_path *, struct iucv_message *);
98static void iucv_callback_connack(struct iucv_path *, u8 ipuser[16]); 98static void iucv_callback_connack(struct iucv_path *, u8 *);
99static int iucv_callback_connreq(struct iucv_path *, u8 ipvmid[8], 99static int iucv_callback_connreq(struct iucv_path *, u8 *, u8 *);
100 u8 ipuser[16]); 100static void iucv_callback_connrej(struct iucv_path *, u8 *);
101static void iucv_callback_connrej(struct iucv_path *, u8 ipuser[16]); 101static void iucv_callback_shutdown(struct iucv_path *, u8 *);
102static void iucv_callback_shutdown(struct iucv_path *, u8 ipuser[16]);
103 102
104static struct iucv_sock_list iucv_sk_list = { 103static struct iucv_sock_list iucv_sk_list = {
105 .lock = __RW_LOCK_UNLOCKED(iucv_sk_list.lock), 104 .lock = __RW_LOCK_UNLOCKED(iucv_sk_list.lock),
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c
index 2a6a1fdd62c0..7eaa000c9258 100644
--- a/net/iucv/iucv.c
+++ b/net/iucv/iucv.c
@@ -713,7 +713,7 @@ static struct notifier_block __refdata iucv_cpu_notifier = {
713 * 713 *
714 * Sever an iucv path to free up the pathid. Used internally. 714 * Sever an iucv path to free up the pathid. Used internally.
715 */ 715 */
716static int iucv_sever_pathid(u16 pathid, u8 userdata[16]) 716static int iucv_sever_pathid(u16 pathid, u8 *userdata)
717{ 717{
718 union iucv_param *parm; 718 union iucv_param *parm;
719 719
@@ -876,7 +876,7 @@ static struct notifier_block iucv_reboot_notifier = {
876 * Returns the result of the CP IUCV call. 876 * Returns the result of the CP IUCV call.
877 */ 877 */
878int iucv_path_accept(struct iucv_path *path, struct iucv_handler *handler, 878int iucv_path_accept(struct iucv_path *path, struct iucv_handler *handler,
879 u8 userdata[16], void *private) 879 u8 *userdata, void *private)
880{ 880{
881 union iucv_param *parm; 881 union iucv_param *parm;
882 int rc; 882 int rc;
@@ -923,7 +923,7 @@ EXPORT_SYMBOL(iucv_path_accept);
923 * Returns the result of the CP IUCV call. 923 * Returns the result of the CP IUCV call.
924 */ 924 */
925int iucv_path_connect(struct iucv_path *path, struct iucv_handler *handler, 925int iucv_path_connect(struct iucv_path *path, struct iucv_handler *handler,
926 u8 userid[8], u8 system[8], u8 userdata[16], 926 u8 *userid, u8 *system, u8 *userdata,
927 void *private) 927 void *private)
928{ 928{
929 union iucv_param *parm; 929 union iucv_param *parm;
@@ -985,7 +985,7 @@ EXPORT_SYMBOL(iucv_path_connect);
985 * 985 *
986 * Returns the result from the CP IUCV call. 986 * Returns the result from the CP IUCV call.
987 */ 987 */
988int iucv_path_quiesce(struct iucv_path *path, u8 userdata[16]) 988int iucv_path_quiesce(struct iucv_path *path, u8 *userdata)
989{ 989{
990 union iucv_param *parm; 990 union iucv_param *parm;
991 int rc; 991 int rc;
@@ -1017,7 +1017,7 @@ EXPORT_SYMBOL(iucv_path_quiesce);
1017 * 1017 *
1018 * Returns the result from the CP IUCV call. 1018 * Returns the result from the CP IUCV call.
1019 */ 1019 */
1020int iucv_path_resume(struct iucv_path *path, u8 userdata[16]) 1020int iucv_path_resume(struct iucv_path *path, u8 *userdata)
1021{ 1021{
1022 union iucv_param *parm; 1022 union iucv_param *parm;
1023 int rc; 1023 int rc;
@@ -1047,7 +1047,7 @@ out:
1047 * 1047 *
1048 * Returns the result from the CP IUCV call. 1048 * Returns the result from the CP IUCV call.
1049 */ 1049 */
1050int iucv_path_sever(struct iucv_path *path, u8 userdata[16]) 1050int iucv_path_sever(struct iucv_path *path, u8 *userdata)
1051{ 1051{
1052 int rc; 1052 int rc;
1053 1053