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

ata: libata: drop ata_msg_probe()

All callsites have been converted to dynamic debugging.

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
17a1e1be 16d42467

+14 -35
+7 -16
drivers/ata/libata-acpi.c
··· 402 402 */ 403 403 static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf) 404 404 { 405 - struct ata_port *ap = dev->link->ap; 406 405 acpi_status status; 407 406 struct acpi_buffer output; 408 407 union acpi_object *out_obj; ··· 416 417 /* set up output buffer */ 417 418 output.length = ACPI_ALLOCATE_BUFFER; 418 419 output.pointer = NULL; /* ACPI-CA sets this; save/free it later */ 419 - 420 - if (ata_msg_probe(ap)) 421 - ata_dev_dbg(dev, "%s: ENTER: port#: %d\n", 422 - __func__, ap->port_no); 423 420 424 421 /* _GTF has no input parameters */ 425 422 status = acpi_evaluate_object(ata_dev_acpi_handle(dev), "_GTF", NULL, ··· 432 437 } 433 438 434 439 if (!output.length || !output.pointer) { 435 - if (ata_msg_probe(ap)) 436 - ata_dev_dbg(dev, "%s: Run _GTF: length or ptr is NULL (0x%llx, 0x%p)\n", 437 - __func__, 438 - (unsigned long long)output.length, 439 - output.pointer); 440 + ata_dev_dbg(dev, "Run _GTF: length or ptr is NULL (0x%llx, 0x%p)\n", 441 + (unsigned long long)output.length, 442 + output.pointer); 440 443 rc = -EINVAL; 441 444 goto out_free; 442 445 } ··· 457 464 rc = out_obj->buffer.length / REGS_PER_GTF; 458 465 if (gtf) { 459 466 *gtf = (void *)out_obj->buffer.pointer; 460 - if (ata_msg_probe(ap)) 461 - ata_dev_dbg(dev, "%s: returning gtf=%p, gtf_count=%d\n", 462 - __func__, *gtf, rc); 467 + ata_dev_dbg(dev, "returning gtf=%p, gtf_count=%d\n", 468 + *gtf, rc); 463 469 } 464 470 return rc; 465 471 ··· 770 778 struct acpi_object_list input; 771 779 union acpi_object in_params[1]; 772 780 773 - if (ata_msg_probe(ap)) 774 - ata_dev_dbg(dev, "%s: ix = %d, port#: %d\n", 775 - __func__, dev->devno, ap->port_no); 781 + ata_dev_dbg(dev, "%s: ix = %d, port#: %d\n", 782 + __func__, dev->devno, ap->port_no); 776 783 777 784 /* Give the drive Identify data to the drive via the _SDD method */ 778 785 /* _SDD: set up input parameters */
+7 -13
drivers/ata/libata-core.c
··· 2535 2535 return 0; 2536 2536 } 2537 2537 2538 - if (ata_msg_probe(ap)) 2539 - ata_dev_dbg(dev, "%s: ENTER\n", __func__); 2540 - 2541 2538 /* set horkage */ 2542 2539 dev->horkage |= ata_dev_blacklisted(dev); 2543 2540 ata_force_horkage(dev); ··· 2582 2585 return rc; 2583 2586 2584 2587 /* print device capabilities */ 2585 - if (ata_msg_probe(ap)) 2586 - ata_dev_dbg(dev, 2587 - "%s: cfg 49:%04x 82:%04x 83:%04x 84:%04x " 2588 - "85:%04x 86:%04x 87:%04x 88:%04x\n", 2589 - __func__, 2590 - id[49], id[82], id[83], id[84], 2591 - id[85], id[86], id[87], id[88]); 2588 + ata_dev_dbg(dev, 2589 + "%s: cfg 49:%04x 82:%04x 83:%04x 84:%04x " 2590 + "85:%04x 86:%04x 87:%04x 88:%04x\n", 2591 + __func__, 2592 + id[49], id[82], id[83], id[84], 2593 + id[85], id[86], id[87], id[88]); 2592 2594 2593 2595 /* initialize to-be-configured parameters */ 2594 2596 dev->flags &= ~ATA_DFLAG_CFG_MASK; ··· 2787 2791 return 0; 2788 2792 2789 2793 err_out_nosup: 2790 - if (ata_msg_probe(ap)) 2791 - ata_dev_dbg(dev, "%s: EXIT, err\n", __func__); 2792 2794 return rc; 2793 2795 } 2794 2796 ··· 5333 5339 5334 5340 #if defined(ATA_VERBOSE_DEBUG) 5335 5341 /* turn on all debugging levels */ 5336 - ap->msg_enable = 0x0007; 5342 + ap->msg_enable = 0x0003; 5337 5343 #elif defined(ATA_DEBUG) 5338 5344 ap->msg_enable = ATA_MSG_DRV | ATA_MSG_INFO; 5339 5345 #else
-4
drivers/ata/libata-sff.c
··· 330 330 static void ata_dev_select(struct ata_port *ap, unsigned int device, 331 331 unsigned int wait, unsigned int can_sleep) 332 332 { 333 - if (ata_msg_probe(ap)) 334 - ata_port_info(ap, "ata_dev_select: ENTER, device %u, wait %u\n", 335 - device, wait); 336 - 337 333 if (wait) 338 334 ata_wait_idle(ap); 339 335
-2
include/linux/libata.h
··· 74 74 enum { 75 75 ATA_MSG_DRV = 0x0001, 76 76 ATA_MSG_INFO = 0x0002, 77 - ATA_MSG_PROBE = 0x0004, 78 77 }; 79 78 80 79 #define ata_msg_drv(p) ((p)->msg_enable & ATA_MSG_DRV) 81 80 #define ata_msg_info(p) ((p)->msg_enable & ATA_MSG_INFO) 82 - #define ata_msg_probe(p) ((p)->msg_enable & ATA_MSG_PROBE) 83 81 84 82 static inline u32 ata_msg_init(int dval, int default_msg_enable_bits) 85 83 {