* [PATCH] video: uvesafb: use true,false for bool variables @ 2020-04-22 7:18 ` Jason Yan 2020-06-01 10:37 ` Bartlomiej Zolnierkiewicz 2020-06-09 9:29 ` [PATCH v2] video: fbdev: uvesafb: fix "noblank" option handling Bartlomiej Zolnierkiewicz 0 siblings, 2 replies; 5+ messages in thread From: Jason Yan @ 2020-04-22 7:18 UTC (permalink / raw) To: spock, b.zolnierkie, linux-fbdev, dri-devel, linux-kernel; +Cc: Jason Yan 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: Jason Yan <yanaijie@huawei.com> --- drivers/video/fbdev/uvesafb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c index 1b385cf76110..bee29aadc646 100644 --- a/drivers/video/fbdev/uvesafb.c +++ b/drivers/video/fbdev/uvesafb.c @@ -45,7 +45,7 @@ static const struct fb_fix_screeninfo uvesafb_fix = { }; 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 bool pmi_setpal = true; /* use PMI for palette changes */ static bool nocrtc; /* ignore CRTC settings */ @@ -1824,19 +1824,19 @@ static int uvesafb_setup(char *options) else if (!strcmp(this_opt, "ywrap")) ypan = 2; else if (!strcmp(this_opt, "vgapal")) - pmi_setpal = 0; + pmi_setpal = false; else if (!strcmp(this_opt, "pmipal")) - pmi_setpal = 1; + pmi_setpal = true; else if (!strncmp(this_opt, "mtrr:", 5)) mtrr = simple_strtoul(this_opt+5, NULL, 0); else if (!strcmp(this_opt, "nomtrr")) mtrr = 0; else if (!strcmp(this_opt, "nocrtc")) - nocrtc = 1; + nocrtc = true; else if (!strcmp(this_opt, "noedid")) - noedid = 1; + noedid = true; else if (!strcmp(this_opt, "noblank")) - blank = 0; + blank = true; else if (!strncmp(this_opt, "vtotal:", 7)) vram_total = simple_strtoul(this_opt + 7, NULL, 0); else if (!strncmp(this_opt, "vremap:", 7)) -- 2.21.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] video: uvesafb: use true,false for bool variables 2020-04-22 7:18 ` [PATCH] video: uvesafb: use true,false for bool variables Jason Yan @ 2020-06-01 10:37 ` Bartlomiej Zolnierkiewicz 2020-06-02 20:50 ` Sam Ravnborg 2020-06-09 9:29 ` [PATCH v2] video: fbdev: uvesafb: fix "noblank" option handling Bartlomiej Zolnierkiewicz 1 sibling, 1 reply; 5+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2020-06-01 10:37 UTC (permalink / raw) To: Jason Yan, Sam Ravnborg; +Cc: spock, linux-fbdev, dri-devel, linux-kernel Hi, On 4/22/20 9:18 AM, Jason Yan wrote: > 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: Jason Yan <yanaijie@huawei.com> > --- > drivers/video/fbdev/uvesafb.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c > index 1b385cf76110..bee29aadc646 100644 > --- a/drivers/video/fbdev/uvesafb.c > +++ b/drivers/video/fbdev/uvesafb.c > @@ -45,7 +45,7 @@ static const struct fb_fix_screeninfo uvesafb_fix = { > }; > > 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 bool pmi_setpal = true; /* use PMI for palette changes */ > static bool nocrtc; /* ignore CRTC settings */ > @@ -1824,19 +1824,19 @@ static int uvesafb_setup(char *options) > else if (!strcmp(this_opt, "ywrap")) > ypan = 2; > else if (!strcmp(this_opt, "vgapal")) > - pmi_setpal = 0; > + pmi_setpal = false; > else if (!strcmp(this_opt, "pmipal")) > - pmi_setpal = 1; > + pmi_setpal = true; > else if (!strncmp(this_opt, "mtrr:", 5)) > mtrr = simple_strtoul(this_opt+5, NULL, 0); > else if (!strcmp(this_opt, "nomtrr")) > mtrr = 0; > else if (!strcmp(this_opt, "nocrtc")) > - nocrtc = 1; > + nocrtc = true; > else if (!strcmp(this_opt, "noedid")) > - noedid = 1; > + noedid = true; > else if (!strcmp(this_opt, "noblank")) > - blank = 0; > + blank = true; The above conversion is incorrect. The follow-up fix is included below (the original patch has been already applied). Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Subject: [PATCH] video: fbdev: uvesafb: fix "noblank" option handling Fix the recent regression. Fixes: dbc7ece12a38 ("video: uvesafb: use true,false for bool variables") Cc: Jason Yan <yanaijie@huawei.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Michal Januszewski <spock@gentoo.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> --- drivers/video/fbdev/uvesafb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: b/drivers/video/fbdev/uvesafb.c =================================================================== --- a/drivers/video/fbdev/uvesafb.c +++ b/drivers/video/fbdev/uvesafb.c @@ -1836,7 +1836,7 @@ static int uvesafb_setup(char *options) else if (!strcmp(this_opt, "noedid")) noedid = true; else if (!strcmp(this_opt, "noblank")) - blank = true; + blank = false; else if (!strncmp(this_opt, "vtotal:", 7)) vram_total = simple_strtoul(this_opt + 7, NULL, 0); else if (!strncmp(this_opt, "vremap:", 7)) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] video: uvesafb: use true,false for bool variables 2020-06-01 10:37 ` Bartlomiej Zolnierkiewicz @ 2020-06-02 20:50 ` Sam Ravnborg 0 siblings, 0 replies; 5+ messages in thread From: Sam Ravnborg @ 2020-06-02 20:50 UTC (permalink / raw) To: Bartlomiej Zolnierkiewicz Cc: Jason Yan, spock, linux-fbdev, dri-devel, linux-kernel Hi Bartlomiej On Mon, Jun 01, 2020 at 12:37:00PM +0200, Bartlomiej Zolnierkiewicz wrote: > > Hi, > > On 4/22/20 9:18 AM, Jason Yan wrote: > > 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: Jason Yan <yanaijie@huawei.com> > > --- > > drivers/video/fbdev/uvesafb.c | 12 ++++++------ > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c > > index 1b385cf76110..bee29aadc646 100644 > > --- a/drivers/video/fbdev/uvesafb.c > > +++ b/drivers/video/fbdev/uvesafb.c > > @@ -45,7 +45,7 @@ static const struct fb_fix_screeninfo uvesafb_fix = { > > }; > > > > 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 bool pmi_setpal = true; /* use PMI for palette changes */ > > static bool nocrtc; /* ignore CRTC settings */ > > @@ -1824,19 +1824,19 @@ static int uvesafb_setup(char *options) > > else if (!strcmp(this_opt, "ywrap")) > > ypan = 2; > > else if (!strcmp(this_opt, "vgapal")) > > - pmi_setpal = 0; > > + pmi_setpal = false; > > else if (!strcmp(this_opt, "pmipal")) > > - pmi_setpal = 1; > > + pmi_setpal = true; > > else if (!strncmp(this_opt, "mtrr:", 5)) > > mtrr = simple_strtoul(this_opt+5, NULL, 0); > > else if (!strcmp(this_opt, "nomtrr")) > > mtrr = 0; > > else if (!strcmp(this_opt, "nocrtc")) > > - nocrtc = 1; > > + nocrtc = true; > > else if (!strcmp(this_opt, "noedid")) > > - noedid = 1; > > + noedid = true; > > else if (!strcmp(this_opt, "noblank")) > > - blank = 0; > > + blank = true; > > The above conversion is incorrect. > > The follow-up fix is included below (the original patch has been > already applied). Good spot, sorry for missing this when I applied the original patch. > > Best regards, > -- > Bartlomiej Zolnierkiewicz > Samsung R&D Institute Poland > Samsung Electronics > > > From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> > Subject: [PATCH] video: fbdev: uvesafb: fix "noblank" option handling > > Fix the recent regression. > > Fixes: dbc7ece12a38 ("video: uvesafb: use true,false for bool variables") > Cc: Jason Yan <yanaijie@huawei.com> > Cc: Sam Ravnborg <sam@ravnborg.org> > Cc: Michal Januszewski <spock@gentoo.org> > Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> > --- > drivers/video/fbdev/uvesafb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: b/drivers/video/fbdev/uvesafb.c > =================================================================== > --- a/drivers/video/fbdev/uvesafb.c > +++ b/drivers/video/fbdev/uvesafb.c > @@ -1836,7 +1836,7 @@ static int uvesafb_setup(char *options) > else if (!strcmp(this_opt, "noedid")) > noedid = true; > else if (!strcmp(this_opt, "noblank")) > - blank = true; > + blank = false; > else if (!strncmp(this_opt, "vtotal:", 7)) > vram_total = simple_strtoul(this_opt + 7, NULL, 0); > else if (!strncmp(this_opt, "vremap:", 7)) ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] video: fbdev: uvesafb: fix "noblank" option handling 2020-04-22 7:18 ` [PATCH] video: uvesafb: use true,false for bool variables Jason Yan 2020-06-01 10:37 ` Bartlomiej Zolnierkiewicz @ 2020-06-09 9:29 ` Bartlomiej Zolnierkiewicz 2020-06-21 8:13 ` Sam Ravnborg 1 sibling, 1 reply; 5+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2020-06-09 9:29 UTC (permalink / raw) To: linux-fbdev, dri-devel; +Cc: Jason Yan, Sam Ravnborg, linux-kernel Fix the recent regression. Fixes: dbc7ece12a38 ("video: uvesafb: use true,false for bool variables") Cc: Jason Yan <yanaijie@huawei.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> --- v2: - added Reviewed-by tag from Sam - removed no longer working Michal's email address from Cc: drivers/video/fbdev/uvesafb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: b/drivers/video/fbdev/uvesafb.c =================================================================== --- a/drivers/video/fbdev/uvesafb.c +++ b/drivers/video/fbdev/uvesafb.c @@ -1836,7 +1836,7 @@ static int uvesafb_setup(char *options) else if (!strcmp(this_opt, "noedid")) noedid = true; else if (!strcmp(this_opt, "noblank")) - blank = true; + blank = false; else if (!strncmp(this_opt, "vtotal:", 7)) vram_total = simple_strtoul(this_opt + 7, NULL, 0); else if (!strncmp(this_opt, "vremap:", 7)) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] video: fbdev: uvesafb: fix "noblank" option handling 2020-06-09 9:29 ` [PATCH v2] video: fbdev: uvesafb: fix "noblank" option handling Bartlomiej Zolnierkiewicz @ 2020-06-21 8:13 ` Sam Ravnborg 0 siblings, 0 replies; 5+ messages in thread From: Sam Ravnborg @ 2020-06-21 8:13 UTC (permalink / raw) To: Bartlomiej Zolnierkiewicz; +Cc: linux-fbdev, dri-devel, linux-kernel, Jason Yan On Tue, Jun 09, 2020 at 11:29:43AM +0200, Bartlomiej Zolnierkiewicz wrote: > Fix the recent regression. > > Fixes: dbc7ece12a38 ("video: uvesafb: use true,false for bool variables") > Cc: Jason Yan <yanaijie@huawei.com> > Reviewed-by: Sam Ravnborg <sam@ravnborg.org> > Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Hi Bartlomiej I was processing drm-misc-fixes patches so I went ahead and applied this. Thanks for fixing this up. Sam > --- > v2: > - added Reviewed-by tag from Sam > - removed no longer working Michal's email address from Cc: > > drivers/video/fbdev/uvesafb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: b/drivers/video/fbdev/uvesafb.c > =================================================================== > --- a/drivers/video/fbdev/uvesafb.c > +++ b/drivers/video/fbdev/uvesafb.c > @@ -1836,7 +1836,7 @@ static int uvesafb_setup(char *options) > else if (!strcmp(this_opt, "noedid")) > noedid = true; > else if (!strcmp(this_opt, "noblank")) > - blank = true; > + blank = false; > else if (!strncmp(this_opt, "vtotal:", 7)) > vram_total = simple_strtoul(this_opt + 7, NULL, 0); > else if (!strncmp(this_opt, "vremap:", 7)) > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-06-21 8:13 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20200422071952eucas1p219bc9ef0a74220149966ecb03688681c@eucas1p2.samsung.com> 2020-04-22 7:18 ` [PATCH] video: uvesafb: use true,false for bool variables Jason Yan 2020-06-01 10:37 ` Bartlomiej Zolnierkiewicz 2020-06-02 20:50 ` Sam Ravnborg 2020-06-09 9:29 ` [PATCH v2] video: fbdev: uvesafb: fix "noblank" option handling Bartlomiej Zolnierkiewicz 2020-06-21 8:13 ` Sam Ravnborg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).