qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Osama Abdelkader <osama.abdelkader@gmail.com>
To: qemu-devel@nongnu.org, qemu_oss@crudebyte.com, groug@kaod.org
Cc: Osama Abdelkader <osama.abdelkader@gmail.com>
Subject: [PATCH] hw/9pfs: Drop unused print_sg helper
Date: Mon, 10 Nov 2025 17:54:24 +0200	[thread overview]
Message-ID: <20251110155424.694664-1-osama.abdelkader@gmail.com> (raw)

Remove the print_sg() debug helper and its always-disabled call sites
in v9fs_read() and v9fs_write(). The function was only reachable via
if (0) blocks, so it has been dead code for a long time.

Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
---
 hw/9pfs/9p.c | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index bc4a016ee3..a8de894f4c 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -1389,20 +1389,6 @@ static int stat_to_v9stat_dotl(V9fsPDU *pdu, const struct stat *stbuf,
     return stat_to_qid(pdu, stbuf, &v9lstat->qid);
 }
 
-static void print_sg(struct iovec *sg, int cnt)
-{
-    int i;
-
-    printf("sg[%d]: {", cnt);
-    for (i = 0; i < cnt; i++) {
-        if (i) {
-            printf(", ");
-        }
-        printf("(%p, %zd)", sg[i].iov_base, sg[i].iov_len);
-    }
-    printf("}\n");
-}
-
 /* Will call this only for path name based fid */
 static void v9fs_fix_path(V9fsPath *dst, V9fsPath *src, int len)
 {
@@ -2468,9 +2454,6 @@ static void coroutine_fn v9fs_read(void *opaque)
         do {
             qemu_iovec_reset(&qiov);
             qemu_iovec_concat(&qiov, &qiov_full, count, qiov_full.size - count);
-            if (0) {
-                print_sg(qiov.iov, qiov.niov);
-            }
             /* Loop in case of EINTR */
             do {
                 len = v9fs_co_preadv(pdu, fidp, qiov.iov, qiov.niov, off);
@@ -2785,9 +2768,6 @@ static void coroutine_fn v9fs_write(void *opaque)
     do {
         qemu_iovec_reset(&qiov);
         qemu_iovec_concat(&qiov, &qiov_full, total, qiov_full.size - total);
-        if (0) {
-            print_sg(qiov.iov, qiov.niov);
-        }
         /* Loop in case of EINTR */
         do {
             len = v9fs_co_pwritev(pdu, fidp, qiov.iov, qiov.niov, off);
-- 
2.43.0



             reply	other threads:[~2025-11-10 15:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-10 15:54 Osama Abdelkader [this message]
2025-11-12  7:03 ` [PATCH] hw/9pfs: Drop unused print_sg helper Philippe Mathieu-Daudé
2025-11-12 12:30   ` Christian Schoenebeck
2025-11-12 13:42     ` Philippe Mathieu-Daudé
2025-11-14 18:08       ` Osama Abdelkader

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=20251110155424.694664-1-osama.abdelkader@gmail.com \
    --to=osama.abdelkader@gmail.com \
    --cc=groug@kaod.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu_oss@crudebyte.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).