mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/nouveau: use NULL for pointer assignment.
@ 2019-12-31 20:57 Wambui Karuga
  2020-01-01 18:51 ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Wambui Karuga @ 2019-12-31 20:57 UTC (permalink / raw)
  To: bskeggs, airlied, daniel, dri-devel, nouveau, linux-kernel

Replace the use of 0 in the pointer assignment with NULL to address the
following sparse warning:
drivers/gpu/drm/nouveau/nouveau_hwmon.c:744:29: warning: Using plain integer as NULL pointer

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
 drivers/gpu/drm/nouveau/nouveau_hwmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
index d445c6f3fece..1c3104d20571 100644
--- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
@@ -741,7 +741,7 @@ nouveau_hwmon_init(struct drm_device *dev)
 			special_groups[i++] = &pwm_fan_sensor_group;
 	}
 
-	special_groups[i] = 0;
+	special_groups[i] = NULL;
 	hwmon_dev = hwmon_device_register_with_info(dev->dev, "nouveau", dev,
 							&nouveau_chip_info,
 							special_groups);
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/nouveau: use NULL for pointer assignment.
  2019-12-31 20:57 [PATCH] drm/nouveau: use NULL for pointer assignment Wambui Karuga
@ 2020-01-01 18:51 ` Daniel Vetter
  2020-01-05 22:08   ` [Nouveau] " Ben Skeggs
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2020-01-01 18:51 UTC (permalink / raw)
  To: Wambui Karuga; +Cc: bskeggs, airlied, daniel, dri-devel, nouveau, linux-kernel

On Tue, Dec 31, 2019 at 11:57:34PM +0300, Wambui Karuga wrote:
> Replace the use of 0 in the pointer assignment with NULL to address the
> following sparse warning:
> drivers/gpu/drm/nouveau/nouveau_hwmon.c:744:29: warning: Using plain integer as NULL pointer
> 
> Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

I'll check with Ben next week or so whether he wants to pick these up or
whether I should stuff them into drm-misc-next.
-Daniel

> ---
>  drivers/gpu/drm/nouveau/nouveau_hwmon.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> index d445c6f3fece..1c3104d20571 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> @@ -741,7 +741,7 @@ nouveau_hwmon_init(struct drm_device *dev)
>  			special_groups[i++] = &pwm_fan_sensor_group;
>  	}
>  
> -	special_groups[i] = 0;
> +	special_groups[i] = NULL;
>  	hwmon_dev = hwmon_device_register_with_info(dev->dev, "nouveau", dev,
>  							&nouveau_chip_info,
>  							special_groups);
> -- 
> 2.17.1
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Nouveau] [PATCH] drm/nouveau: use NULL for pointer assignment.
  2020-01-01 18:51 ` Daniel Vetter
@ 2020-01-05 22:08   ` Ben Skeggs
  0 siblings, 0 replies; 3+ messages in thread
From: Ben Skeggs @ 2020-01-05 22:08 UTC (permalink / raw)
  To: Wambui Karuga, Ben Skeggs, Dave Airlie, ML dri-devel, ML nouveau, LKML
  Cc: Daniel Vetter

On Thu, 2 Jan 2020 at 04:51, Daniel Vetter <daniel@ffwll.ch> wrote:
>
> On Tue, Dec 31, 2019 at 11:57:34PM +0300, Wambui Karuga wrote:
> > Replace the use of 0 in the pointer assignment with NULL to address the
> > following sparse warning:
> > drivers/gpu/drm/nouveau/nouveau_hwmon.c:744:29: warning: Using plain integer as NULL pointer
> >
> > Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> I'll check with Ben next week or so whether he wants to pick these up or
> whether I should stuff them into drm-misc-next.
I'll grab them.

Ben.

> -Daniel
>
> > ---
> >  drivers/gpu/drm/nouveau/nouveau_hwmon.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> > index d445c6f3fece..1c3104d20571 100644
> > --- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> > +++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> > @@ -741,7 +741,7 @@ nouveau_hwmon_init(struct drm_device *dev)
> >                       special_groups[i++] = &pwm_fan_sensor_group;
> >       }
> >
> > -     special_groups[i] = 0;
> > +     special_groups[i] = NULL;
> >       hwmon_dev = hwmon_device_register_with_info(dev->dev, "nouveau", dev,
> >                                                       &nouveau_chip_info,
> >                                                       special_groups);
> > --
> > 2.17.1
> >
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
> _______________________________________________
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-05 22:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-31 20:57 [PATCH] drm/nouveau: use NULL for pointer assignment Wambui Karuga
2020-01-01 18:51 ` Daniel Vetter
2020-01-05 22:08   ` [Nouveau] " Ben Skeggs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®