Commit e7534b0e authored by Gerald Schaefer's avatar Gerald Schaefer Committed by Martin Schwidefsky

[S390] convert appldata printks to pr_xxx macros.

Signed-off-by: default avatarGerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 3b6ed4ab
...@@ -26,10 +26,6 @@ ...@@ -26,10 +26,6 @@
#define CTL_APPLDATA_NET_SUM 2125 #define CTL_APPLDATA_NET_SUM 2125
#define CTL_APPLDATA_PROC 2126 #define CTL_APPLDATA_PROC 2126
#define P_INFO(x...) printk(KERN_INFO MY_PRINT_NAME " info: " x)
#define P_ERROR(x...) printk(KERN_ERR MY_PRINT_NAME " error: " x)
#define P_WARNING(x...) printk(KERN_WARNING MY_PRINT_NAME " status: " x)
struct appldata_ops { struct appldata_ops {
struct list_head list; struct list_head list;
struct ctl_table_header *sysctl_header; struct ctl_table_header *sysctl_header;
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
* Author: Gerald Schaefer <gerald.schaefer@de.ibm.com> * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
*/ */
#define KMSG_COMPONENT "appldata"
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -32,7 +35,6 @@ ...@@ -32,7 +35,6 @@
#include "appldata.h" #include "appldata.h"
#define MY_PRINT_NAME "appldata" /* for debug messages, etc. */
#define APPLDATA_CPU_INTERVAL 10000 /* default (CPU) time for #define APPLDATA_CPU_INTERVAL 10000 /* default (CPU) time for
sampling interval in sampling interval in
milliseconds */ milliseconds */
...@@ -390,8 +392,8 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp, ...@@ -390,8 +392,8 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,
(unsigned long) ops->data, ops->size, (unsigned long) ops->data, ops->size,
ops->mod_lvl); ops->mod_lvl);
if (rc != 0) { if (rc != 0) {
P_ERROR("START DIAG 0xDC for %s failed, " pr_err("Starting the data collection for %s "
"return code: %d\n", ops->name, rc); "failed with rc=%d\n", ops->name, rc);
module_put(ops->owner); module_put(ops->owner);
} else } else
ops->active = 1; ops->active = 1;
...@@ -401,8 +403,8 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp, ...@@ -401,8 +403,8 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,
(unsigned long) ops->data, ops->size, (unsigned long) ops->data, ops->size,
ops->mod_lvl); ops->mod_lvl);
if (rc != 0) if (rc != 0)
P_ERROR("STOP DIAG 0xDC for %s failed, " pr_err("Stopping the data collection for %s "
"return code: %d\n", ops->name, rc); "failed with rc=%d\n", ops->name, rc);
module_put(ops->owner); module_put(ops->owner);
} }
spin_unlock(&appldata_ops_lock); spin_unlock(&appldata_ops_lock);
......
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
* Author: Gerald Schaefer <gerald.schaefer@de.ibm.com> * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
*/ */
#define KMSG_COMPONENT "appldata"
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -22,7 +25,6 @@ ...@@ -22,7 +25,6 @@
#include "appldata.h" #include "appldata.h"
#define MY_PRINT_NAME "appldata_os" /* for debug messages, etc. */
#define LOAD_INT(x) ((x) >> FSHIFT) #define LOAD_INT(x) ((x) >> FSHIFT)
#define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100) #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
...@@ -143,21 +145,16 @@ static void appldata_get_os_data(void *data) ...@@ -143,21 +145,16 @@ static void appldata_get_os_data(void *data)
(unsigned long) ops.data, new_size, (unsigned long) ops.data, new_size,
ops.mod_lvl); ops.mod_lvl);
if (rc != 0) if (rc != 0)
P_ERROR("os: START NEW DIAG 0xDC failed, " pr_err("Starting a new OS data collection "
"return code: %d, new size = %i\n", rc, "failed with rc=%d\n", rc);
new_size);
rc = appldata_diag(APPLDATA_RECORD_OS_ID, rc = appldata_diag(APPLDATA_RECORD_OS_ID,
APPLDATA_STOP_REC, APPLDATA_STOP_REC,
(unsigned long) ops.data, ops.size, (unsigned long) ops.data, ops.size,
ops.mod_lvl); ops.mod_lvl);
if (rc != 0) if (rc != 0)
P_ERROR("os: STOP OLD DIAG 0xDC failed, " pr_err("Stopping a faulty OS data "
"return code: %d, old size = %i\n", rc, "collection failed with rc=%d\n", rc);
ops.size);
else
P_INFO("os: old record size = %i stopped\n",
ops.size);
} }
ops.size = new_size; ops.size = new_size;
} }
...@@ -178,8 +175,8 @@ static int __init appldata_os_init(void) ...@@ -178,8 +175,8 @@ static int __init appldata_os_init(void)
max_size = sizeof(struct appldata_os_data) + max_size = sizeof(struct appldata_os_data) +
(NR_CPUS * sizeof(struct appldata_os_per_cpu)); (NR_CPUS * sizeof(struct appldata_os_per_cpu));
if (max_size > APPLDATA_MAX_REC_SIZE) { if (max_size > APPLDATA_MAX_REC_SIZE) {
P_ERROR("Max. size of OS record = %i, bigger than maximum " pr_err("Maximum OS record size %i exceeds the maximum "
"record size (%i)\n", max_size, APPLDATA_MAX_REC_SIZE); "record size %i\n", max_size, APPLDATA_MAX_REC_SIZE);
rc = -ENOMEM; rc = -ENOMEM;
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment