ARM: hw_breakpoint: Fix newlines in WARN messages
Subsystems (2)
These warnings are missing newlines and spaces causing confusing looking output when they trigger.
--- arch/arm/kernel/hw_breakpoint.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-)
arch/arm/kernel/hw_breakpoint.c +7 -6
@@ -238,8 +238,8 @@ static int enable_monitor_mode(void)ARM_DBG_READ (c1,0 , dscr);/* Ensure that halting mode is disabled. */ -if (WARN_ONCE (dscr &ARM_DSCR_HDBGEN ,"halting debug mode enabled." -"Unable to access hardware resources." )) { +if (WARN_ONCE (dscr &ARM_DSCR_HDBGEN ,"halting debug mode enabled. " +"Unable to access hardware resources.\n" )) { ret = -EPERM ; goto out; }
@@ -377,7 +377,7 @@ int arch_install_hw_breakpoint(struct perf_event *bp) } } -if (WARN_ONCE (i == max_slots,"Can't find any breakpoint slot" )) { +if (WARN_ONCE (i == max_slots,"Can't find any breakpoint slot\n" )) { ret = -EBUSY ; goto out; }
@@ -423,7 +423,7 @@ void arch_uninstall_hw_breakpoint(struct perf_event *bp) } } -if (WARN_ONCE (i == max_slots,"Can't find any breakpoint slot" )) +if (WARN_ONCE (i == max_slots,"Can't find any breakpoint slot\n" ))return ;/* Reset the control register. */
@@ -635,7 +635,7 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp)if (WARN_ONCE (!bp->overflow_handler && (arch_check_bp_in_kernelspace (bp) || !core_has_mismatch_brps () || !bp->hw.bp_target), -"overflow handler required but none found" )) { +"overflow handler required but none found\n" )) { ret = -EINVAL ; } out:
@@ -917,7 +917,8 @@ static int __init arch_hw_breakpoint_init(void)if (dscr &ARM_DSCR_HDBGEN ) { max_watchpoint_len =4 ;pr_warning ("halting debug mode enabled. Assuming maximum " -"watchpoint size of %u bytes." , max_watchpoint_len); +"watchpoint size of %u bytes.\n" , + max_watchpoint_len); }else {/* Work out the maximum supported watchpoint length. */ max_watchpoint_len =get_max_wp_len ();
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
Hi,
Quoted 14 lines · Stephen Boyd
These warnings are missing newlines and spaces causing confusing looking output when they trigger.
Cc Will Deacon <[email protected]>Signed-off-by Stephen Boyd <[email protected]>--- arch/arm/kernel/hw_breakpoint.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-)arch/arm/kernel/hw_breakpoint.c +0
-0
arch/arm/kernel/hw_breakpoint.c static int enable_monitor_mode(void) · line 243
Quoted 8 lines
arch/arm/kernel/hw_breakpoint.c +2
-2@@ -238,8 +238,8 @@ static int enable_monitor_mode(void)ARM_DBG_READ (c1,0 , dscr);/* Ensure that halting mode is disabled. */ -if (WARN_ONCE (dscr &ARM_DSCR_HDBGEN ,"halting debug mode enabled." -"Unable to access hardware resources." )) { +if (WARN_ONCE (dscr &ARM_DSCR_HDBGEN ,"halting debug mode enabled. " +"Unable to access hardware resources.\n" )) {
I'd prefer the message text not to be line wrapped, even if it violates the general line length rule, because that makes it easier to grep for the message in the source code.
Lothar Wa?mann
Signature · 9 lines
___________________________________________________________ Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10 Gesch?ftsf?hrer: Matthias Kaussen Handelsregistereintrag: Amtsgericht Aachen, HRB 4996 www.karo-electronics.de | info at karo-electronics.de ___________________________________________________________
Quoted 2 lines · Lothar Wa?mann
Hi,
Hello,
Quoted 17 lines
Quoted 16 lines · Stephen Boyd
These warnings are missing newlines and spaces causing confusing looking output when they trigger.
Cc Will Deacon <[email protected]>Signed-off-by Stephen Boyd <[email protected]>--- arch/arm/kernel/hw_breakpoint.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-)arch/arm/kernel/hw_breakpoint.c +0
-0@@ -238,8 +238,8 @@ static int enable_monitor_mode(void)ARM_DBG_READ (c1,0 , dscr);
Quoted 9 lines
arch/arm/kernel/hw_breakpoint.c static int enable_monitor_mode(void)
Quoted 6 lines
arch/arm/kernel/hw_breakpoint.c +2
-2/* Ensure that halting mode is disabled. */ -if (WARN_ONCE (dscr &ARM_DSCR_HDBGEN ,"halting debug mode enabled." -"Unable to access hardware resources." )) { +if (WARN_ONCE (dscr &ARM_DSCR_HDBGEN ,"halting debug mode enabled. " +"Unable to access hardware resources.\n" )) {I'd prefer the message text not to be line wrapped, even if it violates the general line length rule, because that makes it easier to grep for the message in the source code.
Ok, that's understandable. Moving the text onto its own line will limit the damage to the line length too. Stephen - are you happy to make these changes as part of your previous patch?
Thanks,
Will
PATCH 1/1 ARM: hw_breakpoint: Fix newlines in WARNings
These warnings are missing newlines and spaces causing confusing looking output when they trigger.
---
Quoted 7 lines · Will Deacon
Quoted 3 lines
I'd prefer the message text not to be line wrapped, even if it violates the general line length rule, because that makes it easier to grep for the message in the source code.
Ok, that's understandable. Moving the text onto its own line will limit the damage to the line length too. Stephen - are you happy to make these changes as part of your previous patch?
Sure.
arch/arm/kernel/hw_breakpoint.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-)
arch/arm/kernel/hw_breakpoint.c +7 -7
@@ -238,8 +238,8 @@ static int enable_monitor_mode(void)ARM_DBG_READ (c1,0 , dscr);/* Ensure that halting mode is disabled. */ -if (WARN_ONCE (dscr &ARM_DSCR_HDBGEN ,"halting debug mode enabled." -"Unable to access hardware resources." )) { +if (WARN_ONCE (dscr &ARM_DSCR_HDBGEN , +"halting debug mode enabled. Unable to access hardware resources.\n" )) { ret = -EPERM ; goto out; }
@@ -377,7 +377,7 @@ int arch_install_hw_breakpoint(struct perf_event *bp) } } -if (WARN_ONCE (i == max_slots,"Can't find any breakpoint slot" )) { +if (WARN_ONCE (i == max_slots,"Can't find any breakpoint slot\n" )) { ret = -EBUSY ; goto out; }
@@ -423,7 +423,7 @@ void arch_uninstall_hw_breakpoint(struct perf_event *bp) } } -if (WARN_ONCE (i == max_slots,"Can't find any breakpoint slot" )) +if (WARN_ONCE (i == max_slots,"Can't find any breakpoint slot\n" ))return ;/* Reset the control register. */
@@ -635,7 +635,7 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp)if (WARN_ONCE (!bp->overflow_handler && (arch_check_bp_in_kernelspace (bp) || !core_has_mismatch_brps () || !bp->hw.bp_target), -"overflow handler required but none found" )) { +"overflow handler required but none found\n" )) { ret = -EINVAL ; } out:
@@ -916,8 +916,8 @@ static int __init arch_hw_breakpoint_init(void)ARM_DBG_READ (c1,0 , dscr);if (dscr &ARM_DSCR_HDBGEN ) { max_watchpoint_len =4 ; -pr_warning ("halting debug mode enabled. Assuming maximum " -"watchpoint size of %u bytes." , max_watchpoint_len); +pr_warning ("halting debug mode enabled. Assuming maximum watchpoint size of %u bytes.\n" , + max_watchpoint_len); }else {/* Work out the maximum supported watchpoint length. */ max_watchpoint_len =get_max_wp_len ();
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
Re: [PATCH] ARM: hw_breakpoint: Fix newlines in WARNings
Will,
Quoted 8 lines · Stephen Boyd
Quoted 6 lines · Will Deacon
Quoted 3 lines
I'd prefer the message text not to be line wrapped, even if it violates the general line length rule, because that makes it easier to grep for the message in the source code.
Ok, that's understandable. Moving the text onto its own line will limit the damage to the line length too. Stephen - are you happy to make these changes as part of your previous patch?
Do you want to take this? I'm going to submit it to the patch tracker tomorrow otherwise.
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
Will Deacon
Acked-byRe: [PATCH] ARM: hw_breakpoint: Fix newlines in WARNings
Quoted 1 line · Stephen Boyd
Will,
Hi Stephen,
Quoted 6 lines · Stephen Boyd
Quoted 4 lines
Quoted 3 lines · Will Deacon
Quoted 3 lines
I'd prefer the message text not to be line wrapped, even if it violates the general line length rule, because that makes it easier to grep for the message in the source code.
Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
Ok, that's understandable. Moving the text onto its own line will limit the damage to the line length too. Stephen - are you happy to make these changes as part of your previous patch?
Do you want to take this? I'm going to submit it to the patch tracker tomorrow otherwise.
Please submit it to the patch system with my ack:
Thanks,
Will