All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Janne Grunau <j@jannau.net>
Cc: oe-kbuild-all@lists.linux.dev, Hector Martin <marcan@marcan.st>
Subject: [asahilinux:bits/200-dcp 41/115] drivers/gpu/drm/apple/dcp.c:189:45: warning: variable 'old_state' set but not used
Date: Mon, 25 Sep 2023 08:10:59 +0800	[thread overview]
Message-ID: <202309250814.ATvf4pce-lkp@intel.com> (raw)

tree:   https://github.com/AsahiLinux/linux bits/200-dcp
head:   f4266bb9a0d063559ea03f3a46244bb54c167e0c
commit: bd2514bb7f205c34b109c693edfad7853892e33e [41/115] gpu: drm: apple: Add dcp_crtc_atomic_check
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20230925/202309250814.ATvf4pce-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230925/202309250814.ATvf4pce-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309250814.ATvf4pce-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/apple/dcp.c: In function 'dcp_crtc_atomic_check':
>> drivers/gpu/drm/apple/dcp.c:189:45: warning: variable 'old_state' set but not used [-Wunused-but-set-variable]
     189 |         struct drm_plane_state *new_state, *old_state;
         |                                             ^~~~~~~~~


vim +/old_state +189 drivers/gpu/drm/apple/dcp.c

   184	
   185	int dcp_crtc_atomic_check(struct drm_crtc *crtc, struct drm_atomic_state *state)
   186	{
   187		struct platform_device *pdev = to_apple_crtc(crtc)->dcp;
   188		struct apple_dcp *dcp = platform_get_drvdata(pdev);
 > 189		struct drm_plane_state *new_state, *old_state;
   190		struct drm_plane *plane;
   191		struct drm_crtc_state *crtc_state;
   192		int plane_idx, plane_count = 0;
   193		bool needs_modeset;
   194	
   195		if (dcp->crashed)
   196			return -EINVAL;
   197	
   198		crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
   199	
   200		needs_modeset = drm_atomic_crtc_needs_modeset(crtc_state) || !dcp->valid_mode;
   201		if (!needs_modeset && !dcp->connector->connected) {
   202			dev_err(dcp->dev, "crtc_atomic_check: disconnected but no modeset");
   203			return -EINVAL;
   204		}
   205	
   206		for_each_oldnew_plane_in_state(state, plane, old_state, new_state, plane_idx) {
   207			/* skip planes not for this crtc */
   208			if (new_state->crtc != crtc)
   209				continue;
   210	
   211			plane_count += 1;
   212		}
   213	
   214		if (plane_count > DCP_MAX_PLANES) {
   215			dev_err(dcp->dev, "crtc_atomic_check: Blend supports only 2 layers!");
   216			return -EINVAL;
   217		}
   218	
   219		return 0;
   220	}
   221	EXPORT_SYMBOL_GPL(dcp_crtc_atomic_check);
   222	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2023-09-25  0:11 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=202309250814.ATvf4pce-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=j@jannau.net \
    --cc=marcan@marcan.st \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.