Skip to contentSkip to conversation

drm/nouveau: use NULL for pointer assignment.

PATCH In review Wambui Karuga 3 participants 3 messages Dec 31, 2019 – Jan 5, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/nouveau: use NULL for pointer assignment.

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

---
 drivers/gpu/drm/nouveau/nouveau_hwmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_hwmon.c +1 -1
index d445c6f3fece..1c3104d20571 100644
@@ -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);
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Wambui Karuga

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

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

Quoted 20 lines
---
 drivers/gpu/drm/nouveau/nouveau_hwmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_hwmon.c +1 -1
index d445c6f3fece..1c3104d20571 100644
@@ -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);
Signature · 1 line
2.17.1
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
#2 lore raw
Quoted 6 lines · Daniel Vetter
Quoted 4 lines · Wambui Karuga

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

Quoted 6 lines
Quoted 1 line

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.

Quoted 31 lines

-Daniel

Quoted 18 lines
---
 drivers/gpu/drm/nouveau/nouveau_hwmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_hwmon.c +1 -2
index d445c6f3fece..1c3104d20571 100644
@@ -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);
--
Quoted 2 lines

2.17.1

--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau