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

ata: libata: remove pointless VPRINTK() calls

Most of the information is already covered by tracepoints
(if not downright pointless), so remove the VPRINTK() calls.
And while we're at it, remove ata_scsi_dump_cdb(), too,
as this information can be retrieved from scsi tracing.

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
e1553351 b5a5fc8b

-52
-3
drivers/ata/libata-core.c
··· 4503 4503 4504 4504 WARN_ON_ONCE(sg == NULL); 4505 4505 4506 - VPRINTK("unmapping %u sg elements\n", qc->n_elem); 4507 - 4508 4506 if (qc->n_elem) 4509 4507 dma_unmap_sg(ap->dev, sg, qc->orig_n_elem, dir); 4510 4508 ··· 4532 4534 if (n_elem < 1) 4533 4535 return -1; 4534 4536 4535 - VPRINTK("%d sg elements mapped\n", n_elem); 4536 4537 qc->orig_n_elem = qc->n_elem; 4537 4538 qc->n_elem = n_elem; 4538 4539 qc->flags |= ATA_QCFLAG_DMAMAP;
-2
drivers/ata/libata-sata.c
··· 1258 1258 { 1259 1259 int rc = 0; 1260 1260 1261 - ata_scsi_dump_cdb(ap, cmd); 1262 - 1263 1261 if (likely(ata_dev_enabled(ap->link.device))) 1264 1262 rc = __ata_scsi_queuecmd(cmd, ap->link.device); 1265 1263 else {
-42
drivers/ata/libata-scsi.c
··· 1299 1299 u64 lba = 0; 1300 1300 u32 len; 1301 1301 1302 - VPRINTK("six-byte command\n"); 1303 - 1304 1302 lba |= ((u64)(cdb[1] & 0x1f)) << 16; 1305 1303 lba |= ((u64)cdb[2]) << 8; 1306 1304 lba |= ((u64)cdb[3]); ··· 1323 1325 { 1324 1326 u64 lba = 0; 1325 1327 u32 len = 0; 1326 - 1327 - VPRINTK("ten-byte command\n"); 1328 1328 1329 1329 lba |= ((u64)cdb[2]) << 24; 1330 1330 lba |= ((u64)cdb[3]) << 16; ··· 1350 1354 { 1351 1355 u64 lba = 0; 1352 1356 u32 len = 0; 1353 - 1354 - VPRINTK("sixteen-byte command\n"); 1355 1357 1356 1358 lba |= ((u64)cdb[2]) << 56; 1357 1359 lba |= ((u64)cdb[3]) << 48; ··· 1700 1706 struct ata_queued_cmd *qc; 1701 1707 int rc; 1702 1708 1703 - VPRINTK("ENTER\n"); 1704 - 1705 1709 qc = ata_scsi_qc_new(dev, cmd); 1706 1710 if (!qc) 1707 1711 goto err_mem; ··· 1730 1738 /* select device, send command to hardware */ 1731 1739 ata_qc_issue(qc); 1732 1740 1733 - VPRINTK("EXIT\n"); 1734 1741 return 0; 1735 1742 1736 1743 early_finish: ··· 1841 1850 0, 1842 1851 2 1843 1852 }; 1844 - 1845 - VPRINTK("ENTER\n"); 1846 1853 1847 1854 /* set scsi removable (RMB) bit per ata bit, or if the 1848 1855 * AHCI port says it's external (Hotplug-capable, eSATA). ··· 2276 2287 u8 dpofua, bp = 0xff; 2277 2288 u16 fp; 2278 2289 2279 - VPRINTK("ENTER\n"); 2280 - 2281 2290 six_byte = (scsicmd[0] == MODE_SENSE); 2282 2291 ebd = !(scsicmd[1] & 0x8); /* dbd bit inverted == edb */ 2283 2292 /* ··· 2393 2406 log2_per_phys = ata_id_log2_per_physical_sector(dev->id); 2394 2407 lowest_aligned = ata_id_logical_sector_offset(dev->id, log2_per_phys); 2395 2408 2396 - VPRINTK("ENTER\n"); 2397 - 2398 2409 if (args->cmd->cmnd[0] == READ_CAPACITY) { 2399 2410 if (last_lba >= 0xffffffffULL) 2400 2411 last_lba = 0xffffffff; ··· 2459 2474 */ 2460 2475 static unsigned int ata_scsiop_report_luns(struct ata_scsi_args *args, u8 *rbuf) 2461 2476 { 2462 - VPRINTK("ENTER\n"); 2463 2477 rbuf[3] = 8; /* just one lun, LUN 0, size 8 bytes */ 2464 2478 2465 2479 return 0; ··· 2553 2569 { 2554 2570 struct scsi_cmnd *cmd = qc->scsicmd; 2555 2571 unsigned int err_mask = qc->err_mask; 2556 - 2557 - VPRINTK("ENTER, err_mask 0x%X\n", err_mask); 2558 2572 2559 2573 /* handle completion from new EH */ 2560 2574 if (unlikely(qc->ap->ops->error_handler && ··· 3662 3680 u8 buffer[64]; 3663 3681 const u8 *p = buffer; 3664 3682 3665 - VPRINTK("ENTER\n"); 3666 - 3667 3683 six_byte = (cdb[0] == MODE_SELECT); 3668 3684 if (six_byte) { 3669 3685 if (scmd->cmd_len < 5) { ··· 3959 3979 return NULL; 3960 3980 } 3961 3981 3962 - /** 3963 - * ata_scsi_dump_cdb - dump SCSI command contents to dmesg 3964 - * @ap: ATA port to which the command was being sent 3965 - * @cmd: SCSI command to dump 3966 - * 3967 - * Prints the contents of a SCSI command via printk(). 3968 - */ 3969 - 3970 - void ata_scsi_dump_cdb(struct ata_port *ap, struct scsi_cmnd *cmd) 3971 - { 3972 - #ifdef ATA_VERBOSE_DEBUG 3973 - struct scsi_device *scsidev = cmd->device; 3974 - 3975 - VPRINTK("CDB (%u:%d,%d,%lld) %9ph\n", 3976 - ap->print_id, 3977 - scsidev->channel, scsidev->id, scsidev->lun, 3978 - cmd->cmnd); 3979 - #endif 3980 - } 3981 - 3982 3982 int __ata_scsi_queuecmd(struct scsi_cmnd *scmd, struct ata_device *dev) 3983 3983 { 3984 3984 u8 scsi_op = scmd->cmnd[0]; ··· 4036 4076 ap = ata_shost_to_port(shost); 4037 4077 4038 4078 spin_lock_irqsave(ap->lock, irq_flags); 4039 - 4040 - ata_scsi_dump_cdb(ap, cmd); 4041 4079 4042 4080 dev = ata_scsi_find_dev(ap, scsidev); 4043 4081 if (likely(dev))
-4
drivers/ata/libata-sff.c
··· 877 877 if (unlikely(!bytes)) 878 878 goto atapi_check; 879 879 880 - VPRINTK("ata%u: xfering %d bytes\n", ap->print_id, bytes); 881 - 882 880 if (unlikely(__atapi_pio_bytes(qc, bytes))) 883 881 goto err_out; 884 882 ata_sff_sync(ap); /* flush */ ··· 2584 2586 2585 2587 prd[pi].addr = cpu_to_le32(addr); 2586 2588 prd[pi].flags_len = cpu_to_le32(len & 0xffff); 2587 - VPRINTK("PRD[%u] = (0x%X, 0x%X)\n", pi, addr, len); 2588 2589 2589 2590 pi++; 2590 2591 sg_len -= len; ··· 2643 2646 prd[++pi].addr = cpu_to_le32(addr + 0x8000); 2644 2647 } 2645 2648 prd[pi].flags_len = cpu_to_le32(blen); 2646 - VPRINTK("PRD[%u] = (0x%X, 0x%X)\n", pi, addr, len); 2647 2649 2648 2650 pi++; 2649 2651 sg_len -= len;
-1
drivers/ata/libata.h
··· 148 148 unsigned int id, u64 lun); 149 149 void ata_scsi_sdev_config(struct scsi_device *sdev); 150 150 int ata_scsi_dev_config(struct scsi_device *sdev, struct ata_device *dev); 151 - void ata_scsi_dump_cdb(struct ata_port *ap, struct scsi_cmnd *cmd); 152 151 int __ata_scsi_queuecmd(struct scsi_cmnd *scmd, struct ata_device *dev); 153 152 154 153 /* libata-eh.c */