mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Kuleshov <kuleshovmail@gmail.com>
To: Michal Simek <monstr@monstr.eu>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Alexander Kuleshov <kuleshovmail@gmail.com>
Subject: [PATCH 3/5 v2] microblaze/mm: Use memblock_first_region_size() helper
Date: Tue,  1 Sep 2015 20:27:59 +0600	[thread overview]
Message-ID: <1441117679-30703-1-git-send-email-kuleshovmail@gmail.com> (raw)

The 0a11142e commit (mm/memblock: Introduce memblock_first_region_size()
helper) introduced memblock_first_region_size() helper for the getting
size of the first memblock region. Let's use it instead of directly access
to structure.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 arch/microblaze/mm/init.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index 77bc7c7..7c846a4 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -332,19 +332,19 @@ asmlinkage void __init mmu_init(void)
 		machine_restart(NULL);
 	}
 
-	if ((u32) memblock.memory.regions[0].size < 0x400000) {
+	if ((u32) memblock_first_region_size() < 0x400000) {
 		pr_emerg("Memory must be greater than 4MB\n");
 		machine_restart(NULL);
 	}
 
-	if ((u32) memblock.memory.regions[0].size < kernel_tlb) {
+	if ((u32) memblock_first_region_size() < kernel_tlb) {
 		pr_emerg("Kernel size is greater than memory node\n");
 		machine_restart(NULL);
 	}
 
 	/* Find main memory where the kernel is */
 	memory_start = (u32) memblock.memory.regions[0].base;
-	lowmem_size = memory_size = (u32) memblock.memory.regions[0].size;
+	lowmem_size = memory_size = (u32)memblock_first_region_size();
 
 	if (lowmem_size > CONFIG_LOWMEM_SIZE) {
 		lowmem_size = CONFIG_LOWMEM_SIZE;
-- 
2.5.0


                 reply	other threads:[~2015-09-01 14:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441117679-30703-1-git-send-email-kuleshovmail@gmail.com \
    --to=kuleshovmail@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=monstr@monstr.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®