Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ata: sata_nv: drop pointless VPRINTK() calls and convert remaining ones

Quite some information from the VPRINTK() is already covered by
tracepoints, so remove the pointless calls and convert the remaining
ones to structured logging.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>

authored by

Hannes Reinecke and committed by
Damien Le Moal
47013c58 23b87b9f

+14 -24
+14 -24
drivers/ata/sata_nv.c
··· 809 809 struct nv_adma_port_priv *pp = ap->private_data; 810 810 u8 flags = pp->cpb[cpb_num].resp_flags; 811 811 812 - VPRINTK("CPB %d, flags=0x%x\n", cpb_num, flags); 812 + ata_port_dbg(ap, "CPB %d, flags=0x%x\n", cpb_num, flags); 813 813 814 814 if (unlikely((force_err || 815 815 flags & (NV_CPB_RESP_ATA_ERR | ··· 1101 1101 struct pci_dev *pdev = to_pci_dev(dev); 1102 1102 u16 tmp; 1103 1103 1104 - VPRINTK("ENTER\n"); 1105 - 1106 1104 /* 1107 1105 * Ensure DMA mask is set to 32-bit before allocating legacy PRD and 1108 1106 * pad buffers. ··· 1189 1191 struct nv_adma_port_priv *pp = ap->private_data; 1190 1192 void __iomem *mmio = pp->ctl_block; 1191 1193 1192 - VPRINTK("ENTER\n"); 1193 1194 writew(0, mmio + NV_ADMA_CTL); 1194 1195 } 1195 1196 ··· 1249 1252 { 1250 1253 void __iomem *mmio = ap->host->iomap[NV_MMIO_BAR]; 1251 1254 struct ata_ioports *ioport = &ap->ioaddr; 1252 - 1253 - VPRINTK("ENTER\n"); 1254 1255 1255 1256 mmio += NV_ADMA_PORT + ap->port_no * NV_ADMA_PORT_SIZE; 1256 1257 ··· 1370 1375 if (qc->tf.protocol == ATA_PROT_NCQ) 1371 1376 ctl_flags |= NV_CPB_CTL_QUEUE | NV_CPB_CTL_FPDMA; 1372 1377 1373 - VPRINTK("qc->flags = 0x%lx\n", qc->flags); 1374 - 1375 1378 nv_adma_tf_to_cpb(&qc->tf, cpb->tf); 1376 1379 1377 1380 if (qc->flags & ATA_QCFLAG_DMAMAP) { ··· 1394 1401 void __iomem *mmio = pp->ctl_block; 1395 1402 int curr_ncq = (qc->tf.protocol == ATA_PROT_NCQ); 1396 1403 1397 - VPRINTK("ENTER\n"); 1398 - 1399 1404 /* We can't handle result taskfile with NCQ commands, since 1400 1405 retrieving the taskfile switches us out of ADMA mode and would abort 1401 1406 existing commands. */ ··· 1405 1414 1406 1415 if (nv_adma_use_reg_mode(qc)) { 1407 1416 /* use ATA register mode */ 1408 - VPRINTK("using ATA register mode: 0x%lx\n", qc->flags); 1409 1417 BUG_ON(!(pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) && 1410 1418 (qc->flags & ATA_QCFLAG_DMAMAP)); 1411 1419 nv_adma_register_mode(qc->ap); ··· 1856 1866 1857 1867 /* enable swncq */ 1858 1868 tmp = readl(mmio + NV_CTL_MCP55); 1859 - VPRINTK("HOST_CTL:0x%X\n", tmp); 1869 + dev_dbg(&pdev->dev, "HOST_CTL:0x%X\n", tmp); 1860 1870 writel(tmp | NV_CTL_PRI_SWNCQ | NV_CTL_SEC_SWNCQ, mmio + NV_CTL_MCP55); 1861 1871 1862 1872 /* enable irq intr */ 1863 1873 tmp = readl(mmio + NV_INT_ENABLE_MCP55); 1864 - VPRINTK("HOST_ENABLE:0x%X\n", tmp); 1874 + dev_dbg(&pdev->dev, "HOST_ENABLE:0x%X\n", tmp); 1865 1875 writel(tmp | 0x00fd00fd, mmio + NV_INT_ENABLE_MCP55); 1866 1876 1867 1877 /* clear port irq */ ··· 2091 2101 ata_qc_complete_multiple(ap, ata_qc_get_active(ap) ^ done_mask); 2092 2102 2093 2103 if (!ap->qc_active) { 2094 - DPRINTK("over\n"); 2104 + ata_port_dbg(ap, "over\n"); 2095 2105 nv_swncq_pp_reinit(ap); 2096 2106 return 0; 2097 2107 } ··· 2106 2116 */ 2107 2117 lack_dhfis = 1; 2108 2118 2109 - DPRINTK("id 0x%x QC: qc_active 0x%llx," 2110 - "SWNCQ:qc_active 0x%X defer_bits %X " 2111 - "dhfis 0x%X dmafis 0x%X last_issue_tag %x\n", 2112 - ap->print_id, ap->qc_active, pp->qc_active, 2113 - pp->defer_queue.defer_bits, pp->dhfis_bits, 2114 - pp->dmafis_bits, pp->last_issue_tag); 2119 + ata_port_dbg(ap, "QC: qc_active 0x%llx," 2120 + "SWNCQ:qc_active 0x%X defer_bits %X " 2121 + "dhfis 0x%X dmafis 0x%X last_issue_tag %x\n", 2122 + ap->qc_active, pp->qc_active, 2123 + pp->defer_queue.defer_bits, pp->dhfis_bits, 2124 + pp->dmafis_bits, pp->last_issue_tag); 2115 2125 2116 2126 nv_swncq_fis_reinit(ap); 2117 2127 ··· 2151 2161 __ata_bmdma_stop(ap); 2152 2162 tag = nv_swncq_tag(ap); 2153 2163 2154 - DPRINTK("dma setup tag 0x%x\n", tag); 2164 + ata_port_dbg(ap, "dma setup tag 0x%x\n", tag); 2155 2165 qc = ata_qc_from_tag(ap, tag); 2156 2166 2157 2167 if (unlikely(!qc)) ··· 2219 2229 2220 2230 if (fis & NV_SWNCQ_IRQ_SDBFIS) { 2221 2231 pp->ncq_flags |= ncq_saw_sdb; 2222 - DPRINTK("id 0x%x SWNCQ: qc_active 0x%X " 2232 + ata_port_dbg(ap, "SWNCQ: qc_active 0x%X " 2223 2233 "dhfis 0x%X dmafis 0x%X sactive 0x%X\n", 2224 - ap->print_id, pp->qc_active, pp->dhfis_bits, 2234 + pp->qc_active, pp->dhfis_bits, 2225 2235 pp->dmafis_bits, readl(pp->sactive_block)); 2226 2236 if (nv_swncq_sdbfis(ap) < 0) 2227 2237 goto irq_error; ··· 2247 2257 goto irq_exit; 2248 2258 2249 2259 if (pp->defer_queue.defer_bits) { 2250 - DPRINTK("send next command\n"); 2260 + ata_port_dbg(ap, "send next command\n"); 2251 2261 qc = nv_swncq_qc_from_dq(ap); 2252 2262 nv_swncq_issue_atacmd(ap, qc); 2253 2263 }