mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Maxime Ripard <maxime@cerno.tech>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: drivers/gpu/drm/drm_atomic.c:1670:33: error: variable 'obj' set but not used
Date: Tue, 7 Jun 2022 10:28:40 +0800	[thread overview]
Message-ID: <202206071049.pofHsRih-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e71e60cd74df9386c3f684c54888f2367050b831
commit: 97a1f01b3f2f734bd3982aa5639b2b54632f8f7d drm/atomic: Add atomic_print_state to private objects
date:   10 weeks ago
config: x86_64-sof-customedconfig-mach-driver-defconfig (https://download.01.org/0day-ci/archive/20220607/202206071049.pofHsRih-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=97a1f01b3f2f734bd3982aa5639b2b54632f8f7d
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 97a1f01b3f2f734bd3982aa5639b2b54632f8f7d
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/gpu/drm/drm_atomic.c: In function 'drm_atomic_print_new_state':
>> drivers/gpu/drm/drm_atomic.c:1670:33: error: variable 'obj' set but not used [-Werror=unused-but-set-variable]
    1670 |         struct drm_private_obj *obj;
         |                                 ^~~
   cc1: all warnings being treated as errors


vim +/obj +1670 drivers/gpu/drm/drm_atomic.c

  1649	
  1650	/**
  1651	 * drm_atomic_print_new_state - prints drm atomic state
  1652	 * @state: atomic configuration to check
  1653	 * @p: drm printer
  1654	 *
  1655	 * This functions prints the drm atomic state snapshot using the drm printer
  1656	 * which is passed to it. This snapshot can be used for debugging purposes.
  1657	 *
  1658	 * Note that this function looks into the new state objects and hence its not
  1659	 * safe to be used after the call to drm_atomic_helper_commit_hw_done().
  1660	 */
  1661	void drm_atomic_print_new_state(const struct drm_atomic_state *state,
  1662			struct drm_printer *p)
  1663	{
  1664		struct drm_plane *plane;
  1665		struct drm_plane_state *plane_state;
  1666		struct drm_crtc *crtc;
  1667		struct drm_crtc_state *crtc_state;
  1668		struct drm_connector *connector;
  1669		struct drm_connector_state *connector_state;
> 1670		struct drm_private_obj *obj;
  1671		struct drm_private_state *obj_state;
  1672		int i;
  1673	
  1674		if (!p) {
  1675			drm_err(state->dev, "invalid drm printer\n");
  1676			return;
  1677		}
  1678	
  1679		drm_dbg_atomic(state->dev, "checking %p\n", state);
  1680	
  1681		for_each_new_plane_in_state(state, plane, plane_state, i)
  1682			drm_atomic_plane_print_state(p, plane_state);
  1683	
  1684		for_each_new_crtc_in_state(state, crtc, crtc_state, i)
  1685			drm_atomic_crtc_print_state(p, crtc_state);
  1686	
  1687		for_each_new_connector_in_state(state, connector, connector_state, i)
  1688			drm_atomic_connector_print_state(p, connector_state);
  1689	
  1690		for_each_new_private_obj_in_state(state, obj, obj_state, i)
  1691			drm_atomic_private_obj_print_state(p, obj_state);
  1692	}
  1693	EXPORT_SYMBOL(drm_atomic_print_new_state);
  1694	

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

                 reply	other threads:[~2022-06-07  2:29 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=202206071049.pofHsRih-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime@cerno.tech \
    /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®