mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/gpu/drm/drm_atomic.c:1670:33: error: variable 'obj' set but not used
@ 2022-06-07  2:28 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-06-07  2:28 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: kbuild-all, linux-kernel, Daniel Vetter

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-07  2:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-07  2:28 drivers/gpu/drm/drm_atomic.c:1670:33: error: variable 'obj' set but not used kernel test robot

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®