diff options
author | Stefan Wahren <stefan.wahren@i2se.com> | 2017-05-26 01:26:12 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-29 18:02:29 +0300 |
commit | 158ef80a8741e55c0214c174509b42bc5de6c7e1 (patch) | |
tree | 5841bde7105f8ffd237131bba5b01c90d2abe45e /drivers | |
parent | d3de2bb882544798eae3958cfb458b1fe001988b (diff) | |
download | linux-158ef80a8741e55c0214c174509b42bc5de6c7e1.tar.xz |
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: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c index d04db3f55519..9105545a3656 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c @@ -577,7 +577,6 @@ static void free_pagelist(struct vchiq_pagelist_info *pagelistinfo, int actual) { - unsigned int i; PAGELIST_T *pagelist = pagelistinfo->pagelist; struct page **pages = pagelistinfo->pages; unsigned int num_pages = pagelistinfo->num_pages; @@ -633,6 +632,8 @@ free_pagelist(struct vchiq_pagelist_info *pagelistinfo, /* Need to mark all the pages dirty. */ if (pagelist->type != PAGELIST_WRITE && pagelistinfo->pages_need_release) { + unsigned int i; + for (i = 0; i < num_pages; i++) set_page_dirty(pages[i]); } |