mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Max Gurtovoy <mgurtovoy@nvidia.com>
To: <akpm@linux-foundation.org>, <linux-mm@kvack.org>
Cc: <pasha.tatashin@soleen.com>, <linux-kernel@vger.kernel.org>,
	<logang@deltatee.com>, Max Gurtovoy <mgurtovoy@nvidia.com>
Subject: [PATCH 2/2] mm,memory_hotplug: print the min alignment in check_pfn_span
Date: Wed, 2 Jun 2021 11:47:52 +0300	[thread overview]
Message-ID: <20210602084752.3534-2-mgurtovoy@nvidia.com> (raw)
In-Reply-To: <20210602084752.3534-1-mgurtovoy@nvidia.com>

The warning only prints the start and end pfns. Add min_align to the
warning print to add more info regarding the failure.

Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
---
 mm/memory_hotplug.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 8c3b423c1141..9e86e9ee0a10 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -289,8 +289,8 @@ static int check_pfn_span(unsigned long pfn, unsigned long nr_pages,
 	else
 		min_align = PAGES_PER_SECTION;
 	if (!IS_ALIGNED(pfn, min_align) || !IS_ALIGNED(nr_pages, min_align)) {
-		WARN(1, "Misaligned __%s_pages start: %#lx end: %#lx\n",
-		     reason, pfn, pfn + nr_pages - 1);
+		WARN(1, "Misaligned __%s_pages min_align: %#lx start: %#lx end: %#lx\n",
+		     reason, min_align, pfn, pfn + nr_pages - 1);
 		return -EINVAL;
 	}
 	return 0;
-- 
2.18.1


  reply	other threads:[~2021-06-02  8:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-02  8:47 [PATCH 1/2] mm,memory_hotplug: align code to fit 80 characters per line Max Gurtovoy
2021-06-02  8:47 ` Max Gurtovoy [this message]
2021-06-02  9:01   ` [PATCH 2/2] mm,memory_hotplug: print the min alignment in check_pfn_span David Hildenbrand
2021-06-02  8:59 ` [PATCH 1/2] mm,memory_hotplug: align code to fit 80 characters per line David Hildenbrand

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=20210602084752.3534-2-mgurtovoy@nvidia.com \
    --to=mgurtovoy@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=logang@deltatee.com \
    --cc=pasha.tatashin@soleen.com \
    /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

Powered by JetHome