scsi: libsas: Drop SAS_DPRINTK() and revise logs levels
Like sas_printk() did previously, SAS_DPRINTK() offers little value now that libsas logs already have the "sas" prefix through pr_fmt(fmt). So it can be dropped. However, after reviewing some logs in libsas, it is noticed that debug level is too low in many instances. So this change drops SAS_DPRINTK() and revises some logs to a more appropriate level. However many stay at debug level, although some are significantly promoted. We add -DDEBUG for compilation so that we keep the debug messages by default, as before. All the pre-existing checkpatch errors for spanning messages across multiple lines are also fixed. Finally, all other references to printk() [apart from special formatting in sas_ata.c] are removed and replaced with appropriate pr_xxx(). Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

committed by
Martin K. Petersen

parent
71a4a99231
commit
15ba7806c3
@@ -110,9 +110,9 @@ static void sas_form_port(struct asd_sas_phy *phy)
|
||||
wake_up(&sas_ha->eh_wait_q);
|
||||
return;
|
||||
} else {
|
||||
SAS_DPRINTK("%s: phy%d belongs to port%d already(%d)!\n",
|
||||
__func__, phy->id, phy->port->id,
|
||||
phy->port->num_phys);
|
||||
pr_info("%s: phy%d belongs to port%d already(%d)!\n",
|
||||
__func__, phy->id, phy->port->id,
|
||||
phy->port->num_phys);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -125,8 +125,8 @@ static void sas_form_port(struct asd_sas_phy *phy)
|
||||
if (*(u64 *) port->sas_addr &&
|
||||
phy_is_wideport_member(port, phy) && port->num_phys > 0) {
|
||||
/* wide port */
|
||||
SAS_DPRINTK("phy%d matched wide port%d\n", phy->id,
|
||||
port->id);
|
||||
pr_debug("phy%d matched wide port%d\n", phy->id,
|
||||
port->id);
|
||||
break;
|
||||
}
|
||||
spin_unlock(&port->phy_list_lock);
|
||||
@@ -147,8 +147,7 @@ static void sas_form_port(struct asd_sas_phy *phy)
|
||||
}
|
||||
|
||||
if (i >= sas_ha->num_phys) {
|
||||
printk(KERN_NOTICE "%s: couldn't find a free port, bug?\n",
|
||||
__func__);
|
||||
pr_err("%s: couldn't find a free port, bug?\n", __func__);
|
||||
spin_unlock_irqrestore(&sas_ha->phy_port_lock, flags);
|
||||
return;
|
||||
}
|
||||
@@ -180,10 +179,10 @@ static void sas_form_port(struct asd_sas_phy *phy)
|
||||
}
|
||||
sas_port_add_phy(port->port, phy->phy);
|
||||
|
||||
SAS_DPRINTK("%s added to %s, phy_mask:0x%x (%16llx)\n",
|
||||
dev_name(&phy->phy->dev), dev_name(&port->port->dev),
|
||||
port->phy_mask,
|
||||
SAS_ADDR(port->attached_sas_addr));
|
||||
pr_debug("%s added to %s, phy_mask:0x%x (%16llx)\n",
|
||||
dev_name(&phy->phy->dev), dev_name(&port->port->dev),
|
||||
port->phy_mask,
|
||||
SAS_ADDR(port->attached_sas_addr));
|
||||
|
||||
if (port->port_dev)
|
||||
port->port_dev->pathways = port->num_phys;
|
||||
@@ -279,7 +278,7 @@ void sas_porte_broadcast_rcvd(struct work_struct *work)
|
||||
prim = phy->sas_prim;
|
||||
spin_unlock_irqrestore(&phy->sas_prim_lock, flags);
|
||||
|
||||
SAS_DPRINTK("broadcast received: %d\n", prim);
|
||||
pr_debug("broadcast received: %d\n", prim);
|
||||
sas_discover_event(phy->port, DISCE_REVALIDATE_DOMAIN);
|
||||
|
||||
if (phy->port)
|
||||
|
Reference in New Issue
Block a user