'/* fallthrough */' hits implicit-fallthrough error with GCC 11.
This patch replaces the existing '/* fallthrough */' comments and
its variants with the 'fallthrough' pseudo keyword, which was added
by Linux kernel commit v5.4-rc2-141-g294f69e662d1.
Test-Parameters: trivial
Change-Id: Icace4c9953950f86d3c48068d8c6bba7dd1160a5
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/45566
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
#define in_dev_for_each_ifa_rcu(ifa, in_dev) for_ifa((in_dev))
#endif
+#ifndef fallthrough
+#define fallthrough do {} while (0) /* fallthrough */
+#endif
+
int choose_ipv4_src(__u32 *ret,
int interface, __u32 dst_ipaddr, struct net *ns);
kgnilnd_dump_blob(D_BUFFS, "RDMA payload",
tx->tx_buffer, nob);
}
- /* fallthrough */
+ fallthrough;
case 1:
libcfs_debug_dumplog();
break;
break;
}
/* needs to queue to try again, so... */
- /* fall through... */
+ fallthrough;
case GNILND_MSG_NOOP:
/* Just make sure this goes out first for this conn */
add_tail = 0;
- /* fall through... */
+ fallthrough;
default:
spin_lock(&conn->gnc_list_lock);
kgnilnd_tx_add_state_locked(tx, conn->gnc_peer, conn, GNILND_TX_FMAQ, add_tail);
case 2:
kgnilnd_dump_blob(D_BUFFS, "bad payload checksum",
&rxmsg[1], rxmsg->gnm_payload_len);
- /* fallthrough */
+ fallthrough;
case 1:
libcfs_debug_dumplog();
break;
case GNILND_MSG_PUT_REQ:
case GNILND_MSG_GET_REQ_REV:
tx->tx_msg.gnm_u.putreq.gnprm_cookie = tx->tx_id.txe_cookie;
- /* fallthrough */
+ fallthrough;
case GNILND_MSG_PUT_ACK:
case GNILND_MSG_PUT_REQ_REV:
case GNILND_MSG_GET_ACK_REV:
!atomic_read(&kiblnd_data.kib_nthreads),
"Waiting for %d threads to terminate\n",
atomic_read(&kiblnd_data.kib_nthreads));
- /* fall through */
+ fallthrough;
case IBLND_INIT_NOTHING:
break;
list_del(&net->ibn_list);
write_unlock_irqrestore(g_lock, flags);
- /* fall through */
+ fallthrough;
case IBLND_INIT_NOTHING:
LASSERT (atomic_read(&net->ibn_nconns) == 0);
}
break;
}
- /* fall through */
+ fallthrough;
default:
CNETERR("%s rejected: reason %d, size %d\n",
libcfs_nid2str(peer_ni->ibp_nid), reason, priv_nob);
switch (ksocknal_data.ksnd_init) {
default:
LASSERT(0);
- /* fallthrough */
+ fallthrough;
case SOCKNAL_INIT_ALL:
case SOCKNAL_INIT_DATA:
ksocknal_close_conn_and_siblings(conn, rc);
return (-EPROTO);
}
- /* Fall through */
+ fallthrough;
case SOCKNAL_RX_SLOP:
/* starting new packet? */
case LNET_EVENT_UNLINK:
CDEBUG(D_NET, "%s recovery ping unlinked\n",
libcfs_nidstr(&ev_info->mt_nid));
- /* fallthrough */
+ fallthrough;
case LNET_EVENT_REPLY:
lnet_handle_recovery_reply(ev_info, event->status, false,
event->type == LNET_EVENT_UNLINK);
ready_delay = true;
goto again;
}
- /* fall through */
+ fallthrough;
case LNET_MATCHMD_DROP:
CNETERR("Dropping PUT from %s portal %d match %llu"
case LNET_CREDIT_OK:
lnet_ni_recv(ni, msg->msg_private, msg, 0,
0, msg->msg_len, msg->msg_len);
- /* fallthrough */
+ fallthrough;
case LNET_CREDIT_WAIT:
continue;
default: /* failures */
case LST_OPC_BATCHSRV:
client = 0;
- /* fallthrough */
+ fallthrough;
case LST_OPC_BATCHCLI:
if (name == NULL)
goto out;
switch (lst_init_step) {
case LST_INIT_CONSOLE:
lstcon_console_fini();
- /* fallthrough */
+ fallthrough;
case LST_INIT_FW:
sfw_shutdown();
- /* fallthrough */
+ fallthrough;
case LST_INIT_RPC:
srpc_shutdown();
- /* fallthrough */
+ fallthrough;
case LST_INIT_WI_TEST:
for (i = 0;
i < cfs_cpt_number(lnet_cpt_table()); i++) {
CFS_FREE_PTR_ARRAY(lst_sched_test,
cfs_cpt_number(lnet_cpt_table()));
lst_sched_test = NULL;
- /* fallthrough */
+ fallthrough;
case LST_INIT_WI_SERIAL:
cfs_wi_sched_destroy(lst_sched_serial);
lst_sched_serial = NULL;
- /* fallthrough */
+ fallthrough;
case LST_INIT_NONE:
break;
default:
switch (wi->swi_state) {
default:
LBUG();
- /* fallthrough */
+ fallthrough;
case SWI_STATE_NEWBORN: {
struct srpc_msg *msg;
struct srpc_generic_reply *reply;
ev->ev_status = rc;
}
}
- /* fallthrough */
+ fallthrough;
case SWI_STATE_BULK_STARTED:
LASSERT(rpc->srpc_bulk == NULL || ev->ev_fired);
break;
wi->swi_state = SWI_STATE_REQUEST_SENT;
- /* fallthrough */
+ fallthrough;
case SWI_STATE_REQUEST_SENT: {
enum srpc_msg_type type;
wi->swi_state = SWI_STATE_REPLY_RECEIVED;
}
- /* fallthrough */
+ fallthrough;
case SWI_STATE_REPLY_RECEIVED:
if (do_bulk && !rpc->crpc_bulkev.ev_fired)
break;
CERROR("Unknown event: status %d, type %d, lnet %d\n",
rpcev->ev_status, rpcev->ev_type, rpcev->ev_lnet);
LBUG();
- /* fallthrough */
+ fallthrough;
case SRPC_REQUEST_SENT:
if (ev->status == 0 && ev->type != LNET_EVENT_UNLINK) {
spin_lock(&srpc_data.rpc_glock);
srpc_data.rpc_counters.rpcs_sent++;
spin_unlock(&srpc_data.rpc_glock);
}
- /* fallthrough */
+ fallthrough;
case SRPC_REPLY_RCVD:
case SRPC_BULK_REQ_RCVD:
crpc = rpcev->ev_data;
if (!ev->unlinked)
break; /* wait for final event */
- /* fallthrough */
+ fallthrough;
case SRPC_BULK_PUT_SENT:
if (ev->status == 0 && ev->type != LNET_EVENT_UNLINK) {
spin_lock(&srpc_data.rpc_glock);
spin_unlock(&srpc_data.rpc_glock);
}
- /* fallthrough */
+ fallthrough;
case SRPC_REPLY_SENT:
srpc = rpcev->ev_data;
scd = srpc->srpc_scd;
switch (state) {
default:
LBUG();
- /* fallthrough */
+ fallthrough;
case SRPC_STATE_RUNNING:
spin_lock(&srpc_data.rpc_glock);
spin_unlock(&srpc_data.rpc_glock);
stt_shutdown();
- /* fallthrough */
+ fallthrough;
case SRPC_STATE_EQ_INIT:
rc = LNetClearLazyPortal(SRPC_FRAMEWORK_REQUEST_PORTAL);
rc = LNetClearLazyPortal(SRPC_REQUEST_PORTAL);
LASSERT(rc == 0);
lnet_assert_handler_unused(srpc_data.rpc_lnet_handler);
- /* fallthrough */
+ fallthrough;
case SRPC_STATE_NI_INIT:
LNetNIFini();
#include <linux/lnet/lnet-nl.h>
#include "liblnetconfig.h"
+#ifndef fallthrough
+#define fallthrough do {} while (0) /* fallthrough */
+#endif
+
#ifndef SOL_NETLINK /* for glibc < 2.24 */
# define SOL_NETLINK 270
#endif
case NLA_S64:
len = snprintf(data->buffer, *size, "%jd",
nla_get_s64(attr));
- /* fallthrough */
+ fallthrough;
default:
break;
}
fprintf(log, "Reader error: '%s' at %ld\n",
extra, (long)parser->problem_offset);
}
- /* fallthrough */
+ fallthrough;
default:
break;
}