All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-goldfish:android-5.4 1/3] lib/test_printf.c:584:16: sparse: sparse: restricted gfp_t degrades to integer
@ 2021-01-13  7:16 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-01-13  7:16 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://android.googlesource.com/kernel/goldfish android-5.4
head:   bb34193d1edc2c8a5ac87ac59d8e410632fc092f
commit: b9d3d8f1e991052edb89b0537b8f2e8b2aa941ac [1/3] ANDROID: GKI: cma: redirect page allocation to CMA
config: x86_64-randconfig-s022-20210113 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-208-g46a52ca4-dirty
        git remote add android-goldfish https://android.googlesource.com/kernel/goldfish
        git fetch --no-tags android-goldfish android-5.4
        git checkout b9d3d8f1e991052edb89b0537b8f2e8b2aa941ac
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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 >>)"
>> lib/test_printf.c:584:16: sparse: sparse: restricted gfp_t degrades to integer
>> lib/test_printf.c:584:13: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted gfp_t [addressable] [assigned] [usertype] gfp @@     got unsigned int @@
   lib/test_printf.c:584:13: sparse:     expected restricted gfp_t [addressable] [assigned] [usertype] gfp
   lib/test_printf.c:584:13: sparse:     got unsigned int
   lib/test_printf.c:585:49: sparse: sparse: cast from restricted gfp_t
   lib/test_printf.c:589:58: sparse: sparse: cast from restricted gfp_t

vim +584 lib/test_printf.c

707cc7280f452a16 Rasmus Villemoes 2015-11-06  546  
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  547  static void __init
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  548  flags(void)
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  549  {
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  550  	unsigned long flags;
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  551  	gfp_t gfp;
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  552  	char *cmp_buffer;
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  553  
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  554  	flags = 0;
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  555  	test("", "%pGp", &flags);
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  556  
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  557  	/* Page flags should filter the zone id */
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  558  	flags = 1UL << NR_PAGEFLAGS;
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  559  	test("", "%pGp", &flags);
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  560  
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  561  	flags |= 1UL << PG_uptodate | 1UL << PG_dirty | 1UL << PG_lru
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  562  		| 1UL << PG_active | 1UL << PG_swapbacked;
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  563  	test("uptodate|dirty|lru|active|swapbacked", "%pGp", &flags);
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  564  
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  565  
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  566  	flags = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  567  			| VM_DENYWRITE;
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  568  	test("read|exec|mayread|maywrite|mayexec|denywrite", "%pGv", &flags);
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  569  
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  570  	gfp = GFP_TRANSHUGE;
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  571  	test("GFP_TRANSHUGE", "%pGg", &gfp);
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  572  
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  573  	gfp = GFP_ATOMIC|__GFP_DMA;
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  574  	test("GFP_ATOMIC|GFP_DMA", "%pGg", &gfp);
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  575  
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  576  	gfp = __GFP_ATOMIC;
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  577  	test("__GFP_ATOMIC", "%pGg", &gfp);
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  578  
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  579  	cmp_buffer = kmalloc(BUF_SIZE, GFP_KERNEL);
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  580  	if (!cmp_buffer)
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  581  		return;
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  582  
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  583  	/* Any flags not translated by the table should remain numeric */
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15 @584  	gfp = ~__GFP_BITS_MASK;
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  585  	snprintf(cmp_buffer, BUF_SIZE, "%#lx", (unsigned long) gfp);
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  586  	test(cmp_buffer, "%pGg", &gfp);
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  587  
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  588  	snprintf(cmp_buffer, BUF_SIZE, "__GFP_ATOMIC|%#lx",
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  589  							(unsigned long) gfp);
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  590  	gfp |= __GFP_ATOMIC;
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  591  	test(cmp_buffer, "%pGg", &gfp);
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  592  
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  593  	kfree(cmp_buffer);
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  594  }
edf14cdbf9a0e5ab Vlastimil Babka  2016-03-15  595  

:::::: The code@line 584 was first introduced by commit
:::::: edf14cdbf9a0e5ab52698ca66d07a76ade0d5c46 mm, printk: introduce new format string for flags

:::::: TO: Vlastimil Babka <vbabka@suse.cz>
:::::: 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: 32842 bytes --]

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

* [android-goldfish:android-5.4 1/3] lib/test_printf.c:584:16: sparse: sparse: restricted gfp_t degrades to integer
@ 2021-07-20  1:31 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-07-20  1:31 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://android.googlesource.com/kernel/goldfish android-5.4
head:   bb34193d1edc2c8a5ac87ac59d8e410632fc092f
commit: b9d3d8f1e991052edb89b0537b8f2e8b2aa941ac [1/3] ANDROID: GKI: cma: redirect page allocation to CMA
config: i386-randconfig-s002-20210720 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        git remote add android-goldfish https://android.googlesource.com/kernel/goldfish
        git fetch --no-tags android-goldfish android-5.4
        git checkout b9d3d8f1e991052edb89b0537b8f2e8b2aa941ac
        # 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

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 >>)
>> lib/test_printf.c:584:16: sparse: sparse: restricted gfp_t degrades to integer
>> lib/test_printf.c:584:13: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted gfp_t [addressable] [assigned] [usertype] gfp @@     got unsigned int @@
   lib/test_printf.c:584:13: sparse:     expected restricted gfp_t [addressable] [assigned] [usertype] gfp
   lib/test_printf.c:584:13: sparse:     got unsigned int
   lib/test_printf.c:585:49: sparse: sparse: cast from restricted gfp_t
   lib/test_printf.c:589:58: sparse: sparse: cast from restricted gfp_t

vim +584 lib/test_printf.c

707cc7280f452a Rasmus Villemoes 2015-11-06  546  
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  547  static void __init
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  548  flags(void)
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  549  {
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  550  	unsigned long flags;
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  551  	gfp_t gfp;
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  552  	char *cmp_buffer;
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  553  
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  554  	flags = 0;
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  555  	test("", "%pGp", &flags);
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  556  
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  557  	/* Page flags should filter the zone id */
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  558  	flags = 1UL << NR_PAGEFLAGS;
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  559  	test("", "%pGp", &flags);
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  560  
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  561  	flags |= 1UL << PG_uptodate | 1UL << PG_dirty | 1UL << PG_lru
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  562  		| 1UL << PG_active | 1UL << PG_swapbacked;
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  563  	test("uptodate|dirty|lru|active|swapbacked", "%pGp", &flags);
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  564  
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  565  
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  566  	flags = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  567  			| VM_DENYWRITE;
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  568  	test("read|exec|mayread|maywrite|mayexec|denywrite", "%pGv", &flags);
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  569  
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  570  	gfp = GFP_TRANSHUGE;
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  571  	test("GFP_TRANSHUGE", "%pGg", &gfp);
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  572  
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  573  	gfp = GFP_ATOMIC|__GFP_DMA;
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  574  	test("GFP_ATOMIC|GFP_DMA", "%pGg", &gfp);
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  575  
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  576  	gfp = __GFP_ATOMIC;
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  577  	test("__GFP_ATOMIC", "%pGg", &gfp);
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  578  
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  579  	cmp_buffer = kmalloc(BUF_SIZE, GFP_KERNEL);
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  580  	if (!cmp_buffer)
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  581  		return;
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  582  
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  583  	/* Any flags not translated by the table should remain numeric */
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15 @584  	gfp = ~__GFP_BITS_MASK;
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  585  	snprintf(cmp_buffer, BUF_SIZE, "%#lx", (unsigned long) gfp);
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  586  	test(cmp_buffer, "%pGg", &gfp);
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  587  
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  588  	snprintf(cmp_buffer, BUF_SIZE, "__GFP_ATOMIC|%#lx",
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  589  							(unsigned long) gfp);
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  590  	gfp |= __GFP_ATOMIC;
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  591  	test(cmp_buffer, "%pGg", &gfp);
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  592  
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  593  	kfree(cmp_buffer);
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  594  }
edf14cdbf9a0e5 Vlastimil Babka  2016-03-15  595  

:::::: The code@line 584 was first introduced by commit
:::::: edf14cdbf9a0e5ab52698ca66d07a76ade0d5c46 mm, printk: introduce new format string for flags

:::::: TO: Vlastimil Babka <vbabka@suse.cz>
:::::: 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: 33844 bytes --]

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

end of thread, other threads:[~2021-07-20  1:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-13  7:16 [android-goldfish:android-5.4 1/3] lib/test_printf.c:584:16: sparse: sparse: restricted gfp_t degrades to integer kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-07-20  1:31 kernel test robot

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.