linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [agd5f:amd-staging-drm-next 359/435] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:113:25: warning: suggest braces around empty body in an 'else' statement
@ 2021-08-05  0:26 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-05  0:26 UTC (permalink / raw)
  To: Wyatt Wood; +Cc: kbuild-all, linux-kernel, Gerrit Cr, Koo Anthony

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

tree:   https://gitlab.freedesktop.org/agd5f/linux.git amd-staging-drm-next
head:   2f56b0d631eba0e76cfc789d85cc5632256ad42d
commit: d731fa8884943560fd90d5a3181f67e18726c6a8 [359/435] drm/amd/display: Add ETW log to dmub_psr_get_state
config: powerpc64-buildonly-randconfig-r002-20210728 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 10.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 agd5f https://gitlab.freedesktop.org/agd5f/linux.git
        git fetch --no-tags agd5f amd-staging-drm-next
        git checkout d731fa8884943560fd90d5a3181f67e18726c6a8
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=powerpc64 

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

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c: In function 'dmub_psr_get_state':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:113:25: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
     113 |     *state, retry_count);
         |                         ^


vim +/else +113 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c

    78	
    79	/*
    80	 * Get PSR state from firmware.
    81	 */
    82	static void dmub_psr_get_state(struct dmub_psr *dmub, enum dc_psr_state *state, uint8_t panel_inst)
    83	{
    84		struct dmub_srv *srv = dmub->ctx->dmub_srv->dmub;
    85		uint32_t raw_state = 0;
    86		uint32_t retry_count = 0;
    87		enum dmub_status status;
    88	
    89		do {
    90			// Send gpint command and wait for ack
    91			status = dmub_srv_send_gpint_command(srv, DMUB_GPINT__GET_PSR_STATE, panel_inst, 30);
    92	
    93			if (status == DMUB_STATUS_OK) {
    94				// GPINT was executed, get response
    95				dmub_srv_get_gpint_response(srv, &raw_state);
    96				*state = convert_psr_state(raw_state);
    97			} else
    98				// Return invalid state when GPINT times out
    99				*state = PSR_STATE_INVALID;
   100	
   101		} while (++retry_count <= 1000 && *state == PSR_STATE_INVALID);
   102	
   103		// Assert if max retry hit
   104		if (retry_count >= 1000 && *state == PSR_STATE_INVALID) {
   105			ASSERT(0);
   106			DC_TRACE_LEVEL_MESSAGE(DAL_TRACE_LEVEL_ERROR,
   107					WPP_BIT_FLAG_Firmware_PsrState,
   108					"Unable to get PSR state from FW.");
   109		} else
   110			DC_TRACE_LEVEL_MESSAGE(DAL_TRACE_LEVEL_VERBOSE,
   111					WPP_BIT_FLAG_Firmware_PsrState,
   112					"Got PSR state from FW. PSR state: %d, Retry count: %d",
 > 113					*state, retry_count);
   114	}
   115	

---
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: 36977 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-05  0:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05  0:26 [agd5f:amd-staging-drm-next 359/435] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:113:25: warning: suggest braces around empty body in an 'else' statement kernel test robot

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).