Skip to content

Commit

Permalink
s390/netiuvc: get rid of forward declarations
Browse files Browse the repository at this point in the history
Move netiucv_handler to get rid of forward declarations and gcc11
compile warnings:

drivers/s390/net/netiucv.c:518:65: warning: argument 2 of type ‘u8[16]’ {aka ‘unsigned char[16]’} with mismatched bound [-Warray-parameter=]
  518 | static void netiucv_callback_connack(struct iucv_path *path, u8 ipuser[16])
      |                                                              ~~~^~~~~~~~~~
drivers/s390/net/netiucv.c:122:58: note: previously declared as ‘u8 *’ {aka ‘unsigned char *’}
  122 | static void netiucv_callback_connack(struct iucv_path *, u8 *);

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Heiko Carstens authored and David S. Miller committed Jun 12, 2021
1 parent 87c272c commit fbf1796
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions drivers/s390/net/netiucv.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,24 +118,6 @@ static struct device_driver netiucv_driver = {
.bus = &iucv_bus,
};

static int netiucv_callback_connreq(struct iucv_path *, u8 *, u8 *);
static void netiucv_callback_connack(struct iucv_path *, u8 *);
static void netiucv_callback_connrej(struct iucv_path *, u8 *);
static void netiucv_callback_connsusp(struct iucv_path *, u8 *);
static void netiucv_callback_connres(struct iucv_path *, u8 *);
static void netiucv_callback_rx(struct iucv_path *, struct iucv_message *);
static void netiucv_callback_txdone(struct iucv_path *, struct iucv_message *);

static struct iucv_handler netiucv_handler = {
.path_pending = netiucv_callback_connreq,
.path_complete = netiucv_callback_connack,
.path_severed = netiucv_callback_connrej,
.path_quiesced = netiucv_callback_connsusp,
.path_resumed = netiucv_callback_connres,
.message_pending = netiucv_callback_rx,
.message_complete = netiucv_callback_txdone
};

/**
* Per connection profiling data
*/
Expand Down Expand Up @@ -774,6 +756,16 @@ static void conn_action_txdone(fsm_instance *fi, int event, void *arg)
}
}

static struct iucv_handler netiucv_handler = {
.path_pending = netiucv_callback_connreq,
.path_complete = netiucv_callback_connack,
.path_severed = netiucv_callback_connrej,
.path_quiesced = netiucv_callback_connsusp,
.path_resumed = netiucv_callback_connres,
.message_pending = netiucv_callback_rx,
.message_complete = netiucv_callback_txdone,
};

static void conn_action_connaccept(fsm_instance *fi, int event, void *arg)
{
struct iucv_event *ev = arg;
Expand Down

0 comments on commit fbf1796

Please sign in to comment.