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

ata: libata: move ata_dump_id() to dynamic debugging

Use ata_dev_dbg() to print out the information in ata_dump_id()
and remove the ata_msg_probe() conditional.

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
6044f3c4 6c952a0d

+9 -27
+9 -27
drivers/ata/libata-core.c
··· 1341 1341 1342 1342 /** 1343 1343 * ata_dump_id - IDENTIFY DEVICE info debugging output 1344 + * @dev: device from which the information is fetched 1344 1345 * @id: IDENTIFY DEVICE page to dump 1345 1346 * 1346 1347 * Dump selected 16-bit words from the given IDENTIFY DEVICE ··· 1351 1350 * caller. 1352 1351 */ 1353 1352 1354 - static inline void ata_dump_id(const u16 *id) 1353 + static inline void ata_dump_id(struct ata_device *dev, const u16 *id) 1355 1354 { 1356 - DPRINTK("49==0x%04x " 1357 - "53==0x%04x " 1358 - "63==0x%04x " 1359 - "64==0x%04x " 1360 - "75==0x%04x \n", 1361 - id[49], 1362 - id[53], 1363 - id[63], 1364 - id[64], 1365 - id[75]); 1366 - DPRINTK("80==0x%04x " 1367 - "81==0x%04x " 1368 - "82==0x%04x " 1369 - "83==0x%04x " 1370 - "84==0x%04x \n", 1371 - id[80], 1372 - id[81], 1373 - id[82], 1374 - id[83], 1375 - id[84]); 1376 - DPRINTK("88==0x%04x " 1377 - "93==0x%04x\n", 1378 - id[88], 1379 - id[93]); 1355 + ata_dev_dbg(dev, 1356 + "49==0x%04x 53==0x%04x 63==0x%04x 64==0x%04x 75==0x%04x\n" 1357 + "80==0x%04x 81==0x%04x 82==0x%04x 83==0x%04x 84==0x%04x\n" 1358 + "88==0x%04x 93==0x%04x\n", 1359 + id[49], id[53], id[63], id[64], id[75], id[80], 1360 + id[81], id[82], id[83], id[84], id[88], id[93]); 1380 1361 } 1381 1362 1382 1363 /** ··· 2615 2632 /* find max transfer mode; for printk only */ 2616 2633 xfer_mask = ata_id_xfermask(id); 2617 2634 2618 - if (ata_msg_probe(ap)) 2619 - ata_dump_id(id); 2635 + ata_dump_id(dev, id); 2620 2636 2621 2637 /* SCSI only uses 4-char revisions, dump full 8 chars from ATA */ 2622 2638 ata_id_c_string(dev->id, fwrevbuf, ATA_ID_FW_REV,