diff options
author | Joe Perches <joe@perches.com> | 2020-11-21 00:16:09 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-11-24 04:22:11 +0100 |
commit | 1b5d2793283dcb97b401b3b2c02b8a94eee29af1 (patch) | |
tree | ebbcf98f57a635e983aa9f6733f2ce3ead0ee443 /drivers/scsi/pm8001/pm8001_ctl.c | |
parent | scsi: pm8001: Remove typecast for pointer returned by kcalloc() (diff) | |
download | linux-1b5d2793283dcb97b401b3b2c02b8a94eee29af1.tar.xz linux-1b5d2793283dcb97b401b3b2c02b8a94eee29af1.zip |
scsi: pm8001: Neaten debug logging macros and uses
Every PM8001_<FOO>_DBG macro uses an internal call to pm8001_printk.
Convert all uses of:
PM8001_<FOO>_DBG(hba, pm8001_printk(fmt, ...))
to
pm8001_dbg(hba, <FOO>, fmt, ...)
so the visual complexity of each macro is reduced.
The repetitive macro definitions are converted to a single pm8001_dbg and
the level is concatenated using PM8001_##level##_LOGGING for the specific
level test.
Done with coccinelle, checkpatch and a little typing of the new macro
definition.
Miscellanea:
- Coalesce formats
- Realign arguments
- Add missing terminating newlines to formats
- Remove trailing spaces from formats
- Change defective loop with printk(KERN_INFO... to emit a 16 byte hex
block to %p16h
Link: https://lore.kernel.org/r/49f36a93af7752b613d03c89a87078243567fd9a.1605914030.git.joe@perches.com
Reported-by: kernel test robot <lkp@intel.com>
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/pm8001/pm8001_ctl.c')
-rw-r--r-- | drivers/scsi/pm8001/pm8001_ctl.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/scsi/pm8001/pm8001_ctl.c b/drivers/scsi/pm8001/pm8001_ctl.c index 3587f7c8a428..12035baf0997 100644 --- a/drivers/scsi/pm8001/pm8001_ctl.c +++ b/drivers/scsi/pm8001/pm8001_ctl.c @@ -841,10 +841,9 @@ static ssize_t pm8001_store_update_fw(struct device *cdev, pm8001_ha->dev); if (ret) { - PM8001_FAIL_DBG(pm8001_ha, - pm8001_printk( - "Failed to load firmware image file %s, error %d\n", - filename_ptr, ret)); + pm8001_dbg(pm8001_ha, FAIL, + "Failed to load firmware image file %s, error %d\n", + filename_ptr, ret); pm8001_ha->fw_status = FAIL_OPEN_BIOS_FILE; goto out; } |