From: Tarun Sahu <tsahu@linux.ibm.com>
To: nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, dave.jiang@intel.com,
dan.j.williams@intel.com, vishal.l.verma@intel.com,
aneesh.kumar@linux.ibm.com, jaypatel@linux.ibm.com,
tsahu@linux.ibm.com
Subject: [PATCH] dax/kmem: Pass valid argument to memory_group_register_static
Date: Tue, 20 Jun 2023 19:33:32 +0530 [thread overview]
Message-ID: <20230620140332.30578-1-tsahu@linux.ibm.com> (raw)
memory_group_register_static takes maximum number of pages as the argument
while dev_dax_kmem_probe passes total_len (in bytes) as the argument.
Signed-off-by: Tarun Sahu <tsahu@linux.ibm.com>
---
drivers/dax/kmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dax/kmem.c b/drivers/dax/kmem.c
index 7b36db6f1cbd..898ca9505754 100644
--- a/drivers/dax/kmem.c
+++ b/drivers/dax/kmem.c
@@ -99,7 +99,7 @@ static int dev_dax_kmem_probe(struct dev_dax *dev_dax)
if (!data->res_name)
goto err_res_name;
- rc = memory_group_register_static(numa_node, total_len);
+ rc = memory_group_register_static(numa_node, PFN_UP(total_len));
if (rc < 0)
goto err_reg_mgid;
data->mgid = rc;
--
2.31.1
next reply other threads:[~2023-06-20 14:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-20 14:03 Tarun Sahu [this message]
2023-06-20 23:18 ` [PATCH] dax/kmem: Pass valid argument to memory_group_register_static Alison Schofield
2023-06-21 6:06 ` Tarun Sahu
2023-06-21 6:42 ` Verma, Vishal L
2023-06-22 7:15 ` Tarun Sahu
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=20230620140332.30578-1-tsahu@linux.ibm.com \
--to=tsahu@linux.ibm.com \
--cc=aneesh.kumar@linux.ibm.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=jaypatel@linux.ibm.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
--cc=vishal.l.verma@intel.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;
as well as URLs for NNTP newsgroup(s).