aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorMichael Holzheu <holzheu@de.ibm.com>2008-12-25 07:39:43 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-12-25 07:39:22 -0500
commitc5612c1956597687e4bdf59f2649d20d60f5a2b6 (patch)
tree95bb534f48a7f687b88b915d95901c43b48fb050 /arch/s390/kernel
parenta4f5a299cf8468619dc17f0711017c6d72d6ab94 (diff)
[S390] convert s390 debug feature printks to pr_xxx macros.
Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/debug.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index 21c90374a58c..ba03fc0a3a56 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -10,6 +10,9 @@
10 * Bugreports to: <Linux390@de.ibm.com> 10 * Bugreports to: <Linux390@de.ibm.com>
11 */ 11 */
12 12
13#define KMSG_COMPONENT "s390dbf"
14#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
15
13#include <linux/stddef.h> 16#include <linux/stddef.h>
14#include <linux/kernel.h> 17#include <linux/kernel.h>
15#include <linux/errno.h> 18#include <linux/errno.h>
@@ -693,8 +696,8 @@ debug_info_t *debug_register_mode(const char *name, int pages_per_area,
693 /* Since debugfs currently does not support uid/gid other than root, */ 696 /* Since debugfs currently does not support uid/gid other than root, */
694 /* we do not allow gid/uid != 0 until we get support for that. */ 697 /* we do not allow gid/uid != 0 until we get support for that. */
695 if ((uid != 0) || (gid != 0)) 698 if ((uid != 0) || (gid != 0))
696 printk(KERN_WARNING "debug: Warning - Currently only uid/gid " 699 pr_warning("Root becomes the owner of all s390dbf files "
697 "= 0 are supported. Using root as owner now!"); 700 "in sysfs\n");
698 if (!initialized) 701 if (!initialized)
699 BUG(); 702 BUG();
700 mutex_lock(&debug_mutex); 703 mutex_lock(&debug_mutex);
@@ -709,7 +712,7 @@ debug_info_t *debug_register_mode(const char *name, int pages_per_area,
709 debug_register_view(rc, &debug_pages_view); 712 debug_register_view(rc, &debug_pages_view);
710out: 713out:
711 if (!rc){ 714 if (!rc){
712 printk(KERN_ERR "debug: debug_register failed for %s\n",name); 715 pr_err("Registering debug feature %s failed\n", name);
713 } 716 }
714 mutex_unlock(&debug_mutex); 717 mutex_unlock(&debug_mutex);
715 return rc; 718 return rc;
@@ -763,8 +766,8 @@ debug_set_size(debug_info_t* id, int nr_areas, int pages_per_area)
763 if(pages_per_area > 0){ 766 if(pages_per_area > 0){
764 new_areas = debug_areas_alloc(pages_per_area, nr_areas); 767 new_areas = debug_areas_alloc(pages_per_area, nr_areas);
765 if(!new_areas) { 768 if(!new_areas) {
766 printk(KERN_WARNING "debug: could not allocate memory "\ 769 pr_info("Allocating memory for %i pages failed\n",
767 "for pagenumber: %i\n",pages_per_area); 770 pages_per_area);
768 rc = -ENOMEM; 771 rc = -ENOMEM;
769 goto out; 772 goto out;
770 } 773 }
@@ -780,8 +783,7 @@ debug_set_size(debug_info_t* id, int nr_areas, int pages_per_area)
780 memset(id->active_entries,0,sizeof(int)*id->nr_areas); 783 memset(id->active_entries,0,sizeof(int)*id->nr_areas);
781 memset(id->active_pages, 0, sizeof(int)*id->nr_areas); 784 memset(id->active_pages, 0, sizeof(int)*id->nr_areas);
782 spin_unlock_irqrestore(&id->lock,flags); 785 spin_unlock_irqrestore(&id->lock,flags);
783 printk(KERN_INFO "debug: %s: set new size (%i pages)\n"\ 786 pr_info("%s: set new size (%i pages)\n" ,id->name, pages_per_area);
784 ,id->name, pages_per_area);
785out: 787out:
786 return rc; 788 return rc;
787} 789}
@@ -800,10 +802,9 @@ debug_set_level(debug_info_t* id, int new_level)
800 spin_lock_irqsave(&id->lock,flags); 802 spin_lock_irqsave(&id->lock,flags);
801 if(new_level == DEBUG_OFF_LEVEL){ 803 if(new_level == DEBUG_OFF_LEVEL){
802 id->level = DEBUG_OFF_LEVEL; 804 id->level = DEBUG_OFF_LEVEL;
803 printk(KERN_INFO "debug: %s: switched off\n",id->name); 805 pr_info("%s: switched off\n",id->name);
804 } else if ((new_level > DEBUG_MAX_LEVEL) || (new_level < 0)) { 806 } else if ((new_level > DEBUG_MAX_LEVEL) || (new_level < 0)) {
805 printk(KERN_INFO 807 pr_info("%s: level %i is out of range (%i - %i)\n",
806 "debug: %s: level %i is out of range (%i - %i)\n",
807 id->name, new_level, 0, DEBUG_MAX_LEVEL); 808 id->name, new_level, 0, DEBUG_MAX_LEVEL);
808 } else { 809 } else {
809 id->level = new_level; 810 id->level = new_level;
@@ -1108,8 +1109,8 @@ debug_register_view(debug_info_t * id, struct debug_view *view)
1108 pde = debugfs_create_file(view->name, mode, id->debugfs_root_entry, 1109 pde = debugfs_create_file(view->name, mode, id->debugfs_root_entry,
1109 id , &debug_file_ops); 1110 id , &debug_file_ops);
1110 if (!pde){ 1111 if (!pde){
1111 printk(KERN_WARNING "debug: debugfs_create_file() failed!"\ 1112 pr_err("Registering view %s/%s failed due to out of "
1112 " Cannot register view %s/%s\n", id->name,view->name); 1113 "memory\n", id->name,view->name);
1113 rc = -1; 1114 rc = -1;
1114 goto out; 1115 goto out;
1115 } 1116 }
@@ -1119,10 +1120,8 @@ debug_register_view(debug_info_t * id, struct debug_view *view)
1119 break; 1120 break;
1120 } 1121 }
1121 if (i == DEBUG_MAX_VIEWS) { 1122 if (i == DEBUG_MAX_VIEWS) {
1122 printk(KERN_WARNING "debug: cannot register view %s/%s\n", 1123 pr_err("Registering view %s/%s would exceed the maximum "
1123 id->name,view->name); 1124 "number of views %i\n", id->name, view->name, i);
1124 printk(KERN_WARNING
1125 "debug: maximum number of views reached (%i)!\n", i);
1126 debugfs_remove(pde); 1125 debugfs_remove(pde);
1127 rc = -1; 1126 rc = -1;
1128 } else { 1127 } else {
@@ -1303,7 +1302,8 @@ debug_input_level_fn(debug_info_t * id, struct debug_view *view,
1303 new_level = debug_get_uint(str); 1302 new_level = debug_get_uint(str);
1304 } 1303 }
1305 if(new_level < 0) { 1304 if(new_level < 0) {
1306 printk(KERN_INFO "debug: level `%s` is not valid\n", str); 1305 pr_warning("%s is not a valid level for a debug "
1306 "feature\n", str);
1307 rc = -EINVAL; 1307 rc = -EINVAL;
1308 } else { 1308 } else {
1309 debug_set_level(id, new_level); 1309 debug_set_level(id, new_level);
@@ -1380,7 +1380,8 @@ debug_input_flush_fn(debug_info_t * id, struct debug_view *view,
1380 goto out; 1380 goto out;
1381 } 1381 }
1382 1382
1383 printk(KERN_INFO "debug: area `%c` is not valid\n", input_buf[0]); 1383 pr_info("Flushing debug data failed because %c is not a valid "
1384 "area\n", input_buf[0]);
1384 1385
1385out: 1386out:
1386 *offset += user_len; 1387 *offset += user_len;