diff options
author | Tejun Heo <htejun@gmail.com> | 2006-02-12 20:02:46 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-20 04:54:22 -0500 |
commit | 6a62a04d4705df4f9f9bee39e889b9e920eeca47 (patch) | |
tree | ea1b13e887740b69f7cd24e602802599c3fb8e76 /drivers/scsi | |
parent | 5b2ffed906a3ebd4e52a5bbef06b99a517c53e4b (diff) |
[PATCH] libata: rename ata_dev_id_[c_]string()
This patch renames ata_dev_id_[c_]string() to ata_id_[c_]string().
All other functions which read data from ATA ID data start with ata_id
and those two function names were getting too long.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/libata-core.c | 23 | ||||
-rw-r--r-- | drivers/scsi/libata-scsi.c | 12 | ||||
-rw-r--r-- | drivers/scsi/sata_sil.c | 3 |
3 files changed, 18 insertions, 20 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index adc5b440c9bc..d694b20e81bf 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -486,7 +486,7 @@ ata_dev_try_classify(struct ata_port *ap, unsigned int device, u8 *r_err) | |||
486 | } | 486 | } |
487 | 487 | ||
488 | /** | 488 | /** |
489 | * ata_dev_id_string - Convert IDENTIFY DEVICE page into string | 489 | * ata_id_string - Convert IDENTIFY DEVICE page into string |
490 | * @id: IDENTIFY DEVICE results we will examine | 490 | * @id: IDENTIFY DEVICE results we will examine |
491 | * @s: string into which data is output | 491 | * @s: string into which data is output |
492 | * @ofs: offset into identify device page | 492 | * @ofs: offset into identify device page |
@@ -500,8 +500,8 @@ ata_dev_try_classify(struct ata_port *ap, unsigned int device, u8 *r_err) | |||
500 | * caller. | 500 | * caller. |
501 | */ | 501 | */ |
502 | 502 | ||
503 | void ata_dev_id_string(const u16 *id, unsigned char *s, | 503 | void ata_id_string(const u16 *id, unsigned char *s, |
504 | unsigned int ofs, unsigned int len) | 504 | unsigned int ofs, unsigned int len) |
505 | { | 505 | { |
506 | unsigned int c; | 506 | unsigned int c; |
507 | 507 | ||
@@ -520,27 +520,27 @@ void ata_dev_id_string(const u16 *id, unsigned char *s, | |||
520 | } | 520 | } |
521 | 521 | ||
522 | /** | 522 | /** |
523 | * ata_dev_id_c_string - Convert IDENTIFY DEVICE page into C string | 523 | * ata_id_c_string - Convert IDENTIFY DEVICE page into C string |
524 | * @id: IDENTIFY DEVICE results we will examine | 524 | * @id: IDENTIFY DEVICE results we will examine |
525 | * @s: string into which data is output | 525 | * @s: string into which data is output |
526 | * @ofs: offset into identify device page | 526 | * @ofs: offset into identify device page |
527 | * @len: length of string to return. must be an odd number. | 527 | * @len: length of string to return. must be an odd number. |
528 | * | 528 | * |
529 | * This function is identical to ata_dev_id_string except that it | 529 | * This function is identical to ata_id_string except that it |
530 | * trims trailing spaces and terminates the resulting string with | 530 | * trims trailing spaces and terminates the resulting string with |
531 | * null. @len must be actual maximum length (even number) + 1. | 531 | * null. @len must be actual maximum length (even number) + 1. |
532 | * | 532 | * |
533 | * LOCKING: | 533 | * LOCKING: |
534 | * caller. | 534 | * caller. |
535 | */ | 535 | */ |
536 | void ata_dev_id_c_string(const u16 *id, unsigned char *s, | 536 | void ata_id_c_string(const u16 *id, unsigned char *s, |
537 | unsigned int ofs, unsigned int len) | 537 | unsigned int ofs, unsigned int len) |
538 | { | 538 | { |
539 | unsigned char *p; | 539 | unsigned char *p; |
540 | 540 | ||
541 | WARN_ON(!(len & 1)); | 541 | WARN_ON(!(len & 1)); |
542 | 542 | ||
543 | ata_dev_id_string(id, s, ofs, len - 1); | 543 | ata_id_string(id, s, ofs, len - 1); |
544 | 544 | ||
545 | p = s + strnlen(s, len - 1); | 545 | p = s + strnlen(s, len - 1); |
546 | while (p > s && p[-1] == ' ') | 546 | while (p > s && p[-1] == ' ') |
@@ -2315,8 +2315,7 @@ static int ata_dma_blacklisted(const struct ata_device *dev) | |||
2315 | unsigned char model_num[41]; | 2315 | unsigned char model_num[41]; |
2316 | int i; | 2316 | int i; |
2317 | 2317 | ||
2318 | ata_dev_id_c_string(dev->id, model_num, ATA_ID_PROD_OFS, | 2318 | ata_id_c_string(dev->id, model_num, ATA_ID_PROD_OFS, sizeof(model_num)); |
2319 | sizeof(model_num)); | ||
2320 | 2319 | ||
2321 | for (i = 0; i < ARRAY_SIZE(ata_dma_blacklist); i++) | 2320 | for (i = 0; i < ARRAY_SIZE(ata_dma_blacklist); i++) |
2322 | if (!strcmp(ata_dma_blacklist[i], model_num)) | 2321 | if (!strcmp(ata_dma_blacklist[i], model_num)) |
@@ -4934,8 +4933,8 @@ EXPORT_SYMBOL_GPL(ata_scsi_slave_config); | |||
4934 | EXPORT_SYMBOL_GPL(ata_scsi_release); | 4933 | EXPORT_SYMBOL_GPL(ata_scsi_release); |
4935 | EXPORT_SYMBOL_GPL(ata_host_intr); | 4934 | EXPORT_SYMBOL_GPL(ata_host_intr); |
4936 | EXPORT_SYMBOL_GPL(ata_dev_classify); | 4935 | EXPORT_SYMBOL_GPL(ata_dev_classify); |
4937 | EXPORT_SYMBOL_GPL(ata_dev_id_string); | 4936 | EXPORT_SYMBOL_GPL(ata_id_string); |
4938 | EXPORT_SYMBOL_GPL(ata_dev_id_c_string); | 4937 | EXPORT_SYMBOL_GPL(ata_id_c_string); |
4939 | EXPORT_SYMBOL_GPL(ata_dev_config); | 4938 | EXPORT_SYMBOL_GPL(ata_dev_config); |
4940 | EXPORT_SYMBOL_GPL(ata_scsi_simulate); | 4939 | EXPORT_SYMBOL_GPL(ata_scsi_simulate); |
4941 | EXPORT_SYMBOL_GPL(ata_eh_qc_complete); | 4940 | EXPORT_SYMBOL_GPL(ata_eh_qc_complete); |
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 86da46502b3e..538784e65cdc 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c | |||
@@ -1567,8 +1567,8 @@ unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf, | |||
1567 | 1567 | ||
1568 | if (buflen > 35) { | 1568 | if (buflen > 35) { |
1569 | memcpy(&rbuf[8], "ATA ", 8); | 1569 | memcpy(&rbuf[8], "ATA ", 8); |
1570 | ata_dev_id_string(args->id, &rbuf[16], ATA_ID_PROD_OFS, 16); | 1570 | ata_id_string(args->id, &rbuf[16], ATA_ID_PROD_OFS, 16); |
1571 | ata_dev_id_string(args->id, &rbuf[32], ATA_ID_FW_REV_OFS, 4); | 1571 | ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV_OFS, 4); |
1572 | if (rbuf[32] == 0 || rbuf[32] == ' ') | 1572 | if (rbuf[32] == 0 || rbuf[32] == ' ') |
1573 | memcpy(&rbuf[32], "n/a ", 4); | 1573 | memcpy(&rbuf[32], "n/a ", 4); |
1574 | } | 1574 | } |
@@ -1642,8 +1642,8 @@ unsigned int ata_scsiop_inq_80(struct ata_scsi_args *args, u8 *rbuf, | |||
1642 | memcpy(rbuf, hdr, sizeof(hdr)); | 1642 | memcpy(rbuf, hdr, sizeof(hdr)); |
1643 | 1643 | ||
1644 | if (buflen > (ATA_SERNO_LEN + 4 - 1)) | 1644 | if (buflen > (ATA_SERNO_LEN + 4 - 1)) |
1645 | ata_dev_id_string(args->id, (unsigned char *) &rbuf[4], | 1645 | ata_id_string(args->id, (unsigned char *) &rbuf[4], |
1646 | ATA_ID_SERNO_OFS, ATA_SERNO_LEN); | 1646 | ATA_ID_SERNO_OFS, ATA_SERNO_LEN); |
1647 | 1647 | ||
1648 | return 0; | 1648 | return 0; |
1649 | } | 1649 | } |
@@ -1806,8 +1806,8 @@ static int ata_dev_supports_fua(u16 *id) | |||
1806 | if (!ata_id_has_fua(id)) | 1806 | if (!ata_id_has_fua(id)) |
1807 | return 0; | 1807 | return 0; |
1808 | 1808 | ||
1809 | ata_dev_id_c_string(id, model, ATA_ID_PROD_OFS, sizeof(model)); | 1809 | ata_id_c_string(id, model, ATA_ID_PROD_OFS, sizeof(model)); |
1810 | ata_dev_id_c_string(id, fw, ATA_ID_FW_REV_OFS, sizeof(fw)); | 1810 | ata_id_c_string(id, fw, ATA_ID_FW_REV_OFS, sizeof(fw)); |
1811 | 1811 | ||
1812 | if (strcmp(model, "Maxtor")) | 1812 | if (strcmp(model, "Maxtor")) |
1813 | return 1; | 1813 | return 1; |
diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c index 15346888faf2..e14ed4ebbeed 100644 --- a/drivers/scsi/sata_sil.c +++ b/drivers/scsi/sata_sil.c | |||
@@ -338,8 +338,7 @@ static void sil_dev_config(struct ata_port *ap, struct ata_device *dev) | |||
338 | unsigned int n, quirks = 0; | 338 | unsigned int n, quirks = 0; |
339 | unsigned char model_num[41]; | 339 | unsigned char model_num[41]; |
340 | 340 | ||
341 | ata_dev_id_c_string(dev->id, model_num, ATA_ID_PROD_OFS, | 341 | ata_id_c_string(dev->id, model_num, ATA_ID_PROD_OFS, sizeof(model_num)); |
342 | sizeof(model_num)); | ||
343 | 342 | ||
344 | for (n = 0; sil_blacklist[n].product; n++) | 343 | for (n = 0; sil_blacklist[n].product; n++) |
345 | if (!strcmp(sil_blacklist[n].product, model_num)) { | 344 | if (!strcmp(sil_blacklist[n].product, model_num)) { |