From: Colin Ian King <colin.i.king@gmail.com>
To: David Airlie <airlied@redhat.com>, dri-devel@lists.freedesktop.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH][next] agp/amd64: remove redundant assignment to variable i
Date: Mon, 23 Oct 2023 14:27:59 +0100 [thread overview]
Message-ID: <20231023132759.666224-1-colin.i.king@gmail.com> (raw)
The variable i is being initialized to 0 and then again in the
following for-loop. The initialization outside the for-loop is
redundant and can be removed.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/char/agp/amd64-agp.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index ce8651436609..47bd3b8a54b4 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -333,7 +333,6 @@ static int cache_nbs(struct pci_dev *pdev, u32 cap_ptr)
if (!amd_nb_has_feature(AMD_NB_GART))
return -ENODEV;
- i = 0;
for (i = 0; i < amd_nb_num(); i++) {
struct pci_dev *dev = node_to_amd_nb(i)->misc;
if (fix_northbridge(dev, pdev, cap_ptr) < 0) {
--
2.39.2
next reply other threads:[~2023-10-23 13:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-23 13:27 Colin Ian King [this message]
2024-02-15 22:48 [PATCH][next] agp/amd64: remove redundant assignment to variable i Colin Ian King
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=20231023132759.666224-1-colin.i.king@gmail.com \
--to=colin.i.king@gmail.com \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--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).