oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* drivers/platform/x86/socwatch/sw_counter_list.c:88:25: sparse: sparse: incorrect type in argument 2 (different base types)
@ 2023-05-07 23:47 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2023-05-07 23:47 UTC (permalink / raw)
  To: Faycal Benmlih; +Cc: oe-kbuild-all

tree:   https://github.com/mchinth/linux sep_socwatch_linux_5_10
head:   c55df4a2b60fc7c6c4d00fd9f9fb447087833513
commit: 80c46c8183c607e70bcb88e9b04febae6c7775a2 SEP/SOCWATCH Update SoCWatch driver after rebasing to linux v5.6
date:   2 years, 7 months ago
config: i386-randconfig-s003 (https://download.01.org/0day-ci/archive/20230508/202305080756.Lxk9XQoY-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://github.com/mchinth/linux/commit/80c46c8183c607e70bcb88e9b04febae6c7775a2
        git remote add mchinth https://github.com/mchinth/linux
        git fetch --no-tags mchinth sep_socwatch_linux_5_10
        git checkout 80c46c8183c607e70bcb88e9b04febae6c7775a2
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 olddefconfig
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/platform/x86/socperf/ drivers/platform/x86/socwatch/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305080756.Lxk9XQoY-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/platform/x86/socwatch/sw_counter_list.c:88:25: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned int flags @@     got restricted gfp_t @@
   drivers/platform/x86/socwatch/sw_counter_list.c:88:25: sparse:     expected unsigned int flags
   drivers/platform/x86/socwatch/sw_counter_list.c:88:25: sparse:     got restricted gfp_t

vim +88 drivers/platform/x86/socwatch/sw_counter_list.c

    74	
    75		pw_u64_t i = 0, max_msr_value = 0;//, msr_array_size = 0;
    76		pw_u64_t msr_list_size = sizeof(msr_info_list) / sizeof(msr_info_list[0]);
    77	
    78		// TODO: Probably sort msr_info_list rather than assuming it is sorted.
    79	
    80		// Since 'msr_info_list' is sorted, the last entry should be the highest MSR
    81		// address
    82		max_msr_value = msr_info_list[msr_list_size-1];
    83		pw_pr_debug("max msr value: %llx\n", max_msr_value);
    84	
    85		// TODO: Optimize the memory usage by making msr_search_array a bit vector
    86		msr_search_array_size = max_msr_value + 1;
    87		msr_search_array = sw_kmalloc(msr_search_array_size * sizeof(pw_u8_t),
  > 88				GFP_KERNEL);
    89	
    90		if (msr_search_array == NULL) {
    91			return -PW_ERROR;
    92		}
    93	
    94		memset(msr_search_array, 0, msr_search_array_size);
    95	
    96		for (i = 0; i < msr_list_size; ++i) {
    97			msr_search_array[msr_info_list[i]] = 1;
    98		}
    99	
   100		return PW_SUCCESS;
   101	}
   102	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

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

* drivers/platform/x86/socwatch/sw_counter_list.c:88:25: sparse: sparse: incorrect type in argument 2 (different base types)
@ 2023-03-29 17:23 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2023-03-29 17:23 UTC (permalink / raw)
  To: Faycal Benmlih; +Cc: oe-kbuild-all

tree:   https://github.com/mchinth/linux sep_socwatch_linux_5_10
head:   c55df4a2b60fc7c6c4d00fd9f9fb447087833513
commit: 80c46c8183c607e70bcb88e9b04febae6c7775a2 SEP/SOCWATCH Update SoCWatch driver after rebasing to linux v5.6
date:   2 years, 6 months ago
config: i386-randconfig-s002 (https://download.01.org/0day-ci/archive/20230330/202303300155.IEvnN58t-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://github.com/mchinth/linux/commit/80c46c8183c607e70bcb88e9b04febae6c7775a2
        git remote add mchinth https://github.com/mchinth/linux
        git fetch --no-tags mchinth sep_socwatch_linux_5_10
        git checkout 80c46c8183c607e70bcb88e9b04febae6c7775a2
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 olddefconfig
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/platform/x86/sepdk/pax/ drivers/platform/x86/socperf/ drivers/platform/x86/socwatch/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303300155.IEvnN58t-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/platform/x86/socwatch/sw_counter_list.c:88:25: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned int flags @@     got restricted gfp_t @@
   drivers/platform/x86/socwatch/sw_counter_list.c:88:25: sparse:     expected unsigned int flags
   drivers/platform/x86/socwatch/sw_counter_list.c:88:25: sparse:     got restricted gfp_t

vim +88 drivers/platform/x86/socwatch/sw_counter_list.c

    74	
    75		pw_u64_t i = 0, max_msr_value = 0;//, msr_array_size = 0;
    76		pw_u64_t msr_list_size = sizeof(msr_info_list) / sizeof(msr_info_list[0]);
    77	
    78		// TODO: Probably sort msr_info_list rather than assuming it is sorted.
    79	
    80		// Since 'msr_info_list' is sorted, the last entry should be the highest MSR
    81		// address
    82		max_msr_value = msr_info_list[msr_list_size-1];
    83		pw_pr_debug("max msr value: %llx\n", max_msr_value);
    84	
    85		// TODO: Optimize the memory usage by making msr_search_array a bit vector
    86		msr_search_array_size = max_msr_value + 1;
    87		msr_search_array = sw_kmalloc(msr_search_array_size * sizeof(pw_u8_t),
  > 88				GFP_KERNEL);
    89	
    90		if (msr_search_array == NULL) {
    91			return -PW_ERROR;
    92		}
    93	
    94		memset(msr_search_array, 0, msr_search_array_size);
    95	
    96		for (i = 0; i < msr_list_size; ++i) {
    97			msr_search_array[msr_info_list[i]] = 1;
    98		}
    99	
   100		return PW_SUCCESS;
   101	}
   102	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

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

* drivers/platform/x86/socwatch/sw_counter_list.c:88:25: sparse: sparse: incorrect type in argument 2 (different base types)
@ 2023-03-28 22:21 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2023-03-28 22:21 UTC (permalink / raw)
  To: Faycal Benmlih; +Cc: oe-kbuild-all

tree:   https://github.com/mchinth/linux sep_socwatch_linux_5_10
head:   c55df4a2b60fc7c6c4d00fd9f9fb447087833513
commit: 80c46c8183c607e70bcb88e9b04febae6c7775a2 SEP/SOCWATCH Update SoCWatch driver after rebasing to linux v5.6
date:   2 years, 6 months ago
config: i386-randconfig-s002 (https://download.01.org/0day-ci/archive/20230329/202303290622.lKLwZeub-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://github.com/mchinth/linux/commit/80c46c8183c607e70bcb88e9b04febae6c7775a2
        git remote add mchinth https://github.com/mchinth/linux
        git fetch --no-tags mchinth sep_socwatch_linux_5_10
        git checkout 80c46c8183c607e70bcb88e9b04febae6c7775a2
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 olddefconfig
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/platform/x86/sepdk/pax/ drivers/platform/x86/socperf/ drivers/platform/x86/socwatch/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303290622.lKLwZeub-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/platform/x86/socwatch/sw_counter_list.c:88:25: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned int flags @@     got restricted gfp_t @@
   drivers/platform/x86/socwatch/sw_counter_list.c:88:25: sparse:     expected unsigned int flags
   drivers/platform/x86/socwatch/sw_counter_list.c:88:25: sparse:     got restricted gfp_t

vim +88 drivers/platform/x86/socwatch/sw_counter_list.c

    74	
    75		pw_u64_t i = 0, max_msr_value = 0;//, msr_array_size = 0;
    76		pw_u64_t msr_list_size = sizeof(msr_info_list) / sizeof(msr_info_list[0]);
    77	
    78		// TODO: Probably sort msr_info_list rather than assuming it is sorted.
    79	
    80		// Since 'msr_info_list' is sorted, the last entry should be the highest MSR
    81		// address
    82		max_msr_value = msr_info_list[msr_list_size-1];
    83		pw_pr_debug("max msr value: %llx\n", max_msr_value);
    84	
    85		// TODO: Optimize the memory usage by making msr_search_array a bit vector
    86		msr_search_array_size = max_msr_value + 1;
    87		msr_search_array = sw_kmalloc(msr_search_array_size * sizeof(pw_u8_t),
  > 88				GFP_KERNEL);
    89	
    90		if (msr_search_array == NULL) {
    91			return -PW_ERROR;
    92		}
    93	
    94		memset(msr_search_array, 0, msr_search_array_size);
    95	
    96		for (i = 0; i < msr_list_size; ++i) {
    97			msr_search_array[msr_info_list[i]] = 1;
    98		}
    99	
   100		return PW_SUCCESS;
   101	}
   102	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

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

end of thread, other threads:[~2023-05-07 23:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-07 23:47 drivers/platform/x86/socwatch/sw_counter_list.c:88:25: sparse: sparse: incorrect type in argument 2 (different base types) kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2023-03-29 17:23 kernel test robot
2023-03-28 22:21 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).