aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-09-11 17:25:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-11 18:59:32 -0400
commitcd3f2cd05cf1066f3975ed3223f12c799bc553c6 (patch)
tree9245e6fef68476e7fbf3bdcf14d7bd7329b9d58a /drivers/block
parent99481334bcab1330fce0c590b845b4a95b101a69 (diff)
pktcdvd: consolidate DPRINTK and VPRINTK macros
Use the more common pkt_dbg(level, fmt, ...) form. These messages are emitted at KERN_NOTICE. Always emit function name with pkt_dbg(2, ...) uses and remove the sometimes abbreviated embedded function name. This form always verifies the format and arguments. Signed-off-by: Joe Perches <joe@perches.com> Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/pktcdvd.c107
1 files changed, 53 insertions, 54 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index eb71522c20ab..aaa5da2b3d66 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -71,17 +71,13 @@
71 71
72#define DRIVER_NAME "pktcdvd" 72#define DRIVER_NAME "pktcdvd"
73 73
74#if PACKET_DEBUG 74#define pkt_dbg(level, fmt, ...) \
75#define DPRINTK(fmt, args...) printk(KERN_NOTICE fmt, ##args) 75do { \
76#else 76 if (level == 2 && PACKET_DEBUG >= 2) \
77#define DPRINTK(fmt, args...) 77 pr_notice("%s: " fmt, __func__, ##__VA_ARGS__); \
78#endif 78 else if (level == 1 && PACKET_DEBUG >= 1) \
79 79 pr_notice(fmt, ##__VA_ARGS__); \
80#if PACKET_DEBUG > 1 80} while (0)
81#define VPRINTK(fmt, args...) printk(KERN_NOTICE fmt, ##args)
82#else
83#define VPRINTK(fmt, args...)
84#endif
85 81
86#define MAX_SPEED 0xffff 82#define MAX_SPEED 0xffff
87 83
@@ -519,7 +515,7 @@ static void pkt_bio_finished(struct pktcdvd_device *pd)
519{ 515{
520 BUG_ON(atomic_read(&pd->cdrw.pending_bios) <= 0); 516 BUG_ON(atomic_read(&pd->cdrw.pending_bios) <= 0);
521 if (atomic_dec_and_test(&pd->cdrw.pending_bios)) { 517 if (atomic_dec_and_test(&pd->cdrw.pending_bios)) {
522 VPRINTK(DRIVER_NAME": queue empty\n"); 518 pkt_dbg(2, "queue empty\n");
523 atomic_set(&pd->iosched.attention, 1); 519 atomic_set(&pd->iosched.attention, 1);
524 wake_up(&pd->wqueue); 520 wake_up(&pd->wqueue);
525 } 521 }
@@ -870,7 +866,7 @@ static void pkt_iosched_process_queue(struct pktcdvd_device *pd)
870 need_write_seek = 0; 866 need_write_seek = 0;
871 if (need_write_seek && reads_queued) { 867 if (need_write_seek && reads_queued) {
872 if (atomic_read(&pd->cdrw.pending_bios) > 0) { 868 if (atomic_read(&pd->cdrw.pending_bios) > 0) {
873 VPRINTK(DRIVER_NAME": write, waiting\n"); 869 pkt_dbg(2, "write, waiting\n");
874 break; 870 break;
875 } 871 }
876 pkt_flush_cache(pd); 872 pkt_flush_cache(pd);
@@ -879,7 +875,7 @@ static void pkt_iosched_process_queue(struct pktcdvd_device *pd)
879 } else { 875 } else {
880 if (!reads_queued && writes_queued) { 876 if (!reads_queued && writes_queued) {
881 if (atomic_read(&pd->cdrw.pending_bios) > 0) { 877 if (atomic_read(&pd->cdrw.pending_bios) > 0) {
882 VPRINTK(DRIVER_NAME": read, waiting\n"); 878 pkt_dbg(2, "read, waiting\n");
883 break; 879 break;
884 } 880 }
885 pd->iosched.writing = 1; 881 pd->iosched.writing = 1;
@@ -985,8 +981,9 @@ static void pkt_end_io_read(struct bio *bio, int err)
985 struct pktcdvd_device *pd = pkt->pd; 981 struct pktcdvd_device *pd = pkt->pd;
986 BUG_ON(!pd); 982 BUG_ON(!pd);
987 983
988 VPRINTK("pkt_end_io_read: bio=%p sec0=%llx sec=%llx err=%d\n", bio, 984 pkt_dbg(2, "bio=%p sec0=%llx sec=%llx err=%d\n",
989 (unsigned long long)pkt->sector, (unsigned long long)bio->bi_sector, err); 985 bio, (unsigned long long)pkt->sector,
986 (unsigned long long)bio->bi_sector, err);
990 987
991 if (err) 988 if (err)
992 atomic_inc(&pkt->io_errors); 989 atomic_inc(&pkt->io_errors);
@@ -1003,7 +1000,7 @@ static void pkt_end_io_packet_write(struct bio *bio, int err)
1003 struct pktcdvd_device *pd = pkt->pd; 1000 struct pktcdvd_device *pd = pkt->pd;
1004 BUG_ON(!pd); 1001 BUG_ON(!pd);
1005 1002
1006 VPRINTK("pkt_end_io_packet_write: id=%d, err=%d\n", pkt->id, err); 1003 pkt_dbg(2, "id=%d, err=%d\n", pkt->id, err);
1007 1004
1008 pd->stats.pkt_ended++; 1005 pd->stats.pkt_ended++;
1009 1006
@@ -1045,7 +1042,7 @@ static void pkt_gather_data(struct pktcdvd_device *pd, struct packet_data *pkt)
1045 spin_unlock(&pkt->lock); 1042 spin_unlock(&pkt->lock);
1046 1043
1047 if (pkt->cache_valid) { 1044 if (pkt->cache_valid) {
1048 VPRINTK("pkt_gather_data: zone %llx cached\n", 1045 pkt_dbg(2, "zone %llx cached\n",
1049 (unsigned long long)pkt->sector); 1046 (unsigned long long)pkt->sector);
1050 goto out_account; 1047 goto out_account;
1051 } 1048 }
@@ -1068,7 +1065,7 @@ static void pkt_gather_data(struct pktcdvd_device *pd, struct packet_data *pkt)
1068 1065
1069 p = (f * CD_FRAMESIZE) / PAGE_SIZE; 1066 p = (f * CD_FRAMESIZE) / PAGE_SIZE;
1070 offset = (f * CD_FRAMESIZE) % PAGE_SIZE; 1067 offset = (f * CD_FRAMESIZE) % PAGE_SIZE;
1071 VPRINTK("pkt_gather_data: Adding frame %d, page:%p offs:%d\n", 1068 pkt_dbg(2, "Adding frame %d, page:%p offs:%d\n",
1072 f, pkt->pages[p], offset); 1069 f, pkt->pages[p], offset);
1073 if (!bio_add_page(bio, pkt->pages[p], CD_FRAMESIZE, offset)) 1070 if (!bio_add_page(bio, pkt->pages[p], CD_FRAMESIZE, offset))
1074 BUG(); 1071 BUG();
@@ -1080,7 +1077,7 @@ static void pkt_gather_data(struct pktcdvd_device *pd, struct packet_data *pkt)
1080 } 1077 }
1081 1078
1082out_account: 1079out_account:
1083 VPRINTK("pkt_gather_data: need %d frames for zone %llx\n", 1080 pkt_dbg(2, "need %d frames for zone %llx\n",
1084 frames_read, (unsigned long long)pkt->sector); 1081 frames_read, (unsigned long long)pkt->sector);
1085 pd->stats.pkt_started++; 1082 pd->stats.pkt_started++;
1086 pd->stats.secs_rg += frames_read * (CD_FRAMESIZE >> 9); 1083 pd->stats.secs_rg += frames_read * (CD_FRAMESIZE >> 9);
@@ -1181,7 +1178,8 @@ static inline void pkt_set_state(struct packet_data *pkt, enum packet_data_state
1181 "IDLE", "WAITING", "READ_WAIT", "WRITE_WAIT", "RECOVERY", "FINISHED" 1178 "IDLE", "WAITING", "READ_WAIT", "WRITE_WAIT", "RECOVERY", "FINISHED"
1182 }; 1179 };
1183 enum packet_data_state old_state = pkt->state; 1180 enum packet_data_state old_state = pkt->state;
1184 VPRINTK("pkt %2d : s=%6llx %s -> %s\n", pkt->id, (unsigned long long)pkt->sector, 1181 pkt_dbg(2, "pkt %2d : s=%6llx %s -> %s\n",
1182 pkt->id, (unsigned long long)pkt->sector,
1185 state_name[old_state], state_name[state]); 1183 state_name[old_state], state_name[state]);
1186#endif 1184#endif
1187 pkt->state = state; 1185 pkt->state = state;
@@ -1200,12 +1198,12 @@ static int pkt_handle_queue(struct pktcdvd_device *pd)
1200 struct rb_node *n; 1198 struct rb_node *n;
1201 int wakeup; 1199 int wakeup;
1202 1200
1203 VPRINTK("handle_queue\n"); 1201 pkt_dbg(2, "\n");
1204 1202
1205 atomic_set(&pd->scan_queue, 0); 1203 atomic_set(&pd->scan_queue, 0);
1206 1204
1207 if (list_empty(&pd->cdrw.pkt_free_list)) { 1205 if (list_empty(&pd->cdrw.pkt_free_list)) {
1208 VPRINTK("handle_queue: no pkt\n"); 1206 pkt_dbg(2, "no pkt\n");
1209 return 0; 1207 return 0;
1210 } 1208 }
1211 1209
@@ -1242,7 +1240,7 @@ try_next_bio:
1242 } 1240 }
1243 spin_unlock(&pd->lock); 1241 spin_unlock(&pd->lock);
1244 if (!bio) { 1242 if (!bio) {
1245 VPRINTK("handle_queue: no bio\n"); 1243 pkt_dbg(2, "no bio\n");
1246 return 0; 1244 return 0;
1247 } 1245 }
1248 1246
@@ -1258,10 +1256,10 @@ try_next_bio:
1258 * to this packet. 1256 * to this packet.
1259 */ 1257 */
1260 spin_lock(&pd->lock); 1258 spin_lock(&pd->lock);
1261 VPRINTK("pkt_handle_queue: looking for zone %llx\n", (unsigned long long)zone); 1259 pkt_dbg(2, "looking for zone %llx\n", (unsigned long long)zone);
1262 while ((node = pkt_rbtree_find(pd, zone)) != NULL) { 1260 while ((node = pkt_rbtree_find(pd, zone)) != NULL) {
1263 bio = node->bio; 1261 bio = node->bio;
1264 VPRINTK("pkt_handle_queue: found zone=%llx\n", 1262 pkt_dbg(2, "found zone=%llx\n",
1265 (unsigned long long)get_zone(bio->bi_sector, pd)); 1263 (unsigned long long)get_zone(bio->bi_sector, pd));
1266 if (get_zone(bio->bi_sector, pd) != zone) 1264 if (get_zone(bio->bi_sector, pd) != zone)
1267 break; 1265 break;
@@ -1314,7 +1312,7 @@ static void pkt_start_write(struct pktcdvd_device *pd, struct packet_data *pkt)
1314 if (!bio_add_page(pkt->w_bio, bvec[f].bv_page, CD_FRAMESIZE, bvec[f].bv_offset)) 1312 if (!bio_add_page(pkt->w_bio, bvec[f].bv_page, CD_FRAMESIZE, bvec[f].bv_offset))
1315 BUG(); 1313 BUG();
1316 } 1314 }
1317 VPRINTK(DRIVER_NAME": vcnt=%d\n", pkt->w_bio->bi_vcnt); 1315 pkt_dbg(2, "vcnt=%d\n", pkt->w_bio->bi_vcnt);
1318 1316
1319 /* 1317 /*
1320 * Fill-in bvec with data from orig_bios. 1318 * Fill-in bvec with data from orig_bios.
@@ -1325,7 +1323,7 @@ static void pkt_start_write(struct pktcdvd_device *pd, struct packet_data *pkt)
1325 pkt_set_state(pkt, PACKET_WRITE_WAIT_STATE); 1323 pkt_set_state(pkt, PACKET_WRITE_WAIT_STATE);
1326 spin_unlock(&pkt->lock); 1324 spin_unlock(&pkt->lock);
1327 1325
1328 VPRINTK("pkt_start_write: Writing %d frames for zone %llx\n", 1326 pkt_dbg(2, "Writing %d frames for zone %llx\n",
1329 pkt->write_size, (unsigned long long)pkt->sector); 1327 pkt->write_size, (unsigned long long)pkt->sector);
1330 1328
1331 if (test_bit(PACKET_MERGE_SEGS, &pd->flags) || (pkt->write_size < pkt->frames)) { 1329 if (test_bit(PACKET_MERGE_SEGS, &pd->flags) || (pkt->write_size < pkt->frames)) {
@@ -1357,7 +1355,7 @@ static void pkt_run_state_machine(struct pktcdvd_device *pd, struct packet_data
1357{ 1355{
1358 int uptodate; 1356 int uptodate;
1359 1357
1360 VPRINTK("run_state_machine: pkt %d\n", pkt->id); 1358 pkt_dbg(2, "pkt %d\n", pkt->id);
1361 1359
1362 for (;;) { 1360 for (;;) {
1363 switch (pkt->state) { 1361 switch (pkt->state) {
@@ -1396,7 +1394,7 @@ static void pkt_run_state_machine(struct pktcdvd_device *pd, struct packet_data
1396 if (pkt_start_recovery(pkt)) { 1394 if (pkt_start_recovery(pkt)) {
1397 pkt_start_write(pd, pkt); 1395 pkt_start_write(pd, pkt);
1398 } else { 1396 } else {
1399 VPRINTK("No recovery possible\n"); 1397 pkt_dbg(2, "No recovery possible\n");
1400 pkt_set_state(pkt, PACKET_FINISHED_STATE); 1398 pkt_set_state(pkt, PACKET_FINISHED_STATE);
1401 } 1399 }
1402 break; 1400 break;
@@ -1417,7 +1415,7 @@ static void pkt_handle_packets(struct pktcdvd_device *pd)
1417{ 1415{
1418 struct packet_data *pkt, *next; 1416 struct packet_data *pkt, *next;
1419 1417
1420 VPRINTK("pkt_handle_packets\n"); 1418 pkt_dbg(2, "\n");
1421 1419
1422 /* 1420 /*
1423 * Run state machine for active packets 1421 * Run state machine for active packets
@@ -1500,9 +1498,9 @@ static int kcdrwd(void *foobar)
1500 if (PACKET_DEBUG > 1) { 1498 if (PACKET_DEBUG > 1) {
1501 int states[PACKET_NUM_STATES]; 1499 int states[PACKET_NUM_STATES];
1502 pkt_count_states(pd, states); 1500 pkt_count_states(pd, states);
1503 VPRINTK("kcdrwd: i:%d ow:%d rw:%d ww:%d rec:%d fin:%d\n", 1501 pkt_dbg(2, "i:%d ow:%d rw:%d ww:%d rec:%d fin:%d\n",
1504 states[0], states[1], states[2], states[3], 1502 states[0], states[1], states[2],
1505 states[4], states[5]); 1503 states[3], states[4], states[5]);
1506 } 1504 }
1507 1505
1508 min_sleep_time = MAX_SCHEDULE_TIMEOUT; 1506 min_sleep_time = MAX_SCHEDULE_TIMEOUT;
@@ -1511,9 +1509,9 @@ static int kcdrwd(void *foobar)
1511 min_sleep_time = pkt->sleep_time; 1509 min_sleep_time = pkt->sleep_time;
1512 } 1510 }
1513 1511
1514 VPRINTK("kcdrwd: sleeping\n"); 1512 pkt_dbg(2, "sleeping\n");
1515 residue = schedule_timeout(min_sleep_time); 1513 residue = schedule_timeout(min_sleep_time);
1516 VPRINTK("kcdrwd: wake up\n"); 1514 pkt_dbg(2, "wake up\n");
1517 1515
1518 /* make swsusp happy with our thread */ 1516 /* make swsusp happy with our thread */
1519 try_to_freeze(); 1517 try_to_freeze();
@@ -1810,7 +1808,8 @@ static int pkt_writable_disc(struct pktcdvd_device *pd, disc_information *di)
1810 case 0x12: /* DVD-RAM */ 1808 case 0x12: /* DVD-RAM */
1811 return 1; 1809 return 1;
1812 default: 1810 default:
1813 VPRINTK(DRIVER_NAME": Wrong disc profile (%x)\n", pd->mmc3_profile); 1811 pkt_dbg(2, "Wrong disc profile (%x)\n",
1812 pd->mmc3_profile);
1814 return 0; 1813 return 0;
1815 } 1814 }
1816 1815
@@ -2125,7 +2124,7 @@ static noinline_for_stack int pkt_perform_opc(struct pktcdvd_device *pd)
2125 struct request_sense sense; 2124 struct request_sense sense;
2126 int ret; 2125 int ret;
2127 2126
2128 VPRINTK(DRIVER_NAME": Performing OPC\n"); 2127 pkt_dbg(2, "Performing OPC\n");
2129 2128
2130 init_cdrom_command(&cgc, NULL, 0, CGC_DATA_NONE); 2129 init_cdrom_command(&cgc, NULL, 0, CGC_DATA_NONE);
2131 cgc.sense = &sense; 2130 cgc.sense = &sense;
@@ -2143,12 +2142,12 @@ static int pkt_open_write(struct pktcdvd_device *pd)
2143 unsigned int write_speed, media_write_speed, read_speed; 2142 unsigned int write_speed, media_write_speed, read_speed;
2144 2143
2145 if ((ret = pkt_probe_settings(pd))) { 2144 if ((ret = pkt_probe_settings(pd))) {
2146 VPRINTK(DRIVER_NAME": %s failed probe\n", pd->name); 2145 pkt_dbg(2, "%s failed probe\n", pd->name);
2147 return ret; 2146 return ret;
2148 } 2147 }
2149 2148
2150 if ((ret = pkt_set_write_settings(pd))) { 2149 if ((ret = pkt_set_write_settings(pd))) {
2151 DPRINTK(DRIVER_NAME": %s failed saving write settings\n", pd->name); 2150 pkt_dbg(1, "%s failed saving write settings\n", pd->name);
2152 return -EIO; 2151 return -EIO;
2153 } 2152 }
2154 2153
@@ -2160,26 +2159,26 @@ static int pkt_open_write(struct pktcdvd_device *pd)
2160 case 0x13: /* DVD-RW */ 2159 case 0x13: /* DVD-RW */
2161 case 0x1a: /* DVD+RW */ 2160 case 0x1a: /* DVD+RW */
2162 case 0x12: /* DVD-RAM */ 2161 case 0x12: /* DVD-RAM */
2163 DPRINTK(DRIVER_NAME": write speed %ukB/s\n", write_speed); 2162 pkt_dbg(1, "write speed %ukB/s\n", write_speed);
2164 break; 2163 break;
2165 default: 2164 default:
2166 if ((ret = pkt_media_speed(pd, &media_write_speed))) 2165 if ((ret = pkt_media_speed(pd, &media_write_speed)))
2167 media_write_speed = 16; 2166 media_write_speed = 16;
2168 write_speed = min(write_speed, media_write_speed * 177); 2167 write_speed = min(write_speed, media_write_speed * 177);
2169 DPRINTK(DRIVER_NAME": write speed %ux\n", write_speed / 176); 2168 pkt_dbg(1, "write speed %ux\n", write_speed / 176);
2170 break; 2169 break;
2171 } 2170 }
2172 read_speed = write_speed; 2171 read_speed = write_speed;
2173 2172
2174 if ((ret = pkt_set_speed(pd, write_speed, read_speed))) { 2173 if ((ret = pkt_set_speed(pd, write_speed, read_speed))) {
2175 DPRINTK(DRIVER_NAME": %s couldn't set write speed\n", pd->name); 2174 pkt_dbg(1, "%s couldn't set write speed\n", pd->name);
2176 return -EIO; 2175 return -EIO;
2177 } 2176 }
2178 pd->write_speed = write_speed; 2177 pd->write_speed = write_speed;
2179 pd->read_speed = read_speed; 2178 pd->read_speed = read_speed;
2180 2179
2181 if ((ret = pkt_perform_opc(pd))) { 2180 if ((ret = pkt_perform_opc(pd))) {
2182 DPRINTK(DRIVER_NAME": %s Optimum Power Calibration failed\n", pd->name); 2181 pkt_dbg(1, "%s Optimum Power Calibration failed\n", pd->name);
2183 } 2182 }
2184 2183
2185 return 0; 2184 return 0;
@@ -2256,7 +2255,7 @@ out:
2256static void pkt_release_dev(struct pktcdvd_device *pd, int flush) 2255static void pkt_release_dev(struct pktcdvd_device *pd, int flush)
2257{ 2256{
2258 if (flush && pkt_flush_cache(pd)) 2257 if (flush && pkt_flush_cache(pd))
2259 DPRINTK(DRIVER_NAME": %s not flushing cache\n", pd->name); 2258 pkt_dbg(1, "%s not flushing cache\n", pd->name);
2260 2259
2261 pkt_lock_door(pd, 0); 2260 pkt_lock_door(pd, 0);
2262 2261
@@ -2278,7 +2277,7 @@ static int pkt_open(struct block_device *bdev, fmode_t mode)
2278 struct pktcdvd_device *pd = NULL; 2277 struct pktcdvd_device *pd = NULL;
2279 int ret; 2278 int ret;
2280 2279
2281 VPRINTK(DRIVER_NAME": entering open\n"); 2280 pkt_dbg(2, "entering\n");
2282 2281
2283 mutex_lock(&pktcdvd_mutex); 2282 mutex_lock(&pktcdvd_mutex);
2284 mutex_lock(&ctl_mutex); 2283 mutex_lock(&ctl_mutex);
@@ -2314,7 +2313,7 @@ static int pkt_open(struct block_device *bdev, fmode_t mode)
2314out_dec: 2313out_dec:
2315 pd->refcnt--; 2314 pd->refcnt--;
2316out: 2315out:
2317 VPRINTK(DRIVER_NAME": failed open (%d)\n", ret); 2316 pkt_dbg(2, "failed (%d)\n", ret);
2318 mutex_unlock(&ctl_mutex); 2317 mutex_unlock(&ctl_mutex);
2319 mutex_unlock(&pktcdvd_mutex); 2318 mutex_unlock(&pktcdvd_mutex);
2320 return ret; 2319 return ret;
@@ -2395,7 +2394,7 @@ static void pkt_make_request(struct request_queue *q, struct bio *bio)
2395 blk_queue_bounce(q, &bio); 2394 blk_queue_bounce(q, &bio);
2396 2395
2397 zone = get_zone(bio->bi_sector, pd); 2396 zone = get_zone(bio->bi_sector, pd);
2398 VPRINTK("pkt_make_request: start = %6llx stop = %6llx\n", 2397 pkt_dbg(2, "start = %6llx stop = %6llx\n",
2399 (unsigned long long)bio->bi_sector, 2398 (unsigned long long)bio->bi_sector,
2400 (unsigned long long)bio_end_sector(bio)); 2399 (unsigned long long)bio_end_sector(bio));
2401 2400
@@ -2650,7 +2649,7 @@ static int pkt_new_dev(struct pktcdvd_device *pd, dev_t dev)
2650 } 2649 }
2651 2650
2652 proc_create_data(pd->name, 0, pkt_proc, &pkt_proc_fops, pd); 2651 proc_create_data(pd->name, 0, pkt_proc, &pkt_proc_fops, pd);
2653 DPRINTK(DRIVER_NAME": writer %s mapped to %s\n", pd->name, bdevname(bdev, b)); 2652 pkt_dbg(1, "writer %s mapped to %s\n", pd->name, bdevname(bdev, b));
2654 return 0; 2653 return 0;
2655 2654
2656out_mem: 2655out_mem:
@@ -2665,8 +2664,8 @@ static int pkt_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd,
2665 struct pktcdvd_device *pd = bdev->bd_disk->private_data; 2664 struct pktcdvd_device *pd = bdev->bd_disk->private_data;
2666 int ret; 2665 int ret;
2667 2666
2668 VPRINTK("pkt_ioctl: cmd %x, dev %d:%d\n", cmd, 2667 pkt_dbg(2, "cmd %x, dev %d:%d\n",
2669 MAJOR(bdev->bd_dev), MINOR(bdev->bd_dev)); 2668 cmd, MAJOR(bdev->bd_dev), MINOR(bdev->bd_dev));
2670 2669
2671 mutex_lock(&pktcdvd_mutex); 2670 mutex_lock(&pktcdvd_mutex);
2672 switch (cmd) { 2671 switch (cmd) {
@@ -2690,7 +2689,7 @@ static int pkt_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd,
2690 break; 2689 break;
2691 2690
2692 default: 2691 default:
2693 VPRINTK(DRIVER_NAME": Unknown ioctl for %s (%x)\n", pd->name, cmd); 2692 pkt_dbg(2, "Unknown ioctl for %s (%x)\n", pd->name, cmd);
2694 ret = -ENOTTY; 2693 ret = -ENOTTY;
2695 } 2694 }
2696 mutex_unlock(&pktcdvd_mutex); 2695 mutex_unlock(&pktcdvd_mutex);
@@ -2839,7 +2838,7 @@ static int pkt_remove_dev(dev_t pkt_dev)
2839 break; 2838 break;
2840 } 2839 }
2841 if (idx == MAX_WRITERS) { 2840 if (idx == MAX_WRITERS) {
2842 DPRINTK(DRIVER_NAME": dev not setup\n"); 2841 pkt_dbg(1, "dev not setup\n");
2843 ret = -ENXIO; 2842 ret = -ENXIO;
2844 goto out; 2843 goto out;
2845 } 2844 }
@@ -2859,7 +2858,7 @@ static int pkt_remove_dev(dev_t pkt_dev)
2859 blkdev_put(pd->bdev, FMODE_READ | FMODE_NDELAY); 2858 blkdev_put(pd->bdev, FMODE_READ | FMODE_NDELAY);
2860 2859
2861 remove_proc_entry(pd->name, pkt_proc); 2860 remove_proc_entry(pd->name, pkt_proc);
2862 DPRINTK(DRIVER_NAME": writer %s unmapped\n", pd->name); 2861 pkt_dbg(1, "writer %s unmapped\n", pd->name);
2863 2862
2864 del_gendisk(pd->disk); 2863 del_gendisk(pd->disk);
2865 blk_cleanup_queue(pd->disk->queue); 2864 blk_cleanup_queue(pd->disk->queue);