]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests/thermal: remove duplicate sprintf() call in workload_hint_test
authorWangYuli <wangyuli@uniontech.com>
Thu, 10 Jul 2025 13:04:12 +0000 (21:04 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 20 Jul 2025 02:08:28 +0000 (19:08 -0700)
Remove redundant sprintf() call that was duplicating the same operation of
formatting delay_str with argv[1].

Link: https://lkml.kernel.org/r/6338CD0E839B770B+20250710130412.284531-1-wangyuli@uniontech.com
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Cc: Guan Wentao <guanwentao@uniontech.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c

index a400972329675aa8e07a87df39e7908c78d7aba7..bda006af8b1b33a699c546f52aa7cf55a0cd1789 100644 (file)
@@ -67,8 +67,6 @@ int main(int argc, char **argv)
                if (delay < 0)
                        exit(1);
 
-               sprintf(delay_str, "%s\n", argv[1]);
-
                sprintf(delay_str, "%s\n", argv[1]);
                fd = open(WORKLOAD_NOTIFICATION_DELAY_ATTRIBUTE, O_RDWR);
                if (fd < 0) {