All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: maarten.lankhorst@linux.intel.com
Cc: dri-devel@lists.freedesktop.org
Subject: re: drm/atomic: add commit_planes_on_crtc helper
Date: Wed, 20 May 2015 22:43:55 +0300	[thread overview]
Message-ID: <20150520194354.GA678@mwanda> (raw)

Hello Maarten Lankhorst,

This is a semi-automatic email about new static checker warnings.

The patch 32975e952e85: "drm/atomic: add commit_planes_on_crtc 
helper" from May 19, 2015, leads to the following Smatch complaint:

drivers/gpu/drm/drm_atomic_helper.c:1244 drm_atomic_helper_commit_planes_on_crtc()
	 error: we previously assumed 'crtc_funcs' could be null (see line 1221)

drivers/gpu/drm/drm_atomic_helper.c
  1220		crtc_funcs = crtc->helper_private;
  1221		if (crtc_funcs && crtc_funcs->atomic_begin)
                    ^^^^^^^^^^
Check.

  1222			crtc_funcs->atomic_begin(crtc);
  1223	
  1224		drm_for_each_plane_mask(plane, crtc->dev, plane_mask) {
  1225			struct drm_plane_state *old_plane_state =
  1226				drm_atomic_get_existing_plane_state(old_state, plane);
  1227			const struct drm_plane_helper_funcs *plane_funcs;
  1228	
  1229			plane_funcs = plane->helper_private;
  1230	
  1231			if (!old_plane_state || !plane_funcs)
  1232				continue;
  1233	
  1234			WARN_ON(plane->state->crtc && plane->state->crtc != crtc);
  1235	
  1236			if (drm_atomic_plane_disabling(plane, old_plane_state) &&
  1237			    plane_funcs->atomic_disable)
  1238				plane_funcs->atomic_disable(plane, old_plane_state);
  1239			else if (plane->state->crtc ||
  1240				 drm_atomic_plane_disabling(plane, old_plane_state))
  1241				plane_funcs->atomic_update(plane, old_plane_state);
  1242		}
  1243	
  1244		if (crtc_funcs->atomic_flush)
                    ^^^^^^^^^^
Unchecked dereference.

  1245			crtc_funcs->atomic_flush(crtc);
  1246	}

regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2015-05-20 19:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20 19:43 Dan Carpenter [this message]
2015-05-21  8:29 ` drm/atomic: add commit_planes_on_crtc helper Daniel Vetter

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=20150520194354.GA678@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.com \
    /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.