linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jim Cromie <jim.cromie@gmail.com>
To: jbaron@akamai.com, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org
Cc: Jim Cromie <jim.cromie@gmail.com>
Subject: [PATCH 3/3] dyndbg: no vpr-info on empty queries
Date: Wed, 13 Oct 2021 16:07:26 -0600	[thread overview]
Message-ID: <20211013220726.1280565-4-jim.cromie@gmail.com> (raw)
In-Reply-To: <20211013220726.1280565-1-jim.cromie@gmail.com>

when `echo $cmd > control` contains multiple queries, extra query
separators (;\n) can parse as empty statements.  This is normal, and a
vpr-info on an empty command is just noise.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
---
 lib/dynamic_debug.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index bc1ac55ac328..7744c787e256 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -540,8 +540,10 @@ static int ddebug_exec_queries(char *query, const char *modname)
 		}
 		i++;
 	}
-	vpr_info("processed %d queries, with %d matches, %d errs\n",
-		 i, nfound, errs);
+
+	if (i)
+		vpr_info("processed %d queries, with %d matches, %d errs\n",
+			 i, nfound, errs);
 
 	if (exitcode)
 		return exitcode;
-- 
2.31.1


      parent reply	other threads:[~2021-10-13 22:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13 22:07 [PATCH 0/3] dynamic debug for -next Jim Cromie
2021-10-13 22:07 ` [PATCH 1/3] dyndbg: fix spurious log-level change Jim Cromie
2021-10-14  8:58   ` Greg KH
2021-10-14 22:36     ` [PATCH 1/1] dyndbg: fix spurious vNpr_info change Jim Cromie
2021-10-13 22:07 ` [PATCH 2/3] dyndbg: vpr-info on remove-module complete, not starting Jim Cromie
2021-10-13 22:07 ` Jim Cromie [this message]

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=20211013220726.1280565-4-jim.cromie@gmail.com \
    --to=jim.cromie@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jbaron@akamai.com \
    --cc=linux-kernel@vger.kernel.org \
    /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).