Re: [PATCH 02/24] sata_nv: move DPRINTK to ata debugging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/14/18 4:27 PM, Sergei Shtylyov wrote:
On 12/13/2018 01:46 PM, Hannes Reinecke wrote:

Replace all DPRINTK calls with the ata_XXX_dbg functions.

Signed-off-by: Hannes Reinecke <hare@xxxxxxxx>
---
  drivers/ata/sata_nv.c | 22 ++++++++++------------
  1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index 72c9b922a77b..aa2611d638ea 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -1451,7 +1451,7 @@ static unsigned int nv_adma_qc_issue(struct ata_queued_cmd *qc)
writew(qc->hw_tag, mmio + NV_ADMA_APPEND); - DPRINTK("Issued tag %u\n", qc->hw_tag);
+	ata_dev_dbg(qc->dev, "Issued tag %u\n", qc->hw_tag);

    Don't we lose printing out __func__ this way?

Yes, but given that this message is pretty unique (for this driver) I thought the omission wasn't too bad.
I can re-add it if you insist...

return 0;
  }
@@ -2029,8 +2029,6 @@ static unsigned int nv_swncq_issue_atacmd(struct ata_port *ap,
  	if (qc == NULL)
  		return 0;
- DPRINTK("Enter\n");
-

    You said "replace all", not "remove some". :-)
    Though w/o __func__ this is pretty useless indeed...

Which is why I removed it.
I'll be updating the description.

[...]
@@ -2053,7 +2051,7 @@ static unsigned int nv_swncq_qc_issue(struct ata_queued_cmd *qc)
  	if (qc->tf.protocol != ATA_PROT_NCQ)
  		return ata_bmdma_qc_issue(qc);
- DPRINTK("Enter\n");
+	ata_dev_dbg(qc->dev, "Enter\n");


    Same here, do we print out __func__ now? Else this is quite pointless.

From what I can see this is primarily so that you can trace the control flow, but I wonder if there are not better ways nowadays (one thinks of ftrace ...).
I guess I'll just drop the pointless "ENTER" messages.

if (!pp->qc_active)
  		nv_swncq_issue_atacmd(ap, qc);
[...]
@@ -2136,10 +2134,10 @@ static int nv_swncq_sdbfis(struct ata_port *ap)
  		 */
  		lack_dhfis = 1;
- DPRINTK("id 0x%x QC: qc_active 0x%x,"
+	ata_port_dbg(ap, "QC: qc_active 0x%llx,"

    Why silently change "%x" to "%llx"?

Because the compiler complained?

Do I need to update the description for this change, too?

Cheers,

Hannes



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux