[linux-next:master 11802/12015] drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h:2655:26: error: variable 'temp' set but not used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   7800ca95d0ed11b492962dc3abc2181c9d5f7f82
commit: 670e71ded7495930883f17a604b1f3ad90bf1d2f [11802/12015] Merge remote-tracking branch 'amdgpu/drm-next'
config: parisc-randconfig-r016-20210906 (attached as .config)
compiler: hppa-linux-gcc (GCC) 11.2.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
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=670e71ded7495930883f17a604b1f3ad90bf1d2f
        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 670e71ded7495930883f17a604b1f3ad90bf1d2f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=parisc 

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

All errors (new ones prefixed by >>):

   In file included from drivers/gpu/drm/amd/amdgpu/../display/dmub/dmub_srv.h:67,
                    from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.h:30,
                    from drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:64:
   drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h: In function 'dmub_rb_flush_pending':
>> drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h:2655:26: error: variable 'temp' set but not used [-Werror=unused-but-set-variable]
    2655 |                 uint64_t temp;
         |                          ^~~~
   cc1: all warnings being treated as errors
--
   In file included from drivers/gpu/drm/amd/amdgpu/../display/dmub/dmub_srv.h:67,
                    from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.h:30,
                    from drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:15:
   drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h: In function 'dmub_rb_flush_pending':
>> drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h:2655:26: error: variable 'temp' set but not used [-Werror=unused-but-set-variable]
    2655 |                 uint64_t temp;
         |                          ^~~~
   drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c: At top level:
   drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:1755:16: error: no previous prototype for 'configure_lttpr_mode_transparent' [-Werror=missing-prototypes]
    1755 | enum dc_status configure_lttpr_mode_transparent(struct dc_link *link)
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:1766:16: error: no previous prototype for 'configure_lttpr_mode_non_transparent' [-Werror=missing-prototypes]
    1766 | enum dc_status configure_lttpr_mode_non_transparent(
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors
--
   In file included from drivers/gpu/drm/amd/amdgpu/../display/dmub/src/../dmub_srv.h:67,
                    from drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_srv.c:26:
   drivers/gpu/drm/amd/amdgpu/../display/dmub/src/../inc/dmub_cmd.h: In function 'dmub_rb_flush_pending':
>> drivers/gpu/drm/amd/amdgpu/../display/dmub/src/../inc/dmub_cmd.h:2655:26: error: variable 'temp' set but not used [-Werror=unused-but-set-variable]
    2655 |                 uint64_t temp;
         |                          ^~~~
   cc1: all warnings being treated as errors
--
   In file included from drivers/gpu/drm/amd/amdgpu/../display/dmub/src/../dmub_srv.h:67,
                    from drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn31.c:26:
   drivers/gpu/drm/amd/amdgpu/../display/dmub/src/../inc/dmub_cmd.h: In function 'dmub_rb_flush_pending':
>> drivers/gpu/drm/amd/amdgpu/../display/dmub/src/../inc/dmub_cmd.h:2655:26: error: variable 'temp' set but not used [-Werror=unused-but-set-variable]
    2655 |                 uint64_t temp;
         |                          ^~~~
   In file included from drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn31.c:30:
   At top level:
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:181:29: error: 'VCN_BASE' defined but not used [-Werror=unused-const-variable=]
     181 | static const struct IP_BASE VCN_BASE = { { { { 0x00007800, 0x00007E00, 0x02403000, 0, 0, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:174:29: error: 'UMC_BASE' defined but not used [-Werror=unused-const-variable=]
     174 | static const struct IP_BASE UMC_BASE = { { { { 0x00014000, 0x00054000, 0x02425800, 0x02425C00, 0, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:167:29: error: 'THM_BASE' defined but not used [-Werror=unused-const-variable=]
     167 | static const struct IP_BASE THM_BASE = { { { { 0x00016600, 0x02400C00, 0, 0, 0, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:160:29: error: 'SMUIO_BASE' defined but not used [-Werror=unused-const-variable=]
     160 | static const struct IP_BASE SMUIO_BASE = { { { { 0x00016800, 0x00016A00, 0x02401000, 0x00440000, 0, 0 } },
         |                             ^~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:153:29: error: 'SDMA0_BASE' defined but not used [-Werror=unused-const-variable=]
     153 | static const struct IP_BASE SDMA0_BASE = { { { { 0x00001260, 0x0000A000, 0x02402C00, 0, 0, 0 } },
         |                             ^~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:146:29: error: 'PCIE_BASE' defined but not used [-Werror=unused-const-variable=]
     146 | static const struct IP_BASE PCIE_BASE = { { { { 0x02411800, 0x04440000, 0, 0, 0, 0 } },
         |                             ^~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:139:29: error: 'OSSSYS_BASE' defined but not used [-Werror=unused-const-variable=]
     139 | static const struct IP_BASE OSSSYS_BASE = { { { { 0x000010A0, 0x0240A000, 0, 0, 0, 0 } },
         |                             ^~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:132:29: error: 'NBIO_BASE' defined but not used [-Werror=unused-const-variable=]
     132 | static const struct IP_BASE NBIO_BASE = { { { { 0x00000000, 0x00000014, 0x00000D20, 0x00010400, 0x0241B000, 0x04040000 } },
         |                             ^~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:125:29: error: 'MP2_BASE' defined but not used [-Werror=unused-const-variable=]
     125 | static const struct IP_BASE MP2_BASE = { { { { 0x00016000, 0x0243FC00, 0x00DC0000, 0x00E00000, 0x00E40000, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:118:29: error: 'MP1_BASE' defined but not used [-Werror=unused-const-variable=]
     118 | static const struct IP_BASE MP1_BASE = { { { { 0x00016000, 0x0243FC00, 0x00DC0000, 0x00E00000, 0x00E40000, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:111:29: error: 'MP0_BASE' defined but not used [-Werror=unused-const-variable=]
     111 | static const struct IP_BASE MP0_BASE = { { { { 0x00016000, 0x0243FC00, 0x00DC0000, 0x00E00000, 0x00E40000, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:104:29: error: 'MMHUB_BASE' defined but not used [-Werror=unused-const-variable=]
     104 | static const struct IP_BASE MMHUB_BASE = { { { { 0x00013200, 0x0001A000, 0x02408800, 0, 0, 0 } },
         |                             ^~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:97:29: error: 'IOHC0_BASE' defined but not used [-Werror=unused-const-variable=]
      97 | static const struct IP_BASE IOHC0_BASE = { { { { 0x00010000, 0x02406000, 0x04EC0000, 0, 0, 0 } },
         |                             ^~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:90:29: error: 'HDP_BASE' defined but not used [-Werror=unused-const-variable=]
      90 | static const struct IP_BASE HDP_BASE = { { { { 0x00000F20, 0x0240A400, 0, 0, 0, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:83:29: error: 'GC_BASE' defined but not used [-Werror=unused-const-variable=]
      83 | static const struct IP_BASE GC_BASE = { { { { 0x00001260, 0x0000A000, 0x02402C00, 0, 0, 0 } },
         |                             ^~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:76:29: error: 'FUSE_BASE' defined but not used [-Werror=unused-const-variable=]
      76 | static const struct IP_BASE FUSE_BASE = { { { { 0x00017400, 0x02401400, 0, 0, 0, 0 } },
         |                             ^~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:69:29: error: 'FCH_BASE' defined but not used [-Werror=unused-const-variable=]
      69 | static const struct IP_BASE FCH_BASE = { { { { 0x0240C000, 0x00B40000, 0x11000000, 0, 0, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:62:29: error: 'DF_BASE' defined but not used [-Werror=unused-const-variable=]
      62 | static const struct IP_BASE DF_BASE = { { { { 0x00007000, 0x0240B800, 0x02447800, 0x00C00000, 0x03640000, 0 } },
         |                             ^~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:55:29: error: 'DPCS_BASE' defined but not used [-Werror=unused-const-variable=]
      55 | static const struct IP_BASE DPCS_BASE = { { { { 0x00000012, 0x000000C0, 0x000034C0, 0x00009000, 0x02403C00, 0 } },
         |                             ^~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:48:29: error: 'DCN_BASE' defined but not used [-Werror=unused-const-variable=]
      48 | static const struct IP_BASE DCN_BASE = { { { { 0x00000012, 0x000000C0, 0x000034C0, 0x00009000, 0x02403C00, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:41:29: error: 'DBGU_IO_BASE' defined but not used [-Werror=unused-const-variable=]
      41 | static const struct IP_BASE DBGU_IO_BASE = { { { { 0x000001E0, 0x00000260, 0x00000280, 0x0240B400, 0x02413C00, 0x02416000 } },
         |                             ^~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:34:29: error: 'CLK_BASE' defined but not used [-Werror=unused-const-variable=]
      34 | static const struct IP_BASE CLK_BASE = { { { { 0x00016C00, 0x02401800, 0, 0, 0, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:27:29: error: 'ATHUB_BASE' defined but not used [-Werror=unused-const-variable=]
      27 | static const struct IP_BASE ATHUB_BASE = { { { { 0x00000C00, 0x00013300, 0x02408C00, 0, 0, 0 } },
         |                             ^~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../include/yellow_carp_offset.h:20:29: error: 'ACP_BASE' defined but not used [-Werror=unused-const-variable=]
      20 | static const struct IP_BASE ACP_BASE = { { { { 0x02403800, 0x00480000, 0, 0, 0, 0 } },
         |                             ^~~~~~~~
   cc1: all warnings being treated as errors
--
   In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c:35:
   drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h: In function 'dmub_rb_flush_pending':
>> drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h:2655:26: error: variable 'temp' set but not used [-Werror=unused-but-set-variable]
    2655 |                 uint64_t temp;
         |                          ^~~~
   drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c: In function 'dce_aux_transfer_with_retries':
   drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c:775:156: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
     775 |                                                                 "dce_aux_transfer_with_retries: AUX_RET_SUCCESS: AUX_TRANSACTION_REPLY_I2C_OVER_AUX_DEFER");
         |                                                                                                                                                            ^
   drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c:783:155: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
     783 |                                                                 "dce_aux_transfer_with_retries: AUX_RET_SUCCESS: AUX_TRANSACTION_REPLY_I2C_OVER_AUX_NACK");
         |                                                                                                                                                           ^
   cc1: all warnings being treated as errors


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@xxxxxxx>
:::::: CC: Alex Deucher <alexander.deucher@xxxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux