lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 10 Nov 2021 20:06:21 +0800
From:   kernel test robot <lkp@...el.com>
To:     unlisted-recipients:; (no To-header on input)
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [mchinth:sep_socwatch_linux_5_15 57/59]
 drivers/platform/x86/sepdk/sep/sys_info.c:320:6: error: variable 'model' set
 but not used

tree:   https://github.com/mchinth/linux sep_socwatch_linux_5_15
head:   3af50f40725e78c505cbf840fb0be424c2f33e5e
commit: 6622fb2e6554a0edd0ebbbd582565bbe84ca9dfe [57/59] Merge branch 'master' into sep_socwatch_linux_5_15
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/mchinth/linux/commit/6622fb2e6554a0edd0ebbbd582565bbe84ca9dfe
        git remote add mchinth https://github.com/mchinth/linux
        git fetch --no-tags mchinth sep_socwatch_linux_5_15
        git checkout 6622fb2e6554a0edd0ebbbd582565bbe84ca9dfe
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

Note: the mchinth/sep_socwatch_linux_5_15 HEAD 3af50f40725e78c505cbf840fb0be424c2f33e5e builds fine.
      It only hurts bisectability.

All errors (new ones prefixed by >>):

   drivers/platform/x86/sepdk/sep/sys_info.c: In function 'sys_info_Fill_CPUID':
>> drivers/platform/x86/sepdk/sep/sys_info.c:320:6: error: variable 'model' set but not used [-Werror=unused-but-set-variable]
     320 |  U32 model = 0;
         |      ^~~~~
   cc1: all warnings being treated as errors
--
   drivers/platform/x86/sepdk/sep/utility.c: In function 'utility_Log_Write':
>> drivers/platform/x86/sepdk/sep/utility.c:702:3: error: function 'utility_Log_Write' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format]
     702 |   DRV_VSNPRINTF(DRV_LOG_ENTRY_message(entry),
         |   ^~~~~~~~~~~~~
   drivers/platform/x86/sepdk/sep/utility.c: In function 'UTILITY_Log':
>> drivers/platform/x86/sepdk/sep/utility.c:845:4: error: function 'UTILITY_Log' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format]
     845 |    nb_written_characters += DRV_VSNPRINTF(
         |    ^~~~~~~~~~~~~~~~~~~~~
>> drivers/platform/x86/sepdk/sep/utility.c:859:22: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
     858 |    if ((category_verbosity & LOG_CHANNEL_PRINTK) *
         |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     859 |        !in_interrupt * !in_notification) {
         |        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors
--
   drivers/platform/x86/sepdk/sep/pebs.c: In function 'PEBS_Flush_Buffer':
>> drivers/platform/x86/sepdk/sep/pebs.c:977:6: error: variable 'cur_grp' set but not used [-Werror=unused-but-set-variable]
     977 |  U32 cur_grp;
         |      ^~~~~~~
   cc1: all warnings being treated as errors
--
   In file included from drivers/platform/x86/sepdk/sep/unc_mmio.c:38:
   drivers/platform/x86/sepdk/sep/unc_mmio.c: In function 'unc_mmio_Write_PMU':
>> drivers/platform/x86/sepdk/inc/utility.h:56:18: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
      56 |  ((base) ? readl((void __iomem *)(base) + (offset)) : 0)
         |                  ^
   drivers/platform/x86/sepdk/sep/unc_mmio.c:201:16: note: in expansion of macro 'SYS_MMIO_Read32'
     201 |    tmp_value = SYS_MMIO_Read32(virtual_addr, offset_delta);
         |                ^~~~~~~~~~~~~~~
   drivers/platform/x86/sepdk/sep/unc_mmio.c: In function 'unc_mmio_Enable_PMU':
>> drivers/platform/x86/sepdk/inc/utility.h:56:18: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
      56 |  ((base) ? readl((void __iomem *)(base) + (offset)) : 0)
         |                  ^
   drivers/platform/x86/sepdk/sep/unc_mmio.c:365:18: note: in expansion of macro 'SYS_MMIO_Read32'
     365 |      buffer[j] = SYS_MMIO_Read32(
         |                  ^~~~~~~~~~~~~~~
   drivers/platform/x86/sepdk/sep/unc_mmio.c: In function 'unc_mmio_Trigger_Read':
>> drivers/platform/x86/sepdk/inc/utility.h:56:18: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
      56 |  ((base) ? readl((void __iomem *)(base) + (offset)) : 0)
         |                  ^
   drivers/platform/x86/sepdk/sep/unc_mmio.c:573:12: note: in expansion of macro 'SYS_MMIO_Read32'
     573 |    value = SYS_MMIO_Read32(virtual_addr, offset_delta);
         |            ^~~~~~~~~~~~~~~
   drivers/platform/x86/sepdk/sep/unc_mmio.c: In function 'unc_mmio_Read_PMU_Data':
>> drivers/platform/x86/sepdk/inc/utility.h:56:18: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
      56 |  ((base) ? readl((void __iomem *)(base) + (offset)) : 0)
         |                  ^
   drivers/platform/x86/sepdk/sep/unc_mmio.c:736:17: note: in expansion of macro 'SYS_MMIO_Read32'
     736 |     tmp_value = SYS_MMIO_Read32(virtual_addr,
         |                 ^~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors
--
   drivers/platform/x86/sepdk/sep/unc_common.c: In function 'UNC_COMMON_Get_Platform_Topology':
>> drivers/platform/x86/sepdk/sep/unc_common.c:280:6: error: variable 'device_id' set but not used [-Werror=unused-but-set-variable]
     280 |  U32 device_id;
         |      ^~~~~~~~~
   cc1: all warnings being treated as errors
--
   drivers/platform/x86/sepdk/sep/unc_pci.c: In function 'unc_pci_Write_PMU':
>> drivers/platform/x86/sepdk/sep/unc_pci.c:57:6: error: variable 'device_id' set but not used [-Werror=unused-but-set-variable]
      57 |  U32 device_id;
         |      ^~~~~~~~~
   cc1: all warnings being treated as errors


vim +/model +320 drivers/platform/x86/sepdk/sep/sys_info.c

d605aabab41663 Jon Moeller 2018-11-13  289  
d605aabab41663 Jon Moeller 2018-11-13  290  /* ------------------------------------------------------------------------- */
d605aabab41663 Jon Moeller 2018-11-13  291  /*!
d605aabab41663 Jon Moeller 2018-11-13  292   * @fn extern void sys_info_Fill_CPUID(...)
d605aabab41663 Jon Moeller 2018-11-13  293   *
d605aabab41663 Jon Moeller 2018-11-13  294   * @param        num_cpuids,
d605aabab41663 Jon Moeller 2018-11-13  295   * @param        basic_funcs,
d605aabab41663 Jon Moeller 2018-11-13  296   * @param        extended_funcs,
d605aabab41663 Jon Moeller 2018-11-13  297   * @param        cpu,
d605aabab41663 Jon Moeller 2018-11-13  298   * @param       *current_cpuid
d605aabab41663 Jon Moeller 2018-11-13  299   * @param       *gen_per_cpu,
d605aabab41663 Jon Moeller 2018-11-13  300   * @param       *local_gpc
d605aabab41663 Jon Moeller 2018-11-13  301   *
d605aabab41663 Jon Moeller 2018-11-13  302   * @return   None
d605aabab41663 Jon Moeller 2018-11-13  303   *
d605aabab41663 Jon Moeller 2018-11-13  304   * @brief  This routine is called to build per cpu information.
d605aabab41663 Jon Moeller 2018-11-13  305   * @brief  Fills in the cpuid for the processor in the right location in the buffer
d605aabab41663 Jon Moeller 2018-11-13  306   *
d605aabab41663 Jon Moeller 2018-11-13  307   */
d605aabab41663 Jon Moeller 2018-11-13  308  static void sys_info_Fill_CPUID(U32 num_cpuids, U32 basic_funcs,
d605aabab41663 Jon Moeller 2018-11-13  309  				U32 extended_funcs, U32 cpu,
d605aabab41663 Jon Moeller 2018-11-13  310  				VTSA_CPUID *current_cpuid,
d605aabab41663 Jon Moeller 2018-11-13  311  				VTSA_GEN_PER_CPU *gen_per_cpu,
d605aabab41663 Jon Moeller 2018-11-13  312  				VTSA_GEN_PER_CPU *local_gpc)
d605aabab41663 Jon Moeller 2018-11-13  313  {
d605aabab41663 Jon Moeller 2018-11-13  314  	U32 i, index, j;
d605aabab41663 Jon Moeller 2018-11-13  315  	U64 cpuid_function;
d605aabab41663 Jon Moeller 2018-11-13  316  	U64 rax, rbx, rcx, rdx;
d605aabab41663 Jon Moeller 2018-11-13  317  	VTSA_CPUID *cpuid_el;
d605aabab41663 Jon Moeller 2018-11-13  318  	U32 shift_nbits_core = 0;
d605aabab41663 Jon Moeller 2018-11-13  319  	U32 shift_nbits_pkg = 0;
d605aabab41663 Jon Moeller 2018-11-13 @320  	U32 model = 0;
d605aabab41663 Jon Moeller 2018-11-13  321  	DRV_BOOL ht_supported = FALSE;
d605aabab41663 Jon Moeller 2018-11-13  322  	U32 apic_id = 0;
d605aabab41663 Jon Moeller 2018-11-13  323  	U32 num_logical_per_physical = 0;
d605aabab41663 Jon Moeller 2018-11-13  324  	U32 cores_per_die = 1;
d605aabab41663 Jon Moeller 2018-11-13  325  	U32 thread_id = 0;
d605aabab41663 Jon Moeller 2018-11-13  326  	U32 core_id = 0;
d605aabab41663 Jon Moeller 2018-11-13  327  	U32 package_id = 0;
d605aabab41663 Jon Moeller 2018-11-13  328  	U32 module_id = 0;
d605aabab41663 Jon Moeller 2018-11-13  329  	U32 cores_sharing_cache = 0;
d605aabab41663 Jon Moeller 2018-11-13  330  	U32 cache_mask_width = 0;
d605aabab41663 Jon Moeller 2018-11-13  331  	U32 num_cores = 0;
d605aabab41663 Jon Moeller 2018-11-13  332  
d605aabab41663 Jon Moeller 2018-11-13  333  	SEP_DRV_LOG_TRACE_IN("CPU: %x.", cpu);
d605aabab41663 Jon Moeller 2018-11-13  334  
d605aabab41663 Jon Moeller 2018-11-13  335  	apic_id = CPU_STATE_apic_id(&pcb[cpu]);
d605aabab41663 Jon Moeller 2018-11-13  336  	SEP_DRV_LOG_TRACE("Cpu %x: apic_id = %d.", cpu, apic_id);
d605aabab41663 Jon Moeller 2018-11-13  337  
d605aabab41663 Jon Moeller 2018-11-13  338  	for (i = 0, index = 0; index < num_cpuids; i++) {
d605aabab41663 Jon Moeller 2018-11-13  339  		cpuid_function =
d605aabab41663 Jon Moeller 2018-11-13  340  			(i < basic_funcs) ? i : (0x80000000 + i - basic_funcs);
d605aabab41663 Jon Moeller 2018-11-13  341  
d605aabab41663 Jon Moeller 2018-11-13  342  		if (cpuid_function == 0x4) {
d605aabab41663 Jon Moeller 2018-11-13  343  			for (j = 0, rax = (U64)-1; (rax & 0x1f) != 0; j++) {
d605aabab41663 Jon Moeller 2018-11-13  344  				rcx = j;
d605aabab41663 Jon Moeller 2018-11-13  345  				UTILITY_Read_Cpuid(cpuid_function, &rax, &rbx,
d605aabab41663 Jon Moeller 2018-11-13  346  						   &rcx, &rdx);
d605aabab41663 Jon Moeller 2018-11-13  347  				cpuid_el = &current_cpuid[index];
d605aabab41663 Jon Moeller 2018-11-13  348  				index++;
d605aabab41663 Jon Moeller 2018-11-13  349  

:::::: The code at line 320 was first introduced by commit
:::::: d605aabab41663c9be9e8c549042933189adbf2f platform/x86: add sep and socwatch drivers without socperf.

:::::: TO: Jon Moeller <jon.moeller@...el.com>
:::::: CC: Faycal Benmlih <faycal.benmlih@...el.com>

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

Download attachment ".config.gz" of type "application/gzip" (66069 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ