From: kernel test robot <lkp@intel.com>
To: Alex Deucher <alexander.deucher@amd.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 12106/12223] drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h:2655:12: error: variable 'temp' set but not used
Date: Fri, 10 Sep 2021 09:40:05 +0800 [thread overview]
Message-ID: <202109100947.yfeDEhJL-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 13351 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: f7f581157d1c8a2f14bef2739dd34135c9e6b233
commit: 699f6820cbd0bc56fff55152f44dd98fc7c3470f [12106/12223] Merge remote-tracking branch 'amdgpu/drm-next'
config: riscv-randconfig-r022-20210908 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=699f6820cbd0bc56fff55152f44dd98fc7c3470f
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 699f6820cbd0bc56fff55152f44dd98fc7c3470f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:34:
In file included from drivers/gpu/drm/amd/amdgpu/../display/dmub/dmub_srv.h:67:
>> drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h:2655:12: error: variable 'temp' set but not used [-Werror,-Wunused-but-set-variable]
uint64_t temp;
^
1 error generated.
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:40:
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.h:30:
In file included from drivers/gpu/drm/amd/amdgpu/../display/dmub/dmub_srv.h:67:
>> drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h:2655:12: error: variable 'temp' set but not used [-Werror,-Wunused-but-set-variable]
uint64_t temp;
^
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:99:3: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction]
BIOS_CMD_TABLE_PARA_REVISION(digxencodercontrol);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:62:4: note: expanded from macro 'BIOS_CMD_TABLE_PARA_REVISION'
GET_INDEX_INTO_MASTER_TABLE(command, fname))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:49:15: note: expanded from macro 'GET_INDEX_INTO_MASTER_TABLE'
->FieldName)-(char *)0)/sizeof(uint16_t))
^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:191:6: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction]
if (EXEC_BIOS_CMD_TABLE(digxencodercontrol, params))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:53:3: note: expanded from macro 'EXEC_BIOS_CMD_TABLE'
GET_INDEX_INTO_MASTER_TABLE(command, fname), \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:49:15: note: expanded from macro 'GET_INDEX_INTO_MASTER_TABLE'
->FieldName)-(char *)0)/sizeof(uint16_t))
^~~~~~~~~~
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:191:6: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction]
if (EXEC_BIOS_CMD_TABLE(digxencodercontrol, params))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:53:3: note: expanded from macro 'EXEC_BIOS_CMD_TABLE'
GET_INDEX_INTO_MASTER_TABLE(command, fname), \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:49:15: note: expanded from macro 'GET_INDEX_INTO_MASTER_TABLE'
->FieldName)-(char *)0)/sizeof(uint16_t))
^~~~~~~~~~
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:191:6: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction]
if (EXEC_BIOS_CMD_TABLE(digxencodercontrol, params))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:53:3: note: expanded from macro 'EXEC_BIOS_CMD_TABLE'
GET_INDEX_INTO_MASTER_TABLE(command, fname), \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:49:15: note: expanded from macro 'GET_INDEX_INTO_MASTER_TABLE'
->FieldName)-(char *)0)/sizeof(uint16_t))
^~~~~~~~~~
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
(cond) ? \
^~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:234:2: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction]
BIOS_CMD_TABLE_REVISION(dig1transmittercontrol, frev, crev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:58:3: note: expanded from macro 'BIOS_CMD_TABLE_REVISION'
GET_INDEX_INTO_MASTER_TABLE(command, fname), &frev, &crev)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:49:15: note: expanded from macro 'GET_INDEX_INTO_MASTER_TABLE'
->FieldName)-(char *)0)/sizeof(uint16_t))
^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:309:6: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction]
if (EXEC_BIOS_CMD_TABLE(dig1transmittercontrol, ps))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:53:3: note: expanded from macro 'EXEC_BIOS_CMD_TABLE'
GET_INDEX_INTO_MASTER_TABLE(command, fname), \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:49:15: note: expanded from macro 'GET_INDEX_INTO_MASTER_TABLE'
->FieldName)-(char *)0)/sizeof(uint16_t))
^~~~~~~~~~
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:309:6: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction]
if (EXEC_BIOS_CMD_TABLE(dig1transmittercontrol, ps))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:53:3: note: expanded from macro 'EXEC_BIOS_CMD_TABLE'
GET_INDEX_INTO_MASTER_TABLE(command, fname), \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:49:15: note: expanded from macro 'GET_INDEX_INTO_MASTER_TABLE'
->FieldName)-(char *)0)/sizeof(uint16_t))
^~~~~~~~~~
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:309:6: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction]
if (EXEC_BIOS_CMD_TABLE(dig1transmittercontrol, ps))
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_srv.c:26:
In file included from drivers/gpu/drm/amd/amdgpu/../display/dmub/src/../dmub_srv.h:67:
>> drivers/gpu/drm/amd/amdgpu/../display/dmub/src/../inc/dmub_cmd.h:2655:12: error: variable 'temp' set but not used [-Werror,-Wunused-but-set-variable]
uint64_t temp;
^
1 error generated.
vim +/temp +2655 drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h
84034ad4c0c081 Anthony Koo 2020-05-15 2638
592a631883fdaa Anthony Koo 2021-03-08 2639 /**
592a631883fdaa Anthony Koo 2021-03-08 2640 * @brief Flushes commands in the ringbuffer to framebuffer memory.
592a631883fdaa Anthony Koo 2021-03-08 2641 *
592a631883fdaa Anthony Koo 2021-03-08 2642 * Avoids a race condition where DMCUB accesses memory while
592a631883fdaa Anthony Koo 2021-03-08 2643 * there are still writes in flight to framebuffer.
592a631883fdaa Anthony Koo 2021-03-08 2644 *
592a631883fdaa Anthony Koo 2021-03-08 2645 * @param rb DMUB ringbuffer
592a631883fdaa Anthony Koo 2021-03-08 2646 */
84034ad4c0c081 Anthony Koo 2020-05-15 2647 static inline void dmub_rb_flush_pending(const struct dmub_rb *rb)
84034ad4c0c081 Anthony Koo 2020-05-15 2648 {
84034ad4c0c081 Anthony Koo 2020-05-15 2649 uint32_t rptr = rb->rptr;
84034ad4c0c081 Anthony Koo 2020-05-15 2650 uint32_t wptr = rb->wrpt;
84034ad4c0c081 Anthony Koo 2020-05-15 2651
84034ad4c0c081 Anthony Koo 2020-05-15 2652 while (rptr != wptr) {
3a9d5b0b5301fb Anthony Koo 2021-08-14 2653 uint64_t volatile *data = (uint64_t volatile *)rb->base_address + rptr / sizeof(uint64_t);
3a9d5b0b5301fb Anthony Koo 2021-08-14 2654 //uint64_t volatile *p = (uint64_t volatile *)data;
3a9d5b0b5301fb Anthony Koo 2021-08-14 @2655 uint64_t temp;
3a9d5b0b5301fb Anthony Koo 2021-08-14 2656 uint8_t i;
84034ad4c0c081 Anthony Koo 2020-05-15 2657
3a9d5b0b5301fb Anthony Koo 2021-08-14 2658 for (i = 0; i < DMUB_RB_CMD_SIZE / sizeof(uint64_t); i++)
3a9d5b0b5301fb Anthony Koo 2021-08-14 2659 temp = *data++;
84034ad4c0c081 Anthony Koo 2020-05-15 2660
84034ad4c0c081 Anthony Koo 2020-05-15 2661 rptr += DMUB_RB_CMD_SIZE;
84034ad4c0c081 Anthony Koo 2020-05-15 2662 if (rptr >= rb->capacity)
84034ad4c0c081 Anthony Koo 2020-05-15 2663 rptr %= rb->capacity;
84034ad4c0c081 Anthony Koo 2020-05-15 2664 }
84034ad4c0c081 Anthony Koo 2020-05-15 2665 }
84034ad4c0c081 Anthony Koo 2020-05-15 2666
:::::: The code at line 2655 was first introduced by commit
:::::: 3a9d5b0b5301fb992554ee93ae34fe91771e6434 drm/amd/display: [FW Promotion] Release 0.0.80
:::::: TO: Anthony Koo <Anthony.Koo@amd.com>
:::::: CC: Alex Deucher <alexander.deucher@amd.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36675 bytes --]
reply other threads:[~2021-09-10 1:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202109100947.yfeDEhJL-lkp@intel.com \
--to=lkp@intel.com \
--cc=alexander.deucher@amd.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).