mm: memory_hotplug: Fix format string in warnings
Subsystems (2)
PATCH 1/1 mm: memory_hotplug: Fix format string in warnings
The format string in __add_pages and __remove_pages 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"
--- mm/memory_hotplug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
mm/memory_hotplug.c +2 -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 ; }
@@ -525,7 +525,7 @@ void __remove_pages(unsigned long pfn, unsigned long nr_pages, map_offset =vmem_altmap_offset (altmap);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 ; }
Signature · 1 line
2.25.1
Quoted 24 lines · Rick Wertenbroek
The format string in
__add_pagesand__remove_pageshas 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]>--- mm/memory_hotplug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)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 ; }
mm/memory_hotplug.c void __remove_pages(unsigned long pfn, unsigned long nr_pages, · line 531
Quoted 8 lines
mm/memory_hotplug.c +1
-1@@ -525,7 +525,7 @@ void __remove_pages(unsigned long pfn, unsigned long nr_pages, map_offset =vmem_altmap_offset (altmap);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 ; }
Signature · 3 lines
Thanks, David / dhildenb
Quoted 6 lines · Rick Wertenbroek
The format string in
__add_pagesand__remove_pageshas 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]>
Quoted 30 lines
--- mm/memory_hotplug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)mm/memory_hotplug.c +2
-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 ; }@@ -525,7 +525,7 @@ void __remove_pages(unsigned long pfn, unsigned long nr_pages, map_offset =vmem_altmap_offset (altmap);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 ; }Signature · 1 line
2.25.1
Signature · 2 lines
Sincerely yours, Mike.