summaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-11 05:14:16 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-11 05:14:16 +0400
commit14ffe009ca60856555df3aec942239d8beed74d3 (patch)
treeb5639c028c996a6907ac0cf6e9f0175398a3a62b /arch/powerpc
parentce40be7a820bb393ac4ac69865f018d2f4038cf0 (diff)
parentec073619cdda99ffb6a07d3b8000569f5210815a (diff)
downloadlinux-14ffe009ca60856555df3aec942239d8beed74d3.tar.xz
Merge branch 'akpm' (Fixups from Andrew)
Merge misc fixes from Andrew Morton: "Followups, fixes and some random stuff I found on the internet." * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (11 patches) perf: fix duplicate header inclusion memcg, kmem: fix build error when CONFIG_INET is disabled rtc: kconfig: fix RTC_INTF defaults connected to RTC_CLASS rapidio: fix comment lib/kasprintf.c: use kmalloc_track_caller() to get accurate traces for kvasprintf rapidio: update for destination ID allocation rapidio: update asynchronous discovery initialization rapidio: use msleep in discovery wait mm: compaction: fix bit ranges in {get,clear,set}_pageblock_skip() arch/powerpc/platforms/pseries/hotplug-memory.c: section removal cleanups arch/powerpc/platforms/pseries/hotplug-memory.c: fix section handling code
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-memory.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
index dc0a035e63bb..ecdb0a6b3171 100644
--- a/arch/powerpc/platforms/pseries/hotplug-memory.c
+++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
@@ -77,8 +77,9 @@ static int pseries_remove_memblock(unsigned long base, unsigned int memblock_siz
{
unsigned long start, start_pfn;
struct zone *zone;
- int i, ret;
- int sections_to_remove;
+ int ret;
+ unsigned long section;
+ unsigned long sections_to_remove;
start_pfn = base >> PAGE_SHIFT;
@@ -99,9 +100,9 @@ static int pseries_remove_memblock(unsigned long base, unsigned int memblock_siz
* while writing to it. So we have to defer it to here.
*/
sections_to_remove = (memblock_size >> PAGE_SHIFT) / PAGES_PER_SECTION;
- for (i = 0; i < sections_to_remove; i++) {
- unsigned long pfn = start_pfn + i * PAGES_PER_SECTION;
- ret = __remove_pages(zone, start_pfn, PAGES_PER_SECTION);
+ for (section = 0; section < sections_to_remove; section++) {
+ unsigned long pfn = start_pfn + section * PAGES_PER_SECTION;
+ ret = __remove_pages(zone, pfn, PAGES_PER_SECTION);
if (ret)
return ret;
}