public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] tst_kvercmp: Handle larger kernel version numbers
@ 2023-10-18  1:50 Edward Liaw via ltp
  2023-10-24 19:51 ` Petr Vorel
  2023-10-24 23:14 ` Petr Vorel
  0 siblings, 2 replies; 7+ messages in thread
From: Edward Liaw via ltp @ 2023-10-18  1:50 UTC (permalink / raw)
  To: ltp; +Cc: kernel-team

Current implementation can only handle revision numbers up to 256.  Bump
this up to 1024 as some revision numbers are in the 300s.

Signed-off-by: Edward Liaw <edliaw@google.com>
---
 lib/tst_kvercmp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/tst_kvercmp.c b/lib/tst_kvercmp.c
index 552920fac..9e1a511af 100644
--- a/lib/tst_kvercmp.c
+++ b/lib/tst_kvercmp.c
@@ -92,8 +92,8 @@ int tst_kvcmp(const char *cur_kver, int r1, int r2, int r3)
 		         cur_kver);
 	}
 
-	testver = (r1 << 16) + (r2 << 8) + r3;
-	currver = (a1 << 16) + (a2 << 8) + a3;
+	testver = (r1 << 20) + (r2 << 10) + r3;
+	currver = (a1 << 20) + (a2 << 10) + a3;
 
 	return currver - testver;
 }
-- 
2.42.0.655.g421f12c284-goog


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-10-25 14:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-18  1:50 [LTP] [PATCH] tst_kvercmp: Handle larger kernel version numbers Edward Liaw via ltp
2023-10-24 19:51 ` Petr Vorel
2023-10-24 23:14 ` Petr Vorel
2023-10-25  0:46   ` Edward Liaw via ltp
2023-10-25  5:35     ` Edward Liaw via ltp
2023-10-25  7:44       ` Petr Vorel
2023-10-25 14:04         ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox