Skip to content

Commit

Permalink
Merge branch 's390-net-updates'
Browse files Browse the repository at this point in the history
Julian Wiedmann says:

====================
s390/iucv: updates 2021-06-11

please apply the following iucv patches to netdev's net-next tree.

This cleans up a pattern of forward declarations in two iucv drivers,
so that they stop causing compile warnings with gcc11.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jun 12, 2021
2 parents 1f1aa3f + fbf1796 commit abf6420
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 35 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
27 changes: 10 additions & 17 deletions net/iucv/af_iucv.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ static struct proto iucv_proto = {
};

static struct iucv_interface *pr_iucv;
static struct iucv_handler af_iucv_handler;

/* special AF_IUCV IPRM messages */
static const u8 iprm_shutdown[8] =
Expand Down Expand Up @@ -91,28 +92,11 @@ static void iucv_sock_close(struct sock *sk);

static void afiucv_hs_callback_txnotify(struct sock *sk, enum iucv_tx_notify);

/* Call Back functions */
static void iucv_callback_rx(struct iucv_path *, struct iucv_message *);
static void iucv_callback_txdone(struct iucv_path *, struct iucv_message *);
static void iucv_callback_connack(struct iucv_path *, u8 *);
static int iucv_callback_connreq(struct iucv_path *, u8 *, u8 *);
static void iucv_callback_connrej(struct iucv_path *, u8 *);
static void iucv_callback_shutdown(struct iucv_path *, u8 *);

static struct iucv_sock_list iucv_sk_list = {
.lock = __RW_LOCK_UNLOCKED(iucv_sk_list.lock),
.autobind_name = ATOMIC_INIT(0)
};

static struct iucv_handler af_iucv_handler = {
.path_pending = iucv_callback_connreq,
.path_complete = iucv_callback_connack,
.path_severed = iucv_callback_connrej,
.message_pending = iucv_callback_rx,
.message_complete = iucv_callback_txdone,
.path_quiesced = iucv_callback_shutdown,
};

static inline void high_nmcpy(unsigned char *dst, char *src)
{
memcpy(dst, src, 8);
Expand Down Expand Up @@ -1817,6 +1801,15 @@ static void iucv_callback_shutdown(struct iucv_path *path, u8 ipuser[16])
bh_unlock_sock(sk);
}

static struct iucv_handler af_iucv_handler = {
.path_pending = iucv_callback_connreq,
.path_complete = iucv_callback_connack,
.path_severed = iucv_callback_connrej,
.message_pending = iucv_callback_rx,
.message_complete = iucv_callback_txdone,
.path_quiesced = iucv_callback_shutdown,
};

/***************** HiperSockets transport callbacks ********************/
static void afiucv_swap_src_dest(struct sk_buff *skb)
{
Expand Down

0 comments on commit abf6420

Please sign in to comment.