Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2708290pxb; Tue, 12 Oct 2021 11:49:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOufwrUzA9RgrbnYkmM21kuypsm3nNylyzws6UFb3cFGylxhUuvpzW1vceWIUbYTe6NTAf X-Received: by 2002:a62:8cc4:0:b0:44c:a611:bf53 with SMTP id m187-20020a628cc4000000b0044ca611bf53mr32940570pfd.64.1634064586214; Tue, 12 Oct 2021 11:49:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634064586; cv=none; d=google.com; s=arc-20160816; b=VT2DvVSlNZzZulutiOFiPWszUhVSSI/AdccbBpCjYohtzH81Hp1Rx9IQefYax+zRGl DKyIT1J4v0yYMhLFsirheLDbRUF4evbS9LWTv6WfjxTNTf0rYeDQ+R44JNyx2xapD7JN 3ZXv7O3T+g6EAGYvgAo8m9URA+t9EkNK40TyfiNv72qv6nJY+3nKxMLS8/noHCOqzclq UNHylNe8mj8OKl19NOz3+fRNtnq9H8+WzsbbfvF8o5YS3Nq0u/xIL8yyQF1Ri4Vz90uj Tp80CuQ447MJpFA+nK8A615vu/ArjoWg9fRAIbwEEdvtb3a8yvsjGuM5BCzTb7YNjDzA 4hSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EaRHyBRUKNYxyFuXsjUd0687S4CA91t+I1Ml3q5IbFY=; b=opn2Rf4GCmxeELBzvIS+EJHY30XG5+2U0taHW9r9AuQZOxhANn6cD6nH7pKXqRq/zT jdNktT1ybuJEqJ/Jm+u+VldmpgCeH91mOMLfLkE4iAWwCKPQdNhw9QMvd2FnA1Dhvqe8 D3PGNVD6fn/2ECjEensfhEt2o3bCN+4jgOcdAXN28wAUXeQv0sbYgt7zPfh+1fkjuEpB V8GiH0cNvqa/JOkmQLgHFt0BghrIw6SCh8nhUOYt0+ODDfWFoCLgAtP1pEsiqTh/vc9l gorKYDMYiEvrHKmpkw3LWtesetJKMKpuBdeID+KHigaQYDUwLqlvxTCytBSbd0JWlyZc IWtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nwdBk8fb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lp15si6083968pjb.94.2021.10.12.11.49.30; Tue, 12 Oct 2021 11:49:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nwdBk8fb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234892AbhJLSlZ (ORCPT + 99 others); Tue, 12 Oct 2021 14:41:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234738AbhJLSlY (ORCPT ); Tue, 12 Oct 2021 14:41:24 -0400 Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCC35C061753 for ; Tue, 12 Oct 2021 11:38:26 -0700 (PDT) Received: by mail-il1-x131.google.com with SMTP id f15so67460ilu.7 for ; Tue, 12 Oct 2021 11:38:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EaRHyBRUKNYxyFuXsjUd0687S4CA91t+I1Ml3q5IbFY=; b=nwdBk8fbWe7Nb+c5ZLhvyEKpPYIi9in5GuaKZnldyXg65IlVUcp7fYOp/1W5b0TbJt sgGBCZEUQqVIzJKGQL42Dlsc4eqc96Foi+AE/gMcZTbtTedyngmbtnKre11VysqsFQhT 3ER42lOG4fFYDS+wSQjA4R3645zRNbAV8YYCt86TRxjsVRbFK0uMIZxB9jydXwEQrw/a US3aQQERw8JH9lUPeqbmSSPxYxa7UgQbSv7agyVHSK4oiP9MNd8zdSn7oLRb01FoCZQb 38pBcBWQ1PQUfhhuLT5ov0p+yenfCPOhT4qrymAu7n76kZ7zOT8SGDBebEzqnln247GP hvNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EaRHyBRUKNYxyFuXsjUd0687S4CA91t+I1Ml3q5IbFY=; b=D+SYgKu5+1fQYjQI/US67FS6bVBd1JGtxMunKret0kUFcAWvI5PdeM2sge8CHOfBvw Fjxa+u3k7JKk0ipq2ZNYXzFmDs9liHzOlYWeR9yaOimoXYcCjUrMng0CXaHZQSymFyFO gqoIjnOhbzBnRAh2hoCa201reSNmq5jyNfF3asG+c/IFI9dnkCVm0NhqrPFyaV86r29p vLxqyv32aUqRedp4uDnUF6yK3YVbx1CLpwjyQKWuffn0biGSZ4BytLHldscptbFSJFm2 t2p97fRtPylv/JSFncg3uR+H0lsYjf4hfFwfPQos4HjAxeIArRXJSjAgDcGSfzF4CpKN WB7g== X-Gm-Message-State: AOAM531Eub24ww0f+v0XPjN+srUCtbjyPFF0QK2TXdA3pv1/Mjk+ZXuI PsuSRR6WBxQBqzsAJlW/Idc= X-Received: by 2002:a05:6e02:bf4:: with SMTP id d20mr25998460ilu.146.1634063611779; Tue, 12 Oct 2021 11:33:31 -0700 (PDT) Received: from samwise.. (c-24-9-77-57.hsd1.co.comcast.net. [24.9.77.57]) by smtp.googlemail.com with ESMTPSA id x5sm2257999ioh.23.2021.10.12.11.33.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 11:33:31 -0700 (PDT) From: Jim Cromie To: jbaron@akamai.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: Jim Cromie Subject: [PATCH 5/5] dyndbg: no vpr-info on empty queries Date: Tue, 12 Oct 2021 12:33:10 -0600 Message-Id: <20211012183310.1016678-6-jim.cromie@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012183310.1016678-1-jim.cromie@gmail.com> References: <20211012183310.1016678-1-jim.cromie@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Also change varname. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 18235de37f25..eef9ca92b05c 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -520,9 +520,9 @@ static int ddebug_exec_query(char *query_string, const char *modname) static int ddebug_exec_queries(char *query, const char *modname) { char *split; - int i, errs = 0, exitcode = 0, rc, nfound = 0; + int qct, errs = 0, exitcode = 0, rc, nfound = 0; - for (i = 0; query; query = split) { + for (qct = 0; query; query = split) { split = strpbrk(query, ";\n"); if (split) *split++ = '\0'; @@ -531,7 +531,7 @@ static int ddebug_exec_queries(char *query, const char *modname) if (!query || !*query || *query == '#') continue; - v2pr_info("query %d: <%s> mod:<%s>\n", i, query, modname ?: "*"); + v2pr_info("query %d: <%s> mod:<%s>\n", qct, query, modname ?: "*"); rc = ddebug_exec_query(query, modname); if (rc < 0) { @@ -540,10 +540,11 @@ static int ddebug_exec_queries(char *query, const char *modname) } else { nfound += rc; } - i++; + qct++; } - v2pr_info("processed %d queries, with %d matches, %d errs\n", - i, nfound, errs); + if (qct) + v2pr_info("processed %d queries, with %d matches, %d errs\n", + qct, nfound, errs); if (exitcode) return exitcode; -- 2.31.1