Skip to contentSkip to conversation

drm: index i shadowed in 2nd loop

PATCH In review roel 2 participants 2 messages Mar 7, 2011

Subsystems (2)
lore
Share & tools
lore

roel

author
#0 lore raw

PATCH 1/1 drm: index i shadowed in 2nd loop

Index i was already used in thhe first loop

---
 drivers/gpu/drm/drm_fb_helper.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

The original was wrong, isn't it?

drivers/gpu/drm/drm_fb_helper.c +2 -2
index 6977a1c..f73ef43 100644
@@ -672,7 +672,7 @@ int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info)
 	struct drm_crtc_helper_funcs *crtc_funcs;
 	u16 *red, *green, *blue, *transp;
 	struct drm_crtc *crtc;
-	int i, rc = 0;
+	int i, j, rc = 0;
 	int start;
 
 	for (i = 0; i < fb_helper->crtc_count; i++) {
@@ -685,7 +685,7 @@ int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info)
 		transp = cmap->transp;
 		start = cmap->start;
 
-		for (i = 0; i < cmap->len; i++) {
+		for (j = 0; j < cmap->len; j++) {
 			u16 hred, hgreen, hblue, htransp = 0xffff;
 
 			hred = *red++;