mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Abhinav Kumar <quic_abhinavk@quicinc.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Subject: [drm-msm:msm-next-staging 61/96] drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c:253:22: warning: variable 'mode' is uninitialized when used here
Date: Mon, 2 May 2022 15:01:45 +0800	[thread overview]
Message-ID: <202205021439.HE0yB3Rm-lkp@intel.com> (raw)

tree:   https://gitlab.freedesktop.org/drm/msm.git msm-next-staging
head:   f1fc2b87de4719cfa8e193e0746cc524dd9f7472
commit: d7d0e73f7de33a2b9998b607707a3e944ef3b86d [61/96] drm/msm/dpu: introduce the dpu_encoder_phys_* for writeback
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20220502/202205021439.HE0yB3Rm-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 09325d36061e42b495d1f4c7e933e260eac260ed)
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
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        git remote add drm-msm https://gitlab.freedesktop.org/drm/msm.git
        git fetch --no-tags drm-msm msm-next-staging
        git checkout d7d0e73f7de33a2b9998b607707a3e944ef3b86d
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/dma/ti/ drivers/gpu/drm/msm/ drivers/pci/controller/dwc/

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/msm/disp/dpu1/dpu_encoder_phys_wb.c:253:22: warning: variable 'mode' is uninitialized when used here [-Wuninitialized]
                           phys_enc->wb_idx, mode->name, mode->hdisplay, mode->vdisplay);
                                             ^~~~
   drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h:36:21: note: expanded from macro 'DPU_DEBUG'
                           DRM_DEBUG(fmt, ##__VA_ARGS__); \
                                            ^~~~~~~~~~~
   include/drm/drm_print.h:526:32: note: expanded from macro 'DRM_DEBUG'
           __drm_dbg(DRM_UT_CORE, fmt, ##__VA_ARGS__)
                                         ^~~~~~~~~~~
   drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c:250:37: note: initialize the variable 'mode' to silence this warning
           const struct drm_display_mode *mode;
                                              ^
                                               = NULL
   drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c:410:6: warning: variable 'refcount' set but not used [-Wunused-but-set-variable]
           int refcount;
               ^
   2 warnings generated.


vim +/mode +253 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c

   237	
   238	/**
   239	 * dpu_encoder_phys_wb_atomic_check - verify and fixup given atomic states
   240	 * @phys_enc:	Pointer to physical encoder
   241	 * @crtc_state:	Pointer to CRTC atomic state
   242	 * @conn_state:	Pointer to connector atomic state
   243	 */
   244	static int dpu_encoder_phys_wb_atomic_check(
   245			struct dpu_encoder_phys *phys_enc,
   246			struct drm_crtc_state *crtc_state,
   247			struct drm_connector_state *conn_state)
   248	{
   249		struct drm_framebuffer *fb;
   250		const struct drm_display_mode *mode;
   251	
   252		DPU_DEBUG("[atomic_check:%d, \"%s\",%d,%d]\n",
 > 253				phys_enc->wb_idx, mode->name, mode->hdisplay, mode->vdisplay);
   254	
   255		if (!conn_state->writeback_job || !conn_state->writeback_job->fb)
   256			return 0;
   257	
   258		fb = conn_state->writeback_job->fb;
   259		mode = &crtc_state->mode;
   260	
   261		if (!conn_state || !conn_state->connector) {
   262			DPU_ERROR("invalid connector state\n");
   263			return -EINVAL;
   264		} else if (conn_state->connector->status !=
   265				connector_status_connected) {
   266			DPU_ERROR("connector not connected %d\n",
   267					conn_state->connector->status);
   268			return -EINVAL;
   269		}
   270	
   271		DPU_DEBUG("[fb_id:%u][fb:%u,%u]\n", fb->base.id,
   272				fb->width, fb->height);
   273	
   274		if (fb->width != mode->hdisplay) {
   275			DPU_ERROR("invalid fb w=%d, mode w=%d\n", fb->width,
   276					mode->hdisplay);
   277			return -EINVAL;
   278		} else if (fb->height != mode->vdisplay) {
   279			DPU_ERROR("invalid fb h=%d, mode h=%d\n", fb->height,
   280					  mode->vdisplay);
   281			return -EINVAL;
   282		} else if (fb->width > DEFAULT_MAX_WRITEBACK_WIDTH) {
   283			DPU_ERROR("invalid fb w=%d, maxlinewidth=%u\n",
   284					  fb->width, DEFAULT_MAX_WRITEBACK_WIDTH);
   285			return -EINVAL;
   286		}
   287	
   288		return 0;
   289	}
   290	

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

                 reply	other threads:[~2022-05-02  7:02 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=202205021439.HE0yB3Rm-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=quic_abhinavk@quicinc.com \
    /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

all inboxes | Powered by JetHome®