Skip to content

Commit fbd2a60

Browse files
Jing Yangyangalexdeucher
authored andcommitted
drm:dcn31: fix boolreturn.cocci warnings
./drivers/gpu/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c:112:9-10:WARNING: return of 0/1 in function 'dcn31_is_panel_backlight_on' with return type bool ./drivers/gpu/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c:122:9-10:WARNING: return of 0/1 in function 'dcn31_is_panel_powered_on' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci Reported-by: Zeal Robot <[email protected]> Signed-off-by: Jing Yangyang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 8f0284f commit fbd2a60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ bool dcn31_is_panel_backlight_on(struct panel_cntl *panel_cntl)
109109
union dmub_rb_cmd cmd;
110110

111111
if (!dcn31_query_backlight_info(panel_cntl, &cmd))
112-
return 0;
112+
return false;
113113

114114
return cmd.panel_cntl.data.is_backlight_on;
115115
}
@@ -119,7 +119,7 @@ bool dcn31_is_panel_powered_on(struct panel_cntl *panel_cntl)
119119
union dmub_rb_cmd cmd;
120120

121121
if (!dcn31_query_backlight_info(panel_cntl, &cmd))
122-
return 0;
122+
return false;
123123

124124
return cmd.panel_cntl.data.is_powered_on;
125125
}

0 commit comments

Comments
 (0)