From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Masahiro Yamada <masahiroy@kernel.org>,
Greg Kroah-Hartman <gregkh@suse.de>,
Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nicolas@fjasle.eu>,
Rusty Russell <rusty@rustcorp.com.au>
Subject: [PATCH 1/3] modpost: fix the missed iteration for the max bit in do_input()
Date: Thu, 26 Dec 2024 00:33:35 +0900 [thread overview]
Message-ID: <20241225153343.134590-2-masahiroy@kernel.org> (raw)
In-Reply-To: <20241225153343.134590-1-masahiroy@kernel.org>
This loop should iterate over the range from 'min' to 'max' inclusively.
The last interation is missed.
Fixes: 1d8f430c15b3 ("[PATCH] Input: add modalias support")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
scripts/mod/file2alias.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 5b5745f00eb3..ff263c285977 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -656,7 +656,7 @@ static void do_input(char *alias,
for (i = min / BITS_PER_LONG; i < max / BITS_PER_LONG + 1; i++)
arr[i] = TO_NATIVE(arr[i]);
- for (i = min; i < max; i++)
+ for (i = min; i <= max; i++)
if (arr[i / BITS_PER_LONG] & (1ULL << (i%BITS_PER_LONG)))
sprintf(alias + strlen(alias), "%X,*", i);
}
--
2.43.0
next prev parent reply other threads:[~2024-12-25 15:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-25 15:33 [PATCH 0/3] modpost: work around unaligned data access Masahiro Yamada
2024-12-25 15:33 ` Masahiro Yamada [this message]
2024-12-25 15:33 ` [PATCH 2/3] modpost: refactor do_vmbus_entry() Masahiro Yamada
2024-12-25 15:33 ` [PATCH 3/3] modpost: work around unaligned data access error Masahiro Yamada
2024-12-25 16:26 ` [PATCH 0/3] modpost: work around unaligned data access John Paul Adrian Glaubitz
2024-12-26 13:55 ` Masahiro Yamada
2024-12-27 13:31 ` John Paul Adrian Glaubitz
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=20241225153343.134590-2-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=gregkh@suse.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=nicolas@fjasle.eu \
--cc=rusty@rustcorp.com.au \
/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