From: Will Deacon <will@kernel.org>
To: tools@kernel.org
Cc: Will Deacon <will@kernel.org>,
Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
Jason Gunthorpe <jgg@nvidia.com>,
Nicolin Chen <nicolinc@nvidia.com>
Subject: [PATCH v2 2/2] ty: Remove unused 'matches' variable
Date: Mon, 4 Mar 2024 13:42:41 +0000 [thread overview]
Message-ID: <20240304134241.20447-3-will@kernel.org> (raw)
In-Reply-To: <20240304134241.20447-1-will@kernel.org>
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
next prev parent reply other threads:[~2024-03-04 13:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 13:42 [PATCH v2 0/2] b4: ty: Fix incorrect patch/commit association Will Deacon
2024-03-04 13:42 ` [PATCH v2 1/2] ty: Try subject matching for every commit before using trackers Will Deacon
2024-03-04 13:42 ` Will Deacon [this message]
2024-03-04 21:32 ` [PATCH v2 0/2] b4: ty: Fix incorrect patch/commit association Konstantin Ryabitsev
2024-05-01 21:23 ` Konstantin Ryabitsev
2024-05-02 9:23 ` Will Deacon
2024-05-02 18:31 ` Konstantin Ryabitsev
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=20240304134241.20447-3-will@kernel.org \
--to=will@kernel.org \
--cc=jgg@nvidia.com \
--cc=konstantin@linuxfoundation.org \
--cc=nicolinc@nvidia.com \
--cc=tools@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.