Re: [PATCH 28/68] sata_promise: Drop pointless VPRINTK() calls and convert the remaining ones

From
Mikael Pettersson <mikpelinux@gmail.com>
Date
2021-12-10 16:19:37
Reply to
Hannes Reinecke, 2021-12-10
On Fri, Dec 10, 2021 at 12:09 PM Hannes Reinecke [off-list ref] wrote:
quoted hunk ↗ jump to hunk
Drop pointless VPRINTK() calls for entering and existing interrupt
routines and convert the remaining calls to dev_dbg().

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/ata/sata_promise.c | 31 ++++++++-----------------------
 1 file changed, 8 insertions(+), 23 deletions(-)
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
index 7815da8ef9e5..1059beae8720 100644
--- a/drivers/ata/sata_promise.c
+++ b/drivers/ata/sata_promise.c
@@ -596,7 +596,8 @@ static void pdc_fill_sg(struct ata_queued_cmd *qc)

                        prd[idx].addr = cpu_to_le32(addr);
                        prd[idx].flags_len = cpu_to_le32(len & 0xffff);
-                       VPRINTK("PRD[%u] = (0x%X, 0x%X)\n", idx, addr, len);
+                       ata_port_dbg(ap, "PRD[%u] = (9x%X, 0x%X)\n",
+                                    idx, addr, len);
typo: 9x -> 0x
quoted hunk ↗ jump to hunk
                        idx++;
                        sg_len -= len;
@@ -609,17 +610,16 @@ static void pdc_fill_sg(struct ata_queued_cmd *qc)
        if (len > SG_COUNT_ASIC_BUG) {
                u32 addr;

-               VPRINTK("Splitting last PRD.\n");
-
                addr = le32_to_cpu(prd[idx - 1].addr);
                prd[idx - 1].flags_len = cpu_to_le32(len - SG_COUNT_ASIC_BUG);
-               VPRINTK("PRD[%u] = (0x%X, 0x%X)\n", idx - 1, addr, SG_COUNT_ASIC_BUG);
+               ata_port_dbg(ap, "PRD[%u] = (0x%X, 0x%X)\n",
+                            idx - 1, addr, SG_COUNT_ASIC_BUG);

                addr = addr + len - SG_COUNT_ASIC_BUG;
                len = SG_COUNT_ASIC_BUG;
                prd[idx].addr = cpu_to_le32(addr);
                prd[idx].flags_len = cpu_to_le32(len);
-               VPRINTK("PRD[%u] = (0x%X, 0x%X)\n", idx, addr, len);
+               ata_port_dbg(ap, "PRD[%u] = (0x%X, 0x%X)\n", idx, addr, len);

                idx++;
        }
@@ -632,8 +632,6 @@ static enum ata_completion_errors pdc_qc_prep(struct ata_queued_cmd *qc)
        struct pdc_port_priv *pp = qc->ap->private_data;
        unsigned int i;

-       VPRINTK("ENTER\n");
-
        switch (qc->tf.protocol) {
        case ATA_PROT_DMA:
                pdc_fill_sg(qc);
@@ -922,12 +920,8 @@ static irqreturn_t pdc_interrupt(int irq, void *dev_instance)
        u32 hotplug_status;
        int is_sataii_tx4;

-       VPRINTK("ENTER\n");
-
-       if (!host || !host->iomap[PDC_MMIO_BAR]) {
-               VPRINTK("QUICK EXIT\n");
+       if (!host || !host->iomap[PDC_MMIO_BAR])
                return IRQ_NONE;
-       }

        host_mmio = host->iomap[PDC_MMIO_BAR];
@@ -946,23 +940,18 @@ static irqreturn_t pdc_interrupt(int irq, void *dev_instance)
        /* reading should also clear interrupts */
        mask = readl(host_mmio + PDC_INT_SEQMASK);

-       if (mask == 0xffffffff && hotplug_status == 0) {
-               VPRINTK("QUICK EXIT 2\n");
+       if (mask == 0xffffffff && hotplug_status == 0)
                goto done_irq;
-       }

        mask &= 0xffff;         /* only 16 SEQIDs possible */
-       if (mask == 0 && hotplug_status == 0) {
-               VPRINTK("QUICK EXIT 3\n");
+       if (mask == 0 && hotplug_status == 0)
                goto done_irq;
-       }

        writel(mask, host_mmio + PDC_INT_SEQMASK);

        is_sataii_tx4 = pdc_is_sataii_tx4(host->ports[0]->flags);

        for (i = 0; i < host->n_ports; i++) {
-               VPRINTK("port %u\n", i);
                ap = host->ports[i];

                /* check for a plug or unplug event */
@@ -989,8 +978,6 @@ static irqreturn_t pdc_interrupt(int irq, void *dev_instance)
                }
        }

-       VPRINTK("EXIT\n");
-
 done_irq:
        spin_unlock(&host->lock);
        return IRQ_RETVAL(handled);
@@ -1005,8 +992,6 @@ static void pdc_packet_start(struct ata_queued_cmd *qc)
        unsigned int port_no = ap->port_no;
        u8 seq = (u8) (port_no + 1);

-       VPRINTK("ENTER, ap %p\n", ap);
-
        writel(0x00000001, host_mmio + (seq * 4));
        readl(host_mmio + (seq * 4));   /* flush */

--
2.29.2
Thread (76 messages) 76 messages, 3 authors, last reply 2021-12-12
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help