Skip to content

Commit

Permalink
s390/dasd: Remove PRINTK_HEADER and KMSG_COMPONENT definitions
Browse files Browse the repository at this point in the history
PRINTK_HEADER was mainly used to prefix log messages with the module
name. Most components don't use this definition anymore. Either because
there are no log messages being generated anymore, or pr_*() were
replaced by dev_*(), which contains device and component information
already.

PRINTK_HEADER is also dropped in the function
dasd_3990_erp_handle_match_erp() in dasd_3990_erp.c from a panic() call
as panic() already provides all relevant information.

KMSG_COMPONENT was mainly used to identify a component in a long gone
kernel message catalog feature.

Remove both definition since they're either not used or alternatives
make the code slightly shorter and more readable.

Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Link: https://lore.kernel.org/r/20240208164248.540985-9-sth@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Jan Höppner authored and Jens Axboe committed Feb 8, 2024
1 parent 4ba6366 commit c6c6c69
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 55 deletions.
3 changes: 0 additions & 3 deletions drivers/s390/block/dasd.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
#include <asm/itcw.h>
#include <asm/diag.h>

/* This is ugly... */
#define PRINTK_HEADER "dasd:"

#include "dasd_int.h"
/*
* SECTION: Constant definitions to be used within this file
Expand Down
7 changes: 1 addition & 6 deletions drivers/s390/block/dasd_3990_erp.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@
*
*/

#define KMSG_COMPONENT "dasd-eckd"

#include <linux/timer.h>
#include <asm/idals.h>

#define PRINTK_HEADER "dasd_erp(3990): "

#include "dasd_int.h"
#include "dasd_eckd.h"

Expand Down Expand Up @@ -2700,8 +2696,7 @@ dasd_3990_erp_handle_match_erp(struct dasd_ccw_req *erp_head,
while (erp_done != erp) {

if (erp_done == NULL) /* end of chain reached */
panic(PRINTK_HEADER "Programming error in ERP! The "
"original request was lost\n");
panic("Programming error in ERP! The original request was lost\n");

/* remove the request from the device queue */
list_del(&erp_done->blocklist);
Expand Down
8 changes: 0 additions & 8 deletions drivers/s390/block/dasd_alias.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,12 @@
* Author(s): Stefan Weinhuber <wein@de.ibm.com>
*/

#define KMSG_COMPONENT "dasd-eckd"

#include <linux/list.h>
#include <linux/slab.h>
#include <asm/ebcdic.h>
#include "dasd_int.h"
#include "dasd_eckd.h"

#ifdef PRINTK_HEADER
#undef PRINTK_HEADER
#endif /* PRINTK_HEADER */
#define PRINTK_HEADER "dasd(eckd):"


/*
* General concept of alias management:
* - PAV and DASD alias management is specific to the eckd discipline.
Expand Down
4 changes: 0 additions & 4 deletions drivers/s390/block/dasd_devmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
*
*/

#define KMSG_COMPONENT "dasd"

#include <linux/ctype.h>
#include <linux/init.h>
#include <linux/module.h>
Expand All @@ -24,8 +22,6 @@
#include <linux/uaccess.h>
#include <asm/ipl.h>

/* This is ugly... */
#define PRINTK_HEADER "dasd_devmap:"
#define DASD_MAX_PARAMS 256

#include "dasd_int.h"
Expand Down
4 changes: 0 additions & 4 deletions drivers/s390/block/dasd_diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*
*/

#define KMSG_COMPONENT "dasd"

#include <linux/kernel_stat.h>
#include <linux/stddef.h>
#include <linux/kernel.h>
Expand All @@ -31,8 +29,6 @@
#include "dasd_int.h"
#include "dasd_diag.h"

#define PRINTK_HEADER "dasd(diag):"

MODULE_LICENSE("GPL");

/* The maximum number of blocks per request (max_blocks) is dependent on the
Expand Down
2 changes: 0 additions & 2 deletions drivers/s390/block/dasd_eckd.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
* Author.........: Nigel Hislop <hislop_nigel@emc.com>
*/

#define KMSG_COMPONENT "dasd-eckd"

#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/slab.h>
Expand Down
7 changes: 0 additions & 7 deletions drivers/s390/block/dasd_eer.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
* Author(s): Stefan Weinhuber <wein@de.ibm.com>
*/

#define KMSG_COMPONENT "dasd-eckd"

#include <linux/init.h>
#include <linux/fs.h>
#include <linux/kernel.h>
Expand All @@ -28,11 +26,6 @@
#include "dasd_int.h"
#include "dasd_eckd.h"

#ifdef PRINTK_HEADER
#undef PRINTK_HEADER
#endif /* PRINTK_HEADER */
#define PRINTK_HEADER "dasd(eer):"

/*
* SECTION: the internal buffer
*/
Expand Down
5 changes: 0 additions & 5 deletions drivers/s390/block/dasd_erp.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,13 @@
*
*/

#define KMSG_COMPONENT "dasd"

#include <linux/ctype.h>
#include <linux/init.h>

#include <asm/debug.h>
#include <asm/ebcdic.h>
#include <linux/uaccess.h>

/* This is ugly... */
#define PRINTK_HEADER "dasd_erp:"

#include "dasd_int.h"

struct dasd_ccw_req *
Expand Down
5 changes: 0 additions & 5 deletions drivers/s390/block/dasd_genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,13 @@
*
*/

#define KMSG_COMPONENT "dasd"

#include <linux/interrupt.h>
#include <linux/major.h>
#include <linux/fs.h>
#include <linux/blkpg.h>

#include <linux/uaccess.h>

/* This is ugly... */
#define PRINTK_HEADER "dasd_gendisk:"

#include "dasd_int.h"

static unsigned int queue_depth = 32;
Expand Down
6 changes: 0 additions & 6 deletions drivers/s390/block/dasd_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
* i/o controls for the dasd driver.
*/

#define KMSG_COMPONENT "dasd"

#include <linux/interrupt.h>
#include <linux/compat.h>
#include <linux/major.h>
Expand All @@ -24,12 +22,8 @@
#include <linux/uaccess.h>
#include <linux/dasd_mod.h>

/* This is ugly... */
#define PRINTK_HEADER "dasd_ioctl:"

#include "dasd_int.h"


static int
dasd_ioctl_api_version(void __user *argp)
{
Expand Down
5 changes: 0 additions & 5 deletions drivers/s390/block/dasd_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
*
*/

#define KMSG_COMPONENT "dasd"

#include <linux/ctype.h>
#include <linux/slab.h>
#include <linux/string.h>
Expand All @@ -23,9 +21,6 @@
#include <asm/debug.h>
#include <linux/uaccess.h>

/* This is ugly... */
#define PRINTK_HEADER "dasd_proc:"

#include "dasd_int.h"

static struct proc_dir_entry *dasd_proc_root_entry = NULL;
Expand Down

0 comments on commit c6c6c69

Please sign in to comment.