MIPS: traps: Use str_enabled_disabled() in parity_protection_init()
PATCH 1/1 MIPS: traps: Use str_enabled_disabled() in parity_protection_init()
Remove hard-coded strings by using the str_enabled_disabled() helper function.
Use pr_info() instead of printk(KERN_INFO) to silence multiple checkpatch warnings.
Suggested-by Christophe JAILLET <[email protected]>
Signed-off-by Thorsten Blum <[email protected]>
--- arch/mips/kernel/traps.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
arch/mips/kernel/traps.c +9 -8
@@ -38,6 +38,7 @@#include <linux/kdb.h> #include <linux/irq.h> #include <linux/perf_event.h> +#include <linux/string_choices.h> #include <asm/addrspace.h> #include <asm/bootinfo.h>
@@ -1741,8 +1742,8 @@ static inline __init void parity_protection_init(void) gcr_ectl &=CM_GCR_ERR_CONTROL_L2_ECC_EN ;WARN_ON (!!gcr_ectl != l2parity); -pr_info ("Cache parity protection %sabled\n" , - l1parity ?"en" :"dis" ); +pr_info ("Cache parity protection %s\n" , +str_enabled_disabled (l1parity));return ; }
@@ -1797,14 +1798,14 @@ static inline __init void parity_protection_init(void)printk (KERN_INFO "Readback ErrCtl register=%08lx\n" , errctl);if (l1parity_present) -printk (KERN_INFO "Cache parity protection %sabled\n" , - (errctl &ERRCTL_PE ) ?"en" :"dis" ); +pr_info ("Cache parity protection %s\n" , +str_enabled_disabled (errctl &ERRCTL_PE ));if (l2parity_present) {if (l1parity_present && l1parity) errctl ^=ERRCTL_L2P ; -printk (KERN_INFO "L2 cache parity protection %sabled\n" , - (errctl &ERRCTL_L2P ) ?"en" :"dis" ); +pr_info ("L2 cache parity protection %s\n" , +str_enabled_disabled (errctl &ERRCTL_L2P )); } }break ;
@@ -1815,8 +1816,8 @@ static inline __init void parity_protection_init(void)write_c0_ecc (0x80000000 );back_to_back_c0_hazard ();/* Set the PE bit (bit 31) in the c0_errctl register. */ -printk (KERN_INFO "Cache parity protection %sabled\n" , - (read_c0_ecc () &0x80000000 ) ?"en" :"dis" ); +pr_info ("Cache parity protection %s\n" , +str_enabled_disabled (read_c0_ecc () &0x80000000 ));break ;case CPU_20KC :case CPU_25KF :
Signature · 1 line
2.47.1
Quoted 11 lines · Thorsten Blum
Remove hard-coded strings by using the
str_enabled_disabled()helper function.Use
pr_info()instead ofprintk(KERN_INFO)to silence multiple checkpatch warnings.Suggested-by Christophe JAILLET <[email protected]>Signed-off-by Thorsten Blum <[email protected]>--- arch/mips/kernel/traps.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Quoted 11 lines · Thorsten Blum
Remove hard-coded strings by using the
str_enabled_disabled()helper function.Use
pr_info()instead ofprintk(KERN_INFO)to silence multiple checkpatch warnings.Suggested-by Christophe JAILLET <[email protected]>Signed-off-by Thorsten Blum <[email protected]>--- arch/mips/kernel/traps.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
applied to mips-next.
Thomas.
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]