mm: memory_hotplug: Fix format string in __add_pages warning
Subsystems (2)
PATCH 1/1 mm: memory_hotplug: Fix format string in __add_pages warning
The format string has a typo and prints e.g., "Misaligned __add_pages start: 0xfc605 end: #fc609" instead of "Misaligned __add_pages start: 0xfc605 end: 0xfc609" Fix "#%lx" => "%#lx"
Signed-off-by Rick Wertenbroek <[email protected]>
--- mm/memory_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memory_hotplug.c +1 -1
@@ -325,7 +325,7 @@ int __ref __add_pages(int nid, unsigned long pfn, unsigned long nr_pages, }if (check_pfn_span (pfn, nr_pages)) { -WARN (1 ,"Misaligned %s start: %#lx end: #%lx\n" , __func__, pfn, pfn + nr_pages -1 ); +WARN (1 ,"Misaligned %s start: %#lx end: %#lx\n" , __func__, pfn, pfn + nr_pages -1 );return -EINVAL ; }
Signature · 1 line
2.25.1
Quoted 7 lines · Rick Wertenbroek
The format string has a typo and prints e.g., "Misaligned
__add_pagesstart:0xfc605end: #fc609" instead of "Misaligned__add_pagesstart:0xfc605end:0xfc609" Fix "#%lx" => "%#lx"Signed-off-by Rick Wertenbroek <[email protected]>
The issue appears in the __remove_pages format string as well, sorry didn't notice that right away. I'll send a new patch.
Rick
Quoted 20 lines
--- mm/memory_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/memory_hotplug.c +1
-2@@ -325,7 +325,7 @@ int __ref __add_pages(int nid, unsigned long pfn, unsigned long nr_pages, }if (check_pfn_span (pfn, nr_pages)) { -WARN (1 ,"Misaligned %s start: %#lx end: #%lx\n" , __func__, pfn, pfn + nr_pages -1 ); +WARN (1 ,"Misaligned %s start: %#lx end: %#lx\n" , __func__, pfn, pfn + nr_pages -1 );return -EINVAL ; } --2.25.1