Skip to contentSkip to conversation

mm/hwpoison: add '#' to hwpoison_inject

PATCH Superseded Wanpeng Li 3 participants 4 messages Dec 6, 2013 – Dec 9, 2013

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Wanpeng Li

author
#0 lore raw

PATCH 1/1 mm/hwpoison: add '#' to hwpoison_inject

Add '#' to hwpoison_inject just as done in madvise_hwpoison.

---
 mm/hwpoison-inject.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
mm/hwpoison-inject.c +1 -1
index 4c84678..146cead 100644
@@ -55,7 +55,7 @@ static int hwpoison_inject(void *data, u64 val)
 		return 0;
 
 inject:
-	printk(KERN_INFO "Injecting memory failure at pfn %lx\n", pfn);
+	pr_info(KERN_INFO "Injecting memory failure at pfn %#lx\n", pfn);
 	return memory_failure(pfn, 18, MF_COUNT_INCREASED);
 }
 
Signature · 7 lines
1.7.7.6

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Wanpeng Li

Add '#' to hwpoison_inject just as done in madvise_hwpoison.

It could affect some test code, but I checked mce-test and it doesn't depend on this message. So maybe it's OK.

Thanks,
Naoya

Quoted 26 lines
---
 mm/hwpoison-inject.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
mm/hwpoison-inject.c +1 -1
index 4c84678..146cead 100644
@@ -55,7 +55,7 @@ static int hwpoison_inject(void *data, u64 val)
 		return 0;
 
 inject:
-	printk(KERN_INFO "Injecting memory failure at pfn %lx\n", pfn);
+	pr_info(KERN_INFO "Injecting memory failure at pfn %#lx\n", pfn);
 	return memory_failure(pfn, 18, MF_COUNT_INCREASED);
 }
 
Signature · 7 lines
1.7.7.6

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#2 lore raw
In reply to Wanpeng Li

Hi Wanpeng

Quoted 12 lines · Wanpeng Li

Add '#' to hwpoison_inject just as done in madvise_hwpoison.

---
 mm/hwpoison-inject.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
mm/hwpoison-inject.c +0 -0
index 4c84678..146cead 100644

mm/hwpoison-inject.c static int hwpoison_inject(void *data, u64 val) · line 58

Quoted 5 lines
mm/hwpoison-inject.c +1 -1
@@ -55,7 +55,7 @@ static int hwpoison_inject(void *data, u64 val)
 		return 0;
 
 inject:
-	printk(KERN_INFO "Injecting memory failure at pfn %lx\n", pfn);
+	pr_info(KERN_INFO "Injecting memory failure at pfn %#lx\n", pfn);

You don't need KERN_INFO here.

Vladimir

Quoted 11 lines
mm/hwpoison-inject.c +0 -0
 	return memory_failure(pfn, 18, MF_COUNT_INCREASED);
 }
 
Signature · 7 lines
1.7.7.6

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

author
#3 lore raw

Hi Vladimir,

Quoted 17 lines · Vladimir Murzin

Hi Wanpeng

Quoted 14 lines · Wanpeng Li

Add '#' to hwpoison_inject just as done in madvise_hwpoison.

---
 mm/hwpoison-inject.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
mm/hwpoison-inject.c +0 -0
index 4c84678..146cead 100644
@@ -55,7 +55,7 @@ static int hwpoison_inject(void *data, u64 val)
 		return 0;
 
Quoted 6 lines

mm/hwpoison-inject.c static int hwpoison_inject(void *data, u64 val) · line 58

Quoted 3 lines
mm/hwpoison-inject.c +1 -1
 inject:
-	printk(KERN_INFO "Injecting memory failure at pfn %lx\n", pfn);
+	pr_info(KERN_INFO "Injecting memory failure at pfn %#lx\n", pfn);

You don't need KERN_INFO here.

Ah, indeed, I will fix it. Thanks.

Regards,
Wanpeng Li

Quoted 13 lines

Vladimir

Quoted 11 lines
mm/hwpoison-inject.c +0 -0
 	return memory_failure(pfn, 18, MF_COUNT_INCREASED);
 }
 
Signature · 7 lines
1.7.7.6

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>