The WARN level was always enabled, so drop ata_msg_warn(). Signed-off-by: Hannes Reinecke <hare@xxxxxxx> --- drivers/ata/libata-core.c | 19 ++++++++----------- include/linux/libata.h | 2 -- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 17e60690b3b4..0235f7dbdc38 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -1571,9 +1571,8 @@ unsigned ata_exec_internal_sg(struct ata_device *dev, else ata_qc_complete(qc); - if (ata_msg_warn(ap)) - ata_dev_warn(dev, "qc timeout (cmd 0x%x)\n", - command); + ata_dev_warn(dev, "qc timeout (cmd 0x%x)\n", + command); } spin_unlock_irqrestore(ap->lock, flags); @@ -1932,9 +1931,8 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, return 0; err_out: - if (ata_msg_warn(ap)) - ata_dev_warn(dev, "failed to IDENTIFY (%s, err_mask=0x%x)\n", - reason, err_mask); + ata_dev_warn(dev, "failed to IDENTIFY (%s, err_mask=0x%x)\n", + reason, err_mask); return rc; } @@ -2678,8 +2676,7 @@ int ata_dev_configure(struct ata_device *dev) rc = atapi_cdb_len(id); if ((rc < 12) || (rc > ATAPI_CDB_LEN)) { - if (ata_msg_warn(ap)) - ata_dev_warn(dev, "unsupported CDB len\n"); + ata_dev_warn(dev, "unsupported CDB len %d\n", rc); rc = -EINVAL; goto err_out_nosup; } @@ -5335,11 +5332,11 @@ struct ata_port *ata_port_alloc(struct ata_host *host) #if defined(ATA_VERBOSE_DEBUG) /* turn on all debugging levels */ - ap->msg_enable = 0x000F; + ap->msg_enable = 0x0007; #elif defined(ATA_DEBUG) - ap->msg_enable = ATA_MSG_DRV | ATA_MSG_INFO | ATA_MSG_WARN; + ap->msg_enable = ATA_MSG_DRV | ATA_MSG_INFO; #else - ap->msg_enable = ATA_MSG_DRV | ATA_MSG_WARN; + ap->msg_enable = ATA_MSG_DRV; #endif mutex_init(&ap->scsi_scan_mutex); diff --git a/include/linux/libata.h b/include/linux/libata.h index 8bde38e3debd..5a4a23d38c08 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -75,13 +75,11 @@ enum { ATA_MSG_DRV = 0x0001, ATA_MSG_INFO = 0x0002, ATA_MSG_PROBE = 0x0004, - ATA_MSG_WARN = 0x0008, }; #define ata_msg_drv(p) ((p)->msg_enable & ATA_MSG_DRV) #define ata_msg_info(p) ((p)->msg_enable & ATA_MSG_INFO) #define ata_msg_probe(p) ((p)->msg_enable & ATA_MSG_PROBE) -#define ata_msg_warn(p) ((p)->msg_enable & ATA_MSG_WARN) static inline u32 ata_msg_init(int dval, int default_msg_enable_bits) { -- 2.29.2