aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/sddr09.c
diff options
context:
space:
mode:
authorFrank Seidel <frank@f-seidel.de>2009-02-05 10:16:24 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-03-24 19:20:30 -0400
commit6f8aa65b52037123beab573432e371c0f70b7b9a (patch)
treec83c7a4190f9f1f5c13c5332d316abc99efaecfd /drivers/usb/storage/sddr09.c
parentc49cfa9170256295f4a0fd1668a2411fc05d6b33 (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/sddr09.c')
-rw-r--r--drivers/usb/storage/sddr09.c37
1 files changed, 22 insertions, 15 deletions
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 }