Skip to contentSkip to conversation

drm/fb-helper: Return correct type to match drm_fb_helper_debug_enter() prototype

PATCH In review Liu Ying 3 participants 3 messages Jun 19, 2014

Subsystems (2)
lore
Share & tools
lore

Liu Ying

author
#0 lore raw

PATCH 1/1 drm/fb-helper: Return correct type to match drm_fb_helper_debug_enter() prototype

The return type of drm_fb_helper_debug_enter() is int, so we should return '0' instead of 'false'.

---
 drivers/gpu/drm/drm_fb_helper.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_fb_helper.c +1 -1
index d5d8cea..8daa4ad 100644
@@ -200,7 +200,7 @@ int drm_fb_helper_debug_enter(struct fb_info *info)
 	int i;
 
 	if (list_empty(&kernel_fb_helper_list))
-		return false;
+		return 0;
 
 	list_for_each_entry(helper, &kernel_fb_helper_list, kernel_fb_list) {
 		for (i = 0; i < helper->crtc_count; i++) {
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 13 lines · Liu Ying

The return type of drm_fb_helper_debug_enter() is int, so we should return '0' instead of 'false'.

---
 drivers/gpu/drm/drm_fb_helper.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_fb_helper.c +0 -0
index d5d8cea..8daa4ad 100644

drivers/gpu/drm/drm_fb_helper.c int drm_fb_helper_debug_enter(struct fb_info *info) · line 203

Quoted 5 lines
drivers/gpu/drm/drm_fb_helper.c +1 -1
@@ -200,7 +200,7 @@ int drm_fb_helper_debug_enter(struct fb_info *info)
 	int i;
 
 	if (list_empty(&kernel_fb_helper_list))
-		return false;
+		return 0;

Actually we can remove the entire if check since list_for_each_entry is a no-op on an empty list, and then we'll fall right through to the return 0; at the end of the function. Care to respin your patch?
-Daniel

Quoted 10 lines
drivers/gpu/drm/drm_fb_helper.c +0 -0
 	list_for_each_entry(helper, &kernel_fb_helper_list, kernel_fb_list) {
 		for (i = 0; i < helper->crtc_count; i++) {
Signature · 6 lines
1.7.9.5

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#2 lore raw
Quoted 16 lines · Daniel Vetter
Quoted 15 lines · Liu Ying

The return type of drm_fb_helper_debug_enter() is int, so we should return '0' instead of 'false'.

---
  drivers/gpu/drm/drm_fb_helper.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_fb_helper.c +0 -0
index d5d8cea..8daa4ad 100644
@@ -200,7 +200,7 @@ int drm_fb_helper_debug_enter(struct fb_info *info)
  	int i;
 
Quoted 8 lines

drivers/gpu/drm/drm_fb_helper.c int drm_fb_helper_debug_enter(struct fb_info *info) · line 203

Quoted 3 lines
drivers/gpu/drm/drm_fb_helper.c +1 -1
  	if (list_empty(&kernel_fb_helper_list))
-		return false;
+		return 0;

Actually we can remove the entire if check since list_for_each_entry is a no-op on an empty list, and then we'll fall right through to the return 0; at the end of the function. Care to respin your patch?
-Daniel

Ok, I will respin my patch. Thanks.

Liu Ying

Quoted 12 lines
Quoted 11 lines
drivers/gpu/drm/drm_fb_helper.c +0 -1
  	list_for_each_entry(helper, &kernel_fb_helper_list, kernel_fb_list) {
  		for (i = 0; i < helper->crtc_count; i++) {
--

1.7.9.5

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel