diff options
author | Frank Seidel <frank@f-seidel.de> | 2009-02-05 10:16:24 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-24 19:20:30 -0400 |
commit | 6f8aa65b52037123beab573432e371c0f70b7b9a (patch) | |
tree | c83c7a4190f9f1f5c13c5332d316abc99efaecfd /drivers/usb/storage | |
parent | c49cfa9170256295f4a0fd1668a2411fc05d6b33 (diff) |
USB: add missing KERN_* constants to printks
According to kerneljanitors todo list all printk calls (beginning
a new line) should have an according KERN_* constant.
Those are the missing peaces here for the usb subsystem.
Signed-off-by: Frank Seidel <frank@f-seidel.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r-- | drivers/usb/storage/alauda.c | 25 | ||||
-rw-r--r-- | drivers/usb/storage/sddr09.c | 37 | ||||
-rw-r--r-- | drivers/usb/storage/sddr55.c | 4 |
3 files changed, 41 insertions, 25 deletions
diff --git a/drivers/usb/storage/alauda.c b/drivers/usb/storage/alauda.c index 8d3711a7ff06..5407411e30e0 100644 --- a/drivers/usb/storage/alauda.c +++ b/drivers/usb/storage/alauda.c | |||
@@ -307,7 +307,8 @@ static int alauda_init_media(struct us_data *us) | |||
307 | data[0], data[1], data[2], data[3]); | 307 | data[0], data[1], data[2], data[3]); |
308 | media_info = alauda_card_find_id(data[1]); | 308 | media_info = alauda_card_find_id(data[1]); |
309 | if (media_info == NULL) { | 309 | if (media_info == NULL) { |
310 | printk("alauda_init_media: Unrecognised media signature: " | 310 | printk(KERN_WARNING |
311 | "alauda_init_media: Unrecognised media signature: " | ||
311 | "%02X %02X %02X %02X\n", | 312 | "%02X %02X %02X %02X\n", |
312 | data[0], data[1], data[2], data[3]); | 313 | data[0], data[1], data[2], data[3]); |
313 | return USB_STOR_TRANSPORT_ERROR; | 314 | return USB_STOR_TRANSPORT_ERROR; |
@@ -518,7 +519,8 @@ static int alauda_read_map(struct us_data *us, unsigned int zone) | |||
518 | 519 | ||
519 | /* check even parity */ | 520 | /* check even parity */ |
520 | if (parity[data[6] ^ data[7]]) { | 521 | if (parity[data[6] ^ data[7]]) { |
521 | printk("alauda_read_map: Bad parity in LBA for block %d" | 522 | printk(KERN_WARNING |
523 | "alauda_read_map: Bad parity in LBA for block %d" | ||
522 | " (%02X %02X)\n", i, data[6], data[7]); | 524 | " (%02X %02X)\n", i, data[6], data[7]); |
523 | pba_to_lba[i] = UNUSABLE; | 525 | pba_to_lba[i] = UNUSABLE; |
524 | continue; | 526 | continue; |
@@ -538,13 +540,16 @@ static int alauda_read_map(struct us_data *us, unsigned int zone) | |||
538 | */ | 540 | */ |
539 | 541 | ||
540 | if (lba_offset >= uzonesize) { | 542 | if (lba_offset >= uzonesize) { |
541 | printk("alauda_read_map: Bad low LBA %d for block %d\n", | 543 | printk(KERN_WARNING |
544 | "alauda_read_map: Bad low LBA %d for block %d\n", | ||
542 | lba_real, blocknum); | 545 | lba_real, blocknum); |
543 | continue; | 546 | continue; |
544 | } | 547 | } |
545 | 548 | ||
546 | if (lba_to_pba[lba_offset] != UNDEF) { | 549 | if (lba_to_pba[lba_offset] != UNDEF) { |
547 | printk("alauda_read_map: LBA %d seen for PBA %d and %d\n", | 550 | printk(KERN_WARNING |
551 | "alauda_read_map: " | ||
552 | "LBA %d seen for PBA %d and %d\n", | ||
548 | lba_real, lba_to_pba[lba_offset], blocknum); | 553 | lba_real, lba_to_pba[lba_offset], blocknum); |
549 | continue; | 554 | continue; |
550 | } | 555 | } |
@@ -712,13 +717,15 @@ static int alauda_write_lba(struct us_data *us, u16 lba, | |||
712 | if (pba == 1) { | 717 | if (pba == 1) { |
713 | /* Maybe it is impossible to write to PBA 1. | 718 | /* Maybe it is impossible to write to PBA 1. |
714 | Fake success, but don't do anything. */ | 719 | Fake success, but don't do anything. */ |
715 | printk("alauda_write_lba: avoid writing to pba 1\n"); | 720 | printk(KERN_WARNING |
721 | "alauda_write_lba: avoid writing to pba 1\n"); | ||
716 | return USB_STOR_TRANSPORT_GOOD; | 722 | return USB_STOR_TRANSPORT_GOOD; |
717 | } | 723 | } |
718 | 724 | ||
719 | new_pba = alauda_find_unused_pba(&MEDIA_INFO(us), zone); | 725 | new_pba = alauda_find_unused_pba(&MEDIA_INFO(us), zone); |
720 | if (!new_pba) { | 726 | if (!new_pba) { |
721 | printk("alauda_write_lba: Out of unused blocks\n"); | 727 | printk(KERN_WARNING |
728 | "alauda_write_lba: Out of unused blocks\n"); | ||
722 | return USB_STOR_TRANSPORT_ERROR; | 729 | return USB_STOR_TRANSPORT_ERROR; |
723 | } | 730 | } |
724 | 731 | ||
@@ -818,7 +825,7 @@ static int alauda_read_data(struct us_data *us, unsigned long address, | |||
818 | len = min(sectors, blocksize) * (pagesize + 64); | 825 | len = min(sectors, blocksize) * (pagesize + 64); |
819 | buffer = kmalloc(len, GFP_NOIO); | 826 | buffer = kmalloc(len, GFP_NOIO); |
820 | if (buffer == NULL) { | 827 | if (buffer == NULL) { |
821 | printk("alauda_read_data: Out of memory\n"); | 828 | printk(KERN_WARNING "alauda_read_data: Out of memory\n"); |
822 | return USB_STOR_TRANSPORT_ERROR; | 829 | return USB_STOR_TRANSPORT_ERROR; |
823 | } | 830 | } |
824 | 831 | ||
@@ -911,7 +918,7 @@ static int alauda_write_data(struct us_data *us, unsigned long address, | |||
911 | len = min(sectors, blocksize) * pagesize; | 918 | len = min(sectors, blocksize) * pagesize; |
912 | buffer = kmalloc(len, GFP_NOIO); | 919 | buffer = kmalloc(len, GFP_NOIO); |
913 | if (buffer == NULL) { | 920 | if (buffer == NULL) { |
914 | printk("alauda_write_data: Out of memory\n"); | 921 | printk(KERN_WARNING "alauda_write_data: Out of memory\n"); |
915 | return USB_STOR_TRANSPORT_ERROR; | 922 | return USB_STOR_TRANSPORT_ERROR; |
916 | } | 923 | } |
917 | 924 | ||
@@ -921,7 +928,7 @@ static int alauda_write_data(struct us_data *us, unsigned long address, | |||
921 | */ | 928 | */ |
922 | blockbuffer = kmalloc((pagesize + 64) * blocksize, GFP_NOIO); | 929 | blockbuffer = kmalloc((pagesize + 64) * blocksize, GFP_NOIO); |
923 | if (blockbuffer == NULL) { | 930 | if (blockbuffer == NULL) { |
924 | printk("alauda_write_data: Out of memory\n"); | 931 | printk(KERN_WARNING "alauda_write_data: Out of memory\n"); |
925 | kfree(buffer); | 932 | kfree(buffer); |
926 | return USB_STOR_TRANSPORT_ERROR; | 933 | return USB_STOR_TRANSPORT_ERROR; |
927 | } | 934 | } |
diff --git a/drivers/usb/storage/sddr09.c b/drivers/usb/storage/sddr09.c index 531ae5c5abf3..b667c7d2b837 100644 --- a/drivers/usb/storage/sddr09.c +++ b/drivers/usb/storage/sddr09.c | |||
@@ -723,7 +723,7 @@ sddr09_read_data(struct us_data *us, | |||
723 | len = min(sectors, (unsigned int) info->blocksize) * info->pagesize; | 723 | len = min(sectors, (unsigned int) info->blocksize) * info->pagesize; |
724 | buffer = kmalloc(len, GFP_NOIO); | 724 | buffer = kmalloc(len, GFP_NOIO); |
725 | if (buffer == NULL) { | 725 | if (buffer == NULL) { |
726 | printk("sddr09_read_data: Out of memory\n"); | 726 | printk(KERN_WARNING "sddr09_read_data: Out of memory\n"); |
727 | return -ENOMEM; | 727 | return -ENOMEM; |
728 | } | 728 | } |
729 | 729 | ||
@@ -838,7 +838,8 @@ sddr09_write_lba(struct us_data *us, unsigned int lba, | |||
838 | if (pba == UNDEF) { | 838 | if (pba == UNDEF) { |
839 | pba = sddr09_find_unused_pba(info, lba); | 839 | pba = sddr09_find_unused_pba(info, lba); |
840 | if (!pba) { | 840 | if (!pba) { |
841 | printk("sddr09_write_lba: Out of unused blocks\n"); | 841 | printk(KERN_WARNING |
842 | "sddr09_write_lba: Out of unused blocks\n"); | ||
842 | return -ENOSPC; | 843 | return -ENOSPC; |
843 | } | 844 | } |
844 | info->pba_to_lba[pba] = lba; | 845 | info->pba_to_lba[pba] = lba; |
@@ -849,7 +850,7 @@ sddr09_write_lba(struct us_data *us, unsigned int lba, | |||
849 | if (pba == 1) { | 850 | if (pba == 1) { |
850 | /* Maybe it is impossible to write to PBA 1. | 851 | /* Maybe it is impossible to write to PBA 1. |
851 | Fake success, but don't do anything. */ | 852 | Fake success, but don't do anything. */ |
852 | printk("sddr09: avoid writing to pba 1\n"); | 853 | printk(KERN_WARNING "sddr09: avoid writing to pba 1\n"); |
853 | return 0; | 854 | return 0; |
854 | } | 855 | } |
855 | 856 | ||
@@ -954,7 +955,7 @@ sddr09_write_data(struct us_data *us, | |||
954 | blocklen = (pagelen << info->blockshift); | 955 | blocklen = (pagelen << info->blockshift); |
955 | blockbuffer = kmalloc(blocklen, GFP_NOIO); | 956 | blockbuffer = kmalloc(blocklen, GFP_NOIO); |
956 | if (!blockbuffer) { | 957 | if (!blockbuffer) { |
957 | printk("sddr09_write_data: Out of memory\n"); | 958 | printk(KERN_WARNING "sddr09_write_data: Out of memory\n"); |
958 | return -ENOMEM; | 959 | return -ENOMEM; |
959 | } | 960 | } |
960 | 961 | ||
@@ -965,7 +966,7 @@ sddr09_write_data(struct us_data *us, | |||
965 | len = min(sectors, (unsigned int) info->blocksize) * info->pagesize; | 966 | len = min(sectors, (unsigned int) info->blocksize) * info->pagesize; |
966 | buffer = kmalloc(len, GFP_NOIO); | 967 | buffer = kmalloc(len, GFP_NOIO); |
967 | if (buffer == NULL) { | 968 | if (buffer == NULL) { |
968 | printk("sddr09_write_data: Out of memory\n"); | 969 | printk(KERN_WARNING "sddr09_write_data: Out of memory\n"); |
969 | kfree(blockbuffer); | 970 | kfree(blockbuffer); |
970 | return -ENOMEM; | 971 | return -ENOMEM; |
971 | } | 972 | } |
@@ -1112,7 +1113,7 @@ sddr09_get_cardinfo(struct us_data *us, unsigned char flags) { | |||
1112 | 1113 | ||
1113 | if (result) { | 1114 | if (result) { |
1114 | US_DEBUGP("Result of read_deviceID is %d\n", result); | 1115 | US_DEBUGP("Result of read_deviceID is %d\n", result); |
1115 | printk("sddr09: could not read card info\n"); | 1116 | printk(KERN_WARNING "sddr09: could not read card info\n"); |
1116 | return NULL; | 1117 | return NULL; |
1117 | } | 1118 | } |
1118 | 1119 | ||
@@ -1153,7 +1154,7 @@ sddr09_get_cardinfo(struct us_data *us, unsigned char flags) { | |||
1153 | sprintf(blurbtxt + strlen(blurbtxt), | 1154 | sprintf(blurbtxt + strlen(blurbtxt), |
1154 | ", WP"); | 1155 | ", WP"); |
1155 | 1156 | ||
1156 | printk("%s\n", blurbtxt); | 1157 | printk(KERN_WARNING "%s\n", blurbtxt); |
1157 | 1158 | ||
1158 | return cardinfo; | 1159 | return cardinfo; |
1159 | } | 1160 | } |
@@ -1184,7 +1185,7 @@ sddr09_read_map(struct us_data *us) { | |||
1184 | alloc_len = (alloc_blocks << CONTROL_SHIFT); | 1185 | alloc_len = (alloc_blocks << CONTROL_SHIFT); |
1185 | buffer = kmalloc(alloc_len, GFP_NOIO); | 1186 | buffer = kmalloc(alloc_len, GFP_NOIO); |
1186 | if (buffer == NULL) { | 1187 | if (buffer == NULL) { |
1187 | printk("sddr09_read_map: out of memory\n"); | 1188 | printk(KERN_WARNING "sddr09_read_map: out of memory\n"); |
1188 | result = -1; | 1189 | result = -1; |
1189 | goto done; | 1190 | goto done; |
1190 | } | 1191 | } |
@@ -1198,7 +1199,7 @@ sddr09_read_map(struct us_data *us) { | |||
1198 | info->pba_to_lba = kmalloc(numblocks*sizeof(int), GFP_NOIO); | 1199 | info->pba_to_lba = kmalloc(numblocks*sizeof(int), GFP_NOIO); |
1199 | 1200 | ||
1200 | if (info->lba_to_pba == NULL || info->pba_to_lba == NULL) { | 1201 | if (info->lba_to_pba == NULL || info->pba_to_lba == NULL) { |
1201 | printk("sddr09_read_map: out of memory\n"); | 1202 | printk(KERN_WARNING "sddr09_read_map: out of memory\n"); |
1202 | result = -1; | 1203 | result = -1; |
1203 | goto done; | 1204 | goto done; |
1204 | } | 1205 | } |
@@ -1238,7 +1239,8 @@ sddr09_read_map(struct us_data *us) { | |||
1238 | if (ptr[j] != 0) | 1239 | if (ptr[j] != 0) |
1239 | goto nonz; | 1240 | goto nonz; |
1240 | info->pba_to_lba[i] = UNUSABLE; | 1241 | info->pba_to_lba[i] = UNUSABLE; |
1241 | printk("sddr09: PBA %d has no logical mapping\n", i); | 1242 | printk(KERN_WARNING "sddr09: PBA %d has no logical mapping\n", |
1243 | i); | ||
1242 | continue; | 1244 | continue; |
1243 | 1245 | ||
1244 | nonz: | 1246 | nonz: |
@@ -1251,7 +1253,8 @@ sddr09_read_map(struct us_data *us) { | |||
1251 | nonff: | 1253 | nonff: |
1252 | /* normal PBAs start with six FFs */ | 1254 | /* normal PBAs start with six FFs */ |
1253 | if (j < 6) { | 1255 | if (j < 6) { |
1254 | printk("sddr09: PBA %d has no logical mapping: " | 1256 | printk(KERN_WARNING |
1257 | "sddr09: PBA %d has no logical mapping: " | ||
1255 | "reserved area = %02X%02X%02X%02X " | 1258 | "reserved area = %02X%02X%02X%02X " |
1256 | "data status %02X block status %02X\n", | 1259 | "data status %02X block status %02X\n", |
1257 | i, ptr[0], ptr[1], ptr[2], ptr[3], | 1260 | i, ptr[0], ptr[1], ptr[2], ptr[3], |
@@ -1261,7 +1264,8 @@ sddr09_read_map(struct us_data *us) { | |||
1261 | } | 1264 | } |
1262 | 1265 | ||
1263 | if ((ptr[6] >> 4) != 0x01) { | 1266 | if ((ptr[6] >> 4) != 0x01) { |
1264 | printk("sddr09: PBA %d has invalid address field " | 1267 | printk(KERN_WARNING |
1268 | "sddr09: PBA %d has invalid address field " | ||
1265 | "%02X%02X/%02X%02X\n", | 1269 | "%02X%02X/%02X%02X\n", |
1266 | i, ptr[6], ptr[7], ptr[11], ptr[12]); | 1270 | i, ptr[6], ptr[7], ptr[11], ptr[12]); |
1267 | info->pba_to_lba[i] = UNUSABLE; | 1271 | info->pba_to_lba[i] = UNUSABLE; |
@@ -1270,7 +1274,8 @@ sddr09_read_map(struct us_data *us) { | |||
1270 | 1274 | ||
1271 | /* check even parity */ | 1275 | /* check even parity */ |
1272 | if (parity[ptr[6] ^ ptr[7]]) { | 1276 | if (parity[ptr[6] ^ ptr[7]]) { |
1273 | printk("sddr09: Bad parity in LBA for block %d" | 1277 | printk(KERN_WARNING |
1278 | "sddr09: Bad parity in LBA for block %d" | ||
1274 | " (%02X %02X)\n", i, ptr[6], ptr[7]); | 1279 | " (%02X %02X)\n", i, ptr[6], ptr[7]); |
1275 | info->pba_to_lba[i] = UNUSABLE; | 1280 | info->pba_to_lba[i] = UNUSABLE; |
1276 | continue; | 1281 | continue; |
@@ -1289,7 +1294,8 @@ sddr09_read_map(struct us_data *us) { | |||
1289 | */ | 1294 | */ |
1290 | 1295 | ||
1291 | if (lba >= 1000) { | 1296 | if (lba >= 1000) { |
1292 | printk("sddr09: Bad low LBA %d for block %d\n", | 1297 | printk(KERN_WARNING |
1298 | "sddr09: Bad low LBA %d for block %d\n", | ||
1293 | lba, i); | 1299 | lba, i); |
1294 | goto possibly_erase; | 1300 | goto possibly_erase; |
1295 | } | 1301 | } |
@@ -1297,7 +1303,8 @@ sddr09_read_map(struct us_data *us) { | |||
1297 | lba += 1000*(i/0x400); | 1303 | lba += 1000*(i/0x400); |
1298 | 1304 | ||
1299 | if (info->lba_to_pba[lba] != UNDEF) { | 1305 | if (info->lba_to_pba[lba] != UNDEF) { |
1300 | printk("sddr09: LBA %d seen for PBA %d and %d\n", | 1306 | printk(KERN_WARNING |
1307 | "sddr09: LBA %d seen for PBA %d and %d\n", | ||
1301 | lba, info->lba_to_pba[lba], i); | 1308 | lba, info->lba_to_pba[lba], i); |
1302 | goto possibly_erase; | 1309 | goto possibly_erase; |
1303 | } | 1310 | } |
diff --git a/drivers/usb/storage/sddr55.c b/drivers/usb/storage/sddr55.c index 0d8df7577899..5a0106ba256c 100644 --- a/drivers/usb/storage/sddr55.c +++ b/drivers/usb/storage/sddr55.c | |||
@@ -703,7 +703,9 @@ static int sddr55_read_map(struct us_data *us) { | |||
703 | 703 | ||
704 | if (info->lba_to_pba[lba + zone * 1000] != NOT_ALLOCATED && | 704 | if (info->lba_to_pba[lba + zone * 1000] != NOT_ALLOCATED && |
705 | !info->force_read_only) { | 705 | !info->force_read_only) { |
706 | printk("sddr55: map inconsistency at LBA %04X\n", lba + zone * 1000); | 706 | printk(KERN_WARNING |
707 | "sddr55: map inconsistency at LBA %04X\n", | ||
708 | lba + zone * 1000); | ||
707 | info->force_read_only = 1; | 709 | info->force_read_only = 1; |
708 | } | 710 | } |
709 | 711 | ||