lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210240744.A1VDujpc-lkp@intel.com>
Date:   Mon, 24 Oct 2022 07:21:38 +0800
From:   kernel test robot <lkp@...el.com>
To:     Janne Grunau <j@...nau.net>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [asahilinux:gpu/rust-wip 1753/2027]
 drivers/gpu/drm/apple/dcp.c:189:45: warning: variable 'old_state' set but
 not used

tree:   https://github.com/AsahiLinux/linux gpu/rust-wip
head:   b7b1866d75e6b48630820b15ccc67dc198f8666f
commit: afce60bb5714afb1753391cda62ea45f746af98e [1753/2027] gpu: drm: apple: Add dcp_crtc_atomic_check
config: arm64-allyesconfig
compiler: aarch64-linux-gcc (GCC) 12.1.0
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
        # https://github.com/AsahiLinux/linux/commit/afce60bb5714afb1753391cda62ea45f746af98e
        git remote add asahilinux https://github.com/AsahiLinux/linux
        git fetch --no-tags asahilinux gpu/rust-wip
        git checkout afce60bb5714afb1753391cda62ea45f746af98e
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/gpu/drm/apple/

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

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/apple/dcp.c:82:6: warning: no previous prototype for 'dcp_delayed_vblank' [-Wmissing-prototypes]
      82 | void dcp_delayed_vblank(struct work_struct *work)
         |      ^~~~~~~~~~~~~~~~~~
   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;
         |                                             ^~~~~~~~~
   drivers/gpu/drm/apple/dcp.c: In function 'dcp_resume':
   drivers/gpu/drm/apple/dcp.c:393:9: error: implicit declaration of function 'dcp_start_signal' [-Werror=implicit-function-declaration]
     393 |         dcp_start_signal(dcp, false, dcp_started, NULL);
         |         ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/apple/dcp.c:393:38: error: 'dcp_started' undeclared (first use in this function); did you mean 'qc_state'?
     393 |         dcp_start_signal(dcp, false, dcp_started, NULL);
         |                                      ^~~~~~~~~~~
         |                                      qc_state
   drivers/gpu/drm/apple/dcp.c:393:38: note: each undeclared identifier is reported only once for each function it appears in
   In file included from drivers/gpu/drm/apple/dcp.c:23:
   drivers/gpu/drm/apple/dcp.h: At top level:
   drivers/gpu/drm/apple/dcp.h:49:18: warning: 'dcp_formats' defined but not used [-Wunused-const-variable=]
      49 | static const u32 dcp_formats[] = {
         |                  ^~~~~~~~~~~
   cc1: some warnings being treated as errors


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

   177	
   178	
   179	void dcp_send_message(struct apple_dcp *dcp, u8 endpoint, u64 message)
   180	{
   181		trace_dcp_send_msg(dcp, endpoint, message);
   182		apple_rtkit_send_message(dcp->rtk, endpoint, message, NULL,
   183					 false);
   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://01.org/lkp

View attachment "config" of type "text/plain" (363092 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ