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

ata: Convert ata_<foo>_printk(KERN_<LEVEL> to ata_<foo>_<level>

Saves text by removing nearly duplicated text format strings by
creating ata_<foo>_printk functions and printf extension %pV.

ata defconfig size shrinks ~5% (~8KB), allyesconfig ~2.5% (~13KB)

Format string duplication comes from:

#define ata_link_printk(link, lv, fmt, args...) do { \
if (sata_pmp_attached((link)->ap) || (link)->ap->slave_link) \
printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id, \
(link)->pmp , ##args); \
else \
printk("%sata%u: "fmt, lv, (link)->ap->print_id , ##args); \
} while(0)

Coalesce long formats.

$ size drivers/ata/built-in.*
text data bss dec hex filename
544969 73893 116584 735446 b38d6 drivers/ata/built-in.allyesconfig.ata.o
558429 73893 117864 750186 b726a drivers/ata/built-in.allyesconfig.dev_level.o
141328 14689 4220 160237 271ed drivers/ata/built-in.defconfig.ata.o
149567 14689 4220 168476 2921c drivers/ata/built-in.defconfig.dev_level.o

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>

authored by

Joe Perches and committed by
Jeff Garzik
a9a79dfe a44fec1f

+566 -533
+2 -3
drivers/ata/ahci.c
··· 540 540 if (rc == -EIO) { 541 541 irq_sts = readl(port_mmio + PORT_IRQ_STAT); 542 542 if (irq_sts & PORT_IRQ_BAD_PMP) { 543 - ata_link_printk(link, KERN_WARNING, 544 - "applying SB600 PMP SRST workaround " 545 - "and retrying\n"); 543 + ata_link_warn(link, 544 + "applying SB600 PMP SRST workaround and retrying\n"); 546 545 rc = ahci_do_softreset(link, class, 0, deadline, 547 546 ahci_check_ready); 548 547 }
+2 -3
drivers/ata/ata_generic.c
··· 81 81 xfer_mask |= ata_xfer_mode2mask(XFER_MW_DMA_0); 82 82 } 83 83 84 - ata_dev_printk(dev, KERN_INFO, "configured for %s\n", 85 - name); 84 + ata_dev_info(dev, "configured for %s\n", name); 86 85 87 86 dev->xfer_mode = ata_xfer_mask2mode(xfer_mask); 88 87 dev->xfer_shift = ata_xfer_mode2shift(dev->xfer_mode); 89 88 dev->flags &= ~ATA_DFLAG_PIO; 90 89 } else { 91 - ata_dev_printk(dev, KERN_INFO, "configured for PIO\n"); 90 + ata_dev_info(dev, "configured for PIO\n"); 92 91 dev->xfer_mode = XFER_PIO_0; 93 92 dev->xfer_shift = ATA_SHIFT_PIO; 94 93 dev->flags |= ATA_DFLAG_PIO;
+11 -13
drivers/ata/libahci.c
··· 286 286 /* the count should not be larger than PAGE_SIZE */ 287 287 if (count > PAGE_SIZE) { 288 288 if (printk_ratelimit()) 289 - ata_port_printk(ap, KERN_WARNING, 290 - "EM read buffer size too large: " 291 - "buffer size %u, page size %lu\n", 292 - hpriv->em_buf_sz, PAGE_SIZE); 289 + ata_port_warn(ap, 290 + "EM read buffer size too large: " 291 + "buffer size %u, page size %lu\n", 292 + hpriv->em_buf_sz, PAGE_SIZE); 293 293 count = PAGE_SIZE; 294 294 } 295 295 ··· 1124 1124 1125 1125 if (hpriv->flags & AHCI_HFLAG_SECT255) { 1126 1126 dev->max_sectors = 255; 1127 - ata_dev_printk(dev, KERN_INFO, 1128 - "SB600 AHCI: limiting to 255 sectors per cmd\n"); 1127 + ata_dev_info(dev, 1128 + "SB600 AHCI: limiting to 255 sectors per cmd\n"); 1129 1129 } 1130 1130 } 1131 1131 ··· 1249 1249 /* prepare for SRST (AHCI-1.1 10.4.1) */ 1250 1250 rc = ahci_kick_engine(ap); 1251 1251 if (rc && rc != -EOPNOTSUPP) 1252 - ata_link_printk(link, KERN_WARNING, 1253 - "failed to reset engine (errno=%d)\n", rc); 1252 + ata_link_warn(link, "failed to reset engine (errno=%d)\n", rc); 1254 1253 1255 1254 ata_tf_init(link->device, &tf); 1256 1255 ··· 1282 1283 * be trusted. Treat device readiness timeout as link 1283 1284 * offline. 1284 1285 */ 1285 - ata_link_printk(link, KERN_INFO, 1286 - "device not ready, treating as offline\n"); 1286 + ata_link_info(link, "device not ready, treating as offline\n"); 1287 1287 *class = ATA_DEV_NONE; 1288 1288 } else if (rc) { 1289 1289 /* link occupied, -ENODEV too is an error */ ··· 1295 1297 return 0; 1296 1298 1297 1299 fail: 1298 - ata_link_printk(link, KERN_ERR, "softreset failed (%s)\n", reason); 1300 + ata_link_err(link, "softreset failed (%s)\n", reason); 1299 1301 return rc; 1300 1302 } 1301 1303 ··· 1964 1966 if (rc == 0) 1965 1967 ahci_power_down(ap); 1966 1968 else { 1967 - ata_port_printk(ap, KERN_ERR, "%s (%d)\n", emsg, rc); 1969 + ata_port_err(ap, "%s (%d)\n", emsg, rc); 1968 1970 ahci_start_port(ap); 1969 1971 } 1970 1972 ··· 2059 2061 /* de-initialize port */ 2060 2062 rc = ahci_deinit_port(ap, &emsg); 2061 2063 if (rc) 2062 - ata_port_printk(ap, KERN_WARNING, "%s (%d)\n", emsg, rc); 2064 + ata_port_warn(ap, "%s (%d)\n", emsg, rc); 2063 2065 } 2064 2066 2065 2067 void ahci_print_info(struct ata_host *host, const char *scc_s)
+28 -38
drivers/ata/libata-acpi.c
··· 332 332 333 333 rc = -EINVAL; 334 334 if (ACPI_FAILURE(status)) { 335 - ata_port_printk(ap, KERN_ERR, 336 - "ACPI get timing mode failed (AE 0x%x)\n", 337 - status); 335 + ata_port_err(ap, "ACPI get timing mode failed (AE 0x%x)\n", 336 + status); 338 337 goto out_free; 339 338 } 340 339 341 340 out_obj = output.pointer; 342 341 if (out_obj->type != ACPI_TYPE_BUFFER) { 343 - ata_port_printk(ap, KERN_WARNING, 344 - "_GTM returned unexpected object type 0x%x\n", 345 - out_obj->type); 342 + ata_port_warn(ap, "_GTM returned unexpected object type 0x%x\n", 343 + out_obj->type); 346 344 347 345 goto out_free; 348 346 } 349 347 350 348 if (out_obj->buffer.length != sizeof(struct ata_acpi_gtm)) { 351 - ata_port_printk(ap, KERN_ERR, 352 - "_GTM returned invalid length %d\n", 353 - out_obj->buffer.length); 349 + ata_port_err(ap, "_GTM returned invalid length %d\n", 350 + out_obj->buffer.length); 354 351 goto out_free; 355 352 } 356 353 ··· 399 402 if (status == AE_NOT_FOUND) 400 403 return -ENOENT; 401 404 if (ACPI_FAILURE(status)) { 402 - ata_port_printk(ap, KERN_ERR, 403 - "ACPI set timing mode failed (status=0x%x)\n", status); 405 + ata_port_err(ap, "ACPI set timing mode failed (status=0x%x)\n", 406 + status); 404 407 return -EINVAL; 405 408 } 406 409 return 0; ··· 447 450 output.pointer = NULL; /* ACPI-CA sets this; save/free it later */ 448 451 449 452 if (ata_msg_probe(ap)) 450 - ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER: port#: %d\n", 451 - __func__, ap->port_no); 453 + ata_dev_dbg(dev, "%s: ENTER: port#: %d\n", 454 + __func__, ap->port_no); 452 455 453 456 /* _GTF has no input parameters */ 454 457 status = acpi_evaluate_object(dev->acpi_handle, "_GTF", NULL, &output); ··· 456 459 457 460 if (ACPI_FAILURE(status)) { 458 461 if (status != AE_NOT_FOUND) { 459 - ata_dev_printk(dev, KERN_WARNING, 460 - "_GTF evaluation failed (AE 0x%x)\n", 461 - status); 462 + ata_dev_warn(dev, "_GTF evaluation failed (AE 0x%x)\n", 463 + status); 462 464 rc = -EINVAL; 463 465 } 464 466 goto out_free; ··· 465 469 466 470 if (!output.length || !output.pointer) { 467 471 if (ata_msg_probe(ap)) 468 - ata_dev_printk(dev, KERN_DEBUG, "%s: Run _GTF: " 469 - "length or ptr is NULL (0x%llx, 0x%p)\n", 470 - __func__, 471 - (unsigned long long)output.length, 472 - output.pointer); 472 + ata_dev_dbg(dev, "%s: Run _GTF: length or ptr is NULL (0x%llx, 0x%p)\n", 473 + __func__, 474 + (unsigned long long)output.length, 475 + output.pointer); 473 476 rc = -EINVAL; 474 477 goto out_free; 475 478 } 476 479 477 480 if (out_obj->type != ACPI_TYPE_BUFFER) { 478 - ata_dev_printk(dev, KERN_WARNING, 479 - "_GTF unexpected object type 0x%x\n", 480 - out_obj->type); 481 + ata_dev_warn(dev, "_GTF unexpected object type 0x%x\n", 482 + out_obj->type); 481 483 rc = -EINVAL; 482 484 goto out_free; 483 485 } 484 486 485 487 if (out_obj->buffer.length % REGS_PER_GTF) { 486 - ata_dev_printk(dev, KERN_WARNING, 487 - "unexpected _GTF length (%d)\n", 488 - out_obj->buffer.length); 488 + ata_dev_warn(dev, "unexpected _GTF length (%d)\n", 489 + out_obj->buffer.length); 489 490 rc = -EINVAL; 490 491 goto out_free; 491 492 } ··· 492 499 if (gtf) { 493 500 *gtf = (void *)out_obj->buffer.pointer; 494 501 if (ata_msg_probe(ap)) 495 - ata_dev_printk(dev, KERN_DEBUG, 496 - "%s: returning gtf=%p, gtf_count=%d\n", 497 - __func__, *gtf, rc); 502 + ata_dev_dbg(dev, "%s: returning gtf=%p, gtf_count=%d\n", 503 + __func__, *gtf, rc); 498 504 } 499 505 return rc; 500 506 ··· 803 811 union acpi_object in_params[1]; 804 812 805 813 if (ata_msg_probe(ap)) 806 - ata_dev_printk(dev, KERN_DEBUG, "%s: ix = %d, port#: %d\n", 807 - __func__, dev->devno, ap->port_no); 814 + ata_dev_dbg(dev, "%s: ix = %d, port#: %d\n", 815 + __func__, dev->devno, ap->port_no); 808 816 809 817 /* Give the drive Identify data to the drive via the _SDD method */ 810 818 /* _SDD: set up input parameters */ ··· 824 832 return -ENOENT; 825 833 826 834 if (ACPI_FAILURE(status)) { 827 - ata_dev_printk(dev, KERN_WARNING, 828 - "ACPI _SDD failed (AE 0x%x)\n", status); 835 + ata_dev_warn(dev, "ACPI _SDD failed (AE 0x%x)\n", status); 829 836 return -EIO; 830 837 } 831 838 ··· 974 983 if (nr_executed) { 975 984 rc = ata_dev_reread_id(dev, 0); 976 985 if (rc < 0) { 977 - ata_dev_printk(dev, KERN_ERR, "failed to IDENTIFY " 978 - "after ACPI commands\n"); 986 + ata_dev_err(dev, 987 + "failed to IDENTIFY after ACPI commands\n"); 979 988 return rc; 980 989 } 981 990 } ··· 993 1002 return rc; 994 1003 } 995 1004 996 - ata_dev_printk(dev, KERN_WARNING, 997 - "ACPI: failed the second time, disabled\n"); 1005 + ata_dev_warn(dev, "ACPI: failed the second time, disabled\n"); 998 1006 dev->acpi_handle = NULL; 999 1007 1000 1008 /* We can safely continue if no _GTF command has been executed
+215 -166
drivers/ata/libata-core.c
··· 335 335 continue; 336 336 337 337 ap->cbl = fe->param.cbl; 338 - ata_port_printk(ap, KERN_NOTICE, 339 - "FORCE: cable set to %s\n", fe->param.name); 338 + ata_port_notice(ap, "FORCE: cable set to %s\n", fe->param.name); 340 339 return; 341 340 } 342 341 } ··· 377 378 /* only honor the first spd limit */ 378 379 if (!did_spd && fe->param.spd_limit) { 379 380 link->hw_sata_spd_limit = (1 << fe->param.spd_limit) - 1; 380 - ata_link_printk(link, KERN_NOTICE, 381 - "FORCE: PHY spd limit set to %s\n", 381 + ata_link_notice(link, "FORCE: PHY spd limit set to %s\n", 382 382 fe->param.name); 383 383 did_spd = true; 384 384 } ··· 385 387 /* let lflags stack */ 386 388 if (fe->param.lflags) { 387 389 link->flags |= fe->param.lflags; 388 - ata_link_printk(link, KERN_NOTICE, 390 + ata_link_notice(link, 389 391 "FORCE: link flag 0x%x forced -> 0x%x\n", 390 392 fe->param.lflags, link->flags); 391 393 } ··· 440 442 dev->pio_mask = pio_mask; 441 443 } 442 444 443 - ata_dev_printk(dev, KERN_NOTICE, 444 - "FORCE: xfer_mask set to %s\n", fe->param.name); 445 + ata_dev_notice(dev, "FORCE: xfer_mask set to %s\n", 446 + fe->param.name); 445 447 return; 446 448 } 447 449 } ··· 484 486 dev->horkage |= fe->param.horkage_on; 485 487 dev->horkage &= ~fe->param.horkage_off; 486 488 487 - ata_dev_printk(dev, KERN_NOTICE, 488 - "FORCE: horkage modified (%s)\n", fe->param.name); 489 + ata_dev_notice(dev, "FORCE: horkage modified (%s)\n", 490 + fe->param.name); 489 491 } 490 492 } 491 493 ··· 709 711 sect = tf->lbal; 710 712 711 713 if (!sect) { 712 - ata_dev_printk(dev, KERN_WARNING, "device reported " 713 - "invalid CHS sector 0\n"); 714 + ata_dev_warn(dev, 715 + "device reported invalid CHS sector 0\n"); 714 716 sect = 1; /* oh well */ 715 717 } 716 718 ··· 1228 1230 1229 1231 err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0); 1230 1232 if (err_mask) { 1231 - ata_dev_printk(dev, KERN_WARNING, "failed to read native " 1232 - "max address (err_mask=0x%x)\n", err_mask); 1233 + ata_dev_warn(dev, 1234 + "failed to read native max address (err_mask=0x%x)\n", 1235 + err_mask); 1233 1236 if (err_mask == AC_ERR_DEV && (tf.feature & ATA_ABORTED)) 1234 1237 return -EACCES; 1235 1238 return -EIO; ··· 1291 1292 1292 1293 err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0); 1293 1294 if (err_mask) { 1294 - ata_dev_printk(dev, KERN_WARNING, "failed to set " 1295 - "max address (err_mask=0x%x)\n", err_mask); 1295 + ata_dev_warn(dev, 1296 + "failed to set max address (err_mask=0x%x)\n", 1297 + err_mask); 1296 1298 if (err_mask == AC_ERR_DEV && 1297 1299 (tf.feature & (ATA_ABORTED | ATA_IDNF))) 1298 1300 return -EACCES; ··· 1336 1336 * be unlocked, skip HPA resizing. 1337 1337 */ 1338 1338 if (rc == -EACCES || !unlock_hpa) { 1339 - ata_dev_printk(dev, KERN_WARNING, "HPA support seems " 1340 - "broken, skipping HPA handling\n"); 1339 + ata_dev_warn(dev, 1340 + "HPA support seems broken, skipping HPA handling\n"); 1341 1341 dev->horkage |= ATA_HORKAGE_BROKEN_HPA; 1342 1342 1343 1343 /* we can continue if device aborted the command */ ··· 1355 1355 return 0; 1356 1356 1357 1357 if (native_sectors > sectors) 1358 - ata_dev_printk(dev, KERN_INFO, 1358 + ata_dev_info(dev, 1359 1359 "HPA detected: current %llu, native %llu\n", 1360 1360 (unsigned long long)sectors, 1361 1361 (unsigned long long)native_sectors); 1362 1362 else if (native_sectors < sectors) 1363 - ata_dev_printk(dev, KERN_WARNING, 1364 - "native sectors (%llu) is smaller than " 1365 - "sectors (%llu)\n", 1363 + ata_dev_warn(dev, 1364 + "native sectors (%llu) is smaller than sectors (%llu)\n", 1366 1365 (unsigned long long)native_sectors, 1367 1366 (unsigned long long)sectors); 1368 1367 return 0; ··· 1371 1372 rc = ata_set_max_sectors(dev, native_sectors); 1372 1373 if (rc == -EACCES) { 1373 1374 /* if device aborted the command, skip HPA resizing */ 1374 - ata_dev_printk(dev, KERN_WARNING, "device aborted resize " 1375 - "(%llu -> %llu), skipping HPA handling\n", 1376 - (unsigned long long)sectors, 1377 - (unsigned long long)native_sectors); 1375 + ata_dev_warn(dev, 1376 + "device aborted resize (%llu -> %llu), skipping HPA handling\n", 1377 + (unsigned long long)sectors, 1378 + (unsigned long long)native_sectors); 1378 1379 dev->horkage |= ATA_HORKAGE_BROKEN_HPA; 1379 1380 return 0; 1380 1381 } else if (rc) ··· 1383 1384 /* re-read IDENTIFY data */ 1384 1385 rc = ata_dev_reread_id(dev, 0); 1385 1386 if (rc) { 1386 - ata_dev_printk(dev, KERN_ERR, "failed to re-read IDENTIFY " 1387 - "data after HPA resizing\n"); 1387 + ata_dev_err(dev, 1388 + "failed to re-read IDENTIFY data after HPA resizing\n"); 1388 1389 return rc; 1389 1390 } 1390 1391 1391 1392 if (print_info) { 1392 1393 u64 new_sectors = ata_id_n_sectors(dev->id); 1393 - ata_dev_printk(dev, KERN_INFO, 1394 + ata_dev_info(dev, 1394 1395 "HPA unlocked: %llu -> %llu, native %llu\n", 1395 1396 (unsigned long long)sectors, 1396 1397 (unsigned long long)new_sectors, ··· 1654 1655 ata_qc_complete(qc); 1655 1656 1656 1657 if (ata_msg_warn(ap)) 1657 - ata_dev_printk(dev, KERN_WARNING, 1658 - "qc timeout (cmd 0x%x)\n", command); 1658 + ata_dev_warn(dev, "qc timeout (cmd 0x%x)\n", 1659 + command); 1659 1660 } 1660 1661 1661 1662 spin_unlock_irqrestore(ap->lock, flags); ··· 1869 1870 int rc; 1870 1871 1871 1872 if (ata_msg_ctl(ap)) 1872 - ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER\n", __func__); 1873 + ata_dev_dbg(dev, "%s: ENTER\n", __func__); 1873 1874 1874 1875 retry: 1875 1876 ata_tf_init(dev, &tf); ··· 1908 1909 1909 1910 if (err_mask) { 1910 1911 if (err_mask & AC_ERR_NODEV_HINT) { 1911 - ata_dev_printk(dev, KERN_DEBUG, 1912 - "NODEV after polling detection\n"); 1912 + ata_dev_dbg(dev, "NODEV after polling detection\n"); 1913 1913 return -ENOENT; 1914 1914 } 1915 1915 1916 1916 if (is_semb) { 1917 - ata_dev_printk(dev, KERN_INFO, "IDENTIFY failed on " 1918 - "device w/ SEMB sig, disabled\n"); 1917 + ata_dev_info(dev, 1918 + "IDENTIFY failed on device w/ SEMB sig, disabled\n"); 1919 1919 /* SEMB is not supported yet */ 1920 1920 *p_class = ATA_DEV_SEMB_UNSUP; 1921 1921 return 0; ··· 1940 1942 * both flavors of IDENTIFYs which happens 1941 1943 * sometimes with phantom devices. 1942 1944 */ 1943 - ata_dev_printk(dev, KERN_DEBUG, 1944 - "both IDENTIFYs aborted, assuming NODEV\n"); 1945 + ata_dev_dbg(dev, 1946 + "both IDENTIFYs aborted, assuming NODEV\n"); 1945 1947 return -ENOENT; 1946 1948 } 1947 1949 ··· 1951 1953 } 1952 1954 1953 1955 if (dev->horkage & ATA_HORKAGE_DUMP_ID) { 1954 - ata_dev_printk(dev, KERN_DEBUG, "dumping IDENTIFY data, " 1955 - "class=%d may_fallback=%d tried_spinup=%d\n", 1956 - class, may_fallback, tried_spinup); 1956 + ata_dev_dbg(dev, "dumping IDENTIFY data, " 1957 + "class=%d may_fallback=%d tried_spinup=%d\n", 1958 + class, may_fallback, tried_spinup); 1957 1959 print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 1958 1960 16, 2, id, ATA_ID_WORDS * sizeof(*id), true); 1959 1961 } ··· 2032 2034 2033 2035 err_out: 2034 2036 if (ata_msg_warn(ap)) 2035 - ata_dev_printk(dev, KERN_WARNING, "failed to IDENTIFY " 2036 - "(%s, err_mask=0x%x)\n", reason, err_mask); 2037 + ata_dev_warn(dev, "failed to IDENTIFY (%s, err_mask=0x%x)\n", 2038 + reason, err_mask); 2037 2039 return rc; 2038 2040 } 2039 2041 ··· 2063 2065 * guaranteed by setting sata_spd_limit to target_limit above. 2064 2066 */ 2065 2067 if (plink->sata_spd > target) { 2066 - ata_dev_printk(dev, KERN_INFO, 2067 - "applying link speed limit horkage to %s\n", 2068 - sata_spd_string(target)); 2068 + ata_dev_info(dev, "applying link speed limit horkage to %s\n", 2069 + sata_spd_string(target)); 2069 2070 return -EAGAIN; 2070 2071 } 2071 2072 return 0; ··· 2107 2110 err_mask = ata_dev_set_feature(dev, SETFEATURES_SATA_ENABLE, 2108 2111 SATA_FPDMA_AA); 2109 2112 if (err_mask) { 2110 - ata_dev_printk(dev, KERN_ERR, "failed to enable AA" 2111 - "(error_mask=0x%x)\n", err_mask); 2113 + ata_dev_err(dev, 2114 + "failed to enable AA (error_mask=0x%x)\n", 2115 + err_mask); 2112 2116 if (err_mask != AC_ERR_DEV) { 2113 2117 dev->horkage |= ATA_HORKAGE_BROKEN_FPDMA_AA; 2114 2118 return -EIO; ··· 2152 2154 int rc; 2153 2155 2154 2156 if (!ata_dev_enabled(dev) && ata_msg_info(ap)) { 2155 - ata_dev_printk(dev, KERN_INFO, "%s: ENTER/EXIT -- nodev\n", 2156 - __func__); 2157 + ata_dev_info(dev, "%s: ENTER/EXIT -- nodev\n", __func__); 2157 2158 return 0; 2158 2159 } 2159 2160 2160 2161 if (ata_msg_probe(ap)) 2161 - ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER\n", __func__); 2162 + ata_dev_dbg(dev, "%s: ENTER\n", __func__); 2162 2163 2163 2164 /* set horkage */ 2164 2165 dev->horkage |= ata_dev_blacklisted(dev); 2165 2166 ata_force_horkage(dev); 2166 2167 2167 2168 if (dev->horkage & ATA_HORKAGE_DISABLE) { 2168 - ata_dev_printk(dev, KERN_INFO, 2169 - "unsupported device, disabling\n"); 2169 + ata_dev_info(dev, "unsupported device, disabling\n"); 2170 2170 ata_dev_disable(dev); 2171 2171 return 0; 2172 2172 } 2173 2173 2174 2174 if ((!atapi_enabled || (ap->flags & ATA_FLAG_NO_ATAPI)) && 2175 2175 dev->class == ATA_DEV_ATAPI) { 2176 - ata_dev_printk(dev, KERN_WARNING, 2177 - "WARNING: ATAPI is %s, device ignored.\n", 2178 - atapi_enabled ? "not supported with this driver" 2179 - : "disabled"); 2176 + ata_dev_warn(dev, "WARNING: ATAPI is %s, device ignored\n", 2177 + atapi_enabled ? "not supported with this driver" 2178 + : "disabled"); 2180 2179 ata_dev_disable(dev); 2181 2180 return 0; 2182 2181 } ··· 2194 2199 2195 2200 /* print device capabilities */ 2196 2201 if (ata_msg_probe(ap)) 2197 - ata_dev_printk(dev, KERN_DEBUG, 2198 - "%s: cfg 49:%04x 82:%04x 83:%04x 84:%04x " 2199 - "85:%04x 86:%04x 87:%04x 88:%04x\n", 2200 - __func__, 2201 - id[49], id[82], id[83], id[84], 2202 - id[85], id[86], id[87], id[88]); 2202 + ata_dev_dbg(dev, 2203 + "%s: cfg 49:%04x 82:%04x 83:%04x 84:%04x " 2204 + "85:%04x 86:%04x 87:%04x 88:%04x\n", 2205 + __func__, 2206 + id[49], id[82], id[83], id[84], 2207 + id[85], id[86], id[87], id[88]); 2203 2208 2204 2209 /* initialize to-be-configured parameters */ 2205 2210 dev->flags &= ~ATA_DFLAG_CFG_MASK; ··· 2233 2238 if (ata_id_is_cfa(id)) { 2234 2239 /* CPRM may make this media unusable */ 2235 2240 if (id[ATA_ID_CFA_KEY_MGMT] & 1) 2236 - ata_dev_printk(dev, KERN_WARNING, 2237 - "supports DRM functions and may " 2238 - "not be fully accessible.\n"); 2241 + ata_dev_warn(dev, 2242 + "supports DRM functions and may not be fully accessible\n"); 2239 2243 snprintf(revbuf, 7, "CFA"); 2240 2244 } else { 2241 2245 snprintf(revbuf, 7, "ATA-%d", ata_id_major_version(id)); 2242 2246 /* Warn the user if the device has TPM extensions */ 2243 2247 if (ata_id_has_tpm(id)) 2244 - ata_dev_printk(dev, KERN_WARNING, 2245 - "supports DRM functions and may " 2246 - "not be fully accessible.\n"); 2248 + ata_dev_warn(dev, 2249 + "supports DRM functions and may not be fully accessible\n"); 2247 2250 } 2248 2251 2249 2252 dev->n_sectors = ata_id_n_sectors(id); ··· 2278 2285 2279 2286 /* print device info to dmesg */ 2280 2287 if (ata_msg_drv(ap) && print_info) { 2281 - ata_dev_printk(dev, KERN_INFO, 2282 - "%s: %s, %s, max %s\n", 2283 - revbuf, modelbuf, fwrevbuf, 2284 - ata_mode_string(xfer_mask)); 2285 - ata_dev_printk(dev, KERN_INFO, 2286 - "%Lu sectors, multi %u: %s %s\n", 2288 + ata_dev_info(dev, "%s: %s, %s, max %s\n", 2289 + revbuf, modelbuf, fwrevbuf, 2290 + ata_mode_string(xfer_mask)); 2291 + ata_dev_info(dev, 2292 + "%llu sectors, multi %u: %s %s\n", 2287 2293 (unsigned long long)dev->n_sectors, 2288 2294 dev->multi_count, lba_desc, ncq_desc); 2289 2295 } ··· 2303 2311 2304 2312 /* print device info to dmesg */ 2305 2313 if (ata_msg_drv(ap) && print_info) { 2306 - ata_dev_printk(dev, KERN_INFO, 2307 - "%s: %s, %s, max %s\n", 2308 - revbuf, modelbuf, fwrevbuf, 2309 - ata_mode_string(xfer_mask)); 2310 - ata_dev_printk(dev, KERN_INFO, 2311 - "%Lu sectors, multi %u, CHS %u/%u/%u\n", 2312 - (unsigned long long)dev->n_sectors, 2313 - dev->multi_count, dev->cylinders, 2314 - dev->heads, dev->sectors); 2314 + ata_dev_info(dev, "%s: %s, %s, max %s\n", 2315 + revbuf, modelbuf, fwrevbuf, 2316 + ata_mode_string(xfer_mask)); 2317 + ata_dev_info(dev, 2318 + "%llu sectors, multi %u, CHS %u/%u/%u\n", 2319 + (unsigned long long)dev->n_sectors, 2320 + dev->multi_count, dev->cylinders, 2321 + dev->heads, dev->sectors); 2315 2322 } 2316 2323 } 2317 2324 ··· 2327 2336 rc = atapi_cdb_len(id); 2328 2337 if ((rc < 12) || (rc > ATAPI_CDB_LEN)) { 2329 2338 if (ata_msg_warn(ap)) 2330 - ata_dev_printk(dev, KERN_WARNING, 2331 - "unsupported CDB len\n"); 2339 + ata_dev_warn(dev, "unsupported CDB len\n"); 2332 2340 rc = -EINVAL; 2333 2341 goto err_out_nosup; 2334 2342 } ··· 2348 2358 err_mask = ata_dev_set_feature(dev, 2349 2359 SETFEATURES_SATA_ENABLE, SATA_AN); 2350 2360 if (err_mask) 2351 - ata_dev_printk(dev, KERN_ERR, 2352 - "failed to enable ATAPI AN " 2353 - "(err_mask=0x%x)\n", err_mask); 2361 + ata_dev_err(dev, 2362 + "failed to enable ATAPI AN (err_mask=0x%x)\n", 2363 + err_mask); 2354 2364 else { 2355 2365 dev->flags |= ATA_DFLAG_AN; 2356 2366 atapi_an_string = ", ATAPI AN"; ··· 2369 2379 2370 2380 /* print device info to dmesg */ 2371 2381 if (ata_msg_drv(ap) && print_info) 2372 - ata_dev_printk(dev, KERN_INFO, 2373 - "ATAPI: %s, %s, max %s%s%s%s\n", 2374 - modelbuf, fwrevbuf, 2375 - ata_mode_string(xfer_mask), 2376 - cdb_intr_string, atapi_an_string, 2377 - dma_dir_string); 2382 + ata_dev_info(dev, 2383 + "ATAPI: %s, %s, max %s%s%s%s\n", 2384 + modelbuf, fwrevbuf, 2385 + ata_mode_string(xfer_mask), 2386 + cdb_intr_string, atapi_an_string, 2387 + dma_dir_string); 2378 2388 } 2379 2389 2380 2390 /* determine max_sectors */ ··· 2386 2396 200 sectors */ 2387 2397 if (ata_dev_knobble(dev)) { 2388 2398 if (ata_msg_drv(ap) && print_info) 2389 - ata_dev_printk(dev, KERN_INFO, 2390 - "applying bridge limits\n"); 2399 + ata_dev_info(dev, "applying bridge limits\n"); 2391 2400 dev->udma_mask &= ATA_UDMA5; 2392 2401 dev->max_sectors = ATA_MAX_SECTORS; 2393 2402 } ··· 2412 2423 bugs */ 2413 2424 2414 2425 if (print_info) { 2415 - ata_dev_printk(dev, KERN_WARNING, 2426 + ata_dev_warn(dev, 2416 2427 "Drive reports diagnostics failure. This may indicate a drive\n"); 2417 - ata_dev_printk(dev, KERN_WARNING, 2428 + ata_dev_warn(dev, 2418 2429 "fault or invalid emulation. Contact drive vendor for information.\n"); 2419 2430 } 2420 2431 } 2421 2432 2422 2433 if ((dev->horkage & ATA_HORKAGE_FIRMWARE_WARN) && print_info) { 2423 - ata_dev_printk(dev, KERN_WARNING, "WARNING: device requires " 2424 - "firmware update to be fully functional.\n"); 2425 - ata_dev_printk(dev, KERN_WARNING, " contact the vendor " 2426 - "or visit http://ata.wiki.kernel.org.\n"); 2434 + ata_dev_warn(dev, "WARNING: device requires firmware update to be fully functional\n"); 2435 + ata_dev_warn(dev, " contact the vendor or visit http://ata.wiki.kernel.org\n"); 2427 2436 } 2428 2437 2429 2438 return 0; 2430 2439 2431 2440 err_out_nosup: 2432 2441 if (ata_msg_probe(ap)) 2433 - ata_dev_printk(dev, KERN_DEBUG, 2434 - "%s: EXIT, err\n", __func__); 2442 + ata_dev_dbg(dev, "%s: EXIT, err\n", __func__); 2435 2443 return rc; 2436 2444 } 2437 2445 ··· 2649 2663 2650 2664 if (ata_phys_link_online(link)) { 2651 2665 tmp = (sstatus >> 4) & 0xf; 2652 - ata_link_printk(link, KERN_INFO, 2653 - "SATA link up %s (SStatus %X SControl %X)\n", 2654 - sata_spd_string(tmp), sstatus, scontrol); 2666 + ata_link_info(link, "SATA link up %s (SStatus %X SControl %X)\n", 2667 + sata_spd_string(tmp), sstatus, scontrol); 2655 2668 } else { 2656 - ata_link_printk(link, KERN_INFO, 2657 - "SATA link down (SStatus %X SControl %X)\n", 2658 - sstatus, scontrol); 2669 + ata_link_info(link, "SATA link down (SStatus %X SControl %X)\n", 2670 + sstatus, scontrol); 2659 2671 } 2660 2672 } 2661 2673 ··· 2742 2758 2743 2759 link->sata_spd_limit = mask; 2744 2760 2745 - ata_link_printk(link, KERN_WARNING, "limiting SATA link speed to %s\n", 2746 - sata_spd_string(fls(mask))); 2761 + ata_link_warn(link, "limiting SATA link speed to %s\n", 2762 + sata_spd_string(fls(mask))); 2747 2763 2748 2764 return 0; 2749 2765 } ··· 3120 3136 snprintf(buf, sizeof(buf), "%s", 3121 3137 ata_mode_string(xfer_mask)); 3122 3138 3123 - ata_dev_printk(dev, KERN_WARNING, 3124 - "limiting speed to %s\n", buf); 3139 + ata_dev_warn(dev, "limiting speed to %s\n", buf); 3125 3140 } 3126 3141 3127 3142 ata_unpack_xfermask(xfer_mask, &dev->pio_mask, &dev->mwdma_mask, ··· 3147 3164 dev_err_whine = " (SET_XFERMODE skipped)"; 3148 3165 else { 3149 3166 if (nosetxfer) 3150 - ata_dev_printk(dev, KERN_WARNING, 3151 - "NOSETXFER but PATA detected - can't " 3152 - "skip SETXFER, might malfunction\n"); 3167 + ata_dev_warn(dev, 3168 + "NOSETXFER but PATA detected - can't " 3169 + "skip SETXFER, might malfunction\n"); 3153 3170 err_mask = ata_dev_set_xfermode(dev); 3154 3171 } 3155 3172 ··· 3199 3216 DPRINTK("xfer_shift=%u, xfer_mode=0x%x\n", 3200 3217 dev->xfer_shift, (int)dev->xfer_mode); 3201 3218 3202 - ata_dev_printk(dev, KERN_INFO, "configured for %s%s\n", 3203 - ata_mode_string(ata_xfer_mode2mask(dev->xfer_mode)), 3204 - dev_err_whine); 3219 + ata_dev_info(dev, "configured for %s%s\n", 3220 + ata_mode_string(ata_xfer_mode2mask(dev->xfer_mode)), 3221 + dev_err_whine); 3205 3222 3206 3223 return 0; 3207 3224 3208 3225 fail: 3209 - ata_dev_printk(dev, KERN_ERR, "failed to set xfermode " 3210 - "(err_mask=0x%x)\n", err_mask); 3226 + ata_dev_err(dev, "failed to set xfermode (err_mask=0x%x)\n", err_mask); 3211 3227 return -EIO; 3212 3228 } 3213 3229 ··· 3268 3286 /* step 2: always set host PIO timings */ 3269 3287 ata_for_each_dev(dev, link, ENABLED) { 3270 3288 if (dev->pio_mode == 0xff) { 3271 - ata_dev_printk(dev, KERN_WARNING, "no PIO support\n"); 3289 + ata_dev_warn(dev, "no PIO support\n"); 3272 3290 rc = -EINVAL; 3273 3291 goto out; 3274 3292 } ··· 3386 3404 3387 3405 if (!warned && time_after(now, start + 5 * HZ) && 3388 3406 (deadline - now > 3 * HZ)) { 3389 - ata_link_printk(link, KERN_WARNING, 3407 + ata_link_warn(link, 3390 3408 "link is slow to respond, please be patient " 3391 3409 "(ready=%d)\n", tmp); 3392 3410 warned = 1; ··· 3534 3552 } while ((scontrol & 0xf0f) != 0x300 && --tries); 3535 3553 3536 3554 if ((scontrol & 0xf0f) != 0x300) { 3537 - ata_link_printk(link, KERN_ERR, 3538 - "failed to resume link (SControl %X)\n", 3539 - scontrol); 3555 + ata_link_err(link, "failed to resume link (SControl %X)\n", 3556 + scontrol); 3540 3557 return 0; 3541 3558 } 3542 3559 3543 3560 if (tries < ATA_LINK_RESUME_TRIES) 3544 - ata_link_printk(link, KERN_WARNING, 3545 - "link resume succeeded after %d retries\n", 3546 - ATA_LINK_RESUME_TRIES - tries); 3561 + ata_link_warn(link, "link resume succeeded after %d retries\n", 3562 + ATA_LINK_RESUME_TRIES - tries); 3547 3563 3548 3564 if ((rc = sata_link_debounce(link, params, deadline))) 3549 3565 return rc; ··· 3658 3678 rc = sata_link_resume(link, timing, deadline); 3659 3679 /* whine about phy resume failure but proceed */ 3660 3680 if (rc && rc != -EOPNOTSUPP) 3661 - ata_link_printk(link, KERN_WARNING, "failed to resume " 3662 - "link for reset (errno=%d)\n", rc); 3681 + ata_link_warn(link, 3682 + "failed to resume link for reset (errno=%d)\n", 3683 + rc); 3663 3684 } 3664 3685 3665 3686 /* no point in trying softreset on offline link */ ··· 3776 3795 /* online is set iff link is online && reset succeeded */ 3777 3796 if (online) 3778 3797 *online = false; 3779 - ata_link_printk(link, KERN_ERR, 3780 - "COMRESET failed (errno=%d)\n", rc); 3798 + ata_link_err(link, "COMRESET failed (errno=%d)\n", rc); 3781 3799 } 3782 3800 DPRINTK("EXIT, rc=%d\n", rc); 3783 3801 return rc; ··· 3860 3880 unsigned char serial[2][ATA_ID_SERNO_LEN + 1]; 3861 3881 3862 3882 if (dev->class != new_class) { 3863 - ata_dev_printk(dev, KERN_INFO, "class mismatch %d != %d\n", 3864 - dev->class, new_class); 3883 + ata_dev_info(dev, "class mismatch %d != %d\n", 3884 + dev->class, new_class); 3865 3885 return 0; 3866 3886 } 3867 3887 ··· 3871 3891 ata_id_c_string(new_id, serial[1], ATA_ID_SERNO, sizeof(serial[1])); 3872 3892 3873 3893 if (strcmp(model[0], model[1])) { 3874 - ata_dev_printk(dev, KERN_INFO, "model number mismatch " 3875 - "'%s' != '%s'\n", model[0], model[1]); 3894 + ata_dev_info(dev, "model number mismatch '%s' != '%s'\n", 3895 + model[0], model[1]); 3876 3896 return 0; 3877 3897 } 3878 3898 3879 3899 if (strcmp(serial[0], serial[1])) { 3880 - ata_dev_printk(dev, KERN_INFO, "serial number mismatch " 3881 - "'%s' != '%s'\n", serial[0], serial[1]); 3900 + ata_dev_info(dev, "serial number mismatch '%s' != '%s'\n", 3901 + serial[0], serial[1]); 3882 3902 return 0; 3883 3903 } 3884 3904 ··· 3948 3968 new_class != ATA_DEV_ATA && 3949 3969 new_class != ATA_DEV_ATAPI && 3950 3970 new_class != ATA_DEV_SEMB) { 3951 - ata_dev_printk(dev, KERN_INFO, "class mismatch %u != %u\n", 3952 - dev->class, new_class); 3971 + ata_dev_info(dev, "class mismatch %u != %u\n", 3972 + dev->class, new_class); 3953 3973 rc = -ENODEV; 3954 3974 goto fail; 3955 3975 } ··· 3970 3990 return 0; 3971 3991 3972 3992 /* n_sectors has changed */ 3973 - ata_dev_printk(dev, KERN_WARNING, "n_sectors mismatch %llu != %llu\n", 3974 - (unsigned long long)n_sectors, 3975 - (unsigned long long)dev->n_sectors); 3993 + ata_dev_warn(dev, "n_sectors mismatch %llu != %llu\n", 3994 + (unsigned long long)n_sectors, 3995 + (unsigned long long)dev->n_sectors); 3976 3996 3977 3997 /* 3978 3998 * Something could have caused HPA to be unlocked ··· 3981 4001 */ 3982 4002 if (dev->n_native_sectors == n_native_sectors && 3983 4003 dev->n_sectors > n_sectors && dev->n_sectors == n_native_sectors) { 3984 - ata_dev_printk(dev, KERN_WARNING, 3985 - "new n_sectors matches native, probably " 3986 - "late HPA unlock, n_sectors updated\n"); 4004 + ata_dev_warn(dev, 4005 + "new n_sectors matches native, probably " 4006 + "late HPA unlock, n_sectors updated\n"); 3987 4007 /* use the larger n_sectors */ 3988 4008 return 0; 3989 4009 } ··· 3997 4017 if (dev->n_native_sectors == n_native_sectors && 3998 4018 dev->n_sectors < n_sectors && n_sectors == n_native_sectors && 3999 4019 !(dev->horkage & ATA_HORKAGE_BROKEN_HPA)) { 4000 - ata_dev_printk(dev, KERN_WARNING, 4001 - "old n_sectors matches native, probably " 4002 - "late HPA lock, will try to unlock HPA\n"); 4020 + ata_dev_warn(dev, 4021 + "old n_sectors matches native, probably " 4022 + "late HPA lock, will try to unlock HPA\n"); 4003 4023 /* try unlocking HPA */ 4004 4024 dev->flags |= ATA_DFLAG_UNLOCK_HPA; 4005 4025 rc = -EIO; ··· 4010 4030 dev->n_native_sectors = n_native_sectors; 4011 4031 dev->n_sectors = n_sectors; 4012 4032 fail: 4013 - ata_dev_printk(dev, KERN_ERR, "revalidation failed (errno=%d)\n", rc); 4033 + ata_dev_err(dev, "revalidation failed (errno=%d)\n", rc); 4014 4034 return rc; 4015 4035 } 4016 4036 ··· 4338 4358 4339 4359 if (ata_dma_blacklisted(dev)) { 4340 4360 xfer_mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA); 4341 - ata_dev_printk(dev, KERN_WARNING, 4342 - "device is on DMA blacklist, disabling DMA\n"); 4361 + ata_dev_warn(dev, 4362 + "device is on DMA blacklist, disabling DMA\n"); 4343 4363 } 4344 4364 4345 4365 if ((host->flags & ATA_HOST_SIMPLEX) && 4346 4366 host->simplex_claimed && host->simplex_claimed != ap) { 4347 4367 xfer_mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA); 4348 - ata_dev_printk(dev, KERN_WARNING, "simplex DMA is claimed by " 4349 - "other device, disabling DMA\n"); 4368 + ata_dev_warn(dev, 4369 + "simplex DMA is claimed by other device, disabling DMA\n"); 4350 4370 } 4351 4371 4352 4372 if (ap->flags & ATA_FLAG_NO_IORDY) ··· 4366 4386 if (xfer_mask & (0xF8 << ATA_SHIFT_UDMA)) 4367 4387 /* UDMA/44 or higher would be available */ 4368 4388 if (cable_is_40wire(ap)) { 4369 - ata_dev_printk(dev, KERN_WARNING, 4370 - "limited to UDMA/33 due to 40-wire cable\n"); 4389 + ata_dev_warn(dev, 4390 + "limited to UDMA/33 due to 40-wire cable\n"); 4371 4391 xfer_mask &= ~(0xF8 << ATA_SHIFT_UDMA); 4372 4392 } 4373 4393 ··· 4934 4954 done_mask = ap->qc_active ^ qc_active; 4935 4955 4936 4956 if (unlikely(done_mask & qc_active)) { 4937 - ata_port_printk(ap, KERN_ERR, "illegal qc_active transition " 4938 - "(%08x->%08x)\n", ap->qc_active, qc_active); 4957 + ata_port_err(ap, "illegal qc_active transition (%08x->%08x)\n", 4958 + ap->qc_active, qc_active); 4939 4959 return -EINVAL; 4940 4960 } 4941 4961 ··· 6002 6022 ap->udma_mask); 6003 6023 6004 6024 if (!ata_port_is_dummy(ap)) { 6005 - ata_port_printk(ap, KERN_INFO, 6006 - "%cATA max %s %s\n", 6007 - (ap->flags & ATA_FLAG_SATA) ? 'S' : 'P', 6008 - ata_mode_string(xfer_mask), 6009 - ap->link.eh_info.desc); 6025 + ata_port_info(ap, "%cATA max %s %s\n", 6026 + (ap->flags & ATA_FLAG_SATA) ? 'S' : 'P', 6027 + ata_mode_string(xfer_mask), 6028 + ap->link.eh_info.desc); 6010 6029 ata_ehi_clear_desc(&ap->link.eh_info); 6011 6030 } else 6012 - ata_port_printk(ap, KERN_INFO, "DUMMY\n"); 6031 + ata_port_info(ap, "DUMMY\n"); 6013 6032 } 6014 6033 6015 6034 /* perform each probe asynchronously */ ··· 6576 6597 const struct ata_port_info ata_dummy_port_info = { 6577 6598 .port_ops = &ata_dummy_port_ops, 6578 6599 }; 6600 + 6601 + /* 6602 + * Utility print functions 6603 + */ 6604 + int ata_port_printk(const struct ata_port *ap, const char *level, 6605 + const char *fmt, ...) 6606 + { 6607 + struct va_format vaf; 6608 + va_list args; 6609 + int r; 6610 + 6611 + va_start(args, fmt); 6612 + 6613 + vaf.fmt = fmt; 6614 + vaf.va = &args; 6615 + 6616 + r = printk("%sata%u: %pV", level, ap->print_id, &vaf); 6617 + 6618 + va_end(args); 6619 + 6620 + return r; 6621 + } 6622 + EXPORT_SYMBOL(ata_port_printk); 6623 + 6624 + int ata_link_printk(const struct ata_link *link, const char *level, 6625 + const char *fmt, ...) 6626 + { 6627 + struct va_format vaf; 6628 + va_list args; 6629 + int r; 6630 + 6631 + va_start(args, fmt); 6632 + 6633 + vaf.fmt = fmt; 6634 + vaf.va = &args; 6635 + 6636 + if (sata_pmp_attached(link->ap) || link->ap->slave_link) 6637 + r = printk("%sata%u.%02u: %pV", 6638 + level, link->ap->print_id, link->pmp, &vaf); 6639 + else 6640 + r = printk("%sata%u: %pV", 6641 + level, link->ap->print_id, &vaf); 6642 + 6643 + va_end(args); 6644 + 6645 + return r; 6646 + } 6647 + EXPORT_SYMBOL(ata_link_printk); 6648 + 6649 + int ata_dev_printk(const struct ata_device *dev, const char *level, 6650 + const char *fmt, ...) 6651 + { 6652 + struct va_format vaf; 6653 + va_list args; 6654 + int r; 6655 + 6656 + va_start(args, fmt); 6657 + 6658 + vaf.fmt = fmt; 6659 + vaf.va = &args; 6660 + 6661 + r = printk("%sata%u.%02u: %pV", 6662 + level, dev->link->ap->print_id, dev->link->pmp + dev->devno, 6663 + &vaf); 6664 + 6665 + va_end(args); 6666 + 6667 + return r; 6668 + } 6669 + EXPORT_SYMBOL(ata_dev_printk); 6579 6670 6580 6671 /* 6581 6672 * libata is essentially a library of internal helper functions for
+68 -75
drivers/ata/libata-eh.c
··· 782 782 spin_unlock_irqrestore(ap->lock, flags); 783 783 goto repeat; 784 784 } 785 - ata_port_printk(ap, KERN_ERR, "EH pending after %d " 786 - "tries, giving up\n", ATA_EH_MAX_TRIES); 785 + ata_port_err(ap, 786 + "EH pending after %d tries, giving up\n", 787 + ATA_EH_MAX_TRIES); 787 788 ap->pflags &= ~ATA_PFLAG_EH_PENDING; 788 789 } 789 790 ··· 817 816 schedule_delayed_work(&ap->hotplug_task, 0); 818 817 819 818 if (ap->pflags & ATA_PFLAG_RECOVERED) 820 - ata_port_printk(ap, KERN_INFO, "EH complete\n"); 819 + ata_port_info(ap, "EH complete\n"); 821 820 822 821 ap->pflags &= ~(ATA_PFLAG_SCSI_HOTPLUG | ATA_PFLAG_RECOVERED); 823 822 ··· 1311 1310 return; 1312 1311 1313 1312 if (ata_msg_drv(dev->link->ap)) 1314 - ata_dev_printk(dev, KERN_WARNING, "disabled\n"); 1313 + ata_dev_warn(dev, "disabled\n"); 1315 1314 ata_acpi_on_disable(dev); 1316 1315 ata_down_xfermask_limit(dev, ATA_DNXFER_FORCE_PIO0 | ATA_DNXFER_QUIET); 1317 1316 dev->class++; ··· 1516 1515 for (i = 0; i < ATA_SECT_SIZE; i++) 1517 1516 csum += buf[i]; 1518 1517 if (csum) 1519 - ata_dev_printk(dev, KERN_WARNING, 1520 - "invalid checksum 0x%x on log page 10h\n", csum); 1518 + ata_dev_warn(dev, "invalid checksum 0x%x on log page 10h\n", 1519 + csum); 1521 1520 1522 1521 if (buf[0] & 0x80) 1523 1522 return -ENOENT; ··· 1717 1716 memset(&tf, 0, sizeof(tf)); 1718 1717 rc = ata_eh_read_log_10h(dev, &tag, &tf); 1719 1718 if (rc) { 1720 - ata_link_printk(link, KERN_ERR, "failed to read log page 10h " 1721 - "(errno=%d)\n", rc); 1719 + ata_link_err(link, "failed to read log page 10h (errno=%d)\n", 1720 + rc); 1722 1721 return; 1723 1722 } 1724 1723 1725 1724 if (!(link->sactive & (1 << tag))) { 1726 - ata_link_printk(link, KERN_ERR, "log page 10h reported " 1727 - "inactive tag %d\n", tag); 1725 + ata_link_err(link, "log page 10h reported inactive tag %d\n", 1726 + tag); 1728 1727 return; 1729 1728 } 1730 1729 ··· 1989 1988 (dev->flags & (ATA_DFLAG_PIO | ATA_DFLAG_NCQ | 1990 1989 ATA_DFLAG_NCQ_OFF)) == ATA_DFLAG_NCQ) { 1991 1990 dev->flags |= ATA_DFLAG_NCQ_OFF; 1992 - ata_dev_printk(dev, KERN_WARNING, 1993 - "NCQ disabled due to excessive errors\n"); 1991 + ata_dev_warn(dev, "NCQ disabled due to excessive errors\n"); 1994 1992 goto done; 1995 1993 } 1996 1994 ··· 2374 2374 ap->eh_tries); 2375 2375 2376 2376 if (ehc->i.dev) { 2377 - ata_dev_printk(ehc->i.dev, KERN_ERR, "exception Emask 0x%x " 2378 - "SAct 0x%x SErr 0x%x action 0x%x%s%s\n", 2379 - ehc->i.err_mask, link->sactive, ehc->i.serror, 2380 - ehc->i.action, frozen, tries_buf); 2377 + ata_dev_err(ehc->i.dev, "exception Emask 0x%x " 2378 + "SAct 0x%x SErr 0x%x action 0x%x%s%s\n", 2379 + ehc->i.err_mask, link->sactive, ehc->i.serror, 2380 + ehc->i.action, frozen, tries_buf); 2381 2381 if (desc) 2382 - ata_dev_printk(ehc->i.dev, KERN_ERR, "%s\n", desc); 2382 + ata_dev_err(ehc->i.dev, "%s\n", desc); 2383 2383 } else { 2384 - ata_link_printk(link, KERN_ERR, "exception Emask 0x%x " 2385 - "SAct 0x%x SErr 0x%x action 0x%x%s%s\n", 2386 - ehc->i.err_mask, link->sactive, ehc->i.serror, 2387 - ehc->i.action, frozen, tries_buf); 2384 + ata_link_err(link, "exception Emask 0x%x " 2385 + "SAct 0x%x SErr 0x%x action 0x%x%s%s\n", 2386 + ehc->i.err_mask, link->sactive, ehc->i.serror, 2387 + ehc->i.action, frozen, tries_buf); 2388 2388 if (desc) 2389 - ata_link_printk(link, KERN_ERR, "%s\n", desc); 2389 + ata_link_err(link, "%s\n", desc); 2390 2390 } 2391 2391 2392 2392 #ifdef CONFIG_ATA_VERBOSE_ERROR 2393 2393 if (ehc->i.serror) 2394 - ata_link_printk(link, KERN_ERR, 2394 + ata_link_err(link, 2395 2395 "SError: { %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s}\n", 2396 2396 ehc->i.serror & SERR_DATA_RECOVERED ? "RecovData " : "", 2397 2397 ehc->i.serror & SERR_COMM_RECOVERED ? "RecovComm " : "", ··· 2456 2456 } else { 2457 2457 const char *descr = ata_get_cmd_descript(cmd->command); 2458 2458 if (descr) 2459 - ata_dev_printk(qc->dev, KERN_ERR, 2460 - "failed command: %s\n", descr); 2459 + ata_dev_err(qc->dev, "failed command: %s\n", 2460 + descr); 2461 2461 } 2462 2462 2463 - ata_dev_printk(qc->dev, KERN_ERR, 2463 + ata_dev_err(qc->dev, 2464 2464 "cmd %02x/%02x:%02x:%02x:%02x:%02x/%02x:%02x:%02x:%02x:%02x/%02x " 2465 2465 "tag %d%s\n %s" 2466 2466 "res %02x/%02x:%02x:%02x:%02x:%02x/%02x:%02x:%02x:%02x:%02x/%02x " ··· 2481 2481 if (res->command & (ATA_BUSY | ATA_DRDY | ATA_DF | ATA_DRQ | 2482 2482 ATA_ERR)) { 2483 2483 if (res->command & ATA_BUSY) 2484 - ata_dev_printk(qc->dev, KERN_ERR, 2485 - "status: { Busy }\n"); 2484 + ata_dev_err(qc->dev, "status: { Busy }\n"); 2486 2485 else 2487 - ata_dev_printk(qc->dev, KERN_ERR, 2488 - "status: { %s%s%s%s}\n", 2486 + ata_dev_err(qc->dev, "status: { %s%s%s%s}\n", 2489 2487 res->command & ATA_DRDY ? "DRDY " : "", 2490 2488 res->command & ATA_DF ? "DF " : "", 2491 2489 res->command & ATA_DRQ ? "DRQ " : "", ··· 2493 2495 if (cmd->command != ATA_CMD_PACKET && 2494 2496 (res->feature & (ATA_ICRC | ATA_UNC | ATA_IDNF | 2495 2497 ATA_ABORTED))) 2496 - ata_dev_printk(qc->dev, KERN_ERR, 2497 - "error: { %s%s%s%s}\n", 2498 + ata_dev_err(qc->dev, "error: { %s%s%s%s}\n", 2498 2499 res->feature & ATA_ICRC ? "ICRC " : "", 2499 2500 res->feature & ATA_UNC ? "UNC " : "", 2500 2501 res->feature & ATA_IDNF ? "IDNF " : "", ··· 2647 2650 2648 2651 if (rc) { 2649 2652 if (rc == -ENOENT) { 2650 - ata_link_printk(link, KERN_DEBUG, 2651 - "port disabled. ignoring.\n"); 2653 + ata_link_dbg(link, "port disabled--ignoring\n"); 2652 2654 ehc->i.action &= ~ATA_EH_RESET; 2653 2655 2654 2656 ata_for_each_dev(dev, link, ALL) ··· 2655 2659 2656 2660 rc = 0; 2657 2661 } else 2658 - ata_link_printk(link, KERN_ERR, 2659 - "prereset failed (errno=%d)\n", rc); 2662 + ata_link_err(link, 2663 + "prereset failed (errno=%d)\n", 2664 + rc); 2660 2665 goto out; 2661 2666 } 2662 2667 ··· 2686 2689 2687 2690 if (reset) { 2688 2691 if (verbose) 2689 - ata_link_printk(link, KERN_INFO, "%s resetting link\n", 2690 - reset == softreset ? "soft" : "hard"); 2692 + ata_link_info(link, "%s resetting link\n", 2693 + reset == softreset ? "soft" : "hard"); 2691 2694 2692 2695 /* mark that this EH session started with reset */ 2693 2696 ehc->last_reset = jiffies; ··· 2707 2710 int tmp; 2708 2711 2709 2712 if (verbose) 2710 - ata_link_printk(slave, KERN_INFO, 2711 - "hard resetting link\n"); 2713 + ata_link_info(slave, "hard resetting link\n"); 2712 2714 2713 2715 ata_eh_about_to_do(slave, NULL, ATA_EH_RESET); 2714 2716 tmp = ata_do_reset(slave, reset, classes, deadline, ··· 2730 2734 reset = softreset; 2731 2735 2732 2736 if (!reset) { 2733 - ata_link_printk(link, KERN_ERR, 2734 - "follow-up softreset required " 2735 - "but no softreset available\n"); 2737 + ata_link_err(link, 2738 + "follow-up softreset required but no softreset available\n"); 2736 2739 failed_link = link; 2737 2740 rc = -EINVAL; 2738 2741 goto fail; ··· 2746 2751 } 2747 2752 } else { 2748 2753 if (verbose) 2749 - ata_link_printk(link, KERN_INFO, "no reset method " 2750 - "available, skipping reset\n"); 2754 + ata_link_info(link, 2755 + "no reset method available, skipping reset\n"); 2751 2756 if (!(lflags & ATA_LFLAG_ASSUME_CLASS)) 2752 2757 lflags |= ATA_LFLAG_ASSUME_ATA; 2753 2758 } ··· 2825 2830 ata_for_each_dev(dev, link, ALL) { 2826 2831 if (ata_phys_link_online(ata_dev_phys_link(dev))) { 2827 2832 if (classes[dev->devno] == ATA_DEV_UNKNOWN) { 2828 - ata_dev_printk(dev, KERN_DEBUG, "link online " 2829 - "but device misclassifed\n"); 2833 + ata_dev_dbg(dev, "link online but device misclassified\n"); 2830 2834 classes[dev->devno] = ATA_DEV_NONE; 2831 2835 nr_unknown++; 2832 2836 } 2833 2837 } else if (ata_phys_link_offline(ata_dev_phys_link(dev))) { 2834 2838 if (ata_class_enabled(classes[dev->devno])) 2835 - ata_dev_printk(dev, KERN_DEBUG, "link offline, " 2836 - "clearing class %d to NONE\n", 2837 - classes[dev->devno]); 2839 + ata_dev_dbg(dev, 2840 + "link offline, clearing class %d to NONE\n", 2841 + classes[dev->devno]); 2838 2842 classes[dev->devno] = ATA_DEV_NONE; 2839 2843 } else if (classes[dev->devno] == ATA_DEV_UNKNOWN) { 2840 - ata_dev_printk(dev, KERN_DEBUG, "link status unknown, " 2841 - "clearing UNKNOWN to NONE\n"); 2844 + ata_dev_dbg(dev, 2845 + "link status unknown, clearing UNKNOWN to NONE\n"); 2842 2846 classes[dev->devno] = ATA_DEV_NONE; 2843 2847 } 2844 2848 } 2845 2849 2846 2850 if (classify && nr_unknown) { 2847 2851 if (try < max_tries) { 2848 - ata_link_printk(link, KERN_WARNING, "link online but " 2849 - "%d devices misclassified, retrying\n", 2850 - nr_unknown); 2852 + ata_link_warn(link, 2853 + "link online but %d devices misclassified, retrying\n", 2854 + nr_unknown); 2851 2855 failed_link = link; 2852 2856 rc = -EAGAIN; 2853 2857 goto fail; 2854 2858 } 2855 - ata_link_printk(link, KERN_WARNING, 2856 - "link online but %d devices misclassified, " 2857 - "device detection might fail\n", nr_unknown); 2859 + ata_link_warn(link, 2860 + "link online but %d devices misclassified, " 2861 + "device detection might fail\n", nr_unknown); 2858 2862 } 2859 2863 2860 2864 /* reset successful, schedule revalidation */ ··· 2890 2896 if (time_before(now, deadline)) { 2891 2897 unsigned long delta = deadline - now; 2892 2898 2893 - ata_link_printk(failed_link, KERN_WARNING, 2899 + ata_link_warn(failed_link, 2894 2900 "reset failed (errno=%d), retrying in %u secs\n", 2895 2901 rc, DIV_ROUND_UP(jiffies_to_msecs(delta), 1000)); 2896 2902 ··· 2981 2987 tf.protocol |= ATA_PROT_NODATA; 2982 2988 err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0); 2983 2989 if (park && (err_mask || tf.lbal != 0xc4)) { 2984 - ata_dev_printk(dev, KERN_ERR, "head unload failed!\n"); 2990 + ata_dev_err(dev, "head unload failed!\n"); 2985 2991 ehc->unloaded_mask &= ~(1 << dev->devno); 2986 2992 } 2987 2993 } ··· 3192 3198 3193 3199 err_mask = atapi_eh_tur(dev, &sense_key); 3194 3200 if (err_mask != 0 && err_mask != AC_ERR_DEV) { 3195 - ata_dev_printk(dev, KERN_WARNING, "TEST_UNIT_READY " 3196 - "failed (err_mask=0x%x)\n", err_mask); 3201 + ata_dev_warn(dev, 3202 + "TEST_UNIT_READY failed (err_mask=0x%x)\n", 3203 + err_mask); 3197 3204 return -EIO; 3198 3205 } 3199 3206 ··· 3203 3208 3204 3209 err_mask = atapi_eh_request_sense(dev, sense_buffer, sense_key); 3205 3210 if (err_mask) { 3206 - ata_dev_printk(dev, KERN_WARNING, "failed to clear " 3211 + ata_dev_warn(dev, "failed to clear " 3207 3212 "UNIT ATTENTION (err_mask=0x%x)\n", err_mask); 3208 3213 return -EIO; 3209 3214 } 3210 3215 } 3211 3216 3212 - ata_dev_printk(dev, KERN_WARNING, 3213 - "UNIT ATTENTION persists after %d tries\n", ATA_EH_UA_TRIES); 3217 + ata_dev_warn(dev, "UNIT ATTENTION persists after %d tries\n", 3218 + ATA_EH_UA_TRIES); 3214 3219 3215 3220 return 0; 3216 3221 } ··· 3261 3266 tf.flags |= ATA_TFLAG_DEVICE; 3262 3267 tf.protocol = ATA_PROT_NODATA; 3263 3268 3264 - ata_dev_printk(dev, KERN_WARNING, "retrying FLUSH 0x%x Emask 0x%x\n", 3269 + ata_dev_warn(dev, "retrying FLUSH 0x%x Emask 0x%x\n", 3265 3270 tf.command, qc->err_mask); 3266 3271 3267 3272 err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0); ··· 3276 3281 */ 3277 3282 qc->scsicmd->allowed = max(qc->scsicmd->allowed, 1); 3278 3283 } else { 3279 - ata_dev_printk(dev, KERN_WARNING, "FLUSH failed Emask 0x%x\n", 3284 + ata_dev_warn(dev, "FLUSH failed Emask 0x%x\n", 3280 3285 err_mask); 3281 3286 rc = -EIO; 3282 3287 ··· 3350 3355 err_mask = ata_dev_set_feature(dev, 3351 3356 SETFEATURES_SATA_DISABLE, SATA_DIPM); 3352 3357 if (err_mask && err_mask != AC_ERR_DEV) { 3353 - ata_dev_printk(dev, KERN_WARNING, 3354 - "failed to disable DIPM, Emask 0x%x\n", 3355 - err_mask); 3358 + ata_dev_warn(dev, 3359 + "failed to disable DIPM, Emask 0x%x\n", 3360 + err_mask); 3356 3361 rc = -EIO; 3357 3362 goto fail; 3358 3363 } ··· 3394 3399 err_mask = ata_dev_set_feature(dev, 3395 3400 SETFEATURES_SATA_ENABLE, SATA_DIPM); 3396 3401 if (err_mask && err_mask != AC_ERR_DEV) { 3397 - ata_dev_printk(dev, KERN_WARNING, 3402 + ata_dev_warn(dev, 3398 3403 "failed to enable DIPM, Emask 0x%x\n", 3399 3404 err_mask); 3400 3405 rc = -EIO; ··· 3413 3418 3414 3419 /* if no device or only one more chance is left, disable LPM */ 3415 3420 if (!dev || ehc->tries[dev->devno] <= 2) { 3416 - ata_link_printk(link, KERN_WARNING, 3417 - "disabling LPM on the link\n"); 3421 + ata_link_warn(link, "disabling LPM on the link\n"); 3418 3422 link->flags |= ATA_LFLAG_NO_LPM; 3419 3423 } 3420 3424 if (r_failed_dev) ··· 3684 3690 rc = ata_eh_reset(link, ata_link_nr_vacant(link), 3685 3691 prereset, softreset, hardreset, postreset); 3686 3692 if (rc) { 3687 - ata_link_printk(link, KERN_ERR, 3688 - "reset failed, giving up\n"); 3693 + ata_link_err(link, "reset failed, giving up\n"); 3689 3694 goto out; 3690 3695 } 3691 3696 }
+59 -64
drivers/ata/libata-pmp.c
··· 147 147 148 148 err_mask = sata_pmp_read(link, reg, r_val); 149 149 if (err_mask) { 150 - ata_link_printk(link, KERN_WARNING, "failed to read SCR %d " 151 - "(Emask=0x%x)\n", reg, err_mask); 150 + ata_link_warn(link, "failed to read SCR %d (Emask=0x%x)\n", 151 + reg, err_mask); 152 152 return -EIO; 153 153 } 154 154 return 0; ··· 178 178 179 179 err_mask = sata_pmp_write(link, reg, val); 180 180 if (err_mask) { 181 - ata_link_printk(link, KERN_WARNING, "failed to write SCR %d " 182 - "(Emask=0x%x)\n", reg, err_mask); 181 + ata_link_warn(link, "failed to write SCR %d (Emask=0x%x)\n", 182 + reg, err_mask); 183 183 return -EIO; 184 184 } 185 185 return 0; ··· 231 231 232 232 err_mask = sata_pmp_read(dev->link, reg, &gscr[reg]); 233 233 if (err_mask) { 234 - ata_dev_printk(dev, KERN_ERR, "failed to read PMP " 235 - "GSCR[%d] (Emask=0x%x)\n", reg, err_mask); 234 + ata_dev_err(dev, "failed to read PMP GSCR[%d] (Emask=0x%x)\n", 235 + reg, err_mask); 236 236 return -EIO; 237 237 } 238 238 } ··· 311 311 } 312 312 313 313 if (print_info) { 314 - ata_dev_printk(dev, KERN_INFO, "Port Multiplier %s, " 315 - "0x%04x:0x%04x r%d, %d ports, feat 0x%x/0x%x\n", 316 - sata_pmp_spec_rev_str(gscr), vendor, devid, 317 - sata_pmp_gscr_rev(gscr), 318 - nr_ports, gscr[SATA_PMP_GSCR_FEAT_EN], 319 - gscr[SATA_PMP_GSCR_FEAT]); 314 + ata_dev_info(dev, "Port Multiplier %s, " 315 + "0x%04x:0x%04x r%d, %d ports, feat 0x%x/0x%x\n", 316 + sata_pmp_spec_rev_str(gscr), vendor, devid, 317 + sata_pmp_gscr_rev(gscr), 318 + nr_ports, gscr[SATA_PMP_GSCR_FEAT_EN], 319 + gscr[SATA_PMP_GSCR_FEAT]); 320 320 321 321 if (!(dev->flags & ATA_DFLAG_AN)) 322 - ata_dev_printk(dev, KERN_INFO, 322 + ata_dev_info(dev, 323 323 "Asynchronous notification not supported, " 324 - "hotplug won't\n work on fan-out " 325 - "ports. Use warm-plug instead.\n"); 324 + "hotplug won't work on fan-out ports. Use warm-plug instead.\n"); 326 325 } 327 326 328 327 return 0; 329 328 330 329 fail: 331 - ata_dev_printk(dev, KERN_ERR, 332 - "failed to configure Port Multiplier (%s, Emask=0x%x)\n", 333 - reason, err_mask); 330 + ata_dev_err(dev, 331 + "failed to configure Port Multiplier (%s, Emask=0x%x)\n", 332 + reason, err_mask); 334 333 return rc; 335 334 } 336 335 ··· 484 485 485 486 /* is it hanging off the right place? */ 486 487 if (!sata_pmp_supported(ap)) { 487 - ata_dev_printk(dev, KERN_ERR, 488 - "host does not support Port Multiplier\n"); 488 + ata_dev_err(dev, "host does not support Port Multiplier\n"); 489 489 return -EINVAL; 490 490 } 491 491 492 492 if (!ata_is_host_link(link)) { 493 - ata_dev_printk(dev, KERN_ERR, 494 - "Port Multipliers cannot be nested\n"); 493 + ata_dev_err(dev, "Port Multipliers cannot be nested\n"); 495 494 return -EINVAL; 496 495 } 497 496 498 497 if (dev->devno) { 499 - ata_dev_printk(dev, KERN_ERR, 500 - "Port Multiplier must be the first device\n"); 498 + ata_dev_err(dev, "Port Multiplier must be the first device\n"); 501 499 return -EINVAL; 502 500 } 503 501 ··· 513 517 514 518 rc = sata_pmp_init_links(ap, sata_pmp_gscr_ports(dev->gscr)); 515 519 if (rc) { 516 - ata_dev_printk(dev, KERN_INFO, 517 - "failed to initialize PMP links\n"); 520 + ata_dev_info(dev, "failed to initialize PMP links\n"); 518 521 goto fail; 519 522 } 520 523 ··· 557 562 struct ata_link *tlink; 558 563 unsigned long flags; 559 564 560 - ata_dev_printk(dev, KERN_INFO, "Port Multiplier detaching\n"); 565 + ata_dev_info(dev, "Port Multiplier detaching\n"); 561 566 562 567 WARN_ON(!ata_is_host_link(link) || dev->devno || 563 568 link->pmp != SATA_PMP_CTRL_PORT); ··· 604 609 new_nr_ports = sata_pmp_gscr_ports(new_gscr); 605 610 606 611 if (old_vendor != new_vendor) { 607 - ata_dev_printk(dev, KERN_INFO, "Port Multiplier " 608 - "vendor mismatch '0x%x' != '0x%x'\n", 609 - old_vendor, new_vendor); 612 + ata_dev_info(dev, 613 + "Port Multiplier vendor mismatch '0x%x' != '0x%x'\n", 614 + old_vendor, new_vendor); 610 615 return 0; 611 616 } 612 617 613 618 if (old_devid != new_devid) { 614 - ata_dev_printk(dev, KERN_INFO, "Port Multiplier " 615 - "device ID mismatch '0x%x' != '0x%x'\n", 616 - old_devid, new_devid); 619 + ata_dev_info(dev, 620 + "Port Multiplier device ID mismatch '0x%x' != '0x%x'\n", 621 + old_devid, new_devid); 617 622 return 0; 618 623 } 619 624 620 625 if (old_nr_ports != new_nr_ports) { 621 - ata_dev_printk(dev, KERN_INFO, "Port Multiplier " 622 - "nr_ports mismatch '0x%x' != '0x%x'\n", 623 - old_nr_ports, new_nr_ports); 626 + ata_dev_info(dev, 627 + "Port Multiplier nr_ports mismatch '0x%x' != '0x%x'\n", 628 + old_nr_ports, new_nr_ports); 624 629 return 0; 625 630 } 626 631 ··· 686 691 return 0; 687 692 688 693 fail: 689 - ata_dev_printk(dev, KERN_ERR, 690 - "PMP revalidation failed (errno=%d)\n", rc); 694 + ata_dev_err(dev, "PMP revalidation failed (errno=%d)\n", rc); 691 695 DPRINTK("EXIT, rc=%d\n", rc); 692 696 return rc; 693 697 } ··· 710 716 711 717 err_mask = sata_pmp_read(dev->link, SATA_PMP_GSCR_PROD_ID, &prod_id); 712 718 if (err_mask) { 713 - ata_dev_printk(dev, KERN_ERR, "failed to read PMP product ID " 714 - "(Emask=0x%x)\n", err_mask); 719 + ata_dev_err(dev, 720 + "failed to read PMP product ID (Emask=0x%x)\n", 721 + err_mask); 715 722 return -EIO; 716 723 } 717 724 718 725 if (prod_id != dev->gscr[SATA_PMP_GSCR_PROD_ID]) { 719 - ata_dev_printk(dev, KERN_ERR, "PMP product ID mismatch\n"); 726 + ata_dev_err(dev, "PMP product ID mismatch\n"); 720 727 /* something weird is going on, request full PMP recovery */ 721 728 return -EIO; 722 729 } ··· 772 777 rc = ata_eh_reset(link, 0, prereset, softreset, hardreset, 773 778 postreset); 774 779 if (rc) { 775 - ata_link_printk(link, KERN_ERR, 776 - "failed to reset PMP, giving up\n"); 780 + ata_link_err(link, "failed to reset PMP, giving up\n"); 777 781 goto fail; 778 782 } 779 783 ··· 813 819 ehc->i.action |= ATA_EH_RESET; 814 820 goto retry; 815 821 } else { 816 - ata_dev_printk(dev, KERN_ERR, "failed to recover PMP " 817 - "after %d tries, giving up\n", 818 - ATA_EH_PMP_TRIES); 822 + ata_dev_err(dev, 823 + "failed to recover PMP after %d tries, giving up\n", 824 + ATA_EH_PMP_TRIES); 819 825 goto fail; 820 826 } 821 827 } ··· 861 867 /* unconditionally clear SError.N */ 862 868 rc = sata_scr_write(link, SCR_ERROR, SERR_PHYRDY_CHG); 863 869 if (rc) { 864 - ata_link_printk(link, KERN_ERR, "failed to clear " 865 - "SError.N (errno=%d)\n", rc); 870 + ata_link_err(link, 871 + "failed to clear SError.N (errno=%d)\n", 872 + rc); 866 873 return rc; 867 874 } 868 875 ··· 885 890 886 891 /* disable this link */ 887 892 if (!(link->flags & ATA_LFLAG_DISABLED)) { 888 - ata_link_printk(link, KERN_WARNING, 893 + ata_link_warn(link, 889 894 "failed to recover link after %d tries, disabling\n", 890 895 ATA_EH_PMP_LINK_TRIES); 891 896 ··· 969 974 err_mask = sata_pmp_write(pmp_link, SATA_PMP_GSCR_FEAT_EN, 970 975 gscr[SATA_PMP_GSCR_FEAT_EN]); 971 976 if (err_mask) { 972 - ata_link_printk(pmp_link, KERN_WARNING, 977 + ata_link_warn(pmp_link, 973 978 "failed to disable NOTIFY (err_mask=0x%x)\n", 974 979 err_mask); 975 980 goto pmp_fail; ··· 1013 1018 err_mask = sata_pmp_write(pmp_link, SATA_PMP_GSCR_FEAT_EN, 1014 1019 gscr[SATA_PMP_GSCR_FEAT_EN]); 1015 1020 if (err_mask) { 1016 - ata_dev_printk(pmp_dev, KERN_ERR, "failed to write " 1017 - "PMP_FEAT_EN (Emask=0x%x)\n", err_mask); 1021 + ata_dev_err(pmp_dev, 1022 + "failed to write PMP_FEAT_EN (Emask=0x%x)\n", 1023 + err_mask); 1018 1024 rc = -EIO; 1019 1025 goto pmp_fail; 1020 1026 } ··· 1024 1028 /* check GSCR_ERROR */ 1025 1029 err_mask = sata_pmp_read(pmp_link, SATA_PMP_GSCR_ERROR, &gscr_error); 1026 1030 if (err_mask) { 1027 - ata_dev_printk(pmp_dev, KERN_ERR, "failed to read " 1028 - "PMP_GSCR_ERROR (Emask=0x%x)\n", err_mask); 1031 + ata_dev_err(pmp_dev, 1032 + "failed to read PMP_GSCR_ERROR (Emask=0x%x)\n", 1033 + err_mask); 1029 1034 rc = -EIO; 1030 1035 goto pmp_fail; 1031 1036 } ··· 1040 1043 ata_ehi_hotplugged(&link->eh_context.i); 1041 1044 cnt++; 1042 1045 } else { 1043 - ata_link_printk(link, KERN_WARNING, 1044 - "PHY status changed but maxed out on retries, " 1045 - "giving up\n"); 1046 - ata_link_printk(link, KERN_WARNING, 1047 - "Manully issue scan to resume this link\n"); 1046 + ata_link_warn(link, 1047 + "PHY status changed but maxed out on retries, giving up\n"); 1048 + ata_link_warn(link, 1049 + "Manually issue scan to resume this link\n"); 1048 1050 } 1049 1051 } 1050 1052 1051 1053 if (cnt) { 1052 - ata_port_printk(ap, KERN_INFO, "PMP SError.N set for some " 1053 - "ports, repeating recovery\n"); 1054 + ata_port_info(ap, 1055 + "PMP SError.N set for some ports, repeating recovery\n"); 1054 1056 goto retry; 1055 1057 } 1056 1058 ··· 1077 1081 goto retry; 1078 1082 } 1079 1083 1080 - ata_port_printk(ap, KERN_ERR, 1081 - "failed to recover PMP after %d tries, giving up\n", 1082 - ATA_EH_PMP_TRIES); 1084 + ata_port_err(ap, "failed to recover PMP after %d tries, giving up\n", 1085 + ATA_EH_PMP_TRIES); 1083 1086 sata_pmp_detach(pmp_dev); 1084 1087 ata_dev_disable(pmp_dev); 1085 1088
+9 -13
drivers/ata/libata-scsi.c
··· 1108 1108 /* configure draining */ 1109 1109 buf = kmalloc(ATAPI_MAX_DRAIN, q->bounce_gfp | GFP_KERNEL); 1110 1110 if (!buf) { 1111 - ata_dev_printk(dev, KERN_ERR, 1112 - "drain buffer allocation failed\n"); 1111 + ata_dev_err(dev, "drain buffer allocation failed\n"); 1113 1112 return -ENOMEM; 1114 1113 } 1115 1114 ··· 1126 1127 * IDENTIFY_PACKET is executed as ATA_PROT_PIO. 1127 1128 */ 1128 1129 if (sdev->sector_size > PAGE_SIZE) 1129 - ata_dev_printk(dev, KERN_WARNING, 1130 + ata_dev_warn(dev, 1130 1131 "sector_size=%u > PAGE_SIZE, PIO may malfunction\n", 1131 1132 sdev->sector_size); 1132 1133 ··· 1783 1784 if (cmd->sc_data_direction == DMA_FROM_DEVICE || 1784 1785 cmd->sc_data_direction == DMA_TO_DEVICE) { 1785 1786 if (unlikely(scsi_bufflen(cmd) < 1)) { 1786 - ata_dev_printk(dev, KERN_WARNING, 1787 - "WARNING: zero len r/w req\n"); 1787 + ata_dev_warn(dev, "WARNING: zero len r/w req\n"); 1788 1788 goto err_did; 1789 1789 } 1790 1790 ··· 2967 2969 * with the cached multi_count of libata 2968 2970 */ 2969 2971 if (multi_count != dev->multi_count) 2970 - ata_dev_printk(dev, KERN_WARNING, 2971 - "invalid multi_count %u ignored\n", 2972 - multi_count); 2972 + ata_dev_warn(dev, "invalid multi_count %u ignored\n", 2973 + multi_count); 2973 2974 } 2974 2975 2975 2976 /* ··· 3463 3466 goto repeat; 3464 3467 } 3465 3468 3466 - ata_port_printk(ap, KERN_ERR, "WARNING: synchronous SCSI scan " 3467 - "failed without making any progress,\n" 3468 - " switching to async\n"); 3469 + ata_port_err(ap, 3470 + "WARNING: synchronous SCSI scan failed without making any progress, switching to async\n"); 3469 3471 } 3470 3472 3471 3473 queue_delayed_work(system_long_wq, &ap->hotplug_task, ··· 3546 3550 mutex_unlock(&ap->scsi_host->scan_mutex); 3547 3551 3548 3552 if (sdev) { 3549 - ata_dev_printk(dev, KERN_INFO, "detaching (SCSI %s)\n", 3550 - dev_name(&sdev->sdev_gendev)); 3553 + ata_dev_info(dev, "detaching (SCSI %s)\n", 3554 + dev_name(&sdev->sdev_gendev)); 3551 3555 3552 3556 scsi_remove_device(sdev); 3553 3557 scsi_device_put(sdev);
+16 -16
drivers/ata/libata-sff.c
··· 227 227 } 228 228 229 229 if (status != 0xff && (status & ATA_BUSY)) 230 - ata_port_printk(ap, KERN_WARNING, 231 - "port is slow to respond, please be patient " 232 - "(Status 0x%x)\n", status); 230 + ata_port_warn(ap, 231 + "port is slow to respond, please be patient (Status 0x%x)\n", 232 + status); 233 233 234 234 timeout = ata_deadline(timer_start, tmout); 235 235 while (status != 0xff && (status & ATA_BUSY) && ··· 242 242 return -ENODEV; 243 243 244 244 if (status & ATA_BUSY) { 245 - ata_port_printk(ap, KERN_ERR, "port failed to respond " 246 - "(%lu secs, Status 0x%x)\n", 247 - DIV_ROUND_UP(tmout, 1000), status); 245 + ata_port_err(ap, 246 + "port failed to respond (%lu secs, Status 0x%x)\n", 247 + DIV_ROUND_UP(tmout, 1000), status); 248 248 return -EBUSY; 249 249 } 250 250 ··· 350 350 unsigned int wait, unsigned int can_sleep) 351 351 { 352 352 if (ata_msg_probe(ap)) 353 - ata_port_printk(ap, KERN_INFO, "ata_dev_select: ENTER, " 354 - "device %u, wait %u\n", device, wait); 353 + ata_port_info(ap, "ata_dev_select: ENTER, device %u, wait %u\n", 354 + device, wait); 355 355 356 356 if (wait) 357 357 ata_wait_idle(ap); ··· 1335 1335 ap->hsm_task_state = HSM_ST_IDLE; 1336 1336 1337 1337 if (ata_msg_ctl(ap)) 1338 - ata_port_printk(ap, KERN_DEBUG, "%s: EXIT\n", __func__); 1338 + ata_port_dbg(ap, "%s: EXIT\n", __func__); 1339 1339 } 1340 1340 1341 1341 static void ata_sff_pio_task(struct work_struct *work) ··· 1513 1513 ap->ops->sff_check_status(ap); 1514 1514 if (ap->ops->sff_irq_clear) 1515 1515 ap->ops->sff_irq_clear(ap); 1516 - ata_port_printk(ap, KERN_WARNING, "irq trap\n"); 1516 + ata_port_warn(ap, "irq trap\n"); 1517 1517 return 1; 1518 1518 } 1519 1519 #endif ··· 1711 1711 1712 1712 /* There was a command running, we are no longer busy and we have 1713 1713 no interrupt. */ 1714 - ata_port_printk(ap, KERN_WARNING, "lost interrupt (Status 0x%x)\n", 1714 + ata_port_warn(ap, "lost interrupt (Status 0x%x)\n", 1715 1715 status); 1716 1716 /* Run the host interrupt logic as if the interrupt had not been 1717 1717 lost */ ··· 1798 1798 if (!ata_link_offline(link)) { 1799 1799 rc = ata_sff_wait_ready(link, deadline); 1800 1800 if (rc && rc != -ENODEV) { 1801 - ata_link_printk(link, KERN_WARNING, "device not ready " 1802 - "(errno=%d), forcing hardreset\n", rc); 1801 + ata_link_warn(link, 1802 + "device not ready (errno=%d), forcing hardreset\n", 1803 + rc); 1803 1804 ehc->i.action |= ATA_EH_HARDRESET; 1804 1805 } 1805 1806 } ··· 2057 2056 rc = ata_bus_softreset(ap, devmask, deadline); 2058 2057 /* if link is occupied, -ENODEV too is an error */ 2059 2058 if (rc && (rc != -ENODEV || sata_scr_valid(link))) { 2060 - ata_link_printk(link, KERN_ERR, "SRST failed (errno=%d)\n", rc); 2059 + ata_link_err(link, "SRST failed (errno=%d)\n", rc); 2061 2060 return rc; 2062 2061 } 2063 2062 ··· 2171 2170 2172 2171 /* Can become DEBUG later */ 2173 2172 if (count) 2174 - ata_port_printk(ap, KERN_DEBUG, 2175 - "drained %d bytes to clear DRQ.\n", count); 2173 + ata_port_dbg(ap, "drained %d bytes to clear DRQ\n", count); 2176 2174 2177 2175 } 2178 2176 EXPORT_SYMBOL_GPL(ata_sff_drain_fifo);
+4 -4
drivers/ata/pata_ali.c
··· 287 287 int print_info = ehc->i.flags & ATA_EHI_PRINTINFO; 288 288 289 289 if (print_info && adev->class == ATA_DEV_ATAPI && !ali_atapi_dma) { 290 - ata_dev_printk(adev, KERN_WARNING, 291 - "WARNING: ATAPI DMA disabled for reliability issues. It can be enabled\n"); 292 - ata_dev_printk(adev, KERN_WARNING, 293 - "WARNING: via pata_ali.atapi_dma modparam or corresponding sysfs node.\n"); 290 + ata_dev_warn(adev, 291 + "WARNING: ATAPI DMA disabled for reliability issues. It can be enabled\n"); 292 + ata_dev_warn(adev, 293 + "WARNING: via pata_ali.atapi_dma modparam or corresponding sysfs node.\n"); 294 294 } 295 295 } 296 296
+1 -1
drivers/ata/pata_amd.c
··· 311 311 cable detection result */ 312 312 limit |= ata_pack_xfermask(ATA_PIO4, ATA_MWDMA2, ATA_UDMA2); 313 313 314 - ata_port_printk(ap, KERN_DEBUG, "nv_mode_filter: 0x%lx&0x%lx->0x%lx, " 314 + ata_port_dbg(ap, "nv_mode_filter: 0x%lx&0x%lx->0x%lx, " 315 315 "BIOS=0x%lx (0x%x) ACPI=0x%lx%s\n", 316 316 xfer_mask, limit, xfer_mask & limit, bios_limit, 317 317 saved_udma, acpi_limit, acpi_str);
+2 -2
drivers/ata/pata_bf54x.c
··· 1129 1129 /* issue bus reset */ 1130 1130 err_mask = bfin_bus_softreset(ap, devmask); 1131 1131 if (err_mask) { 1132 - ata_port_printk(ap, KERN_ERR, "SRST failed (err_mask=0x%x)\n", 1132 + ata_port_err(ap, "SRST failed (err_mask=0x%x)\n", 1133 1133 err_mask); 1134 1134 return -EIO; 1135 1135 } ··· 1382 1382 #ifdef ATA_IRQ_TRAP 1383 1383 if ((ap->stats.idle_irq % 1000) == 0) { 1384 1384 ap->ops->irq_ack(ap, 0); /* debug trap */ 1385 - ata_port_printk(ap, KERN_WARNING, "irq trap\n"); 1385 + ata_port_warn(ap, "irq trap\n"); 1386 1386 return 1; 1387 1387 } 1388 1388 #endif
+2 -2
drivers/ata/pata_icside.c
··· 210 210 else 211 211 iomd_type = 'A', cycle = 562; 212 212 213 - ata_dev_printk(adev, KERN_INFO, "timings: act %dns rec %dns cyc %dns (%c)\n", 214 - t.active, t.recover, t.cycle, iomd_type); 213 + ata_dev_info(adev, "timings: act %dns rec %dns cyc %dns (%c)\n", 214 + t.active, t.recover, t.cycle, iomd_type); 215 215 216 216 state->port[ap->port_no].speed[adev->devno] = cycle; 217 217 }
+7 -7
drivers/ata/pata_it821x.c
··· 473 473 /* We do need the right mode information for DMA or PIO 474 474 and this comes from the current configuration flags */ 475 475 if (ata_id_has_dma(dev->id)) { 476 - ata_dev_printk(dev, KERN_INFO, "configured for DMA\n"); 476 + ata_dev_info(dev, "configured for DMA\n"); 477 477 dev->xfer_mode = XFER_MW_DMA_0; 478 478 dev->xfer_shift = ATA_SHIFT_MWDMA; 479 479 dev->flags &= ~ATA_DFLAG_PIO; 480 480 } else { 481 - ata_dev_printk(dev, KERN_INFO, "configured for PIO\n"); 481 + ata_dev_info(dev, "configured for PIO\n"); 482 482 dev->xfer_mode = XFER_PIO_0; 483 483 dev->xfer_shift = ATA_SHIFT_PIO; 484 484 dev->flags |= ATA_DFLAG_PIO; ··· 508 508 509 509 if (strstr(model_num, "Integrated Technology Express")) { 510 510 /* RAID mode */ 511 - ata_dev_printk(adev, KERN_INFO, "%sRAID%d volume", 512 - adev->id[147]?"Bootable ":"", 513 - adev->id[129]); 511 + ata_dev_info(adev, "%sRAID%d volume", 512 + adev->id[147] ? "Bootable " : "", 513 + adev->id[129]); 514 514 if (adev->id[129] != 1) 515 - printk("(%dK stripe)", adev->id[146]); 516 - printk(".\n"); 515 + pr_cont("(%dK stripe)", adev->id[146]); 516 + pr_cont("\n"); 517 517 } 518 518 /* This is a controller firmware triggered funny, don't 519 519 report the drive faulty! */
+1 -1
drivers/ata/pata_ixp4xx_cf.c
··· 31 31 struct ata_device *dev; 32 32 33 33 ata_for_each_dev(dev, link, ENABLED) { 34 - ata_dev_printk(dev, KERN_INFO, "configured for PIO0\n"); 34 + ata_dev_info(dev, "configured for PIO0\n"); 35 35 dev->pio_mode = XFER_PIO_0; 36 36 dev->xfer_mode = XFER_PIO_0; 37 37 dev->xfer_shift = ATA_SHIFT_PIO;
+1 -1
drivers/ata/pata_legacy.c
··· 213 213 struct ata_device *dev; 214 214 215 215 ata_for_each_dev(dev, link, ENABLED) { 216 - ata_dev_printk(dev, KERN_INFO, "configured for PIO\n"); 216 + ata_dev_info(dev, "configured for PIO\n"); 217 217 dev->pio_mode = XFER_PIO_0; 218 218 dev->xfer_mode = XFER_PIO_0; 219 219 dev->xfer_shift = ATA_SHIFT_PIO;
+2 -3
drivers/ata/pata_macio.c
··· 813 813 blk_queue_update_dma_pad(sdev->request_queue, 31); 814 814 815 815 /* Tell the world about it */ 816 - ata_dev_printk(dev, KERN_INFO, "OHare alignment limits applied\n"); 816 + ata_dev_info(dev, "OHare alignment limits applied\n"); 817 817 return 0; 818 818 } 819 819 ··· 839 839 cmd | PCI_COMMAND_INVALIDATE); 840 840 841 841 /* Tell the world about it */ 842 - ata_dev_printk(dev, KERN_INFO, 843 - "K2/Shasta alignment limits applied\n"); 842 + ata_dev_info(dev, "K2/Shasta alignment limits applied\n"); 844 843 } 845 844 846 845 return 0;
+1 -1
drivers/ata/pata_octeon_cf.c
··· 405 405 406 406 rc = ata_sff_wait_after_reset(link, 1, deadline); 407 407 if (rc) { 408 - ata_link_printk(link, KERN_ERR, "SRST failed (errno=%d)\n", rc); 408 + ata_link_err(link, "SRST failed (errno=%d)\n", rc); 409 409 return rc; 410 410 } 411 411
+2 -3
drivers/ata/pata_pcmcia.c
··· 68 68 the same vendor - check serial */ 69 69 if (memcmp(master->id + ATA_ID_SERNO, slave->id + ATA_ID_SERNO, 70 70 ATA_ID_SERNO_LEN) == 0 && master->id[ATA_ID_SERNO] >> 8) { 71 - ata_dev_printk(slave, KERN_WARNING, "is a ghost device, ignoring.\n"); 71 + ata_dev_warn(slave, "is a ghost device, ignoring\n"); 72 72 ata_dev_disable(slave); 73 73 } 74 74 } ··· 142 142 ioread8(ap->ioaddr.data_addr); 143 143 144 144 if (count) 145 - ata_port_printk(ap, KERN_WARNING, "drained %d bytes to clear DRQ.\n", 146 - count); 145 + ata_port_warn(ap, "drained %d bytes to clear DRQ\n", count); 147 146 148 147 } 149 148
+1 -1
drivers/ata/pata_platform.c
··· 39 39 dev->pio_mode = dev->xfer_mode = XFER_PIO_0; 40 40 dev->xfer_shift = ATA_SHIFT_PIO; 41 41 dev->flags |= ATA_DFLAG_PIO; 42 - ata_dev_printk(dev, KERN_INFO, "configured for PIO\n"); 42 + ata_dev_info(dev, "configured for PIO\n"); 43 43 } 44 44 return 0; 45 45 }
+1 -1
drivers/ata/pata_rz1000.c
··· 44 44 dev->xfer_mode = XFER_PIO_0; 45 45 dev->xfer_shift = ATA_SHIFT_PIO; 46 46 dev->flags |= ATA_DFLAG_PIO; 47 - ata_dev_printk(dev, KERN_INFO, "configured for PIO\n"); 47 + ata_dev_info(dev, "configured for PIO\n"); 48 48 } 49 49 return 0; 50 50 }
+1 -1
drivers/ata/pata_samsung_cf.c
··· 376 376 rc = pata_s3c_bus_softreset(ap, deadline); 377 377 /* if link is occupied, -ENODEV too is an error */ 378 378 if (rc && rc != -ENODEV) { 379 - ata_link_printk(link, KERN_ERR, "SRST failed (errno=%d)\n", rc); 379 + ata_link_err(link, "SRST failed (errno=%d)\n", rc); 380 380 return rc; 381 381 } 382 382
+1 -2
drivers/ata/pata_scc.c
··· 637 637 DPRINTK("about to softreset, devmask=%x\n", devmask); 638 638 err_mask = scc_bus_softreset(ap, devmask, deadline); 639 639 if (err_mask) { 640 - ata_port_printk(ap, KERN_ERR, "SRST failed (err_mask=0x%x)\n", 641 - err_mask); 640 + ata_port_err(ap, "SRST failed (err_mask=0x%x)\n", err_mask); 642 641 return -EIO; 643 642 } 644 643
+2 -2
drivers/ata/pata_via.c
··· 350 350 if (config->id == PCI_DEVICE_ID_VIA_82C586_0) { 351 351 ata_id_c_string(dev->id, model_num, ATA_ID_PROD, sizeof(model_num)); 352 352 if (strcmp(model_num, "TS64GSSD25-M") == 0) { 353 - ata_dev_printk(dev, KERN_WARNING, 354 - "disabling UDMA mode due to reported lockups with this device.\n"); 353 + ata_dev_warn(dev, 354 + "disabling UDMA mode due to reported lockups with this device\n"); 355 355 mask &= ~ ATA_MASK_UDMA; 356 356 } 357 357 }
+12 -17
drivers/ata/sata_fsl.c
··· 346 346 347 347 /* warn if each s/g element is not dword aligned */ 348 348 if (sg_addr & 0x03) 349 - ata_port_printk(qc->ap, KERN_ERR, 350 - "s/g addr unaligned : 0x%llx\n", 351 - (unsigned long long)sg_addr); 349 + ata_port_err(qc->ap, "s/g addr unaligned : 0x%llx\n", 350 + (unsigned long long)sg_addr); 352 351 if (sg_len & 0x03) 353 - ata_port_printk(qc->ap, KERN_ERR, 354 - "s/g len unaligned : 0x%x\n", sg_len); 352 + ata_port_err(qc->ap, "s/g len unaligned : 0x%x\n", 353 + sg_len); 355 354 356 355 if (num_prde == (SATA_FSL_MAX_PRD_DIRECT - 1) && 357 356 sg_next(sg) != NULL) { ··· 738 739 1, 500); 739 740 740 741 if (temp & ONLINE) { 741 - ata_port_printk(ap, KERN_ERR, 742 - "Hardreset failed, not off-lined %d\n", i); 742 + ata_port_err(ap, "Hardreset failed, not off-lined %d\n", i); 743 743 744 744 /* 745 745 * Try to offline controller atleast twice ··· 774 776 temp = ata_wait_register(ap, hcr_base + HSTATUS, ONLINE, 0, 1, 500); 775 777 776 778 if (!(temp & ONLINE)) { 777 - ata_port_printk(ap, KERN_ERR, 778 - "Hardreset failed, not on-lined\n"); 779 + ata_port_err(ap, "Hardreset failed, not on-lined\n"); 779 780 goto err; 780 781 } 781 782 ··· 790 793 791 794 temp = ata_wait_register(ap, hcr_base + HSTATUS, 0xFF, 0, 1, 500); 792 795 if ((!(temp & 0x10)) || ata_link_offline(link)) { 793 - ata_port_printk(ap, KERN_WARNING, 794 - "No Device OR PHYRDY change,Hstatus = 0x%x\n", 795 - ioread32(hcr_base + HSTATUS)); 796 + ata_port_warn(ap, "No Device OR PHYRDY change,Hstatus = 0x%x\n", 797 + ioread32(hcr_base + HSTATUS)); 796 798 *class = ATA_DEV_NONE; 797 799 return 0; 798 800 } ··· 804 808 500, jiffies_to_msecs(deadline - start_jiffies)); 805 809 806 810 if ((temp & 0xFF) != 0x18) { 807 - ata_port_printk(ap, KERN_WARNING, "No Signature Update\n"); 811 + ata_port_warn(ap, "No Signature Update\n"); 808 812 *class = ATA_DEV_NONE; 809 813 goto do_followup_srst; 810 814 } else { 811 - ata_port_printk(ap, KERN_INFO, 812 - "Signature Update detected @ %d msecs\n", 813 - jiffies_to_msecs(jiffies - start_jiffies)); 815 + ata_port_info(ap, "Signature Update detected @ %d msecs\n", 816 + jiffies_to_msecs(jiffies - start_jiffies)); 814 817 *class = sata_fsl_dev_classify(ap); 815 818 return 0; 816 819 } ··· 884 889 885 890 temp = ata_wait_register(ap, CQ + hcr_base, 0x1, 0x1, 1, 5000); 886 891 if (temp & 0x1) { 887 - ata_port_printk(ap, KERN_WARNING, "ATA_SRST issue failed\n"); 892 + ata_port_warn(ap, "ATA_SRST issue failed\n"); 888 893 889 894 DPRINTK("Softreset@5000,CQ=0x%x,CA=0x%x,CC=0x%x\n", 890 895 ioread32(CQ + hcr_base),
+8 -7
drivers/ata/sata_inic162x.c
··· 396 396 } 397 397 398 398 spurious: 399 - ata_port_printk(ap, KERN_WARNING, "unhandled interrupt: " 400 - "cmd=0x%x irq_stat=0x%x idma_stat=0x%x\n", 401 - qc ? qc->tf.command : 0xff, irq_stat, idma_stat); 399 + ata_port_warn(ap, "unhandled interrupt: cmd=0x%x irq_stat=0x%x idma_stat=0x%x\n", 400 + qc ? qc->tf.command : 0xff, irq_stat, idma_stat); 402 401 } 403 402 404 403 static irqreturn_t inic_interrupt(int irq, void *dev_instance) ··· 618 619 619 620 rc = sata_link_resume(link, timing, deadline); 620 621 if (rc) { 621 - ata_link_printk(link, KERN_WARNING, "failed to resume " 622 - "link after reset (errno=%d)\n", rc); 622 + ata_link_warn(link, 623 + "failed to resume link after reset (errno=%d)\n", 624 + rc); 623 625 return rc; 624 626 } 625 627 ··· 632 632 rc = ata_wait_after_reset(link, deadline, inic_check_ready); 633 633 /* link occupied, -ENODEV too is an error */ 634 634 if (rc) { 635 - ata_link_printk(link, KERN_WARNING, "device not ready " 636 - "after hardreset (errno=%d)\n", rc); 635 + ata_link_warn(link, 636 + "device not ready after hardreset (errno=%d)\n", 637 + rc); 637 638 return rc; 638 639 } 639 640
+19 -22
drivers/ata/sata_mv.c
··· 1190 1190 break; 1191 1191 udelay(per_loop); 1192 1192 } 1193 - /* ata_port_printk(ap, KERN_INFO, "%s: %u+ usecs\n", __func__, i); */ 1193 + /* ata_port_info(ap, "%s: %u+ usecs\n", __func__, i); */ 1194 1194 } 1195 1195 1196 1196 /** ··· 1228 1228 pp->pp_flags &= ~MV_PP_FLAG_EDMA_EN; 1229 1229 mv_wait_for_edma_empty_idle(ap); 1230 1230 if (mv_stop_edma_engine(port_mmio)) { 1231 - ata_port_printk(ap, KERN_ERR, "Unable to stop eDMA\n"); 1231 + ata_port_err(ap, "Unable to stop eDMA\n"); 1232 1232 err = -EIO; 1233 1233 } 1234 1234 mv_edma_cfg(ap, 0, 0); ··· 1382 1382 if (adev->flags & ATA_DFLAG_NCQ) { 1383 1383 if (sata_pmp_attached(adev->link->ap)) { 1384 1384 adev->flags &= ~ATA_DFLAG_NCQ; 1385 - ata_dev_printk(adev, KERN_INFO, 1385 + ata_dev_info(adev, 1386 1386 "NCQ disabled for command-based switching\n"); 1387 1387 } 1388 1388 } ··· 2225 2225 2226 2226 /* See if it worked */ 2227 2227 if ((ifstat & 0x3000) != 0x1000) { 2228 - ata_port_printk(ap, KERN_WARNING, 2229 - "%s transmission error, ifstat=%08x\n", 2230 - __func__, ifstat); 2228 + ata_port_warn(ap, "%s transmission error, ifstat=%08x\n", 2229 + __func__, ifstat); 2231 2230 return AC_ERR_OTHER; 2232 2231 } 2233 2232 return 0; ··· 2341 2342 */ 2342 2343 if (limit_warnings > 0 && (qc->nbytes / qc->sect_size) > 1) { 2343 2344 --limit_warnings; 2344 - ata_link_printk(qc->dev->link, KERN_WARNING, DRV_NAME 2345 - ": attempting PIO w/multiple DRQ: " 2346 - "this may fail due to h/w errata\n"); 2345 + ata_link_warn(qc->dev->link, DRV_NAME 2346 + ": attempting PIO w/multiple DRQ: " 2347 + "this may fail due to h/w errata\n"); 2347 2348 } 2348 2349 /* drop through */ 2349 2350 case ATA_PROT_NODATA: ··· 2498 2499 } 2499 2500 failed_links = hweight16(new_map); 2500 2501 2501 - ata_port_printk(ap, KERN_INFO, "%s: pmp_map=%04x qc_map=%04x " 2502 - "failed_links=%d nr_active_links=%d\n", 2503 - __func__, pp->delayed_eh_pmp_map, 2504 - ap->qc_active, failed_links, 2505 - ap->nr_active_links); 2502 + ata_port_info(ap, 2503 + "%s: pmp_map=%04x qc_map=%04x failed_links=%d nr_active_links=%d\n", 2504 + __func__, pp->delayed_eh_pmp_map, 2505 + ap->qc_active, failed_links, 2506 + ap->nr_active_links); 2506 2507 2507 2508 if (ap->nr_active_links <= failed_links && mv_req_q_empty(ap)) { 2508 2509 mv_process_crpb_entries(ap, pp); 2509 2510 mv_stop_edma(ap); 2510 2511 mv_eh_freeze(ap); 2511 - ata_port_printk(ap, KERN_INFO, "%s: done\n", __func__); 2512 + ata_port_info(ap, "%s: done\n", __func__); 2512 2513 return 1; /* handled */ 2513 2514 } 2514 - ata_port_printk(ap, KERN_INFO, "%s: waiting\n", __func__); 2515 + ata_port_info(ap, "%s: waiting\n", __func__); 2515 2516 return 1; /* handled */ 2516 2517 } 2517 2518 ··· 2553 2554 * and we cannot handle it here. 2554 2555 */ 2555 2556 if (edma_err_cause & EDMA_ERR_SELF_DIS) { 2556 - ata_port_printk(ap, KERN_WARNING, 2557 - "%s: err_cause=0x%x pp_flags=0x%x\n", 2558 - __func__, edma_err_cause, pp->pp_flags); 2557 + ata_port_warn(ap, "%s: err_cause=0x%x pp_flags=0x%x\n", 2558 + __func__, edma_err_cause, pp->pp_flags); 2559 2559 return 0; /* not handled */ 2560 2560 } 2561 2561 return mv_handle_fbs_ncq_dev_err(ap); ··· 2565 2567 * and we cannot handle it here. 2566 2568 */ 2567 2569 if (!(edma_err_cause & EDMA_ERR_SELF_DIS)) { 2568 - ata_port_printk(ap, KERN_WARNING, 2569 - "%s: err_cause=0x%x pp_flags=0x%x\n", 2570 - __func__, edma_err_cause, pp->pp_flags); 2570 + ata_port_warn(ap, "%s: err_cause=0x%x pp_flags=0x%x\n", 2571 + __func__, edma_err_cause, pp->pp_flags); 2571 2572 return 0; /* not handled */ 2572 2573 } 2573 2574 return mv_handle_fbs_non_ncq_dev_err(ap);
+33 -36
drivers/ata/sata_nv.c
··· 620 620 count++; 621 621 } 622 622 if (count == 20) 623 - ata_port_printk(ap, KERN_WARNING, 624 - "timeout waiting for ADMA IDLE, stat=0x%hx\n", 625 - status); 623 + ata_port_warn(ap, "timeout waiting for ADMA IDLE, stat=0x%hx\n", 624 + status); 626 625 627 626 tmp = readw(mmio + NV_ADMA_CTL); 628 627 writew(tmp & ~NV_ADMA_CTL_GO, mmio + NV_ADMA_CTL); ··· 634 635 count++; 635 636 } 636 637 if (count == 20) 637 - ata_port_printk(ap, KERN_WARNING, 638 - "timeout waiting for ADMA LEGACY, stat=0x%hx\n", 639 - status); 638 + ata_port_warn(ap, 639 + "timeout waiting for ADMA LEGACY, stat=0x%hx\n", 640 + status); 640 641 641 642 pp->flags |= NV_ADMA_PORT_REGISTER_MODE; 642 643 } ··· 664 665 count++; 665 666 } 666 667 if (count == 20) 667 - ata_port_printk(ap, KERN_WARNING, 668 + ata_port_warn(ap, 668 669 "timeout waiting for ADMA LEGACY clear and IDLE, stat=0x%hx\n", 669 670 status); 670 671 ··· 771 772 772 773 blk_queue_segment_boundary(sdev->request_queue, segment_boundary); 773 774 blk_queue_max_segments(sdev->request_queue, sg_tablesize); 774 - ata_port_printk(ap, KERN_INFO, 775 - "DMA mask 0x%llX, segment boundary 0x%lX, hw segs %hu\n", 776 - (unsigned long long)*ap->host->dev->dma_mask, 777 - segment_boundary, sg_tablesize); 775 + ata_port_info(ap, 776 + "DMA mask 0x%llX, segment boundary 0x%lX, hw segs %hu\n", 777 + (unsigned long long)*ap->host->dev->dma_mask, 778 + segment_boundary, sg_tablesize); 778 779 779 780 spin_unlock_irqrestore(ap->lock, flags); 780 781 ··· 1442 1443 existing commands. */ 1443 1444 if (unlikely(qc->tf.protocol == ATA_PROT_NCQ && 1444 1445 (qc->flags & ATA_QCFLAG_RESULT_TF))) { 1445 - ata_dev_printk(qc->dev, KERN_ERR, 1446 - "NCQ w/ RESULT_TF not allowed\n"); 1446 + ata_dev_err(qc->dev, "NCQ w/ RESULT_TF not allowed\n"); 1447 1447 return AC_ERR_SYSTEM; 1448 1448 } 1449 1449 ··· 1579 1581 int rc; 1580 1582 1581 1583 if (!(ehc->i.flags & ATA_EHI_QUIET)) 1582 - ata_link_printk(link, KERN_INFO, "nv: skipping " 1583 - "hardreset on occupied port\n"); 1584 + ata_link_info(link, 1585 + "nv: skipping hardreset on occupied port\n"); 1584 1586 1585 1587 /* make sure the link is online */ 1586 1588 rc = sata_link_resume(link, timing, deadline); 1587 1589 /* whine about phy resume failure but proceed */ 1588 1590 if (rc && rc != -EOPNOTSUPP) 1589 - ata_link_printk(link, KERN_WARNING, "failed to resume " 1590 - "link (errno=%d)\n", rc); 1591 + ata_link_warn(link, "failed to resume link (errno=%d)\n", 1592 + rc); 1591 1593 } 1592 1594 1593 1595 /* device signature acquisition is unreliable */ ··· 1684 1686 u8 cpb_count = readb(mmio + NV_ADMA_CPB_COUNT); 1685 1687 u8 next_cpb_idx = readb(mmio + NV_ADMA_NEXT_CPB_IDX); 1686 1688 1687 - ata_port_printk(ap, KERN_ERR, 1689 + ata_port_err(ap, 1688 1690 "EH in ADMA mode, notifier 0x%X " 1689 1691 "notifier_error 0x%X gen_ctl 0x%X status 0x%X " 1690 1692 "next cpb count 0x%X next cpb idx 0x%x\n", ··· 1695 1697 struct nv_adma_cpb *cpb = &pp->cpb[i]; 1696 1698 if ((ata_tag_valid(ap->link.active_tag) && i == ap->link.active_tag) || 1697 1699 ap->link.sactive & (1 << i)) 1698 - ata_port_printk(ap, KERN_ERR, 1700 + ata_port_err(ap, 1699 1701 "CPB %d: ctl_flags 0x%x, resp_flags 0x%x\n", 1700 1702 i, cpb->ctl_flags, cpb->resp_flags); 1701 1703 } ··· 1797 1799 u32 sactive; 1798 1800 u32 done_mask; 1799 1801 1800 - ata_port_printk(ap, KERN_ERR, 1801 - "EH in SWNCQ mode,QC:qc_active 0x%X sactive 0x%X\n", 1802 - ap->qc_active, ap->link.sactive); 1803 - ata_port_printk(ap, KERN_ERR, 1802 + ata_port_err(ap, "EH in SWNCQ mode,QC:qc_active 0x%X sactive 0x%X\n", 1803 + ap->qc_active, ap->link.sactive); 1804 + ata_port_err(ap, 1804 1805 "SWNCQ:qc_active 0x%X defer_bits 0x%X last_issue_tag 0x%x\n " 1805 1806 "dhfis 0x%X dmafis 0x%X sdbfis 0x%X\n", 1806 1807 pp->qc_active, pp->defer_queue.defer_bits, pp->last_issue_tag, 1807 1808 pp->dhfis_bits, pp->dmafis_bits, pp->sdbfis_bits); 1808 1809 1809 - ata_port_printk(ap, KERN_ERR, "ATA_REG 0x%X ERR_REG 0x%X\n", 1810 - ap->ops->sff_check_status(ap), 1811 - ioread8(ap->ioaddr.error_addr)); 1810 + ata_port_err(ap, "ATA_REG 0x%X ERR_REG 0x%X\n", 1811 + ap->ops->sff_check_status(ap), 1812 + ioread8(ap->ioaddr.error_addr)); 1812 1813 1813 1814 sactive = readl(pp->sactive_block); 1814 1815 done_mask = pp->qc_active ^ sactive; 1815 1816 1816 - ata_port_printk(ap, KERN_ERR, "tag : dhfis dmafis sdbfis sacitve\n"); 1817 + ata_port_err(ap, "tag : dhfis dmafis sdbfis sactive\n"); 1817 1818 for (i = 0; i < ATA_MAX_QUEUE; i++) { 1818 1819 u8 err = 0; 1819 1820 if (pp->qc_active & (1 << i)) ··· 1822 1825 else 1823 1826 continue; 1824 1827 1825 - ata_port_printk(ap, KERN_ERR, 1826 - "tag 0x%x: %01x %01x %01x %01x %s\n", i, 1827 - (pp->dhfis_bits >> i) & 0x1, 1828 - (pp->dmafis_bits >> i) & 0x1, 1829 - (pp->sdbfis_bits >> i) & 0x1, 1830 - (sactive >> i) & 0x1, 1831 - (err ? "error! tag doesn't exit" : " ")); 1828 + ata_port_err(ap, 1829 + "tag 0x%x: %01x %01x %01x %01x %s\n", i, 1830 + (pp->dhfis_bits >> i) & 0x1, 1831 + (pp->dmafis_bits >> i) & 0x1, 1832 + (pp->sdbfis_bits >> i) & 0x1, 1833 + (sactive >> i) & 0x1, 1834 + (err ? "error! tag doesn't exit" : " ")); 1832 1835 } 1833 1836 1834 1837 nv_swncq_pp_reinit(ap); ··· 1953 1956 1954 1957 if (strncmp(model_num, "Maxtor", 6) == 0) { 1955 1958 ata_scsi_change_queue_depth(sdev, 1, SCSI_QDEPTH_DEFAULT); 1956 - ata_dev_printk(dev, KERN_NOTICE, 1957 - "Disabling SWNCQ mode (depth %x)\n", sdev->queue_depth); 1959 + ata_dev_notice(dev, "Disabling SWNCQ mode (depth %x)\n", 1960 + sdev->queue_depth); 1958 1961 } 1959 1962 1960 1963 return rc;
+4 -4
drivers/ata/sata_sil.c
··· 643 643 ((ap->flags & SIL_FLAG_MOD15WRITE) && 644 644 (quirks & SIL_QUIRK_MOD15WRITE))) { 645 645 if (print_info) 646 - ata_dev_printk(dev, KERN_INFO, "applying Seagate " 647 - "errata fix (mod15write workaround)\n"); 646 + ata_dev_info(dev, 647 + "applying Seagate errata fix (mod15write workaround)\n"); 648 648 dev->max_sectors = 15; 649 649 return; 650 650 } ··· 652 652 /* limit to udma5 */ 653 653 if (quirks & SIL_QUIRK_UDMA5MAX) { 654 654 if (print_info) 655 - ata_dev_printk(dev, KERN_INFO, "applying Maxtor " 656 - "errata fix %s\n", model_num); 655 + ata_dev_info(dev, "applying Maxtor errata fix %s\n", 656 + model_num); 657 657 dev->udma_mask &= ATA_UDMA5; 658 658 return; 659 659 }
+8 -9
drivers/ata/sata_sil24.c
··· 694 694 return 0; 695 695 696 696 err: 697 - ata_link_printk(link, KERN_ERR, "softreset failed (%s)\n", reason); 697 + ata_link_err(link, "softreset failed (%s)\n", reason); 698 698 return -EIO; 699 699 } 700 700 ··· 714 714 * This happens often after PM DMA CS errata. 715 715 */ 716 716 if (pp->do_port_rst) { 717 - ata_port_printk(ap, KERN_WARNING, "controller in dubious " 718 - "state, performing PORT_RST\n"); 717 + ata_port_warn(ap, 718 + "controller in dubious state, performing PORT_RST\n"); 719 719 720 720 writel(PORT_CS_PORT_RST, port + PORT_CTRL_STAT); 721 721 ata_msleep(ap, 10); ··· 773 773 goto retry; 774 774 } 775 775 776 - ata_link_printk(link, KERN_ERR, "hardreset failed (%s)\n", reason); 776 + ata_link_err(link, "hardreset failed (%s)\n", reason); 777 777 return -EIO; 778 778 } 779 779 ··· 925 925 926 926 if (sata_pmp_gscr_vendor(gscr) == 0x11ab && 927 927 sata_pmp_gscr_devid(gscr) == 0x4140) { 928 - ata_port_printk(ap, KERN_INFO, 928 + ata_port_info(ap, 929 929 "disabling NCQ support due to sil24-mv4140 quirk\n"); 930 930 ap->flags &= ~ATA_FLAG_NCQ; 931 931 } ··· 946 946 947 947 rc = sil24_init_port(link->ap); 948 948 if (rc) { 949 - ata_link_printk(link, KERN_ERR, 950 - "hardreset failed (port not ready)\n"); 949 + ata_link_err(link, "hardreset failed (port not ready)\n"); 951 950 return rc; 952 951 } 953 952 ··· 1140 1141 1141 1142 /* spurious interrupts are expected if PCIX_IRQ_WOC */ 1142 1143 if (!(ap->flags & SIL24_FLAG_PCIX_IRQ_WOC) && ata_ratelimit()) 1143 - ata_port_printk(ap, KERN_INFO, "spurious interrupt " 1144 - "(slot_stat 0x%x active_tag %d sactive 0x%x)\n", 1144 + ata_port_info(ap, 1145 + "spurious interrupt (slot_stat 0x%x active_tag %d sactive 0x%x)\n", 1145 1146 slot_stat, ap->link.active_tag, ap->link.sactive); 1146 1147 } 1147 1148
+3 -3
drivers/ata/sata_via.c
··· 360 360 361 361 online = (sstatus & 0xf) == 0x3; 362 362 363 - ata_port_printk(ap, KERN_INFO, 364 - "SATA link %s 1.5 Gbps (SStatus %X SControl %X)\n", 365 - online ? "up" : "down", sstatus, scontrol); 363 + ata_port_info(ap, 364 + "SATA link %s 1.5 Gbps (SStatus %X SControl %X)\n", 365 + online ? "up" : "down", sstatus, scontrol); 366 366 367 367 /* SStatus is read one more time */ 368 368 svia_scr_read(link, SCR_STATUS, &sstatus);
+40 -12
include/linux/libata.h
··· 1244 1244 /* 1245 1245 * printk helpers 1246 1246 */ 1247 - #define ata_port_printk(ap, lv, fmt, args...) \ 1248 - printk("%sata%u: "fmt, lv, (ap)->print_id , ##args) 1247 + __attribute__((format (printf, 3, 4))) 1248 + int ata_port_printk(const struct ata_port *ap, const char *level, 1249 + const char *fmt, ...); 1250 + __attribute__((format (printf, 3, 4))) 1251 + int ata_link_printk(const struct ata_link *link, const char *level, 1252 + const char *fmt, ...); 1253 + __attribute__((format (printf, 3, 4))) 1254 + int ata_dev_printk(const struct ata_device *dev, const char *level, 1255 + const char *fmt, ...); 1249 1256 1250 - #define ata_link_printk(link, lv, fmt, args...) do { \ 1251 - if (sata_pmp_attached((link)->ap) || (link)->ap->slave_link) \ 1252 - printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id, \ 1253 - (link)->pmp , ##args); \ 1254 - else \ 1255 - printk("%sata%u: "fmt, lv, (link)->ap->print_id , ##args); \ 1256 - } while(0) 1257 + #define ata_port_err(ap, fmt, ...) \ 1258 + ata_port_printk(ap, KERN_ERR, fmt, ##__VA_ARGS__) 1259 + #define ata_port_warn(ap, fmt, ...) \ 1260 + ata_port_printk(ap, KERN_WARNING, fmt, ##__VA_ARGS__) 1261 + #define ata_port_notice(ap, fmt, ...) \ 1262 + ata_port_printk(ap, KERN_NOTICE, fmt, ##__VA_ARGS__) 1263 + #define ata_port_info(ap, fmt, ...) \ 1264 + ata_port_printk(ap, KERN_INFO, fmt, ##__VA_ARGS__) 1265 + #define ata_port_dbg(ap, fmt, ...) \ 1266 + ata_port_printk(ap, KERN_DEBUG, fmt, ##__VA_ARGS__) 1257 1267 1258 - #define ata_dev_printk(dev, lv, fmt, args...) \ 1259 - printk("%sata%u.%02u: "fmt, lv, (dev)->link->ap->print_id, \ 1260 - (dev)->link->pmp + (dev)->devno , ##args) 1268 + #define ata_link_err(link, fmt, ...) \ 1269 + ata_link_printk(link, KERN_ERR, fmt, ##__VA_ARGS__) 1270 + #define ata_link_warn(link, fmt, ...) \ 1271 + ata_link_printk(link, KERN_WARNING, fmt, ##__VA_ARGS__) 1272 + #define ata_link_notice(link, fmt, ...) \ 1273 + ata_link_printk(link, KERN_NOTICE, fmt, ##__VA_ARGS__) 1274 + #define ata_link_info(link, fmt, ...) \ 1275 + ata_link_printk(link, KERN_INFO, fmt, ##__VA_ARGS__) 1276 + #define ata_link_dbg(link, fmt, ...) \ 1277 + ata_link_printk(link, KERN_DEBUG, fmt, ##__VA_ARGS__) 1278 + 1279 + #define ata_dev_err(dev, fmt, ...) \ 1280 + ata_dev_printk(dev, KERN_ERR, fmt, ##__VA_ARGS__) 1281 + #define ata_dev_warn(dev, fmt, ...) \ 1282 + ata_dev_printk(dev, KERN_WARNING, fmt, ##__VA_ARGS__) 1283 + #define ata_dev_notice(dev, fmt, ...) \ 1284 + ata_dev_printk(dev, KERN_NOTICE, fmt, ##__VA_ARGS__) 1285 + #define ata_dev_info(dev, fmt, ...) \ 1286 + ata_dev_printk(dev, KERN_INFO, fmt, ##__VA_ARGS__) 1287 + #define ata_dev_dbg(dev, fmt, ...) \ 1288 + ata_dev_printk(dev, KERN_DEBUG, fmt, ##__VA_ARGS__) 1261 1289 1262 1290 /* 1263 1291 * ata_eh_info helpers