diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2024-12-26 00:33:35 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-01-09 13:32:06 +0100 |
commit | bc6962f2dbaf1676c8cbb8b04522f26a186bf416 (patch) | |
tree | 8458bf3e22550146c6f6088148f02c4e550ae2ce | |
parent | f93e9ae0ba5ebfb11466ce5370be9e9a85bc093d (diff) | |
download | linux-bc6962f2dbaf1676c8cbb8b04522f26a186bf416.tar.gz linux-bc6962f2dbaf1676c8cbb8b04522f26a186bf416.tar.bz2 linux-bc6962f2dbaf1676c8cbb8b04522f26a186bf416.zip |
modpost: fix the missed iteration for the max bit in do_input()
[ Upstream commit bf36b4bf1b9a7a0015610e2f038ee84ddb085de2 ]
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>
Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | scripts/mod/file2alias.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 96f37fe1b992..ea498eff1f2a 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -742,7 +742,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); } |