public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, KuoHsiang Chou <kuohsiang_chou@aspeedtech.com>
Cc: lkp@intel.com, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org,
	Thomas Zimmermann <tzimmermann@suse.de>
Subject: [drm-misc:for-linux-next 1/7] drivers/gpu/drm/ast/ast_mode.c:1019 ast_crtc_dpms() warn: ignoring unreachable code.
Date: Wed, 4 May 2022 13:07:59 +0300	[thread overview]
Message-ID: <202205041752.s96JbPPp-lkp@intel.com> (raw)

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


                 reply	other threads:[~2022-05-04 10:08 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=202205041752.s96JbPPp-lkp@intel.com \
    --to=dan.carpenter@oracle.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=kuohsiang_chou@aspeedtech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=tzimmermann@suse.de \
    /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