public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [drm-misc:for-linux-next 1/7] drivers/gpu/drm/ast/ast_mode.c:1019 ast_crtc_dpms() warn: ignoring unreachable code.
@ 2022-05-04 10:07 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2022-05-04 10:07 UTC (permalink / raw)
  To: kbuild, KuoHsiang Chou; +Cc: lkp, kbuild-all, linux-kernel, Thomas Zimmermann

tree:   git://anongit.freedesktop.org/drm/drm-misc for-linux-next
head:   d7442505de9259f8b975232470378d399c25b2fa
commit: 594e9c04b5864b4b8b151ef4ba9521c59e0f5c54 [1/7] drm/ast: Create the driver for ASPEED proprietory Display-Port
config: ia64-randconfig-m031-20220501 (https://download.01.org/0day-ci/archive/20220504/202205041752.s96JbPPp-lkp@intel.com/config)
compiler: ia64-linux-gcc (GCC) 11.3.0

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

smatch warnings:
drivers/gpu/drm/ast/ast_mode.c:1019 ast_crtc_dpms() warn: ignoring unreachable code.

vim +1019 drivers/gpu/drm/ast/ast_mode.c

312fec1405dd54 Dave Airlie       2012-02-29   988  static void ast_crtc_dpms(struct drm_crtc *crtc, int mode)
312fec1405dd54 Dave Airlie       2012-02-29   989  {
fa7dbd7688849d Thomas Zimmermann 2020-06-17   990  	struct ast_private *ast = to_ast_private(crtc->dev);
594e9c04b5864b KuoHsiang Chou    2022-04-28   991  	u8 ch = AST_DPMS_VSYNC_OFF | AST_DPMS_HSYNC_OFF;
312fec1405dd54 Dave Airlie       2012-02-29   992  
2fbeec03e17165 Thomas Zimmermann 2019-12-02   993  	/* TODO: Maybe control display signal generation with
2fbeec03e17165 Thomas Zimmermann 2019-12-02   994  	 *       Sync Enable (bit CR17.7).
2fbeec03e17165 Thomas Zimmermann 2019-12-02   995  	 */
312fec1405dd54 Dave Airlie       2012-02-29   996  	switch (mode) {
312fec1405dd54 Dave Airlie       2012-02-29   997  	case DRM_MODE_DPMS_ON:
594e9c04b5864b KuoHsiang Chou    2022-04-28   998  		ast_set_index_reg_mask(ast, AST_IO_SEQ_PORT,  0x01, 0xdf, 0);
594e9c04b5864b KuoHsiang Chou    2022-04-28   999  		ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb6, 0xfc, 0);
83c6620bae3f14 Dave Airlie       2014-03-28  1000  		if (ast->tx_chip_type == AST_TX_DP501)
83c6620bae3f14 Dave Airlie       2014-03-28  1001  			ast_set_dp501_video_output(crtc->dev, 1);
594e9c04b5864b KuoHsiang Chou    2022-04-28  1002  
594e9c04b5864b KuoHsiang Chou    2022-04-28  1003  		if (ast->tx_chip_type == AST_TX_ASTDP) {
594e9c04b5864b KuoHsiang Chou    2022-04-28  1004  			ast_dp_power_on_off(crtc->dev, AST_DP_POWER_ON);
594e9c04b5864b KuoHsiang Chou    2022-04-28  1005  			ast_wait_for_vretrace(ast);
594e9c04b5864b KuoHsiang Chou    2022-04-28  1006  			ast_dp_set_on_off(crtc->dev, 1);
594e9c04b5864b KuoHsiang Chou    2022-04-28  1007  		}
594e9c04b5864b KuoHsiang Chou    2022-04-28  1008  
594e9c04b5864b KuoHsiang Chou    2022-04-28  1009  		ast_crtc_load_lut(ast, crtc);
312fec1405dd54 Dave Airlie       2012-02-29  1010  		break;
594e9c04b5864b KuoHsiang Chou    2022-04-28  1011  	case DRM_MODE_DPMS_STANDBY:
594e9c04b5864b KuoHsiang Chou    2022-04-28  1012  	case DRM_MODE_DPMS_SUSPEND:
312fec1405dd54 Dave Airlie       2012-02-29  1013  	case DRM_MODE_DPMS_OFF:
594e9c04b5864b KuoHsiang Chou    2022-04-28  1014  		ch = mode;
83c6620bae3f14 Dave Airlie       2014-03-28  1015  		if (ast->tx_chip_type == AST_TX_DP501)
83c6620bae3f14 Dave Airlie       2014-03-28  1016  			ast_set_dp501_video_output(crtc->dev, 0);
312fec1405dd54 Dave Airlie       2012-02-29  1017  		break;
                                                                ^^^^^^
break

594e9c04b5864b KuoHsiang Chou    2022-04-28  1018  
594e9c04b5864b KuoHsiang Chou    2022-04-28 @1019  		if (ast->tx_chip_type == AST_TX_ASTDP) {

Unreachable code.


594e9c04b5864b KuoHsiang Chou    2022-04-28  1020  			ast_dp_set_on_off(crtc->dev, 0);
594e9c04b5864b KuoHsiang Chou    2022-04-28  1021  			ast_dp_power_on_off(crtc->dev, AST_DP_POWER_OFF);
594e9c04b5864b KuoHsiang Chou    2022-04-28  1022  		}
594e9c04b5864b KuoHsiang Chou    2022-04-28  1023  
594e9c04b5864b KuoHsiang Chou    2022-04-28  1024  		ast_set_index_reg_mask(ast, AST_IO_SEQ_PORT,  0x01, 0xdf, 0x20);
594e9c04b5864b KuoHsiang Chou    2022-04-28  1025  		ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb6, 0xfc, ch);
312fec1405dd54 Dave Airlie       2012-02-29  1026  	}
312fec1405dd54 Dave Airlie       2012-02-29  1027  }

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp


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

only message in thread, other threads:[~2022-05-04 10:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-04 10:07 [drm-misc:for-linux-next 1/7] drivers/gpu/drm/ast/ast_mode.c:1019 ast_crtc_dpms() warn: ignoring unreachable code Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox