* Re: [PATCH] drivers/video/fbdev:modify 0 to NULL
2021-03-18 2:33 ` ChunyouTang
@ 2021-03-18 1:41 ` Gustavo A. R. Silva
-1 siblings, 0 replies; 10+ messages in thread
From: Gustavo A. R. Silva @ 2021-03-18 1:41 UTC (permalink / raw)
To: ChunyouTang, gustavoars, sam
Cc: dri-devel, linux-fbdev, linux-kernel, tangchunyou
On 3/17/21 21:33, ChunyouTang wrote:
> From: tangchunyou <tangchunyou@yulong.com>
>
> modify 0 to NULL,info is a pointer,it should be
>
> compared with NULL,not 0
>
> Signed-off-by: tangchunyou <tangchunyou@yulong.com>
> ---
> drivers/video/fbdev/offb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c
> index 4501e84..cd1042f 100644
> --- a/drivers/video/fbdev/offb.c
> +++ b/drivers/video/fbdev/offb.c
> @@ -412,7 +412,7 @@ static void __init offb_init_fb(const char *name,
>
> info = framebuffer_alloc(sizeof(u32) * 16, NULL);
>
> - if (info == 0) {
> + if (info == NULL) {
if (!info) is better.
--
Gustavo
> release_mem_region(res_start, res_size);
> return;
> }
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drivers/video/fbdev:modify 0 to NULL
@ 2021-03-18 1:41 ` Gustavo A. R. Silva
0 siblings, 0 replies; 10+ messages in thread
From: Gustavo A. R. Silva @ 2021-03-18 1:41 UTC (permalink / raw)
To: ChunyouTang, gustavoars, sam
Cc: linux-fbdev, tangchunyou, linux-kernel, dri-devel
On 3/17/21 21:33, ChunyouTang wrote:
> From: tangchunyou <tangchunyou@yulong.com>
>
> modify 0 to NULL,info is a pointer,it should be
>
> compared with NULL,not 0
>
> Signed-off-by: tangchunyou <tangchunyou@yulong.com>
> ---
> drivers/video/fbdev/offb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c
> index 4501e84..cd1042f 100644
> --- a/drivers/video/fbdev/offb.c
> +++ b/drivers/video/fbdev/offb.c
> @@ -412,7 +412,7 @@ static void __init offb_init_fb(const char *name,
>
> info = framebuffer_alloc(sizeof(u32) * 16, NULL);
>
> - if (info == 0) {
> + if (info == NULL) {
if (!info) is better.
--
Gustavo
> release_mem_region(res_start, res_size);
> return;
> }
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drivers/video/fbdev:modify 0 to NULL
2021-03-18 2:47 ` Chunyou Tang
@ 2021-03-18 1:54 ` Gustavo A. R. Silva
-1 siblings, 0 replies; 10+ messages in thread
From: Gustavo A. R. Silva @ 2021-03-18 1:54 UTC (permalink / raw)
To: Chunyou Tang
Cc: gustavoars, sam, dri-devel, linux-fbdev, linux-kernel, tangchunyou
On 3/17/21 21:47, Chunyou Tang wrote:
> I think "if (info == NULL)" is more intuitive,and there have many
> compare likes "if (info == NULL)" in this file.
In that case, all those instances should be changed to if (!foo), instead.
--
Gustavo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drivers/video/fbdev:modify 0 to NULL
@ 2021-03-18 1:54 ` Gustavo A. R. Silva
0 siblings, 0 replies; 10+ messages in thread
From: Gustavo A. R. Silva @ 2021-03-18 1:54 UTC (permalink / raw)
To: Chunyou Tang
Cc: linux-fbdev, sam, gustavoars, dri-devel, linux-kernel, tangchunyou
On 3/17/21 21:47, Chunyou Tang wrote:
> I think "if (info == NULL)" is more intuitive,and there have many
> compare likes "if (info == NULL)" in this file.
In that case, all those instances should be changed to if (!foo), instead.
--
Gustavo
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] drivers/video/fbdev:modify 0 to NULL
@ 2021-03-18 2:33 ` ChunyouTang
0 siblings, 0 replies; 10+ messages in thread
From: ChunyouTang @ 2021-03-18 2:33 UTC (permalink / raw)
To: gustavoars, sam; +Cc: dri-devel, linux-fbdev, linux-kernel, tangchunyou
From: tangchunyou <tangchunyou@yulong.com>
modify 0 to NULL,info is a pointer,it should be
compared with NULL,not 0
Signed-off-by: tangchunyou <tangchunyou@yulong.com>
---
drivers/video/fbdev/offb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c
index 4501e84..cd1042f 100644
--- a/drivers/video/fbdev/offb.c
+++ b/drivers/video/fbdev/offb.c
@@ -412,7 +412,7 @@ static void __init offb_init_fb(const char *name,
info = framebuffer_alloc(sizeof(u32) * 16, NULL);
- if (info == 0) {
+ if (info == NULL) {
release_mem_region(res_start, res_size);
return;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] drivers/video/fbdev:modify 0 to NULL
@ 2021-03-18 2:33 ` ChunyouTang
0 siblings, 0 replies; 10+ messages in thread
From: ChunyouTang @ 2021-03-18 2:33 UTC (permalink / raw)
To: gustavoars, sam; +Cc: linux-fbdev, tangchunyou, linux-kernel, dri-devel
From: tangchunyou <tangchunyou@yulong.com>
modify 0 to NULL,info is a pointer,it should be
compared with NULL,not 0
Signed-off-by: tangchunyou <tangchunyou@yulong.com>
---
drivers/video/fbdev/offb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c
index 4501e84..cd1042f 100644
--- a/drivers/video/fbdev/offb.c
+++ b/drivers/video/fbdev/offb.c
@@ -412,7 +412,7 @@ static void __init offb_init_fb(const char *name,
info = framebuffer_alloc(sizeof(u32) * 16, NULL);
- if (info == 0) {
+ if (info == NULL) {
release_mem_region(res_start, res_size);
return;
}
--
1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] drivers/video/fbdev:modify 0 to NULL
2021-03-18 1:41 ` Gustavo A. R. Silva
@ 2021-03-18 2:47 ` Chunyou Tang
-1 siblings, 0 replies; 10+ messages in thread
From: Chunyou Tang @ 2021-03-18 2:47 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: gustavoars, sam, dri-devel, linux-fbdev, linux-kernel, tangchunyou
HI,Gustavo
On Wed, 17 Mar 2021 20:41:15 -0500
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
> On 3/17/21 21:33, ChunyouTang wrote:
> > From: tangchunyou <tangchunyou@yulong.com>
> >
> > modify 0 to NULL,info is a pointer,it should be
> >
> > compared with NULL,not 0
> >
> > Signed-off-by: tangchunyou <tangchunyou@yulong.com>
> > ---
> > drivers/video/fbdev/offb.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c
> > index 4501e84..cd1042f 100644
> > --- a/drivers/video/fbdev/offb.c
> > +++ b/drivers/video/fbdev/offb.c
> > @@ -412,7 +412,7 @@ static void __init offb_init_fb(const char
> > *name,
> > info = framebuffer_alloc(sizeof(u32) * 16, NULL);
> >
> > - if (info == 0) {
> > + if (info == NULL) {
>
> if (!info) is better.
>
> --
> Gustavo
>
> > release_mem_region(res_start, res_size);
> > return;
> > }
> >
I think "if (info == NULL)" is more intuitive,and there have many
compare likes "if (info == NULL)" in this file.
--
ChunyouTang
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drivers/video/fbdev:modify 0 to NULL
@ 2021-03-18 2:47 ` Chunyou Tang
0 siblings, 0 replies; 10+ messages in thread
From: Chunyou Tang @ 2021-03-18 2:47 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: linux-fbdev, sam, gustavoars, dri-devel, linux-kernel, tangchunyou
HI,Gustavo
On Wed, 17 Mar 2021 20:41:15 -0500
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
> On 3/17/21 21:33, ChunyouTang wrote:
> > From: tangchunyou <tangchunyou@yulong.com>
> >
> > modify 0 to NULL,info is a pointer,it should be
> >
> > compared with NULL,not 0
> >
> > Signed-off-by: tangchunyou <tangchunyou@yulong.com>
> > ---
> > drivers/video/fbdev/offb.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c
> > index 4501e84..cd1042f 100644
> > --- a/drivers/video/fbdev/offb.c
> > +++ b/drivers/video/fbdev/offb.c
> > @@ -412,7 +412,7 @@ static void __init offb_init_fb(const char
> > *name,
> > info = framebuffer_alloc(sizeof(u32) * 16, NULL);
> >
> > - if (info == 0) {
> > + if (info == NULL) {
>
> if (!info) is better.
>
> --
> Gustavo
>
> > release_mem_region(res_start, res_size);
> > return;
> > }
> >
I think "if (info == NULL)" is more intuitive,and there have many
compare likes "if (info == NULL)" in this file.
--
ChunyouTang
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drivers/video/fbdev:modify 0 to NULL
2021-03-18 1:54 ` Gustavo A. R. Silva
@ 2021-03-18 2:56 ` Chunyou Tang
-1 siblings, 0 replies; 10+ messages in thread
From: Chunyou Tang @ 2021-03-18 2:56 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: gustavoars, sam, dri-devel, linux-fbdev, linux-kernel, tangchunyou
Hi,Gustavo
On Wed, 17 Mar 2021 20:54:41 -0500
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
> On 3/17/21 21:47, Chunyou Tang wrote:
>
> > I think "if (info == NULL)" is more intuitive,and there have many
> > compare likes "if (info == NULL)" in this file.
>
> In that case, all those instances should be changed to if (!foo),
> instead.
>
> --
> Gustavo
OK,I change it.
--
ChunyouTang
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drivers/video/fbdev:modify 0 to NULL
@ 2021-03-18 2:56 ` Chunyou Tang
0 siblings, 0 replies; 10+ messages in thread
From: Chunyou Tang @ 2021-03-18 2:56 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: linux-fbdev, sam, gustavoars, dri-devel, linux-kernel, tangchunyou
Hi,Gustavo
On Wed, 17 Mar 2021 20:54:41 -0500
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
> On 3/17/21 21:47, Chunyou Tang wrote:
>
> > I think "if (info == NULL)" is more intuitive,and there have many
> > compare likes "if (info == NULL)" in this file.
>
> In that case, all those instances should be changed to if (!foo),
> instead.
>
> --
> Gustavo
OK,I change it.
--
ChunyouTang
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-03-18 3:18 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-18 2:33 [PATCH] drivers/video/fbdev:modify 0 to NULL ChunyouTang
2021-03-18 2:33 ` ChunyouTang
2021-03-18 1:41 ` Gustavo A. R. Silva
2021-03-18 1:41 ` Gustavo A. R. Silva
2021-03-18 2:47 ` Chunyou Tang
2021-03-18 2:47 ` Chunyou Tang
2021-03-18 1:54 ` Gustavo A. R. Silva
2021-03-18 1:54 ` Gustavo A. R. Silva
2021-03-18 2:56 ` Chunyou Tang
2021-03-18 2:56 ` Chunyou Tang
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.