All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [arnd-playground:randconfig-5.15-min 80/175] mm/damon/vaddr-test.c:76:47: sparse: sparse: missing braces around initializer
Date: Tue, 26 Oct 2021 08:55:11 +0800	[thread overview]
Message-ID: <202110260807.SMWrx3LS-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 7869 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Arnd Bergmann <arnd@arndb.de>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git randconfig-5.15-min
head:   c471093763a746b316809f07c3114a455f37a32b
commit: 967ea466c98bfe3b29c40ecafe25190d95c57082 [80/175] damon: disable structleak plugin for kunit test
:::::: branch date: 4 weeks ago
:::::: commit date: 4 weeks ago
config: i386-randconfig-s001-20211010 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commit/?id=967ea466c98bfe3b29c40ecafe25190d95c57082
        git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
        git fetch --no-tags arnd-playground randconfig-5.15-min
        git checkout 967ea466c98bfe3b29c40ecafe25190d95c57082
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash mm/damon/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> mm/damon/vaddr-test.c:76:47: sparse: sparse: missing braces around initializer

vim +76 mm/damon/vaddr-test.c

17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  46  
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  47  /*
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  48   * Test __damon_va_three_regions() function
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  49   *
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  50   * In case of virtual memory address spaces monitoring, DAMON converts the
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  51   * complex and dynamic memory mappings of each target task to three
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  52   * discontiguous regions which cover every mapped areas.  However, the three
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  53   * regions should not include the two biggest unmapped areas in the original
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  54   * mapping, because the two biggest areas are normally the areas between 1)
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  55   * heap and the mmap()-ed regions, and 2) the mmap()-ed regions and stack.
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  56   * Because these two unmapped areas are very huge but obviously never accessed,
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  57   * covering the region is just a waste.
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  58   *
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  59   * '__damon_va_three_regions() receives an address space of a process.  It
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  60   * first identifies the start of mappings, end of mappings, and the two biggest
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  61   * unmapped areas.  After that, based on the information, it constructs the
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  62   * three regions and returns.  For more detail, refer to the comment of
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  63   * 'damon_init_regions_of()' function definition in 'mm/damon.c' file.
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  64   *
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  65   * For example, suppose virtual address ranges of 10-20, 20-25, 200-210,
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  66   * 210-220, 300-305, and 307-330 (Other comments represent this mappings in
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  67   * more short form: 10-20-25, 200-210-220, 300-305, 307-330) of a process are
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  68   * mapped.  To cover every mappings, the three regions should start with 10,
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  69   * and end with 305.  The process also has three unmapped areas, 25-200,
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  70   * 220-300, and 305-307.  Among those, 25-200 and 220-300 are the biggest two
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  71   * unmapped areas, and thus it should be converted to three regions of 10-25,
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  72   * 200-220, and 300-330.
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  73   */
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  74  static void damon_test_three_regions_in_vmas(struct kunit *test)
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  75  {
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 @76  	struct damon_addr_range regions[3] = {0,};
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  77  	/* 10-20-25, 200-210-220, 300-305, 307-330 */
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  78  	struct vm_area_struct vmas[] = {
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  79  		(struct vm_area_struct) {.vm_start = 10, .vm_end = 20},
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  80  		(struct vm_area_struct) {.vm_start = 20, .vm_end = 25},
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  81  		(struct vm_area_struct) {.vm_start = 200, .vm_end = 210},
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  82  		(struct vm_area_struct) {.vm_start = 210, .vm_end = 220},
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  83  		(struct vm_area_struct) {.vm_start = 300, .vm_end = 305},
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  84  		(struct vm_area_struct) {.vm_start = 307, .vm_end = 330},
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  85  	};
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  86  
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  87  	__link_vmas(vmas, 6);
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  88  
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  89  	__damon_va_three_regions(&vmas[0], regions);
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  90  
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  91  	KUNIT_EXPECT_EQ(test, 10ul, regions[0].start);
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  92  	KUNIT_EXPECT_EQ(test, 25ul, regions[0].end);
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  93  	KUNIT_EXPECT_EQ(test, 200ul, regions[1].start);
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  94  	KUNIT_EXPECT_EQ(test, 220ul, regions[1].end);
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  95  	KUNIT_EXPECT_EQ(test, 300ul, regions[2].start);
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  96  	KUNIT_EXPECT_EQ(test, 330ul, regions[2].end);
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  97  }
17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07  98  

:::::: The code at line 76 was first introduced by commit
:::::: 17ccae8bb5c928946f6f3af14626ec458f74e6ad mm/damon: add kunit tests

:::::: TO: SeongJae Park <sjpark@amazon.de>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33151 bytes --]

             reply	other threads:[~2021-10-26  0:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26  0:55 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-10-10 16:00 [arnd-playground:randconfig-5.15-min 80/175] mm/damon/vaddr-test.c:76:47: sparse: sparse: missing braces around initializer kernel test robot

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=202110260807.SMWrx3LS-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.