[radeon-alex:amd-20.45 2387/2427] drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1284:2: warning: ignoring return value of function declared with 'warn_unused_result' attribute
by kernel test robot
Hi Guchun,
FYI, the error/warning still remains.
tree: git://people.freedesktop.org/~agd5f/linux.git amd-20.45
head: a3950d94b046fb206e58fd3ec717f071c0203ba3
commit: cf13e50dea28cde351fa32767e36135afb30386d [2387/2427] drm/amdgpu: clean up ras sysfs creation (v2)
config: x86_64-randconfig-a002-20201214 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project a29ecca7819a6ed4250d3689b12b1f664bb790d7)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git remote add radeon-alex git://people.freedesktop.org/~agd5f/linux.git
git fetch --no-tags radeon-alex amd-20.45
git checkout cf13e50dea28cde351fa32767e36135afb30386d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:906:5: warning: no previous prototype for function 'amdgpu_ras_error_cure' [-Wmissing-prototypes]
int amdgpu_ras_error_cure(struct amdgpu_device *adev,
^
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:906:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int amdgpu_ras_error_cure(struct amdgpu_device *adev,
^
static
>> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1284:2: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
sysfs_create_group(&adev->dev->kobj, &group);
^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
vim +/warn_unused_result +1284 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
1249
1250 /* ras fs */
1251 static BIN_ATTR(gpu_vram_bad_pages, S_IRUGO,
1252 amdgpu_ras_sysfs_badpages_read, NULL, 0);
1253 static DEVICE_ATTR(features, S_IRUGO,
1254 amdgpu_ras_sysfs_features_read, NULL);
1255 static int amdgpu_ras_fs_init(struct amdgpu_device *adev)
1256 {
1257 struct amdgpu_ras *con = amdgpu_ras_get_context(adev);
1258 struct attribute_group group = {
1259 .name = RAS_FS_NAME,
1260 };
1261 struct attribute *attrs[] = {
1262 &con->features_attr.attr,
1263 NULL
1264 };
1265 struct bin_attribute *bin_attrs[] = {
1266 NULL,
1267 NULL,
1268 };
1269
1270 /* add features entry */
1271 con->features_attr = dev_attr_features;
1272 group.attrs = attrs;
1273 sysfs_attr_init(attrs[0]);
1274
1275 if (amdgpu_bad_page_threshold != 0) {
1276 /* add bad_page_features entry */
1277 bin_attr_gpu_vram_bad_pages.private = NULL;
1278 con->badpages_attr = bin_attr_gpu_vram_bad_pages;
1279 bin_attrs[0] = &con->badpages_attr;
1280 group.bin_attrs = bin_attrs;
1281 sysfs_bin_attr_init(bin_attrs[0]);
1282 }
1283
> 1284 sysfs_create_group(&adev->dev->kobj, &group);
1285
1286 return 0;
1287 }
1288
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[radeon-alex:amd-20.45 2349/2427] drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c:272:15: warning: initialized field overwritten
by kernel test robot
tree: git://people.freedesktop.org/~agd5f/linux.git amd-20.45
head: a3950d94b046fb206e58fd3ec717f071c0203ba3
commit: 353801e46ab9f255e45bff91e185580df75787c0 [2349/2427] drm/amdgpu/gmc9: print client id string for mmhub
config: i386-randconfig-r022-20201214 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git remote add radeon-alex git://people.freedesktop.org/~agd5f/linux.git
git fetch --no-tags radeon-alex amd-20.45
git checkout 353801e46ab9f255e45bff91e185580df75787c0
# 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(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c:272:15: warning: initialized field overwritten [-Woverride-init]
272 | [32+15][1] = "SDMA1",
| ^~~~~~~
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c:272:15: note: (near initialization for 'mmhub_client_ids_arcturus[47][1]')
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c:383:23: warning: 'ecc_umc_mcumc_status_addrs' defined but not used [-Wunused-const-variable=]
383 | static const uint32_t ecc_umc_mcumc_status_addrs[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/backport/include/kcl/kcl_amdgpu.h:6,
from drivers/gpu/drm/amd/backport/backport.h:22,
from <command-line>:
drivers/gpu/drm/amd/amdgpu/amdgpu.h:198:19: warning: 'no_system_mem_limit' defined but not used [-Wunused-const-variable=]
198 | static const bool no_system_mem_limit;
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu.h:197:19: warning: 'debug_evictions' defined but not used [-Wunused-const-variable=]
197 | static const bool debug_evictions; /* = false */
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu.h:196:18: warning: 'sched_policy' defined but not used [-Wunused-const-variable=]
196 | static const int sched_policy = KFD_SCHED_POLICY_HWS;
| ^~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/display/dc/dc_types.h:33,
from drivers/gpu/drm/amd/display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/include/dm_pp_interface.h:26,
from drivers/gpu/drm/amd/amdgpu/amdgpu.h:64,
from drivers/gpu/drm/amd/backport/include/kcl/kcl_amdgpu.h:6,
from drivers/gpu/drm/amd/backport/backport.h:22,
from <command-line>:
drivers/gpu/drm/amd/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/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/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/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/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 };
| ^~~~~~~~~~~
vim +272 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
242
243 static const char *mmhub_client_ids_arcturus[][2] = {
244 [2][0] = "MP1",
245 [3][0] = "MP0",
246 [10][0] = "UTCL2",
247 [13][0] = "OSS",
248 [14][0] = "HDP",
249 [15][0] = "SDMA0",
250 [32+15][0] = "SDMA1",
251 [64+15][0] = "SDMA2",
252 [96+15][0] = "SDMA3",
253 [128+15][0] = "SDMA4",
254 [160+11][0] = "JPEG",
255 [160+12][0] = "VCN",
256 [160+13][0] = "VCNU",
257 [160+15][0] = "SDMA5",
258 [192+10][0] = "UTCL2",
259 [192+11][0] = "JPEG1",
260 [192+12][0] = "VCN1",
261 [192+13][0] = "VCN1U",
262 [192+15][0] = "SDMA6",
263 [224+15][0] = "SDMA7",
264 [0][1] = "DBGU1",
265 [1][1] = "XDP",
266 [2][1] = "MP1",
267 [3][1] = "MP0",
268 [13][1] = "OSS",
269 [14][1] = "HDP",
270 [15][1] = "SDMA0",
271 [32+15][1] = "SDMA1",
> 272 [32+15][1] = "SDMA1",
273 [64+15][1] = "SDMA2",
274 [96+15][1] = "SDMA3",
275 [128+15][1] = "SDMA4",
276 [160+11][1] = "JPEG",
277 [160+12][1] = "VCN",
278 [160+13][1] = "VCNU",
279 [160+15][1] = "SDMA5",
280 [192+11][1] = "JPEG1",
281 [192+12][1] = "VCN1",
282 [192+13][1] = "VCN1U",
283 [192+15][1] = "SDMA6",
284 [224+15][1] = "SDMA7",
285 };
286
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[radeon-alex:amd-20.45 1587/2427] drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:882:6: warning: no previous prototype for 'kgd_gfx_v10_set_address_watch'
by kernel test robot
tree: git://people.freedesktop.org/~agd5f/linux.git amd-20.45
head: a3950d94b046fb206e58fd3ec717f071c0203ba3
commit: abdc393ab8265df9db5d9d64eb33ed1c33e9d95c [1587/2427] drm/amdkfd: Add gfx10 address watch support
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add radeon-alex git://people.freedesktop.org/~agd5f/linux.git
git fetch --no-tags radeon-alex amd-20.45
git checkout abdc393ab8265df9db5d9d64eb33ed1c33e9d95c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:763:6: warning: no previous prototype for 'kgd_gfx_v10_enable_debug_trap' [-Wmissing-prototypes]
763 | void kgd_gfx_v10_enable_debug_trap(struct kgd_dev *kgd,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:792:6: warning: no previous prototype for 'kgd_gfx_v10_disable_debug_trap' [-Wmissing-prototypes]
792 | void kgd_gfx_v10_disable_debug_trap(struct kgd_dev *kgd)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:803:5: warning: no previous prototype for 'kgd_gfx_v10_set_wave_launch_trap_override' [-Wmissing-prototypes]
803 | int kgd_gfx_v10_set_wave_launch_trap_override(struct kgd_dev *kgd,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:852:6: warning: no previous prototype for 'kgd_gfx_v10_set_wave_launch_mode' [-Wmissing-prototypes]
852 | void kgd_gfx_v10_set_wave_launch_mode(struct kgd_dev *kgd,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:882:6: warning: no previous prototype for 'kgd_gfx_v10_set_address_watch' [-Wmissing-prototypes]
882 | void kgd_gfx_v10_set_address_watch(struct kgd_dev *kgd,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:942:6: warning: no previous prototype for 'kgd_gfx_v10_clear_address_watch' [-Wmissing-prototypes]
942 | void kgd_gfx_v10_clear_address_watch(struct kgd_dev *kgd,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:967:6: warning: no previous prototype for 'kgd_gfx_v10_get_iq_wait_times' [-Wmissing-prototypes]
967 | void kgd_gfx_v10_get_iq_wait_times(struct kgd_dev *kgd,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:976:6: warning: no previous prototype for 'kgd_gfx_v10_build_grace_period_packet_info' [-Wmissing-prototypes]
976 | void kgd_gfx_v10_build_grace_period_packet_info(struct kgd_dev *kgd,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/display/dc/dc_types.h:33,
from drivers/gpu/drm/amd/display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/include/dm_pp_interface.h:26,
from drivers/gpu/drm/amd/amdgpu/amdgpu.h:64,
from drivers/gpu/drm/amd/backport/include/kcl/kcl_amdgpu.h:6,
from drivers/gpu/drm/amd/backport/backport.h:18,
from <command-line>:
drivers/gpu/drm/amd/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/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/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/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/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/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 +/kgd_gfx_v10_set_address_watch +882 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c
881
> 882 void kgd_gfx_v10_set_address_watch(struct kgd_dev *kgd,
883 uint64_t watch_address,
884 uint32_t watch_address_mask,
885 uint32_t watch_id,
886 uint32_t watch_mode,
887 uint32_t debug_vmid)
888 {
889 struct amdgpu_device *adev = get_amdgpu_device(kgd);
890 uint32_t watch_address_high;
891 uint32_t watch_address_low;
892 uint32_t watch_address_cntl;
893
894 watch_address_cntl = 0;
895
896 watch_address_low = lower_32_bits(watch_address);
897 watch_address_high = upper_32_bits(watch_address) & 0xffff;
898
899 watch_address_cntl = REG_SET_FIELD(watch_address_cntl,
900 TCP_WATCH0_CNTL,
901 VMID,
902 debug_vmid);
903 watch_address_cntl = REG_SET_FIELD(watch_address_cntl,
904 TCP_WATCH0_CNTL,
905 MODE,
906 watch_mode);
907 watch_address_cntl = REG_SET_FIELD(watch_address_cntl,
908 TCP_WATCH0_CNTL,
909 MASK,
910 watch_address_mask >> 6);
911
912 /* Turning off this watch point until we set all the registers */
913 watch_address_cntl = REG_SET_FIELD(watch_address_cntl,
914 TCP_WATCH0_CNTL,
915 VALID,
916 0);
917
918 WREG32((SOC15_REG_OFFSET(GC, 0, mmTCP_WATCH0_CNTL) +
919 (watch_id * TCP_WATCH_STRIDE)),
920 watch_address_cntl);
921
922 WREG32((SOC15_REG_OFFSET(GC, 0, mmTCP_WATCH0_ADDR_H) +
923 (watch_id * TCP_WATCH_STRIDE)),
924 watch_address_high);
925
926 WREG32((SOC15_REG_OFFSET(GC, 0, mmTCP_WATCH0_ADDR_L) +
927 (watch_id * TCP_WATCH_STRIDE)),
928 watch_address_low);
929
930 /* Enable the watch point */
931 watch_address_cntl = REG_SET_FIELD(watch_address_cntl,
932 TCP_WATCH0_CNTL,
933 VALID,
934 1);
935
936 WREG32((SOC15_REG_OFFSET(GC, 0, mmTCP_WATCH0_CNTL) +
937 (watch_id * TCP_WATCH_STRIDE)),
938 watch_address_cntl);
939
940 }
941
> 942 void kgd_gfx_v10_clear_address_watch(struct kgd_dev *kgd,
943 uint32_t watch_id)
944 {
945 struct amdgpu_device *adev = get_amdgpu_device(kgd);
946
947 uint32_t watch_address_cntl;
948
949 watch_address_cntl = 0;
950
951 WREG32((SOC15_REG_OFFSET(GC, 0, mmTCP_WATCH0_CNTL) +
952 (watch_id * TCP_WATCH_STRIDE)),
953 watch_address_cntl);
954 }
955
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[radeon-alex:amd-20.45 2016/2427] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:62: warning: passing argument 1 of 'drm_gem_fb_get_obj' discards 'const' qualifier from pointer target type
by kernel test robot
tree: git://people.freedesktop.org/~agd5f/linux.git amd-20.45
head: a3950d94b046fb206e58fd3ec717f071c0203ba3
commit: e1357d7a01b8b3bf23e71415eb7ca101902ee6b4 [2016/2427] drm/amdkcl: fake drm_gem_fb_get_obj & kcl_drm_gem_fb_set_obj
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add radeon-alex git://people.freedesktop.org/~agd5f/linux.git
git fetch --no-tags radeon-alex amd-20.45
git checkout e1357d7a01b8b3bf23e71415eb7ca101902ee6b4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/gpu/drm/amd/display/dmub/dmub_srv.h:67,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:33:
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h: In function 'dmub_rb_flush_pending':
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h:785:12: warning: variable 'temp' set but not used [-Wunused-but-set-variable]
785 | uint64_t temp;
| ^~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_notify_freesync':
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3659:30: warning: variable 'old_con_state' set but not used [-Wunused-but-set-variable]
3659 | struct drm_connector_state *old_con_state, *new_con_state;
| ^~~~~~~~~~~~~
In file included from include/asm-generic/bug.h:19,
from arch/mips/include/asm/bug.h:42,
from include/linux/bug.h:5,
from arch/mips/include/asm/cmpxchg.h:11,
from arch/mips/include/asm/atomic.h:22,
from include/linux/atomic.h:7,
from include/linux/rcupdate.h:25,
from include/kcl/kcl_rcupdate.h:5,
from include/kcl/kcl_fence.h:6,
from include/kcl/backport/kcl_fence_backport.h:4,
from drivers/gpu/drm/amd/backport/backport.h:11,
from <command-line>:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'get_fb_info':
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:62: warning: passing argument 1 of 'drm_gem_fb_get_obj' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
3987 | struct amdgpu_bo *rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:986:26: note: in definition of macro 'container_of'
986 | void *__mptr = (void *)(ptr); \
| ^~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:26: note: in expansion of macro 'gem_to_amdgpu_bo'
3987 | struct amdgpu_bo *rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
| ^~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/backport/include/kcl/kcl_amdgpu_drm_fb_helper.h:6,
from drivers/gpu/drm/amd/backport/backport.h:59,
from <command-line>:
include/drm/drm_gem_framebuffer_helper.h:15:24: note: expected 'struct drm_framebuffer *' but argument is of type 'const struct drm_framebuffer *'
15 | struct drm_gem_object *drm_gem_fb_get_obj(struct drm_framebuffer *fb,
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/rcupdate.h:24,
from include/kcl/kcl_rcupdate.h:5,
from include/kcl/kcl_fence.h:6,
from include/kcl/backport/kcl_fence_backport.h:4,
from drivers/gpu/drm/amd/backport/backport.h:11,
from <command-line>:
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:62: warning: passing argument 1 of 'drm_gem_fb_get_obj' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
3987 | struct amdgpu_bo *rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
330 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
350 | _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:987:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
987 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:987:20: note: in expansion of macro '__same_type'
987 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h:34:32: note: in expansion of macro 'container_of'
34 | #define gem_to_amdgpu_bo(gobj) container_of((gobj), struct amdgpu_bo, tbo.base)
| ^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:26: note: in expansion of macro 'gem_to_amdgpu_bo'
3987 | struct amdgpu_bo *rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
| ^~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/backport/include/kcl/kcl_amdgpu_drm_fb_helper.h:6,
from drivers/gpu/drm/amd/backport/backport.h:59,
from <command-line>:
include/drm/drm_gem_framebuffer_helper.h:15:24: note: expected 'struct drm_framebuffer *' but argument is of type 'const struct drm_framebuffer *'
15 | struct drm_gem_object *drm_gem_fb_get_obj(struct drm_framebuffer *fb,
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/rcupdate.h:24,
from include/kcl/kcl_rcupdate.h:5,
from include/kcl/kcl_fence.h:6,
from include/kcl/backport/kcl_fence_backport.h:4,
from drivers/gpu/drm/amd/backport/backport.h:11,
from <command-line>:
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:62: warning: passing argument 1 of 'drm_gem_fb_get_obj' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
3987 | struct amdgpu_bo *rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
330 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
350 | _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:987:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
987 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:988:6: note: in expansion of macro '__same_type'
988 | !__same_type(*(ptr), void), \
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h:34:32: note: in expansion of macro 'container_of'
34 | #define gem_to_amdgpu_bo(gobj) container_of((gobj), struct amdgpu_bo, tbo.base)
| ^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:26: note: in expansion of macro 'gem_to_amdgpu_bo'
3987 | struct amdgpu_bo *rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
| ^~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/backport/include/kcl/kcl_amdgpu_drm_fb_helper.h:6,
from drivers/gpu/drm/amd/backport/backport.h:59,
from <command-line>:
include/drm/drm_gem_framebuffer_helper.h:15:24: note: expected 'struct drm_framebuffer *' but argument is of type 'const struct drm_framebuffer *'
15 | struct drm_gem_object *drm_gem_fb_get_obj(struct drm_framebuffer *fb,
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_commit_cursors':
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7680:44: warning: variable 'new_plane_state' set but not used [-Wunused-but-set-variable]
7680 | struct drm_plane_state *old_plane_state, *new_plane_state;
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_atomic_check':
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9643:25: warning: unused variable 'dm_old_crtc_state' [-Wunused-variable]
9643 | struct dm_crtc_state *dm_old_crtc_state = to_dm_crtc_state(old_crtc_state);
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9642:25: warning: unused variable 'dm_new_crtc_state' [-Wunused-variable]
9642 | struct dm_crtc_state *dm_new_crtc_state = to_dm_crtc_state(new_crtc_state);
| ^~~~~~~~~~~~~~~~~
At top level:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3598:11: warning: 'dm_get_backlight_level' defined but not used [-Wunused-function]
3598 | static u8 dm_get_backlight_level(struct amdgpu_encoder *amdgpu_encoder)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3592:13: warning: 'dm_set_backlight_level' defined but not used [-Wunused-function]
3592 | static void dm_set_backlight_level(struct amdgpu_encoder *amdgpu_encoder,
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/display/dc/inc/core_types.h:88,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:31:
drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h:54:42: warning: 'dpp_input_csc_matrix' defined but not used [-Wunused-const-variable=]
54 | static const struct dpp_input_csc_matrix dpp_input_csc_matrix[] = {
| ^~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/display/dc/inc/core_types.h:32,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:31:
drivers/gpu/drm/amd/display/include/ddc_service_types.h:124:22: warning: 'DP_DVI_CONVERTER_ID_4' defined but not used [-Wunused-const-variable=]
124 | static const uint8_t DP_DVI_CONVERTER_ID_4[] = "m2DVIa";
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/display/include/ddc_service_types.h:122:22: warning: 'DP_VGA_LVDS_CONVERTER_ID_3' defined but not used [-Wunused-const-variable=]
122 | static const uint8_t DP_VGA_LVDS_CONVERTER_ID_3[] = "dnomlA";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/display/include/ddc_service_types.h:120:22: warning: 'DP_VGA_LVDS_CONVERTER_ID_2' defined but not used [-Wunused-const-variable=]
120 | static const uint8_t DP_VGA_LVDS_CONVERTER_ID_2[] = "sivarT";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/backport/include/kcl/kcl_amdgpu.h:6,
from drivers/gpu/drm/amd/backport/backport.h:18,
from <command-line>:
drivers/gpu/drm/amd/amdgpu/amdgpu.h:196:19: warning: 'debug_evictions' defined but not used [-Wunused-const-variable=]
196 | static const bool debug_evictions; /* = false */
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu.h:195:18: warning: 'sched_policy' defined but not used [-Wunused-const-variable=]
195 | static const int sched_policy = KFD_SCHED_POLICY_HWS;
| ^~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/display/dc/dc_types.h:33,
from drivers/gpu/drm/amd/display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/include/dm_pp_interface.h:26,
from drivers/gpu/drm/amd/amdgpu/amdgpu.h:64,
from drivers/gpu/drm/amd/backport/include/kcl/kcl_amdgpu.h:6,
from drivers/gpu/drm/amd/backport/backport.h:18,
from <command-line>:
drivers/gpu/drm/amd/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/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/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/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/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/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 +3987 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
3983
3984 static int get_fb_info(const struct amdgpu_framebuffer *amdgpu_fb,
3985 uint64_t *tiling_flags, bool *tmz_surface)
3986 {
> 3987 struct amdgpu_bo *rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
3988 int r = amdgpu_bo_reserve(rbo, false);
3989
3990 if (unlikely(r)) {
3991 /* Don't show error message when returning -ERESTARTSYS */
3992 if (r != -ERESTARTSYS)
3993 DRM_ERROR("Unable to reserve buffer: %d\n", r);
3994 return r;
3995 }
3996
3997 if (tiling_flags)
3998 amdgpu_bo_get_tiling_flags(rbo, tiling_flags);
3999
4000 if (tmz_surface)
4001 *tmz_surface = amdgpu_bo_encrypted(rbo);
4002
4003 amdgpu_bo_unreserve(rbo);
4004
4005 return r;
4006 }
4007
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[radeon-alex:amd-20.45 2016/2427] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:62: warning: passing argument 1 of 'drm_gem_fb_get_obj' discards 'const' qualifier from pointer target type
by kernel test robot
tree: git://people.freedesktop.org/~agd5f/linux.git amd-20.45
head: a3950d94b046fb206e58fd3ec717f071c0203ba3
commit: e1357d7a01b8b3bf23e71415eb7ca101902ee6b4 [2016/2427] drm/amdkcl: fake drm_gem_fb_get_obj & kcl_drm_gem_fb_set_obj
config: i386-randconfig-r022-20201214 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git remote add radeon-alex git://people.freedesktop.org/~agd5f/linux.git
git fetch --no-tags radeon-alex amd-20.45
git checkout e1357d7a01b8b3bf23e71415eb7ca101902ee6b4
# 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(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/gpu/drm/amd/display/dmub/dmub_srv.h:67,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:33:
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h: In function 'dmub_rb_flush_pending':
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h:785:12: warning: variable 'temp' set but not used [-Wunused-but-set-variable]
785 | uint64_t temp;
| ^~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_notify_freesync':
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3659:30: warning: variable 'old_con_state' set but not used [-Wunused-but-set-variable]
3659 | struct drm_connector_state *old_con_state, *new_con_state;
| ^~~~~~~~~~~~~
In file included from include/asm-generic/bug.h:19,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/jump_label.h:250,
from include/linux/static_key.h:1,
from arch/x86/include/asm/nospec-branch.h:6,
from arch/x86/include/asm/irqflags.h:9,
from include/linux/irqflags.h:16,
from include/linux/rcupdate.h:26,
from include/kcl/kcl_rcupdate.h:5,
from include/kcl/kcl_fence.h:6,
from include/kcl/backport/kcl_fence_backport.h:4,
from drivers/gpu/drm/amd/backport/backport.h:11,
from <command-line>:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'get_fb_info':
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:62: warning: passing argument 1 of 'drm_gem_fb_get_obj' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
3987 | struct amdgpu_bo *rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:986:26: note: in definition of macro 'container_of'
986 | void *__mptr = (void *)(ptr); \
| ^~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:26: note: in expansion of macro 'gem_to_amdgpu_bo'
3987 | struct amdgpu_bo *rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
| ^~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/backport/include/kcl/kcl_amdgpu_drm_fb_helper.h:6,
from drivers/gpu/drm/amd/backport/backport.h:59,
from <command-line>:
include/drm/drm_gem_framebuffer_helper.h:15:24: note: expected 'struct drm_framebuffer *' but argument is of type 'const struct drm_framebuffer *'
15 | struct drm_gem_object *drm_gem_fb_get_obj(struct drm_framebuffer *fb,
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/rcupdate.h:24,
from include/kcl/kcl_rcupdate.h:5,
from include/kcl/kcl_fence.h:6,
from include/kcl/backport/kcl_fence_backport.h:4,
from drivers/gpu/drm/amd/backport/backport.h:11,
from <command-line>:
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:62: warning: passing argument 1 of 'drm_gem_fb_get_obj' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
3987 | struct amdgpu_bo *rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
330 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
350 | _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:987:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
987 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:987:20: note: in expansion of macro '__same_type'
987 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h:34:32: note: in expansion of macro 'container_of'
34 | #define gem_to_amdgpu_bo(gobj) container_of((gobj), struct amdgpu_bo, tbo.base)
| ^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:26: note: in expansion of macro 'gem_to_amdgpu_bo'
3987 | struct amdgpu_bo *rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
| ^~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/backport/include/kcl/kcl_amdgpu_drm_fb_helper.h:6,
from drivers/gpu/drm/amd/backport/backport.h:59,
from <command-line>:
include/drm/drm_gem_framebuffer_helper.h:15:24: note: expected 'struct drm_framebuffer *' but argument is of type 'const struct drm_framebuffer *'
15 | struct drm_gem_object *drm_gem_fb_get_obj(struct drm_framebuffer *fb,
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/rcupdate.h:24,
from include/kcl/kcl_rcupdate.h:5,
from include/kcl/kcl_fence.h:6,
from include/kcl/backport/kcl_fence_backport.h:4,
from drivers/gpu/drm/amd/backport/backport.h:11,
from <command-line>:
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:62: warning: passing argument 1 of 'drm_gem_fb_get_obj' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
3987 | struct amdgpu_bo *rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
330 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
350 | _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:987:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
987 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:988:6: note: in expansion of macro '__same_type'
988 | !__same_type(*(ptr), void), \
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h:34:32: note: in expansion of macro 'container_of'
34 | #define gem_to_amdgpu_bo(gobj) container_of((gobj), struct amdgpu_bo, tbo.base)
| ^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:26: note: in expansion of macro 'gem_to_amdgpu_bo'
3987 | struct amdgpu_bo *rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
| ^~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/backport/include/kcl/kcl_amdgpu_drm_fb_helper.h:6,
from drivers/gpu/drm/amd/backport/backport.h:59,
from <command-line>:
include/drm/drm_gem_framebuffer_helper.h:15:24: note: expected 'struct drm_framebuffer *' but argument is of type 'const struct drm_framebuffer *'
15 | struct drm_gem_object *drm_gem_fb_get_obj(struct drm_framebuffer *fb,
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'dm_update_mst_vcpi_slots_for_dsc':
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6227:46: warning: variable 'old_con_state' set but not used [-Wunused-but-set-variable]
6227 | struct drm_connector_state *new_con_state, *old_con_state;
| ^~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_commit_cursors':
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7680:44: warning: variable 'new_plane_state' set but not used [-Wunused-but-set-variable]
7680 | struct drm_plane_state *old_plane_state, *new_plane_state;
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_atomic_check':
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9643:25: warning: unused variable 'dm_old_crtc_state' [-Wunused-variable]
9643 | struct dm_crtc_state *dm_old_crtc_state = to_dm_crtc_state(old_crtc_state);
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9642:25: warning: unused variable 'dm_new_crtc_state' [-Wunused-variable]
9642 | struct dm_crtc_state *dm_new_crtc_state = to_dm_crtc_state(new_crtc_state);
| ^~~~~~~~~~~~~~~~~
At top level:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3598:11: warning: 'dm_get_backlight_level' defined but not used [-Wunused-function]
3598 | static u8 dm_get_backlight_level(struct amdgpu_encoder *amdgpu_encoder)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3592:13: warning: 'dm_set_backlight_level' defined but not used [-Wunused-function]
3592 | static void dm_set_backlight_level(struct amdgpu_encoder *amdgpu_encoder,
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:93:
drivers/gpu/drm/amd/include/vega10_ip_offset.h:208:29: warning: 'FUSE_BASE' defined but not used [-Wunused-const-variable=]
208 | static const struct IP_BASE FUSE_BASE = { { { { 0x00017400, 0, 0, 0, 0 } },
| ^~~~~~~~~
drivers/gpu/drm/amd/include/vega10_ip_offset.h:203:29: warning: 'CLK_BASE' defined but not used [-Wunused-const-variable=]
203 | static const struct IP_BASE CLK_BASE = { { { { 0x00016C00, 0, 0, 0, 0 } },
| ^~~~~~~~
drivers/gpu/drm/amd/include/vega10_ip_offset.h:198:29: warning: 'PWR_BASE' defined but not used [-Wunused-const-variable=]
198 | static const struct IP_BASE PWR_BASE = { { { { 0x00016A00, 0, 0, 0, 0 } },
| ^~~~~~~~
drivers/gpu/drm/amd/include/vega10_ip_offset.h:193:29: warning: 'SMUIO_BASE' defined but not used [-Wunused-const-variable=]
193 | static const struct IP_BASE SMUIO_BASE = { { { { 0x00016800, 0, 0, 0, 0 } },
| ^~~~~~~~~~
drivers/gpu/drm/amd/include/vega10_ip_offset.h:188:29: warning: 'THM_BASE' defined but not used [-Wunused-const-variable=]
188 | static const struct IP_BASE THM_BASE = { { { { 0x00016600, 0, 0, 0, 0 } },
| ^~~~~~~~
drivers/gpu/drm/amd/include/vega10_ip_offset.h:183:29: warning: 'UMC_BASE' defined but not used [-Wunused-const-variable=]
183 | static const struct IP_BASE UMC_BASE = { { { { 0x00014000, 0, 0, 0, 0 } },
| ^~~~~~~~
drivers/gpu/drm/amd/include/vega10_ip_offset.h:178:29: warning: 'XDMA_BASE' defined but not used [-Wunused-const-variable=]
178 | static const struct IP_BASE XDMA_BASE = { { { { 0x00003400, 0, 0, 0, 0 } },
| ^~~~~~~~~
drivers/gpu/drm/amd/include/vega10_ip_offset.h:173:29: warning: 'SDMA1_BASE' defined but not used [-Wunused-const-variable=]
173 | static const struct IP_BASE SDMA1_BASE = { { { { 0x00001460, 0, 0, 0, 0 } },
| ^~~~~~~~~~
drivers/gpu/drm/amd/include/vega10_ip_offset.h:168:29: warning: 'SDMA0_BASE' defined but not used [-Wunused-const-variable=]
168 | static const struct IP_BASE SDMA0_BASE = { { { { 0x00001260, 0, 0, 0, 0 } },
| ^~~~~~~~~~
drivers/gpu/drm/amd/include/vega10_ip_offset.h:163:29: warning: 'OSSSYS_BASE' defined but not used [-Wunused-const-variable=]
163 | static const struct IP_BASE OSSSYS_BASE = { { { { 0x000010A0, 0, 0, 0, 0 } },
| ^~~~~~~~~~~
drivers/gpu/drm/amd/include/vega10_ip_offset.h:158:29: warning: 'HDP_BASE' defined but not used [-Wunused-const-variable=]
158 | static const struct IP_BASE HDP_BASE = { { { { 0x00000F20, 0, 0, 0, 0 } },
| ^~~~~~~~
drivers/gpu/drm/amd/include/vega10_ip_offset.h:153:29: warning: 'RSMU_BASE' defined but not used [-Wunused-const-variable=]
153 | static const struct IP_BASE RSMU_BASE = { { { { 0x00012000, 0, 0, 0, 0 } },
| ^~~~~~~~~
drivers/gpu/drm/amd/include/vega10_ip_offset.h:148:29: warning: 'MMHUB_BASE' defined but not used [-Wunused-const-variable=]
148 | static const struct IP_BASE MMHUB_BASE = { { { { 0x0001A000, 0, 0, 0, 0 } },
| ^~~~~~~~~~
drivers/gpu/drm/amd/include/vega10_ip_offset.h:143:29: warning: 'GC_BASE' defined but not used [-Wunused-const-variable=]
143 | static const struct IP_BASE GC_BASE = { { { { 0x00002000, 0x0000A000, 0, 0, 0 } },
| ^~~~~~~
drivers/gpu/drm/amd/include/vega10_ip_offset.h:138:29: warning: 'VCE_BASE' defined but not used [-Wunused-const-variable=]
138 | static const struct IP_BASE VCE_BASE = { { { { 0x00007E00, 0x00048800, 0, 0, 0 } },
| ^~~~~~~~
drivers/gpu/drm/amd/include/vega10_ip_offset.h:133:29: warning: 'ATHUB_BASE' defined but not used [-Wunused-const-variable=]
133 | static const struct IP_BASE ATHUB_BASE = { { { { 0x00000C20, 0, 0, 0, 0 } },
| ^~~~~~~~~~
vim +3987 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
3983
3984 static int get_fb_info(const struct amdgpu_framebuffer *amdgpu_fb,
3985 uint64_t *tiling_flags, bool *tmz_surface)
3986 {
> 3987 struct amdgpu_bo *rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
3988 int r = amdgpu_bo_reserve(rbo, false);
3989
3990 if (unlikely(r)) {
3991 /* Don't show error message when returning -ERESTARTSYS */
3992 if (r != -ERESTARTSYS)
3993 DRM_ERROR("Unable to reserve buffer: %d\n", r);
3994 return r;
3995 }
3996
3997 if (tiling_flags)
3998 amdgpu_bo_get_tiling_flags(rbo, tiling_flags);
3999
4000 if (tmz_surface)
4001 *tmz_surface = amdgpu_bo_encrypted(rbo);
4002
4003 amdgpu_bo_unreserve(rbo);
4004
4005 return r;
4006 }
4007
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[jfern:coresched 21/27] include/linux/entry-common.h:10:10: fatal error: 'asm/entry-common.h' file not found
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git coresched
head: ab6dba45b1d05f19d87064315f414761a86ab024
commit: 81ab496aa4fb2f215f7e10edfaaccecc67eef58a [21/27] entry/idle: Enter and exit kernel protection during idle entry and exit
config: powerpc-randconfig-r032-20201214 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project a29ecca7819a6ed4250d3689b12b1f664bb790d7)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git/commit/?i...
git remote add jfern https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git
git fetch --no-tags jfern coresched
git checkout 81ab496aa4fb2f215f7e10edfaaccecc67eef58a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from kernel/sched/idle.c:9:
In file included from kernel/sched/sched.h:17:
In file included from include/linux/sched/isolation.h:6:
In file included from include/linux/tick.h:8:
In file included from include/linux/clockchips.h:14:
In file included from include/linux/clocksource.h:21:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:166:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/sched/idle.c:9:
In file included from kernel/sched/sched.h:17:
In file included from include/linux/sched/isolation.h:6:
In file included from include/linux/tick.h:8:
In file included from include/linux/clockchips.h:14:
In file included from include/linux/clocksource.h:21:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:168:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/sched/idle.c:9:
In file included from kernel/sched/sched.h:17:
In file included from include/linux/sched/isolation.h:6:
In file included from include/linux/tick.h:8:
In file included from include/linux/clockchips.h:14:
In file included from include/linux/clocksource.h:21:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:170:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/sched/idle.c:9:
In file included from kernel/sched/sched.h:17:
In file included from include/linux/sched/isolation.h:6:
In file included from include/linux/tick.h:8:
In file included from include/linux/clockchips.h:14:
In file included from include/linux/clocksource.h:21:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:172:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/sched/idle.c:9:
In file included from kernel/sched/sched.h:17:
In file included from include/linux/sched/isolation.h:6:
In file included from include/linux/tick.h:8:
In file included from include/linux/clockchips.h:14:
In file included from include/linux/clocksource.h:21:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:174:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/sched/idle.c:9:
kernel/sched/sched.h:1232:17: warning: declaration of 'struct sched_group' will not be visible outside of this function [-Wvisibility]
struct sched_group *group)
^
In file included from kernel/sched/idle.c:11:
>> include/linux/entry-common.h:10:10: fatal error: 'asm/entry-common.h' file not found
#include <asm/entry-common.h>
^~~~~~~~~~~~~~~~~~~~
13 warnings and 1 error generated.
vim +10 include/linux/entry-common.h
142781e108b13b2 Thomas Gleixner 2020-07-22 9
142781e108b13b2 Thomas Gleixner 2020-07-22 @10 #include <asm/entry-common.h>
142781e108b13b2 Thomas Gleixner 2020-07-22 11
:::::: The code at line 10 was first introduced by commit
:::::: 142781e108b13b2b0e8f035cfb5bfbbc8f14d887 entry: Provide generic syscall entry functionality
:::::: TO: Thomas Gleixner <tglx(a)linutronix.de>
:::::: CC: Thomas Gleixner <tglx(a)linutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[trace:ftrace/core 40/40] kernel/trace/trace.c:9070:20: sparse: sparse: symbol 'eval_map_work' was not declared. Should it be
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git ftrace/core
head: f9631ff0c019f4af10b7baa70464b620fa997938
commit: f9631ff0c019f4af10b7baa70464b620fa997938 [40/40] tracing: Offload eval map updates to a work queue
config: i386-randconfig-s002-20201214 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-184-g1b896707-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git/c...
git remote add trace https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
git fetch --no-tags trace ftrace/core
git checkout f9631ff0c019f4af10b7baa70464b620fa997938
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
kernel/trace/trace.c:382:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct trace_export **list @@ got struct trace_export [noderef] __rcu ** @@
kernel/trace/trace.c:382:28: sparse: expected struct trace_export **list
kernel/trace/trace.c:382:28: sparse: got struct trace_export [noderef] __rcu **
kernel/trace/trace.c:396:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct trace_export **list @@ got struct trace_export [noderef] __rcu ** @@
kernel/trace/trace.c:396:33: sparse: expected struct trace_export **list
kernel/trace/trace.c:396:33: sparse: got struct trace_export [noderef] __rcu **
kernel/trace/trace.c:2795:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct event_filter *filter @@ got struct event_filter [noderef] __rcu *filter @@
kernel/trace/trace.c:2795:38: sparse: expected struct event_filter *filter
kernel/trace/trace.c:2795:38: sparse: got struct event_filter [noderef] __rcu *filter
kernel/trace/trace.c:3133:46: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct trace_buffer_struct * @@
kernel/trace/trace.c:3133:46: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/trace/trace.c:3133:46: sparse: got struct trace_buffer_struct *
kernel/trace/trace.c:3149:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got int * @@
kernel/trace/trace.c:3149:9: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/trace/trace.c:3149:9: sparse: got int *
kernel/trace/trace.c:3149:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got int * @@
kernel/trace/trace.c:3149:9: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/trace/trace.c:3149:9: sparse: got int *
kernel/trace/trace.c:3159:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct trace_buffer_struct *buffers @@ got struct trace_buffer_struct [noderef] __percpu * @@
kernel/trace/trace.c:3159:17: sparse: expected struct trace_buffer_struct *buffers
kernel/trace/trace.c:3159:17: sparse: got struct trace_buffer_struct [noderef] __percpu *
>> kernel/trace/trace.c:9070:20: sparse: sparse: symbol 'eval_map_work' was not declared. Should it be static?
kernel/trace/trace.c:336:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/trace/trace.c:336:9: sparse: struct trace_export [noderef] __rcu *
kernel/trace/trace.c:336:9: sparse: struct trace_export *
kernel/trace/trace.c:351:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/trace/trace.c:351:9: sparse: struct trace_export [noderef] __rcu *
kernel/trace/trace.c:351:9: sparse: struct trace_export *
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[radeon-alex:amd-20.45 1835/2427] drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:788:5: error: redefinition of 'amdgpu_mn_register'
by kernel test robot
tree: git://people.freedesktop.org/~agd5f/linux.git amd-20.45
head: a3950d94b046fb206e58fd3ec717f071c0203ba3
commit: 90e75e02fc4f30c8139b7321f8bbd635ec9d75ce [1835/2427] drm/amdkcl: dkms support for hmm
config: x86_64-randconfig-a002-20201214 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project a29ecca7819a6ed4250d3689b12b1f664bb790d7)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git remote add radeon-alex git://people.freedesktop.org/~agd5f/linux.git
git fetch --no-tags radeon-alex amd-20.45
git checkout 90e75e02fc4f30c8139b7321f8bbd635ec9d75ce
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:788:5: error: redefinition of 'amdgpu_mn_register'
int amdgpu_mn_register(struct amdgpu_bo *bo, unsigned long addr)
^
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h:70:19: note: previous definition is here
static inline int amdgpu_mn_register(struct amdgpu_bo *bo, unsigned long addr)
^
>> drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:806:6: error: redefinition of 'amdgpu_mn_unregister'
void amdgpu_mn_unregister(struct amdgpu_bo *bo)
^
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h:76:20: note: previous definition is here
static inline void amdgpu_mn_unregister(struct amdgpu_bo *bo) {}
^
2 errors generated.
vim +/amdgpu_mn_register +788 drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
778
779 /**
780 * amdgpu_mn_register - register a BO for notifier updates
781 *
782 * @bo: amdgpu buffer object
783 * @addr: userptr addr we should monitor
784 *
785 * Registers a mmu_notifier for the given BO at the specified address.
786 * Returns 0 on success, -ERRNO if anything goes wrong.
787 */
> 788 int amdgpu_mn_register(struct amdgpu_bo *bo, unsigned long addr)
789 {
790 if (bo->kfd_bo)
791 return mmu_interval_notifier_insert(&bo->notifier, current->mm,
792 addr, amdgpu_bo_size(bo),
793 &amdgpu_mn_hsa_ops);
794 return mmu_interval_notifier_insert(&bo->notifier, current->mm, addr,
795 amdgpu_bo_size(bo),
796 &amdgpu_mn_gfx_ops);
797 }
798
799 /**
800 * amdgpu_mn_unregister - unregister a BO for notifier updates
801 *
802 * @bo: amdgpu buffer object
803 *
804 * Remove any registration of mmu notifier updates from the buffer object.
805 */
> 806 void amdgpu_mn_unregister(struct amdgpu_bo *bo)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[radeon-alex:amd-20.45 2016/2427] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:33: sparse: sparse: incorrect type in argument 1 (different modifiers)
by kernel test robot
tree: git://people.freedesktop.org/~agd5f/linux.git amd-20.45
head: a3950d94b046fb206e58fd3ec717f071c0203ba3
commit: e1357d7a01b8b3bf23e71415eb7ca101902ee6b4 [2016/2427] drm/amdkcl: fake drm_gem_fb_get_obj & kcl_drm_gem_fb_set_obj
config: arc-randconfig-s031-20201214 (attached as .config)
compiler: arc-elf-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-184-g1b896707-dirty
git remote add radeon-alex git://people.freedesktop.org/~agd5f/linux.git
git fetch --no-tags radeon-alex amd-20.45
git checkout e1357d7a01b8b3bf23e71415eb7ca101902ee6b4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:797:25: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:801:23: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:802:23: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:805:30: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:808:28: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1192:17: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1192:17: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1192:17: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1192:17: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1192:17: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1192:17: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1197:17: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1197:17: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1197:17: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1199:36: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1276:25: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1276:25: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1276:25: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1282:37: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1308:41: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1310:39: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1314:17: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1315:17: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1318:17: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:33: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct drm_framebuffer *fb @@ got struct drm_framebuffer const * @@
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:33: sparse: expected struct drm_framebuffer *fb
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:33: sparse: got struct drm_framebuffer const *
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:33: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct drm_framebuffer *fb @@ got struct drm_framebuffer const * @@
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:33: sparse: expected struct drm_framebuffer *fb
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:33: sparse: got struct drm_framebuffer const *
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:33: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct drm_framebuffer *fb @@ got struct drm_framebuffer const * @@
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:33: sparse: expected struct drm_framebuffer *fb
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3987:33: sparse: got struct drm_framebuffer const *
vim +3987 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
3983
3984 static int get_fb_info(const struct amdgpu_framebuffer *amdgpu_fb,
3985 uint64_t *tiling_flags, bool *tmz_surface)
3986 {
> 3987 struct amdgpu_bo *rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
3988 int r = amdgpu_bo_reserve(rbo, false);
3989
3990 if (unlikely(r)) {
3991 /* Don't show error message when returning -ERESTARTSYS */
3992 if (r != -ERESTARTSYS)
3993 DRM_ERROR("Unable to reserve buffer: %d\n", r);
3994 return r;
3995 }
3996
3997 if (tiling_flags)
3998 amdgpu_bo_get_tiling_flags(rbo, tiling_flags);
3999
4000 if (tmz_surface)
4001 *tmz_surface = amdgpu_bo_encrypted(rbo);
4002
4003 amdgpu_bo_unreserve(rbo);
4004
4005 return r;
4006 }
4007
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months