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]
Message-ID: <202006180325.FOEaJjPL%lkp@intel.com>
Date:   Thu, 18 Jun 2020 03:02:29 +0800
From:   kernel test robot <lkp@...el.com>
To:     Prike Liang <Prike.Liang@....com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Alex Deucher <alexander.deucher@....com>,
        Evan Quan <evan.quan@....com>
Subject: drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:2: note: in
 expansion of macro 'if'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   69119673bd50b176ded34032fadd41530fb5af21
commit: 80381d40c9bf5218db06a7d7246c5478c95987ee drm/amd/powerplay: fix pre-check condition for setting clock range
date:   3 months ago
config: x86_64-randconfig-s022-20200617 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-rc1-6-g78f577f8-dirty
        git checkout 80381d40c9bf5218db06a7d7246c5478c95987ee
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from include/linux/firmware.h:6,
from drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:23:
drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c: In function 'smu_set_soft_freq_range':
drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
225 |  if (min < 0 && max < 0)
|          ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
|                                                    ^~~~
>> drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:2: note: in expansion of macro 'if'
225 |  if (min < 0 && max < 0)
|  ^~
drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:21: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
225 |  if (min < 0 && max < 0)
|                     ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
|                                                    ^~~~
>> drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:2: note: in expansion of macro 'if'
225 |  if (min < 0 && max < 0)
|  ^~
drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
225 |  if (min < 0 && max < 0)
|          ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
|                                                             ^~~~
>> drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:2: note: in expansion of macro 'if'
225 |  if (min < 0 && max < 0)
|  ^~
drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:21: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
225 |  if (min < 0 && max < 0)
|                     ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
|                                                             ^~~~
>> drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:2: note: in expansion of macro 'if'
225 |  if (min < 0 && max < 0)
|  ^~
drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
225 |  if (min < 0 && max < 0)
|          ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
69 |  (cond) ?              |   ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
|                            ^~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:2: note: in expansion of macro 'if'
225 |  if (min < 0 && max < 0)
|  ^~
drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:21: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
225 |  if (min < 0 && max < 0)
|                     ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
69 |  (cond) ?              |   ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
|                            ^~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:225:2: note: in expansion of macro 'if'
225 |  if (min < 0 && max < 0)
|  ^~
drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c: At top level:
drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:1703:5: warning: no previous prototype for 'smu_adjust_power_state_dynamic' [-Wmissing-prototypes]
1703 | int smu_adjust_power_state_dynamic(struct smu_context *smu,
|     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:31:
drivers/gpu/drm/amd/amdgpu/../powerplay/inc/smu_v11_0.h:68:43: warning: 'smu11_thermal_policy' defined but not used [-Wunused-const-variable=]
68 | static const struct smu_temperature_range smu11_thermal_policy[] =
|                                           ^~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:27:
drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:177:18: warning: 'sched_policy' defined but not used [-Wunused-const-variable=]
177 | static const int sched_policy = KFD_SCHED_POLICY_HWS;
|                  ^~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../include/dm_pp_interface.h:26,
from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:53,
from drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:27:
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: 'dc_fixpt_ln2_div_2' defined but not used [-Wunused-const-variable=]
76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
|                                ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: 'dc_fixpt_ln2' defined but not used [-Wunused-const-variable=]
75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
|                                ^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: 'dc_fixpt_e' defined but not used [-Wunused-const-variable=]
74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
|                                ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: 'dc_fixpt_two_pi' defined but not used [-Wunused-const-variable=]
73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
|                                ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: 'dc_fixpt_pi' defined but not used [-Wunused-const-variable=]
72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
|                                ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:67:32: warning: 'dc_fixpt_zero' defined but not used [-Wunused-const-variable=]
67 | static const struct fixed31_32 dc_fixpt_zero = { 0 };
|                                ^~~~~~~~~~~~~

vim +/if +225 drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c

   219	
   220	int smu_set_soft_freq_range(struct smu_context *smu, enum smu_clk_type clk_type,
   221				    uint32_t min, uint32_t max)
   222	{
   223		int ret = 0;
   224	
 > 225		if (min < 0 && max < 0)
   226			return -EINVAL;
   227	
   228		if (!smu_clk_dpm_is_enabled(smu, clk_type))
   229			return 0;
   230	
   231		ret = smu_set_soft_freq_limited_range(smu, clk_type, min, max);
   232		return ret;
   233	}
   234	

---
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" (37080 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ