Commit 158ef80a authored by Stefan Wahren's avatar Stefan Wahren Committed by Greg Kroah-Hartman

staging: vchiq_2835_arm: Reduce scope of i in free_pagelist

We can reduce the scope of the counting variable i. This has
been found by CppCheck.
Signed-off-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d3de2bb8
...@@ -577,7 +577,6 @@ static void ...@@ -577,7 +577,6 @@ static void
free_pagelist(struct vchiq_pagelist_info *pagelistinfo, free_pagelist(struct vchiq_pagelist_info *pagelistinfo,
int actual) int actual)
{ {
unsigned int i;
PAGELIST_T *pagelist = pagelistinfo->pagelist; PAGELIST_T *pagelist = pagelistinfo->pagelist;
struct page **pages = pagelistinfo->pages; struct page **pages = pagelistinfo->pages;
unsigned int num_pages = pagelistinfo->num_pages; unsigned int num_pages = pagelistinfo->num_pages;
...@@ -633,6 +632,8 @@ free_pagelist(struct vchiq_pagelist_info *pagelistinfo, ...@@ -633,6 +632,8 @@ free_pagelist(struct vchiq_pagelist_info *pagelistinfo,
/* Need to mark all the pages dirty. */ /* Need to mark all the pages dirty. */
if (pagelist->type != PAGELIST_WRITE && if (pagelist->type != PAGELIST_WRITE &&
pagelistinfo->pages_need_release) { pagelistinfo->pages_need_release) {
unsigned int i;
for (i = 0; i < num_pages; i++) for (i = 0; i < num_pages; i++)
set_page_dirty(pages[i]); set_page_dirty(pages[i]);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment