qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
To: qemu-devel@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org
Cc: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>,
	Yuval Shaia <yuval.shaia.ml@gmail.com>,
	Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Subject: [RFC PATCH 46/75] contrib/rdmacm-mux: add fallthrough pseudo-keyword
Date: Fri, 13 Oct 2023 10:47:59 +0300	[thread overview]
Message-ID: <a45dd47fa12e2e8fe817b1816dfbbecd4f4e8065.1697034504.git.manos.pitsidianakis@linaro.org> (raw)
In-Reply-To: <cover.1697034504.git.manos.pitsidianakis@linaro.org>

Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
---
 contrib/rdmacm-mux/main.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/contrib/rdmacm-mux/main.c b/contrib/rdmacm-mux/main.c
index 771ca01e03..dda6917d58 100644
--- a/contrib/rdmacm-mux/main.c
+++ b/contrib/rdmacm-mux/main.c
@@ -303,72 +303,72 @@ static void hash_tbl_remove_fd_ifid_pair(int fd)
 static int get_fd(const char *mad, int umad_len, int *fd, __be64 *gid_ifid)
 {
     struct umad_hdr *hdr = (struct umad_hdr *)mad;
     char *data = (char *)hdr + sizeof(*hdr);
     int32_t comm_id = 0;
     uint16_t attr_id = be16toh(hdr->attr_id);
     int rc = 0;
 
     if (umad_len <= sizeof(*hdr)) {
         rc = -EINVAL;
         syslog(LOG_DEBUG, "Ignoring MAD packets with header only\n");
         goto out;
     }
 
     switch (attr_id) {
     case UMAD_CM_ATTR_REQ:
         if (unlikely(umad_len < sizeof(*hdr) + CM_REQ_DGID_POS +
             sizeof(*gid_ifid))) {
             rc = -EINVAL;
             syslog(LOG_WARNING,
                    "Invalid MAD packet size (%d) for attr_id 0x%x\n", umad_len,
                     attr_id);
             goto out;
         }
         memcpy(gid_ifid, data + CM_REQ_DGID_POS, sizeof(*gid_ifid));
         rc = hash_tbl_search_fd_by_ifid(fd, gid_ifid);
         break;
 
     case UMAD_CM_ATTR_SIDR_REQ:
         if (unlikely(umad_len < sizeof(*hdr) + CM_SIDR_REQ_DGID_POS +
             sizeof(*gid_ifid))) {
             rc = -EINVAL;
             syslog(LOG_WARNING,
                    "Invalid MAD packet size (%d) for attr_id 0x%x\n", umad_len,
                     attr_id);
             goto out;
         }
         memcpy(gid_ifid, data + CM_SIDR_REQ_DGID_POS, sizeof(*gid_ifid));
         rc = hash_tbl_search_fd_by_ifid(fd, gid_ifid);
         break;
 
     case UMAD_CM_ATTR_REP:
-        /* Fall through */
+        fallthrough;
     case UMAD_CM_ATTR_REJ:
-        /* Fall through */
+        fallthrough;
     case UMAD_CM_ATTR_DREQ:
-        /* Fall through */
+        fallthrough;
     case UMAD_CM_ATTR_DREP:
-        /* Fall through */
+        fallthrough;
     case UMAD_CM_ATTR_RTU:
         data += sizeof(comm_id);
-        /* Fall through */
+        fallthrough;
     case UMAD_CM_ATTR_SIDR_REP:
         if (unlikely(umad_len < sizeof(*hdr) + sizeof(comm_id))) {
             rc = -EINVAL;
             syslog(LOG_WARNING,
                    "Invalid MAD packet size (%d) for attr_id 0x%x\n", umad_len,
                    attr_id);
             goto out;
         }
         memcpy(&comm_id, data, sizeof(comm_id));
         if (comm_id) {
             rc = hash_tbl_search_fd_by_comm_id(comm_id, fd, gid_ifid);
         }
         break;
 
     default:
         rc = -EINVAL;
         syslog(LOG_WARNING, "Unsupported attr_id 0x%x\n", attr_id);
     }
 
     syslog(LOG_DEBUG, "mad_to_vm: %d 0x%x 0x%x\n", *fd, attr_id, comm_id);
-- 
2.39.2



  parent reply	other threads:[~2023-10-13  8:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1697034504.git.manos.pitsidianakis@linaro.org>
2023-10-13  7:47 ` [RFC PATCH 37/75] system/rtc.c: add fallthrough pseudo-keyword Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 38/75] hw/scsi: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 39/75] hw/sd/sdhci.c: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 40/75] linux-user: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 41/75] hw/i386: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 42/75] hw/misc: " Emmanouil Pitsidianakis
2023-10-13  8:11   ` Cédric Le Goater
2023-10-13  7:47 ` [RFC PATCH 43/75] hw/m68k/mcf_intc.c: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 44/75] hw/dma: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 45/75] disas: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` Emmanouil Pitsidianakis [this message]
2023-10-13  7:48 ` [RFC PATCH 47/75] contrib/vhost-user-scsi: " Emmanouil Pitsidianakis
2023-10-23  9:31   ` Raphael Norwitz
2023-10-13  7:48 ` [RFC PATCH 48/75] hw/arm: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 49/75] hw/audio: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 50/75] chardev: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 51/75] hw/char: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 52/75] nbd: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 53/75] hw/core: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 54/75] hw/display: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 55/75] hw/input: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 56/75] hw/net: " Emmanouil Pitsidianakis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a45dd47fa12e2e8fe817b1816dfbbecd4f4e8065.1697034504.git.manos.pitsidianakis@linaro.org \
    --to=manos.pitsidianakis@linaro.org \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=yuval.shaia.ml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).