Skip to contentSkip to conversation

drm/omap: tiler: clear buffer properly

PATCH In review Dan Carpenter 2 participants 2 messages Aug 22, 2013

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

PATCH 1/1 drm/omap: tiler: clear buffer properly

We're taking the sizeof() the wrong thing so it doesn't clear the whole buffer.

---
I can't compile this.

drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +1 -1
index 9b794c9..acf6678 100644
@@ -871,7 +871,7 @@ int tiler_map_show(struct seq_file *s, void *arg)
 		goto error;
 
 	for (lut_idx = 0; lut_idx < omap_dmm->num_lut; lut_idx++) {
-		memset(map, 0, sizeof(h_adj * sizeof(*map)));
+		memset(map, 0, h_adj * sizeof(*map));
 		memset(global_map, ' ', (w_adj + 1) * h_adj);
 
 		for (i = 0; i < omap_dmm->container_height; i++) {
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Dan Carpenter

We're taking the sizeof() the wrong thing so it doesn't clear the whole buffer.

Oh, that was very certainly wrong before!

Quoted 16 lines

---
I can't compile this.

drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +1 -1
index 9b794c9..acf6678 100644
@@ -871,7 +871,7 @@ int tiler_map_show(struct seq_file *s, void *arg)
                goto error;
 
        for (lut_idx = 0; lut_idx < omap_dmm->num_lut; lut_idx++) {
-               memset(map, 0, sizeof(h_adj * sizeof(*map)));
+               memset(map, 0, h_adj * sizeof(*map));
                memset(global_map, ' ', (w_adj + 1) * h_adj);
 
                for (i = 0; i < omap_dmm->container_height; i++) {