Skip to contentSkip to conversation

drm/nouveau/disp: Use NULL for pointers

PATCH In review Thierry Reding 2 participants 4 messages Jul 21, 2014 – Jun 5, 2015

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

PATCH 1/1 drm/nouveau/disp: Use NULL for pointers

From: Thierry Reding <[email protected]>

The return type of exec_lookup() is struct nvkm_output *, so it should return NULL rather than 0.

---
 drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c +1 -1
index fa30d8196f35..ebf64e1d0a70 100644
@@ -939,7 +939,7 @@ exec_lookup(struct nv50_disp_priv *priv, int head, int or, u32 ctrl,
 		case 0x00000900: type = DCB_OUTPUT_DP; mask = 2; break;
 		default:
 			nv_error(priv, "unknown SOR mc 0x%08x\n", ctrl);
-			return 0x0000;
+			return NULL;
 		}
 	}
 
Signature · 1 line
2.0.1
#1 lore raw
Quoted 15 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The return type of exec_lookup() is struct nvkm_output *, so it should return NULL rather than 0.

---
 drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c +0 -0
index fa30d8196f35..ebf64e1d0a70 100644

drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c exec_lookup(struct nv50_disp_priv *priv, int head, int or, u32 ctrl, · line 945

Quoted 8 lines
drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c +1 -1
@@ -939,7 +939,7 @@ exec_lookup(struct nv50_disp_priv *priv, int head, int or, u32 ctrl,
 		case 0x00000900: type = DCB_OUTPUT_DP; mask = 2; break;
 		default:
 			nv_error(priv, "unknown SOR mc 0x%08x\n", ctrl);
-			return 0x0000;
+			return NULL;
 		}
 	}
 

Ping?

Thierry

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

Reviewed-by
#2 lore raw
Quoted 27 lines · Thierry Reding
Quoted 15 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The return type of exec_lookup() is struct nvkm_output *, so it should return NULL rather than 0.

---
 drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c +0 -0
index fa30d8196f35..ebf64e1d0a70 100644

drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c exec_lookup(struct nv50_disp_priv *priv, int head, int or, u32 ctrl, · line 945

Quoted 8 lines
drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c +1 -1
@@ -939,7 +939,7 @@ exec_lookup(struct nv50_disp_priv *priv, int head, int or, u32 ctrl,
 		case 0x00000900: type = DCB_OUTPUT_DP; mask = 2; break;
 		default:
 			nv_error(priv, "unknown SOR mc 0x%08x\n", ctrl);
-			return 0x0000;
+			return NULL;
 		}
 	}
 

Ping?

Quoted 2 lines

Thierry

I have an identical patch in a local branch, but with worse commit message :) Fwiw the patch is

-Emil

#3 lore raw
Quoted 28 lines · Emil Velikov
Quoted 27 lines · Thierry Reding
Quoted 15 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The return type of exec_lookup() is struct nvkm_output *, so it should return NULL rather than 0.

---
 drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c +0 -0
index fa30d8196f35..ebf64e1d0a70 100644

drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c exec_lookup(struct nv50_disp_priv *priv, int head, int or, u32 ctrl, · line 945

Quoted 8 lines
drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c +1 -1
@@ -939,7 +939,7 @@ exec_lookup(struct nv50_disp_priv *priv, int head, int or, u32 ctrl,
 		case 0x00000900: type = DCB_OUTPUT_DP; mask = 2; break;
 		default:
 			nv_error(priv, "unknown SOR mc 0x%08x\n", ctrl);
-			return 0x0000;
+			return NULL;
 		}
 	}
 

Ping?

Quoted 6 lines
Quoted 2 lines

Thierry

I have an identical patch in a local branch, but with worse commit message :) Fwiw the patch is

Ben, any chance you could pick this up? It should still apply as-is on recent trees, but I can resend if you prefer.

Thierry

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel