Commit dbc7ece1 authored by Jason Yan's avatar Jason Yan Committed by Sam Ravnborg

video: uvesafb: use true,false for bool variables

Fix the following coccicheck warning:

drivers/video/fbdev/uvesafb.c:48:12-17: WARNING: Assignment of 0/1 to
bool variable
drivers/video/fbdev/uvesafb.c:1827:3-13: WARNING: Assignment of 0/1 to
bool variable
drivers/video/fbdev/uvesafb.c:1829:3-13: WARNING: Assignment of 0/1 to
bool variable
drivers/video/fbdev/uvesafb.c:1835:3-9: WARNING: Assignment of 0/1 to
bool variable
drivers/video/fbdev/uvesafb.c:1837:3-9: WARNING: Assignment of 0/1 to
bool variable
drivers/video/fbdev/uvesafb.c:1839:3-8: WARNING: Assignment of 0/1 to
bool variable
Signed-off-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200422071845.403-1-yanaijie@huawei.com
parent 7022537b
...@@ -45,7 +45,7 @@ static const struct fb_fix_screeninfo uvesafb_fix = { ...@@ -45,7 +45,7 @@ static const struct fb_fix_screeninfo uvesafb_fix = {
}; };
static int mtrr = 3; /* enable mtrr by default */ static int mtrr = 3; /* enable mtrr by default */
static bool blank = 1; /* enable blanking by default */ static bool blank = true; /* enable blanking by default */
static int ypan = 1; /* 0: scroll, 1: ypan, 2: ywrap */ static int ypan = 1; /* 0: scroll, 1: ypan, 2: ywrap */
static bool pmi_setpal = true; /* use PMI for palette changes */ static bool pmi_setpal = true; /* use PMI for palette changes */
static bool nocrtc; /* ignore CRTC settings */ static bool nocrtc; /* ignore CRTC settings */
...@@ -1824,19 +1824,19 @@ static int uvesafb_setup(char *options) ...@@ -1824,19 +1824,19 @@ static int uvesafb_setup(char *options)
else if (!strcmp(this_opt, "ywrap")) else if (!strcmp(this_opt, "ywrap"))
ypan = 2; ypan = 2;
else if (!strcmp(this_opt, "vgapal")) else if (!strcmp(this_opt, "vgapal"))
pmi_setpal = 0; pmi_setpal = false;
else if (!strcmp(this_opt, "pmipal")) else if (!strcmp(this_opt, "pmipal"))
pmi_setpal = 1; pmi_setpal = true;
else if (!strncmp(this_opt, "mtrr:", 5)) else if (!strncmp(this_opt, "mtrr:", 5))
mtrr = simple_strtoul(this_opt+5, NULL, 0); mtrr = simple_strtoul(this_opt+5, NULL, 0);
else if (!strcmp(this_opt, "nomtrr")) else if (!strcmp(this_opt, "nomtrr"))
mtrr = 0; mtrr = 0;
else if (!strcmp(this_opt, "nocrtc")) else if (!strcmp(this_opt, "nocrtc"))
nocrtc = 1; nocrtc = true;
else if (!strcmp(this_opt, "noedid")) else if (!strcmp(this_opt, "noedid"))
noedid = 1; noedid = true;
else if (!strcmp(this_opt, "noblank")) else if (!strcmp(this_opt, "noblank"))
blank = 0; blank = true;
else if (!strncmp(this_opt, "vtotal:", 7)) else if (!strncmp(this_opt, "vtotal:", 7))
vram_total = simple_strtoul(this_opt + 7, NULL, 0); vram_total = simple_strtoul(this_opt + 7, NULL, 0);
else if (!strncmp(this_opt, "vremap:", 7)) else if (!strncmp(this_opt, "vremap:", 7))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment