All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c:503:11: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
@ 2021-07-19  3:42 kernel test robot
  2021-07-19  9:00   ` kernel test robot
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-07-19  3:42 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Xiaomeng Hou <Xiaomeng.Hou@amd.com>
CC: Alex Deucher <alexander.deucher@amd.com>
CC: Huang Rui <ray.huang@amd.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2734d6c1b1a089fb593ef6a23d4b70903526fe0c
commit: bd8dcea93a7d45a3366b5f3e6c341a677ff90acf drm/amd/pm: add callbacks to read/write sysfs file pp_power_profile_mode
date:   6 weeks ago
:::::: branch date: 6 hours ago
:::::: commit date: 6 weeks ago
compiler: ia64-linux-gcc (GCC) 10.3.0

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


cppcheck warnings: (new ones prefixed by >>)
   In file included from drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/yellow_carp_ppt.c:
>> drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c:503:11: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
     size += sprintf(buf + size, "%2d %14s%sn",
             ^

vim +503 drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c

4cea0fc9816add7 Xiaomeng Hou 2021-02-09  473  
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  474  static int yellow_carp_get_power_profile_mode(struct smu_context *smu,
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  475  						char *buf)
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  476  {
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  477  	static const char *profile_name[] = {
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  478  					"BOOTUP_DEFAULT",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  479  					"3D_FULL_SCREEN",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  480  					"POWER_SAVING",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  481  					"VIDEO",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  482  					"VR",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  483  					"COMPUTE",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  484  					"CUSTOM"};
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  485  	uint32_t i, size = 0;
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  486  	int16_t workload_type = 0;
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  487  
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  488  	if (!buf)
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  489  		return -EINVAL;
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  490  
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  491  	for (i = 0; i <= PP_SMC_POWER_PROFILE_CUSTOM; i++) {
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  492  		/*
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  493  		 * Conv PP_SMC_POWER_PROFILE* to WORKLOAD_PPLIB_*_BIT.
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  494  		 * Not all profile modes are supported on yellow carp.
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  495  		 */
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  496  		workload_type = smu_cmn_to_asic_specific_index(smu,
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  497  							       CMN2ASIC_MAPPING_WORKLOAD,
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  498  							       i);
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  499  
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  500  		if (workload_type < 0)
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  501  			continue;
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  502  
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 @503  		size += sprintf(buf + size, "%2d %14s%s\n",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  504  			i, profile_name[i], (i == smu->power_profile_mode) ? "*" : " ");
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  505  	}
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  506  
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  507  	return size;
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  508  }
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29  509  

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

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

* drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c:503:11: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
  2021-07-19  3:42 drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c:503:11: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] kernel test robot
@ 2021-07-19  9:00   ` kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-07-19  9:00 UTC (permalink / raw)
  To: kbuild-all

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


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head: 2734d6c1b1a089fb593ef6a23d4b70903526fe0c
commit: bd8dcea93a7d45a3366b5f3e6c341a677ff90acf drm/amd/pm: add 
callbacks to read/write sysfs file pp_power_profile_mode
date: 6 weeks ago
compiler: ia64-linux-gcc (GCC) 10.3.0

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


cppcheck warnings: (new ones prefixed by >>)
In file included from 
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/yellow_carp_ppt.c:
>> drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c:503:11: warning: 
>> %d in format string (no. 1) requires 'int' but the argument type is 
>> 'unsigned int'. [invalidPrintfArgType_sint]
size += sprintf(buf + size, "%2d %14s%sn",
^

vim +503 drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c

4cea0fc9816add7 Xiaomeng Hou 2021-02-09 473 bd8dcea93a7d45a Xiaomeng Hou 
2021-03-29 474 static int yellow_carp_get_power_profile_mode(struct 
smu_context *smu,
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 475 char *buf)
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 476 {
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 477 static const char 
*profile_name[] = {
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 478 "BOOTUP_DEFAULT",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 479 "3D_FULL_SCREEN",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 480 "POWER_SAVING",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 481 "VIDEO",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 482 "VR",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 483 "COMPUTE",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 484 "CUSTOM"};
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 485 uint32_t i, size = 0;
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 486 int16_t workload_type = 0;
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 487 bd8dcea93a7d45a Xiaomeng Hou 
2021-03-29 488 if (!buf)
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 489 return -EINVAL;
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 490 bd8dcea93a7d45a Xiaomeng Hou 
2021-03-29 491 for (i = 0; i <= PP_SMC_POWER_PROFILE_CUSTOM; i++) {
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 492 /*
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 493 * Conv PP_SMC_POWER_PROFILE* 
to WORKLOAD_PPLIB_*_BIT.
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 494 * Not all profile modes are 
supported on yellow carp.
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 495 */
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 496 workload_type = 
smu_cmn_to_asic_specific_index(smu,
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 497 CMN2ASIC_MAPPING_WORKLOAD,
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 498 i);
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 499 bd8dcea93a7d45a Xiaomeng Hou 
2021-03-29 500 if (workload_type < 0)
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 501 continue;
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 502 bd8dcea93a7d45a Xiaomeng Hou 
2021-03-29 @503 size += sprintf(buf + size, "%2d %14s%s\n",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 504 i, profile_name[i], (i == 
smu->power_profile_mode) ? "*" : " ");
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 505 }
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 506 bd8dcea93a7d45a Xiaomeng Hou 
2021-03-29 507 return size;
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 508 }
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 509
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

* drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c:503:11: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
@ 2021-07-19  9:00   ` kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-07-19  9:00 UTC (permalink / raw)
  To: Xiaomeng Hou; +Cc: kbuild-all@lists.01.org, LKML, Alex Deucher, Huang Rui


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head: 2734d6c1b1a089fb593ef6a23d4b70903526fe0c
commit: bd8dcea93a7d45a3366b5f3e6c341a677ff90acf drm/amd/pm: add 
callbacks to read/write sysfs file pp_power_profile_mode
date: 6 weeks ago
compiler: ia64-linux-gcc (GCC) 10.3.0

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


cppcheck warnings: (new ones prefixed by >>)
In file included from 
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/yellow_carp_ppt.c:
>> drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c:503:11: warning: 
>> %d in format string (no. 1) requires 'int' but the argument type is 
>> 'unsigned int'. [invalidPrintfArgType_sint]
size += sprintf(buf + size, "%2d %14s%sn",
^

vim +503 drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c

4cea0fc9816add7 Xiaomeng Hou 2021-02-09 473 bd8dcea93a7d45a Xiaomeng Hou 
2021-03-29 474 static int yellow_carp_get_power_profile_mode(struct 
smu_context *smu,
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 475 char *buf)
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 476 {
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 477 static const char 
*profile_name[] = {
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 478 "BOOTUP_DEFAULT",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 479 "3D_FULL_SCREEN",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 480 "POWER_SAVING",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 481 "VIDEO",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 482 "VR",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 483 "COMPUTE",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 484 "CUSTOM"};
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 485 uint32_t i, size = 0;
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 486 int16_t workload_type = 0;
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 487 bd8dcea93a7d45a Xiaomeng Hou 
2021-03-29 488 if (!buf)
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 489 return -EINVAL;
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 490 bd8dcea93a7d45a Xiaomeng Hou 
2021-03-29 491 for (i = 0; i <= PP_SMC_POWER_PROFILE_CUSTOM; i++) {
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 492 /*
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 493 * Conv PP_SMC_POWER_PROFILE* 
to WORKLOAD_PPLIB_*_BIT.
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 494 * Not all profile modes are 
supported on yellow carp.
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 495 */
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 496 workload_type = 
smu_cmn_to_asic_specific_index(smu,
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 497 CMN2ASIC_MAPPING_WORKLOAD,
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 498 i);
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 499 bd8dcea93a7d45a Xiaomeng Hou 
2021-03-29 500 if (workload_type < 0)
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 501 continue;
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 502 bd8dcea93a7d45a Xiaomeng Hou 
2021-03-29 @503 size += sprintf(buf + size, "%2d %14s%s\n",
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 504 i, profile_name[i], (i == 
smu->power_profile_mode) ? "*" : " ");
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 505 }
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 506 bd8dcea93a7d45a Xiaomeng Hou 
2021-03-29 507 return size;
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 508 }
bd8dcea93a7d45a Xiaomeng Hou 2021-03-29 509
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

end of thread, other threads:[~2021-07-19  9:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-19  3:42 drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c:503:11: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] kernel test robot
2021-07-19  9:00 ` kernel test robot
2021-07-19  9:00   ` 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.