[01/18] drm/i915/display/icl_dsi: Prefer drm_WARN_ON over WARN_ON
diff mbox series

Message ID 20200406112800.23762-2-pankaj.laxminarayan.bharadiya@intel.com
State New
Headers show
Series
  • Prefer drm_WARN* over WARN*
Related show

Commit Message

Laxminarayan Bharadiya, Pankaj April 6, 2020, 11:27 a.m. UTC
struct drm_device specific drm_WARN* macros include device information
in the backtrace, so we know what device the warnings originate from.

Prefer drm_WARN_ON over WARN_ON.

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 drivers/gpu/drm/i915/display/icl_dsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

kbuild test robot April 6, 2020, 6:08 p.m. UTC | #1
Hi Pankaj,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on next-20200406]
[cannot apply to v5.6]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Pankaj-Bharadiya/Prefer-drm_WARN-over-WARN/20200406-210932
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-f002-20200406 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project a43e23360657e3df82af6b96b403d1a5a3174744)
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER=clang make.cross ARCH=x86_64 

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

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/i915/display/icl_dsi.c:1127:14: error: use of undeclared identifier 'state'
           drm_WARN_ON(state->base.dev, crtc_state->has_pch_encoder);
                       ^
>> drivers/gpu/drm/i915/display/icl_dsi.c:1127:14: error: use of undeclared identifier 'state'
   2 errors generated.

vim +/state +1127 drivers/gpu/drm/i915/display/icl_dsi.c

  1120	
  1121	static void gen11_dsi_enable(struct intel_encoder *encoder,
  1122				     const struct intel_crtc_state *crtc_state,
  1123				     const struct drm_connector_state *conn_state)
  1124	{
  1125		struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
  1126	
> 1127		drm_WARN_ON(state->base.dev, crtc_state->has_pch_encoder);
  1128	
  1129		/* step6d: enable dsi transcoder */
  1130		gen11_dsi_enable_transcoder(encoder);
  1131	
  1132		/* step7: enable backlight */
  1133		intel_panel_enable_backlight(crtc_state, conn_state);
  1134		intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_BACKLIGHT_ON);
  1135	
  1136		intel_crtc_vblank_on(crtc_state);
  1137	}
  1138	

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

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c
index 99a25c0bb08f..499383766fc2 100644
--- a/drivers/gpu/drm/i915/display/icl_dsi.c
+++ b/drivers/gpu/drm/i915/display/icl_dsi.c
@@ -1195,7 +1195,7 @@  static void gen11_dsi_enable(struct intel_atomic_state *state,
 {
 	struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
 
-	WARN_ON(crtc_state->has_pch_encoder);
+	drm_WARN_ON(state->base.dev, crtc_state->has_pch_encoder);
 
 	/* step6d: enable dsi transcoder */
 	gen11_dsi_enable_transcoder(encoder);