History

ata: libata: drop ata_msg_probe()

All callsites have been converted to dynamic debugging.

Hannes Reinecke committed 4 years ago

Commit 17a1e1b1 parent 16d42464 files · +14 −35Browse files

Unified · Split

4 files
  1. drivers/ata/libata-acpi.c +7 −16
  2. drivers/ata/libata-core.c +7 −13
  3. drivers/ata/libata-sff.c +0 −4
  4. include/linux/libata.h +0 −2
drivers/ata/libata-acpi.c+7−16
@@ -402,7 +402,6 @@ EXPORT_SYMBOL_GPL(ata_acpi_stm); · 401 unmodified lines
402402 */
403403 static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf)
404404 {
405− struct ata_port *ap = dev->link->ap;
406405 acpi_status status;
407406 struct acpi_buffer output;
408407 union acpi_object *out_obj;
@@ -418,10 +417,6 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf) · 9 unmodified lines
418417 output.length = ACPI_ALLOCATE_BUFFER;
419418 output.pointer = NULL; /* ACPI-CA sets this; save/free it later */
420419
421− if (ata_msg_probe(ap))
422− ata_dev_dbg(dev, "%s: ENTER: port#: %d\n",
423− __func__, ap->port_no);
424−
425420 /* _GTF has no input parameters */
426421 status = acpi_evaluate_object(ata_dev_acpi_handle(dev), "_GTF", NULL,
427422 &output);
@@ -437,11 +432,9 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf) · 9 unmodified lines
437432 }
438433
439434 if (!output.length || !output.pointer) {
440− if (ata_msg_probe(ap))
441− ata_dev_dbg(dev, "%s: Run _GTF: length or ptr is NULL (0x%llx, 0x%p)\n",
442− __func__,
443− (unsigned long long)output.length,
444− output.pointer);
435+ ata_dev_dbg(dev, "Run _GTF: length or ptr is NULL (0x%llx, 0x%p)\n",
436+ (unsigned long long)output.length,
437+ output.pointer);
445438 rc = -EINVAL;
446439 goto out_free;
447440 }
@@ -464,9 +457,8 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf) · 16 unmodified lines
464457 rc = out_obj->buffer.length / REGS_PER_GTF;
465458 if (gtf) {
466459 *gtf = (void *)out_obj->buffer.pointer;
467− if (ata_msg_probe(ap))
468− ata_dev_dbg(dev, "%s: returning gtf=%p, gtf_count=%d\n",
469− __func__, *gtf, rc);
460+ ata_dev_dbg(dev, "returning gtf=%p, gtf_count=%d\n",
461+ *gtf, rc);
470462 }
471463 return rc;
472464
@@ -778,9 +770,8 @@ static int ata_acpi_push_id(struct ata_device *dev) · 305 unmodified lines
778770 struct acpi_object_list input;
779771 union acpi_object in_params[1];
780772
781− if (ata_msg_probe(ap))
782− ata_dev_dbg(dev, "%s: ix = %d, port#: %d\n",
783− __func__, dev->devno, ap->port_no);
773+ ata_dev_dbg(dev, "%s: ix = %d, port#: %d\n",
774+ __func__, dev->devno, ap->port_no);
784775
785776 /* Give the drive Identify data to the drive via the _SDD method */
786777 /* _SDD: set up input parameters */
drivers/ata/libata-core.c+7−13
@@ -2535,9 +2535,6 @@ int ata_dev_configure(struct ata_device *dev) · 2534 unmodified lines
25352535 return 0;
25362536 }
25372537
2538− if (ata_msg_probe(ap))
2539− ata_dev_dbg(dev, "%s: ENTER\n", __func__);
2540−
25412538 /* set horkage */
25422539 dev->horkage |= ata_dev_blacklisted(dev);
25432540 ata_force_horkage(dev);
@@ -2585,13 +2582,12 @@ int ata_dev_configure(struct ata_device *dev) · 41 unmodified lines
25852582 return rc;
25862583
25872584 /* print device capabilities */
2588− if (ata_msg_probe(ap))
2589− ata_dev_dbg(dev,
2590− "%s: cfg 49:%04x 82:%04x 83:%04x 84:%04x "
2591− "85:%04x 86:%04x 87:%04x 88:%04x\n",
2592− __func__,
2593− id[49], id[82], id[83], id[84],
2594− id[85], id[86], id[87], id[88]);
2585+ ata_dev_dbg(dev,
2586+ "%s: cfg 49:%04x 82:%04x 83:%04x 84:%04x "
2587+ "85:%04x 86:%04x 87:%04x 88:%04x\n",
2588+ __func__,
2589+ id[49], id[82], id[83], id[84],
2590+ id[85], id[86], id[87], id[88]);
25952591
25962592 /* initialize to-be-configured parameters */
25972593 dev->flags &= ~ATA_DFLAG_CFG_MASK;
@@ -2791,8 +2787,6 @@ int ata_dev_configure(struct ata_device *dev) · 193 unmodified lines
27912787 return 0;
27922788
27932789 err_out_nosup:
2794− if (ata_msg_probe(ap))
2795− ata_dev_dbg(dev, "%s: EXIT, err\n", __func__);
27962790 return rc;
27972791 }
27982792
@@ -5339,7 +5333,7 @@ struct ata_port *ata_port_alloc(struct ata_host *host) · 2540 unmodified lines
53395333
53405334 #if defined(ATA_VERBOSE_DEBUG)
53415335 /* turn on all debugging levels */
5342− ap->msg_enable = 0x0007;
5336+ ap->msg_enable = 0x0003;
53435337 #elif defined(ATA_DEBUG)
53445338 ap->msg_enable = ATA_MSG_DRV | ATA_MSG_INFO;
53455339 #else
drivers/ata/libata-sff.c+0−4
@@ -330,10 +330,6 @@ EXPORT_SYMBOL_GPL(ata_sff_dev_select); · 329 unmodified lines
330330 static void ata_dev_select(struct ata_port *ap, unsigned int device,
331331 unsigned int wait, unsigned int can_sleep)
332332 {
333− if (ata_msg_probe(ap))
334− ata_port_info(ap, "ata_dev_select: ENTER, device %u, wait %u\n",
335− device, wait);
336−
337333 if (wait)
338334 ata_wait_idle(ap);
339335
include/linux/libata.h+0−2
@@ -74,12 +74,10 @@ · 73 unmodified lines
7474 enum {
7575 ATA_MSG_DRV = 0x0001,
7676 ATA_MSG_INFO = 0x0002,
77− ATA_MSG_PROBE = 0x0004,
7877 };
7978
8079 #define ata_msg_drv(p) ((p)->msg_enable & ATA_MSG_DRV)
8180 #define ata_msg_info(p) ((p)->msg_enable & ATA_MSG_INFO)
82−#define ata_msg_probe(p) ((p)->msg_enable & ATA_MSG_PROBE)
8381
8482 static inline u32 ata_msg_init(int dval, int default_msg_enable_bits)
8583 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t