mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-19 12:24:34 +08:00
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>
This commit is contained in:
parent
2f784b923d
commit
16d4246727
@ -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);
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user