]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mm/damon/vaddr-test: split a test function having >1024 bytes frame size
authorSeongJae Park <sj@kernel.org>
Fri, 10 Dec 2021 22:46:40 +0000 (14:46 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:51:45 +0000 (19:51 +0100)
commit9a351255db2648a86d39f20b71896222d659803d
tree55704ddf66dff342a43fe32521a6ae784bf18c13
parenta3eca3037e7064e33fad57f8e265a30f42b639f5
mm/damon/vaddr-test: split a test function having >1024 bytes frame size

commit 044cd9750fe010170f5dc812e4824d98f5ea928c upstream.

On some configuration[1], 'damon_test_split_evenly()' kunit test
function has >1024 bytes frame size, so below build warning is
triggered:

      CC      mm/damon/vaddr.o
    In file included from mm/damon/vaddr.c:672:
    mm/damon/vaddr-test.h: In function 'damon_test_split_evenly':
    mm/damon/vaddr-test.h:309:1: warning: the frame size of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=]
      309 | }
          | ^

This commit fixes the warning by separating the common logic in the
function.

[1] https://lore.kernel.org/linux-mm/202111182146.OV3C4uGr-lkp@intel.com/

Link: https://lkml.kernel.org/r/20211201150440.1088-6-sj@kernel.org
Fixes: 17ccae8bb5c9 ("mm/damon: add kunit tests")
Signed-off-by: SeongJae Park <sj@kernel.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Brendan Higgins <brendanhiggins@google.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mm/damon/vaddr-test.h