Remove cas_disk message prefixes
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
parent
f70789e127
commit
320c998a1d
@ -28,19 +28,7 @@ struct casdsk_module {
|
||||
|
||||
extern struct casdsk_module *casdsk_module;
|
||||
|
||||
/* prefixes for messages */
|
||||
#define CASDSK_LOGO "CAS Disk"
|
||||
#define CASDSK_PREFIX_SHORT "[" CASDSK_LOGO "] "
|
||||
#define CASDSK_PREFIX_LONG "Cache Acceleration Software Linux"
|
||||
|
||||
#define CASDSK_KERN_EMERG KERN_EMERG""CASDSK_PREFIX_SHORT
|
||||
#define CASDSK_KERN_ALERT KERN_ALERT""CASDSK_PREFIX_SHORT
|
||||
#define CASDSK_KERN_CRIT KERN_CRIT""CASDSK_PREFIX_SHORT
|
||||
#define CASDSK_KERN_ERR KERN_ERR""CASDSK_PREFIX_SHORT
|
||||
#define CASDSK_KERN_WARNING KERN_WARNING""CASDSK_PREFIX_SHORT
|
||||
#define CASDSK_KERN_NOTICE KERN_NOTICE""CASDSK_PREFIX_SHORT
|
||||
#define CASDSK_KERN_INFO KERN_INFO""CASDSK_PREFIX_SHORT
|
||||
#define CASDSK_KERN_DEBUG KERN_DEBUG""CASDSK_PREFIX_SHORT
|
||||
|
||||
static inline struct block_device *open_bdev_exclusive(const char *path,
|
||||
fmode_t mode,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright(c) 2012-2021 Intel Corporation
|
||||
* Copyright(c) 2012-2022 Intel Corporation
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
#ifndef __CASDISK_DEBUG_H__
|
||||
@ -9,20 +9,20 @@
|
||||
|
||||
#ifdef CASDSK_DEBUG
|
||||
#define CASDSK_DEBUG_TRACE() \
|
||||
printk(CASDSK_KERN_INFO "%s\n", __func__)
|
||||
printk(KERN_INFO "%s\n", __func__)
|
||||
|
||||
#define CASDSK_DEBUG_DISK_TRACE(dsk) \
|
||||
printk(CASDSK_KERN_INFO "[%u] %s\n", dsk->id, __func__)
|
||||
printk(KERN_INFO "[%u] %s\n", dsk->id, __func__)
|
||||
|
||||
#define CASDSK_DEBUG_MSG(msg) \
|
||||
printk(CASDSK_KERN_INFO "%s - %s\n", __func__, msg)
|
||||
printk(KERN_INFO "%s - %s\n", __func__, msg)
|
||||
|
||||
#define CASDSK_DEBUG_PARAM(format, ...) \
|
||||
printk(CASDSK_KERN_INFO "%s - "format"\n", \
|
||||
printk(KERN_INFO "%s - "format"\n", \
|
||||
__func__, ##__VA_ARGS__)
|
||||
|
||||
#define CASDSK_DEBUG_DISK(dsk, format, ...) \
|
||||
printk(CASDSK_KERN_INFO "[%u] %s - "format"\n", \
|
||||
printk(KERN_INFO "[%u] %s - "format"\n", \
|
||||
dsk->id, \
|
||||
__func__, ##__VA_ARGS__)
|
||||
|
||||
|
@ -113,10 +113,10 @@ static int _casdsk_del_partitions(struct casdsk_disk *dsk)
|
||||
}
|
||||
result = cas_vfs_ioctl(bd_file, BLKPG, usr_barg);
|
||||
if (result == 0) {
|
||||
printk(CASDSK_KERN_INFO "Partition %d on %s hidden\n",
|
||||
printk(KERN_INFO "Partition %d on %s hidden\n",
|
||||
part_no, bd->bd_disk->disk_name);
|
||||
} else {
|
||||
printk(CASDSK_KERN_ERR "Error(%d) hiding the partition %d on %s\n",
|
||||
printk(KERN_ERR "Error(%d) hiding the partition %d on %s\n",
|
||||
result, part_no, bd->bd_disk->disk_name);
|
||||
break;
|
||||
}
|
||||
@ -148,7 +148,7 @@ static int _casdsk_exp_obj_hide_parts(struct casdsk_disk *dsk)
|
||||
|
||||
if (disk_max_parts(dsk->bd->bd_disk) > 1) {
|
||||
if (_casdsk_del_partitions(dsk)) {
|
||||
printk(CASDSK_KERN_ERR "Error deleting a partition on thedevice %s\n",
|
||||
printk(KERN_ERR "Error deleting a partition on thedevice %s\n",
|
||||
gdsk->disk_name);
|
||||
|
||||
/* Try restore previous partitions by rescaning */
|
||||
@ -534,7 +534,7 @@ int casdsk_exp_obj_activate(struct casdsk_disk *dsk)
|
||||
|
||||
snprintf(path, PATH_MAX, "/dev/%s", dsk->exp_obj->dev_name);
|
||||
if (_casdsk_exp_obj_exists(path)) {
|
||||
printk(CASDSK_KERN_ERR "Could not activate exported object, "
|
||||
printk(KERN_ERR "Could not activate exported object, "
|
||||
"because file %s exists.\n", path);
|
||||
kfree(path);
|
||||
return -EEXIST;
|
||||
|
@ -51,7 +51,7 @@ static int __init casdsk_init_module(void)
|
||||
|
||||
mutex_unlock(&casdsk_module->lock);
|
||||
|
||||
printk(CASDSK_KERN_INFO "%s Version %s (%s)::Module loaded successfully\n",
|
||||
printk(KERN_INFO "%s Version %s (%s)::Module loaded successfully\n",
|
||||
CASDSK_LOGO, CAS_VERSION, CAS_KERNEL);
|
||||
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user