All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/fb-helper: Remove unnecessary list empty check in drm_fb_helper_debug_enter()
@ 2014-06-19  8:01 Liu Ying
  2014-06-19  8:14 ` Daniel Vetter
  0 siblings, 1 reply; 2+ messages in thread
From: Liu Ying @ 2014-06-19  8:01 UTC (permalink / raw)
  To: dri-devel

The following list empty check is unnecessary because we would still do nothing
real and return 'val' if my_list is empty.

if (list_empty(&my_list))
	return val;

list_for_each_entry(pos, &my_list, member) {
	...
}

return val;

This patch removes the unnecessary check in drm_fb_helper_debug_enter().

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
---
 drivers/gpu/drm/drm_fb_helper.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index d5d8cea..eb77a2f 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -199,9 +199,6 @@ int drm_fb_helper_debug_enter(struct fb_info *info)
 	struct drm_crtc_helper_funcs *funcs;
 	int i;
 
-	if (list_empty(&kernel_fb_helper_list))
-		return false;
-
 	list_for_each_entry(helper, &kernel_fb_helper_list, kernel_fb_list) {
 		for (i = 0; i < helper->crtc_count; i++) {
 			struct drm_mode_set *mode_set =
-- 
1.7.9.5

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

end of thread, other threads:[~2014-06-19  8:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-19  8:01 [PATCH] drm/fb-helper: Remove unnecessary list empty check in drm_fb_helper_debug_enter() Liu Ying
2014-06-19  8:14 ` Daniel Vetter

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.