All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/gpu/drm/vc4/vc4_kms.c:414 vc4_atomic_commit_setup() warn: passing zero to 'PTR_ERR'
@ 2022-01-23  4:58 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-01-23  4:58 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3396 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Maxime Ripard <maxime@cerno.tech>
CC: Dave Stevenson <dave.stevenson@raspberrypi.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1c52283265a462a100ae63ddf58b4e5884acde86
commit: f927767978d201d4ac023fcd797adbb963a6565d drm/vc4: kms: Fix return code check
date:   8 weeks ago
:::::: branch date: 19 hours ago
:::::: commit date: 8 weeks ago
config: powerpc64-randconfig-m031-20220120 (https://download.01.org/0day-ci/archive/20220123/202201231255.I5OPKZM2-lkp(a)intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/gpu/drm/vc4/vc4_kms.c:414 vc4_atomic_commit_setup() warn: passing zero to 'PTR_ERR'
drivers/gpu/drm/vc4/vc4_kms.c:425 vc4_atomic_commit_setup() error: 'hvs_state' dereferencing possible ERR_PTR()

vim +/PTR_ERR +414 drivers/gpu/drm/vc4/vc4_kms.c

b501bacc6060fd Eric Anholt   2015-11-30  404  
9ec03d7f1ed394 Maxime Ripard 2020-12-04  405  static int vc4_atomic_commit_setup(struct drm_atomic_state *state)
9ec03d7f1ed394 Maxime Ripard 2020-12-04  406  {
9ec03d7f1ed394 Maxime Ripard 2020-12-04  407  	struct drm_crtc_state *crtc_state;
9ec03d7f1ed394 Maxime Ripard 2020-12-04  408  	struct vc4_hvs_state *hvs_state;
9ec03d7f1ed394 Maxime Ripard 2020-12-04  409  	struct drm_crtc *crtc;
9ec03d7f1ed394 Maxime Ripard 2020-12-04  410  	unsigned int i;
9ec03d7f1ed394 Maxime Ripard 2020-12-04  411  
9ec03d7f1ed394 Maxime Ripard 2020-12-04  412  	hvs_state = vc4_hvs_get_new_global_state(state);
f927767978d201 Maxime Ripard 2021-11-17  413  	if (WARN_ON(IS_ERR(hvs_state)))
f927767978d201 Maxime Ripard 2021-11-17 @414  		return PTR_ERR(hvs_state);
9ec03d7f1ed394 Maxime Ripard 2020-12-04  415  
9ec03d7f1ed394 Maxime Ripard 2020-12-04  416  	for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
9ec03d7f1ed394 Maxime Ripard 2020-12-04  417  		struct vc4_crtc_state *vc4_crtc_state =
9ec03d7f1ed394 Maxime Ripard 2020-12-04  418  			to_vc4_crtc_state(crtc_state);
9ec03d7f1ed394 Maxime Ripard 2020-12-04  419  		unsigned int channel =
9ec03d7f1ed394 Maxime Ripard 2020-12-04  420  			vc4_crtc_state->assigned_channel;
9ec03d7f1ed394 Maxime Ripard 2020-12-04  421  
9ec03d7f1ed394 Maxime Ripard 2020-12-04  422  		if (channel == VC4_HVS_CHANNEL_DISABLED)
9ec03d7f1ed394 Maxime Ripard 2020-12-04  423  			continue;
9ec03d7f1ed394 Maxime Ripard 2020-12-04  424  
9ec03d7f1ed394 Maxime Ripard 2020-12-04 @425  		if (!hvs_state->fifo_state[channel].in_use)
9ec03d7f1ed394 Maxime Ripard 2020-12-04  426  			continue;
9ec03d7f1ed394 Maxime Ripard 2020-12-04  427  
9ec03d7f1ed394 Maxime Ripard 2020-12-04  428  		hvs_state->fifo_state[channel].pending_commit =
9ec03d7f1ed394 Maxime Ripard 2020-12-04  429  			drm_crtc_commit_get(crtc_state->commit);
9ec03d7f1ed394 Maxime Ripard 2020-12-04  430  	}
9ec03d7f1ed394 Maxime Ripard 2020-12-04  431  
9ec03d7f1ed394 Maxime Ripard 2020-12-04  432  	return 0;
9ec03d7f1ed394 Maxime Ripard 2020-12-04  433  }
9ec03d7f1ed394 Maxime Ripard 2020-12-04  434  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

* drivers/gpu/drm/vc4/vc4_kms.c:414 vc4_atomic_commit_setup() warn: passing zero to 'PTR_ERR'
@ 2022-01-23 22:59 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-01-23 22:59 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3395 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Maxime Ripard <maxime@cerno.tech>
CC: Dave Stevenson <dave.stevenson@raspberrypi.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   dd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0
commit: f927767978d201d4ac023fcd797adbb963a6565d drm/vc4: kms: Fix return code check
date:   8 weeks ago
:::::: branch date: 7 hours ago
:::::: commit date: 8 weeks ago
config: powerpc64-randconfig-m031-20220120 (https://download.01.org/0day-ci/archive/20220124/202201240642.kNVBulZh-lkp(a)intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/gpu/drm/vc4/vc4_kms.c:414 vc4_atomic_commit_setup() warn: passing zero to 'PTR_ERR'
drivers/gpu/drm/vc4/vc4_kms.c:425 vc4_atomic_commit_setup() error: 'hvs_state' dereferencing possible ERR_PTR()

vim +/PTR_ERR +414 drivers/gpu/drm/vc4/vc4_kms.c

b501bacc6060fd Eric Anholt   2015-11-30  404  
9ec03d7f1ed394 Maxime Ripard 2020-12-04  405  static int vc4_atomic_commit_setup(struct drm_atomic_state *state)
9ec03d7f1ed394 Maxime Ripard 2020-12-04  406  {
9ec03d7f1ed394 Maxime Ripard 2020-12-04  407  	struct drm_crtc_state *crtc_state;
9ec03d7f1ed394 Maxime Ripard 2020-12-04  408  	struct vc4_hvs_state *hvs_state;
9ec03d7f1ed394 Maxime Ripard 2020-12-04  409  	struct drm_crtc *crtc;
9ec03d7f1ed394 Maxime Ripard 2020-12-04  410  	unsigned int i;
9ec03d7f1ed394 Maxime Ripard 2020-12-04  411  
9ec03d7f1ed394 Maxime Ripard 2020-12-04  412  	hvs_state = vc4_hvs_get_new_global_state(state);
f927767978d201 Maxime Ripard 2021-11-17  413  	if (WARN_ON(IS_ERR(hvs_state)))
f927767978d201 Maxime Ripard 2021-11-17 @414  		return PTR_ERR(hvs_state);
9ec03d7f1ed394 Maxime Ripard 2020-12-04  415  
9ec03d7f1ed394 Maxime Ripard 2020-12-04  416  	for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
9ec03d7f1ed394 Maxime Ripard 2020-12-04  417  		struct vc4_crtc_state *vc4_crtc_state =
9ec03d7f1ed394 Maxime Ripard 2020-12-04  418  			to_vc4_crtc_state(crtc_state);
9ec03d7f1ed394 Maxime Ripard 2020-12-04  419  		unsigned int channel =
9ec03d7f1ed394 Maxime Ripard 2020-12-04  420  			vc4_crtc_state->assigned_channel;
9ec03d7f1ed394 Maxime Ripard 2020-12-04  421  
9ec03d7f1ed394 Maxime Ripard 2020-12-04  422  		if (channel == VC4_HVS_CHANNEL_DISABLED)
9ec03d7f1ed394 Maxime Ripard 2020-12-04  423  			continue;
9ec03d7f1ed394 Maxime Ripard 2020-12-04  424  
9ec03d7f1ed394 Maxime Ripard 2020-12-04 @425  		if (!hvs_state->fifo_state[channel].in_use)
9ec03d7f1ed394 Maxime Ripard 2020-12-04  426  			continue;
9ec03d7f1ed394 Maxime Ripard 2020-12-04  427  
9ec03d7f1ed394 Maxime Ripard 2020-12-04  428  		hvs_state->fifo_state[channel].pending_commit =
9ec03d7f1ed394 Maxime Ripard 2020-12-04  429  			drm_crtc_commit_get(crtc_state->commit);
9ec03d7f1ed394 Maxime Ripard 2020-12-04  430  	}
9ec03d7f1ed394 Maxime Ripard 2020-12-04  431  
9ec03d7f1ed394 Maxime Ripard 2020-12-04  432  	return 0;
9ec03d7f1ed394 Maxime Ripard 2020-12-04  433  }
9ec03d7f1ed394 Maxime Ripard 2020-12-04  434  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-23 22:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-23 22:59 drivers/gpu/drm/vc4/vc4_kms.c:414 vc4_atomic_commit_setup() warn: passing zero to 'PTR_ERR' kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-01-23  4:58 kernel test robot

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.