tools.linux.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: tools@kernel.org
Cc: Will Deacon <willdeacon@google.com>,
	Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
	Jason Gunthorpe <jgg@nvidia.com>,
	Nicolin Chen <nicolinc@nvidia.com>, Will Deacon <will@kernel.org>
Subject: [PATCH 2/2] ty: Remove unused 'matches' variable
Date: Fri,  1 Mar 2024 10:24:18 +0000	[thread overview]
Message-ID: <20240301102418.17705-3-will@kernel.org> (raw)
In-Reply-To: <20240301102418.17705-1-will@kernel.org>

From: Will Deacon <willdeacon@google.com>

The 'matches' variable in auto_locate_series() is updated but not used
for anything, so remove it.

Signed-off-by: Will Deacon <will@kernel.org>
---
 src/b4/ty.py | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/b4/ty.py b/src/b4/ty.py
index 950c357a89c5..97f4c44a0832 100644
--- a/src/b4/ty.py
+++ b/src/b4/ty.py
@@ -198,7 +198,6 @@ def auto_locate_series(gitdir: Optional[str], jsondata: dict, branch: str,
     patchids = set(commits.keys())
     # We need to find all of them in the commits
     found = list()
-    matches = 0
     at = 0
     for patch in jsondata['patches']:
         at += 1
@@ -206,7 +205,6 @@ def auto_locate_series(gitdir: Optional[str], jsondata: dict, branch: str,
         if patch[1] in patchids:
             logger.debug('Found: %s', patch[0])
             found.append((at, commits[patch[1]][0]))
-            matches += 1
         else:
             # try to locate by subject
             success = False
@@ -215,7 +213,6 @@ def auto_locate_series(gitdir: Optional[str], jsondata: dict, branch: str,
                     logger.debug('Matched using subject')
                     found.append((at, commit[0]))
                     success = True
-                    matches += 1
                     break
 
             if success:
@@ -229,7 +226,6 @@ def auto_locate_series(gitdir: Optional[str], jsondata: dict, branch: str,
                             logger.debug('Matched using recorded message-id')
                             found.append((at, commit[0]))
                             success = True
-                            matches += 1
                             break
                 if success:
                     break
-- 
2.44.0.rc1.240.g4c46232300-goog


  parent reply	other threads:[~2024-03-01 10:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01 10:24 [PATCH 0/2] b4: ty: Fix incorrect patch/commit association Will Deacon
2024-03-01 10:24 ` [PATCH 1/2] ty: Try subject matching for every commit before using trackers Will Deacon
2024-03-01 10:24 ` Will Deacon [this message]
2024-03-01 10:34 ` [PATCH 0/2] b4: ty: Fix incorrect patch/commit association Will Deacon

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=20240301102418.17705-3-will@kernel.org \
    --to=will@kernel.org \
    --cc=jgg@nvidia.com \
    --cc=konstantin@linuxfoundation.org \
    --cc=nicolinc@nvidia.com \
    --cc=tools@kernel.org \
    --cc=willdeacon@google.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).