[PATCH 13/13] sddr55: Clean up printk()'s in drivers/usb/storage/sddr55.c
Clean up printk()s and add KERN_ constants in drivers/usb/storage/sddr55.c Signed-off-by: James Nelson <[EMAIL PROTECTED]> diff -Nurp -x dontdiff-osdl --exclude='*~' linux-2.6.11-mm1-original/drivers/usb/storage/sddr55.c linux-2.6.11-mm1/drivers/usb/storage/sddr55.c --- linux-2.6.11-mm1-original/drivers/usb/storage/sddr55.c 2005-03-05 13:29:48.0 -0500 +++ linux-2.6.11-mm1/drivers/usb/storage/sddr55.c 2005-03-05 17:49:49.0 -0500 @@ -37,6 +37,7 @@ #include "debug.h" #include "sddr55.h" +#define PFX "sddr55: " #define short_pack(lsb,msb) ( ((u16)(lsb)) | ( ((u16)(msb))<<8 ) ) #define LSB_of(s) ((s)&0xFF) @@ -105,7 +106,7 @@ static int sddr55_status(struct us_data result = sddr55_bulk_transport(us, DMA_TO_DEVICE, command, 8); - US_DEBUGP("Result for send_command in status %d\n", + US_DEBUGP(PFX "Result for send_command in status %d\n", result); if (result != USB_STOR_XFER_GOOD) { @@ -196,7 +197,7 @@ static int sddr55_read_data(struct us_da info->blocksize - page); len = pages << info->pageshift; - US_DEBUGP("Read %02X pages, from PBA %04X" + US_DEBUGP(PFX "Read %02X pages, from PBA %04X" " (LBA %04X) page %02X\n", pages, pba, lba, page); @@ -221,7 +222,7 @@ static int sddr55_read_data(struct us_da result = sddr55_bulk_transport(us, DMA_TO_DEVICE, command, 8); - US_DEBUGP("Result for send_command in read_data %d\n", + US_DEBUGP(PFX "Result for send_command in read_data %d\n", result); if (result != USB_STOR_XFER_GOOD) { @@ -326,7 +327,7 @@ static int sddr55_write_data(struct us_d usb_stor_access_xfer_buf(buffer, len, us->srb, , , FROM_XFER_BUF); - US_DEBUGP("Write %02X pages, to PBA %04X" + US_DEBUGP(PFX "Write %02X pages, to PBA %04X" " (LBA %04X) page %02X\n", pages, pba, lba, page); @@ -342,7 +343,7 @@ static int sddr55_write_data(struct us_d /* set pba to first block in zone lba is in */ pba = (lba / 1000) * 1024; - US_DEBUGP("No PBA for LBA %04X\n",lba); + US_DEBUGP(PFX "No PBA for LBA %04X\n",lba); if (max_pba > 1024) max_pba = 1024; @@ -365,14 +366,14 @@ static int sddr55_write_data(struct us_d if (pba == -1) { /* oh dear */ - US_DEBUGP("Couldn't find unallocated block\n"); + US_DEBUGP(PFX "Couldn't find unallocated block\n"); set_sense_info (3, 0x31, 0);/* medium error */ result = USB_STOR_TRANSPORT_FAILED; goto leave; } - US_DEBUGP("Allocating PBA %04X for LBA %04X\n", pba, lba); + US_DEBUGP(PFX "Allocating PBA %04X for LBA %04X\n", pba, lba); /* set writing to unallocated block flag */ command[4] = 0x40; @@ -397,7 +398,7 @@ static int sddr55_write_data(struct us_d DMA_TO_DEVICE, command, 8); if (result != USB_STOR_XFER_GOOD) { - US_DEBUGP("Result for send_command in write_data %d\n", + US_DEBUGP(PFX "Result for send_command in write_data %d\n", result); /* set_sense_info is superfluous here? */ @@ -411,7 +412,7 @@ static int sddr55_write_data(struct us_d DMA_TO_DEVICE, buffer, len); if (result != USB_STOR_XFER_GOOD) { - US_DEBUGP("Result for send_data in write_data %d\n", + US_DEBUGP(PFX "Result for send_data in write_data %d\n", result); /* set_sense_info is superfluous here? */ @@ -424,7 +425,7 @@ static int sddr55_write_data(struct us_d result = sddr55_bulk_transport(us, DMA_FROM_DEVICE, status, 6); if (result != USB_STOR_XFER_GOOD) { - US_DEBUGP("Result for get_status in write_data %d\n", + US_DEBUGP(PFX "Result for get_status in write_data %d\n", result); /* set_sense_info is superfluous here? */ @@ -445,7 +446,7 @@ static int sddr55_write_data(struct us_d goto leave; } - US_DEBUGP("Updating maps for LBA
[PATCH 13/13] sddr55: Clean up printk()'s in drivers/usb/storage/sddr55.c
Clean up printk()s and add KERN_ constants in drivers/usb/storage/sddr55.c Signed-off-by: James Nelson [EMAIL PROTECTED] diff -Nurp -x dontdiff-osdl --exclude='*~' linux-2.6.11-mm1-original/drivers/usb/storage/sddr55.c linux-2.6.11-mm1/drivers/usb/storage/sddr55.c --- linux-2.6.11-mm1-original/drivers/usb/storage/sddr55.c 2005-03-05 13:29:48.0 -0500 +++ linux-2.6.11-mm1/drivers/usb/storage/sddr55.c 2005-03-05 17:49:49.0 -0500 @@ -37,6 +37,7 @@ #include debug.h #include sddr55.h +#define PFX sddr55: #define short_pack(lsb,msb) ( ((u16)(lsb)) | ( ((u16)(msb))8 ) ) #define LSB_of(s) ((s)0xFF) @@ -105,7 +106,7 @@ static int sddr55_status(struct us_data result = sddr55_bulk_transport(us, DMA_TO_DEVICE, command, 8); - US_DEBUGP(Result for send_command in status %d\n, + US_DEBUGP(PFX Result for send_command in status %d\n, result); if (result != USB_STOR_XFER_GOOD) { @@ -196,7 +197,7 @@ static int sddr55_read_data(struct us_da info-blocksize - page); len = pages info-pageshift; - US_DEBUGP(Read %02X pages, from PBA %04X + US_DEBUGP(PFX Read %02X pages, from PBA %04X (LBA %04X) page %02X\n, pages, pba, lba, page); @@ -221,7 +222,7 @@ static int sddr55_read_data(struct us_da result = sddr55_bulk_transport(us, DMA_TO_DEVICE, command, 8); - US_DEBUGP(Result for send_command in read_data %d\n, + US_DEBUGP(PFX Result for send_command in read_data %d\n, result); if (result != USB_STOR_XFER_GOOD) { @@ -326,7 +327,7 @@ static int sddr55_write_data(struct us_d usb_stor_access_xfer_buf(buffer, len, us-srb, index, offset, FROM_XFER_BUF); - US_DEBUGP(Write %02X pages, to PBA %04X + US_DEBUGP(PFX Write %02X pages, to PBA %04X (LBA %04X) page %02X\n, pages, pba, lba, page); @@ -342,7 +343,7 @@ static int sddr55_write_data(struct us_d /* set pba to first block in zone lba is in */ pba = (lba / 1000) * 1024; - US_DEBUGP(No PBA for LBA %04X\n,lba); + US_DEBUGP(PFX No PBA for LBA %04X\n,lba); if (max_pba 1024) max_pba = 1024; @@ -365,14 +366,14 @@ static int sddr55_write_data(struct us_d if (pba == -1) { /* oh dear */ - US_DEBUGP(Couldn't find unallocated block\n); + US_DEBUGP(PFX Couldn't find unallocated block\n); set_sense_info (3, 0x31, 0);/* medium error */ result = USB_STOR_TRANSPORT_FAILED; goto leave; } - US_DEBUGP(Allocating PBA %04X for LBA %04X\n, pba, lba); + US_DEBUGP(PFX Allocating PBA %04X for LBA %04X\n, pba, lba); /* set writing to unallocated block flag */ command[4] = 0x40; @@ -397,7 +398,7 @@ static int sddr55_write_data(struct us_d DMA_TO_DEVICE, command, 8); if (result != USB_STOR_XFER_GOOD) { - US_DEBUGP(Result for send_command in write_data %d\n, + US_DEBUGP(PFX Result for send_command in write_data %d\n, result); /* set_sense_info is superfluous here? */ @@ -411,7 +412,7 @@ static int sddr55_write_data(struct us_d DMA_TO_DEVICE, buffer, len); if (result != USB_STOR_XFER_GOOD) { - US_DEBUGP(Result for send_data in write_data %d\n, + US_DEBUGP(PFX Result for send_data in write_data %d\n, result); /* set_sense_info is superfluous here? */ @@ -424,7 +425,7 @@ static int sddr55_write_data(struct us_d result = sddr55_bulk_transport(us, DMA_FROM_DEVICE, status, 6); if (result != USB_STOR_XFER_GOOD) { - US_DEBUGP(Result for get_status in write_data %d\n, + US_DEBUGP(PFX Result for get_status in write_data %d\n, result); /* set_sense_info is superfluous here? */ @@ -445,7 +446,7 @@ static int sddr55_write_data(struct us_d goto leave; } - US_DEBUGP(Updating maps for LBA %04X: old PBA %04X, new PBA %04X\n, +