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

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

 



On Wed, Dec 8, 2021 at 9:36 PM Hannes Reinecke <hare@xxxxxxx> wrote:
>
> Drop pointless VPRINTK() calls for entering and existing interrupt
> routines and convert the remaining calls to dev_dbg().
>
> Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
> ---
>  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",

typo: 9x -> 0x
LGTM otherwise

> +                                    idx, addr, len);
>
>                         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
>



[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