summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2021-12-21 08:21:04 +0100
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>2022-01-05 19:33:02 +0900
commit16d424672716dc886fb58ec4a47a408db4781cc0 (patch)
treef829e4416834eaf242975d871cc0af244ebde2ad
parent2f784b923d50cdef1f6bd24d7c18614321b0833a (diff)
downloadlinux-stable-16d424672716dc886fb58ec4a47a408db4781cc0.tar.gz
linux-stable-16d424672716dc886fb58ec4a47a408db4781cc0.tar.bz2
linux-stable-16d424672716dc886fb58ec4a47a408db4781cc0.zip
ata: libata: drop ata_msg_warn()
The WARN level was always enabled, so drop ata_msg_warn(). Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
-rw-r--r--drivers/ata/libata-core.c19
-rw-r--r--include/linux/libata.h2
2 files changed, 8 insertions, 13 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 3accab132492..b5334e0a8603 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 @@ retry:
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;
}
@@ -2683,8 +2681,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;
}
@@ -5342,11 +5339,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 5651bbf4902b..0e5ed2ff94be 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)
{