Commit cd3f2cd0 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

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: default avatarJoe Perches <joe@perches.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 99481334
...@@ -71,17 +71,13 @@ ...@@ -71,17 +71,13 @@
#define DRIVER_NAME "pktcdvd" #define DRIVER_NAME "pktcdvd"
#if PACKET_DEBUG #define pkt_dbg(level, fmt, ...) \
#define DPRINTK(fmt, args...) printk(KERN_NOTICE fmt, ##args) do { \
#else if (level == 2 && PACKET_DEBUG >= 2) \
#define DPRINTK(fmt, args...) pr_notice("%s: " fmt, __func__, ##__VA_ARGS__); \
#endif else if (level == 1 && PACKET_DEBUG >= 1) \
pr_notice(fmt, ##__VA_ARGS__); \
#if PACKET_DEBUG > 1 } while (0)
#define VPRINTK(fmt, args...) printk(KERN_NOTICE fmt, ##args)
#else
#define VPRINTK(fmt, args...)
#endif
#define MAX_SPEED 0xffff #define MAX_SPEED 0xffff
...@@ -519,7 +515,7 @@ static void pkt_bio_finished(struct pktcdvd_device *pd) ...@@ -519,7 +515,7 @@ static void pkt_bio_finished(struct pktcdvd_device *pd)
{ {
BUG_ON(atomic_read(&pd->cdrw.pending_bios) <= 0); BUG_ON(atomic_read(&pd->cdrw.pending_bios) <= 0);
if (atomic_dec_and_test(&pd->cdrw.pending_bios)) { if (atomic_dec_and_test(&pd->cdrw.pending_bios)) {
VPRINTK(DRIVER_NAME": queue empty\n"); pkt_dbg(2, "queue empty\n");
atomic_set(&pd->iosched.attention, 1); atomic_set(&pd->iosched.attention, 1);
wake_up(&pd->wqueue); wake_up(&pd->wqueue);
} }
...@@ -870,7 +866,7 @@ static void pkt_iosched_process_queue(struct pktcdvd_device *pd) ...@@ -870,7 +866,7 @@ static void pkt_iosched_process_queue(struct pktcdvd_device *pd)
need_write_seek = 0; need_write_seek = 0;
if (need_write_seek && reads_queued) { if (need_write_seek && reads_queued) {
if (atomic_read(&pd->cdrw.pending_bios) > 0) { if (atomic_read(&pd->cdrw.pending_bios) > 0) {
VPRINTK(DRIVER_NAME": write, waiting\n"); pkt_dbg(2, "write, waiting\n");
break; break;
} }
pkt_flush_cache(pd); pkt_flush_cache(pd);
...@@ -879,7 +875,7 @@ static void pkt_iosched_process_queue(struct pktcdvd_device *pd) ...@@ -879,7 +875,7 @@ static void pkt_iosched_process_queue(struct pktcdvd_device *pd)
} else { } else {
if (!reads_queued && writes_queued) { if (!reads_queued && writes_queued) {
if (atomic_read(&pd->cdrw.pending_bios) > 0) { if (atomic_read(&pd->cdrw.pending_bios) > 0) {
VPRINTK(DRIVER_NAME": read, waiting\n"); pkt_dbg(2, "read, waiting\n");
break; break;
} }
pd->iosched.writing = 1; pd->iosched.writing = 1;
...@@ -985,8 +981,9 @@ static void pkt_end_io_read(struct bio *bio, int err) ...@@ -985,8 +981,9 @@ static void pkt_end_io_read(struct bio *bio, int err)
struct pktcdvd_device *pd = pkt->pd; struct pktcdvd_device *pd = pkt->pd;
BUG_ON(!pd); BUG_ON(!pd);
VPRINTK("pkt_end_io_read: bio=%p sec0=%llx sec=%llx err=%d\n", bio, pkt_dbg(2, "bio=%p sec0=%llx sec=%llx err=%d\n",
(unsigned long long)pkt->sector, (unsigned long long)bio->bi_sector, err); bio, (unsigned long long)pkt->sector,
(unsigned long long)bio->bi_sector, err);
if (err) if (err)
atomic_inc(&pkt->io_errors); atomic_inc(&pkt->io_errors);
...@@ -1003,7 +1000,7 @@ static void pkt_end_io_packet_write(struct bio *bio, int err) ...@@ -1003,7 +1000,7 @@ static void pkt_end_io_packet_write(struct bio *bio, int err)
struct pktcdvd_device *pd = pkt->pd; struct pktcdvd_device *pd = pkt->pd;
BUG_ON(!pd); BUG_ON(!pd);
VPRINTK("pkt_end_io_packet_write: id=%d, err=%d\n", pkt->id, err); pkt_dbg(2, "id=%d, err=%d\n", pkt->id, err);
pd->stats.pkt_ended++; pd->stats.pkt_ended++;
...@@ -1045,7 +1042,7 @@ static void pkt_gather_data(struct pktcdvd_device *pd, struct packet_data *pkt) ...@@ -1045,7 +1042,7 @@ static void pkt_gather_data(struct pktcdvd_device *pd, struct packet_data *pkt)
spin_unlock(&pkt->lock); spin_unlock(&pkt->lock);
if (pkt->cache_valid) { if (pkt->cache_valid) {
VPRINTK("pkt_gather_data: zone %llx cached\n", pkt_dbg(2, "zone %llx cached\n",
(unsigned long long)pkt->sector); (unsigned long long)pkt->sector);
goto out_account; goto out_account;
} }
...@@ -1068,7 +1065,7 @@ static void pkt_gather_data(struct pktcdvd_device *pd, struct packet_data *pkt) ...@@ -1068,7 +1065,7 @@ static void pkt_gather_data(struct pktcdvd_device *pd, struct packet_data *pkt)
p = (f * CD_FRAMESIZE) / PAGE_SIZE; p = (f * CD_FRAMESIZE) / PAGE_SIZE;
offset = (f * CD_FRAMESIZE) % PAGE_SIZE; offset = (f * CD_FRAMESIZE) % PAGE_SIZE;
VPRINTK("pkt_gather_data: Adding frame %d, page:%p offs:%d\n", pkt_dbg(2, "Adding frame %d, page:%p offs:%d\n",
f, pkt->pages[p], offset); f, pkt->pages[p], offset);
if (!bio_add_page(bio, pkt->pages[p], CD_FRAMESIZE, offset)) if (!bio_add_page(bio, pkt->pages[p], CD_FRAMESIZE, offset))
BUG(); BUG();
...@@ -1080,7 +1077,7 @@ static void pkt_gather_data(struct pktcdvd_device *pd, struct packet_data *pkt) ...@@ -1080,7 +1077,7 @@ static void pkt_gather_data(struct pktcdvd_device *pd, struct packet_data *pkt)
} }
out_account: out_account:
VPRINTK("pkt_gather_data: need %d frames for zone %llx\n", pkt_dbg(2, "need %d frames for zone %llx\n",
frames_read, (unsigned long long)pkt->sector); frames_read, (unsigned long long)pkt->sector);
pd->stats.pkt_started++; pd->stats.pkt_started++;
pd->stats.secs_rg += frames_read * (CD_FRAMESIZE >> 9); 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,7 +1178,8 @@ static inline void pkt_set_state(struct packet_data *pkt, enum packet_data_state
"IDLE", "WAITING", "READ_WAIT", "WRITE_WAIT", "RECOVERY", "FINISHED" "IDLE", "WAITING", "READ_WAIT", "WRITE_WAIT", "RECOVERY", "FINISHED"
}; };
enum packet_data_state old_state = pkt->state; enum packet_data_state old_state = pkt->state;
VPRINTK("pkt %2d : s=%6llx %s -> %s\n", pkt->id, (unsigned long long)pkt->sector, pkt_dbg(2, "pkt %2d : s=%6llx %s -> %s\n",
pkt->id, (unsigned long long)pkt->sector,
state_name[old_state], state_name[state]); state_name[old_state], state_name[state]);
#endif #endif
pkt->state = state; pkt->state = state;
...@@ -1200,12 +1198,12 @@ static int pkt_handle_queue(struct pktcdvd_device *pd) ...@@ -1200,12 +1198,12 @@ static int pkt_handle_queue(struct pktcdvd_device *pd)
struct rb_node *n; struct rb_node *n;
int wakeup; int wakeup;
VPRINTK("handle_queue\n"); pkt_dbg(2, "\n");
atomic_set(&pd->scan_queue, 0); atomic_set(&pd->scan_queue, 0);
if (list_empty(&pd->cdrw.pkt_free_list)) { if (list_empty(&pd->cdrw.pkt_free_list)) {
VPRINTK("handle_queue: no pkt\n"); pkt_dbg(2, "no pkt\n");
return 0; return 0;
} }
...@@ -1242,7 +1240,7 @@ static int pkt_handle_queue(struct pktcdvd_device *pd) ...@@ -1242,7 +1240,7 @@ static int pkt_handle_queue(struct pktcdvd_device *pd)
} }
spin_unlock(&pd->lock); spin_unlock(&pd->lock);
if (!bio) { if (!bio) {
VPRINTK("handle_queue: no bio\n"); pkt_dbg(2, "no bio\n");
return 0; return 0;
} }
...@@ -1258,10 +1256,10 @@ static int pkt_handle_queue(struct pktcdvd_device *pd) ...@@ -1258,10 +1256,10 @@ static int pkt_handle_queue(struct pktcdvd_device *pd)
* to this packet. * to this packet.
*/ */
spin_lock(&pd->lock); spin_lock(&pd->lock);
VPRINTK("pkt_handle_queue: looking for zone %llx\n", (unsigned long long)zone); pkt_dbg(2, "looking for zone %llx\n", (unsigned long long)zone);
while ((node = pkt_rbtree_find(pd, zone)) != NULL) { while ((node = pkt_rbtree_find(pd, zone)) != NULL) {
bio = node->bio; bio = node->bio;
VPRINTK("pkt_handle_queue: found zone=%llx\n", pkt_dbg(2, "found zone=%llx\n",
(unsigned long long)get_zone(bio->bi_sector, pd)); (unsigned long long)get_zone(bio->bi_sector, pd));
if (get_zone(bio->bi_sector, pd) != zone) if (get_zone(bio->bi_sector, pd) != zone)
break; break;
...@@ -1314,7 +1312,7 @@ static void pkt_start_write(struct pktcdvd_device *pd, struct packet_data *pkt) ...@@ -1314,7 +1312,7 @@ static void pkt_start_write(struct pktcdvd_device *pd, struct packet_data *pkt)
if (!bio_add_page(pkt->w_bio, bvec[f].bv_page, CD_FRAMESIZE, bvec[f].bv_offset)) if (!bio_add_page(pkt->w_bio, bvec[f].bv_page, CD_FRAMESIZE, bvec[f].bv_offset))
BUG(); BUG();
} }
VPRINTK(DRIVER_NAME": vcnt=%d\n", pkt->w_bio->bi_vcnt); pkt_dbg(2, "vcnt=%d\n", pkt->w_bio->bi_vcnt);
/* /*
* Fill-in bvec with data from orig_bios. * 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,7 +1323,7 @@ static void pkt_start_write(struct pktcdvd_device *pd, struct packet_data *pkt)
pkt_set_state(pkt, PACKET_WRITE_WAIT_STATE); pkt_set_state(pkt, PACKET_WRITE_WAIT_STATE);
spin_unlock(&pkt->lock); spin_unlock(&pkt->lock);
VPRINTK("pkt_start_write: Writing %d frames for zone %llx\n", pkt_dbg(2, "Writing %d frames for zone %llx\n",
pkt->write_size, (unsigned long long)pkt->sector); pkt->write_size, (unsigned long long)pkt->sector);
if (test_bit(PACKET_MERGE_SEGS, &pd->flags) || (pkt->write_size < pkt->frames)) { 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,7 +1355,7 @@ static void pkt_run_state_machine(struct pktcdvd_device *pd, struct packet_data
{ {
int uptodate; int uptodate;
VPRINTK("run_state_machine: pkt %d\n", pkt->id); pkt_dbg(2, "pkt %d\n", pkt->id);
for (;;) { for (;;) {
switch (pkt->state) { switch (pkt->state) {
...@@ -1396,7 +1394,7 @@ static void pkt_run_state_machine(struct pktcdvd_device *pd, struct packet_data ...@@ -1396,7 +1394,7 @@ static void pkt_run_state_machine(struct pktcdvd_device *pd, struct packet_data
if (pkt_start_recovery(pkt)) { if (pkt_start_recovery(pkt)) {
pkt_start_write(pd, pkt); pkt_start_write(pd, pkt);
} else { } else {
VPRINTK("No recovery possible\n"); pkt_dbg(2, "No recovery possible\n");
pkt_set_state(pkt, PACKET_FINISHED_STATE); pkt_set_state(pkt, PACKET_FINISHED_STATE);
} }
break; break;
...@@ -1417,7 +1415,7 @@ static void pkt_handle_packets(struct pktcdvd_device *pd) ...@@ -1417,7 +1415,7 @@ static void pkt_handle_packets(struct pktcdvd_device *pd)
{ {
struct packet_data *pkt, *next; struct packet_data *pkt, *next;
VPRINTK("pkt_handle_packets\n"); pkt_dbg(2, "\n");
/* /*
* Run state machine for active packets * Run state machine for active packets
...@@ -1500,9 +1498,9 @@ static int kcdrwd(void *foobar) ...@@ -1500,9 +1498,9 @@ static int kcdrwd(void *foobar)
if (PACKET_DEBUG > 1) { if (PACKET_DEBUG > 1) {
int states[PACKET_NUM_STATES]; int states[PACKET_NUM_STATES];
pkt_count_states(pd, states); pkt_count_states(pd, states);
VPRINTK("kcdrwd: i:%d ow:%d rw:%d ww:%d rec:%d fin:%d\n", pkt_dbg(2, "i:%d ow:%d rw:%d ww:%d rec:%d fin:%d\n",
states[0], states[1], states[2], states[3], states[0], states[1], states[2],
states[4], states[5]); states[3], states[4], states[5]);
} }
min_sleep_time = MAX_SCHEDULE_TIMEOUT; min_sleep_time = MAX_SCHEDULE_TIMEOUT;
...@@ -1511,9 +1509,9 @@ static int kcdrwd(void *foobar) ...@@ -1511,9 +1509,9 @@ static int kcdrwd(void *foobar)
min_sleep_time = pkt->sleep_time; min_sleep_time = pkt->sleep_time;
} }
VPRINTK("kcdrwd: sleeping\n"); pkt_dbg(2, "sleeping\n");
residue = schedule_timeout(min_sleep_time); residue = schedule_timeout(min_sleep_time);
VPRINTK("kcdrwd: wake up\n"); pkt_dbg(2, "wake up\n");
/* make swsusp happy with our thread */ /* make swsusp happy with our thread */
try_to_freeze(); try_to_freeze();
...@@ -1810,7 +1808,8 @@ static int pkt_writable_disc(struct pktcdvd_device *pd, disc_information *di) ...@@ -1810,7 +1808,8 @@ static int pkt_writable_disc(struct pktcdvd_device *pd, disc_information *di)
case 0x12: /* DVD-RAM */ case 0x12: /* DVD-RAM */
return 1; return 1;
default: default:
VPRINTK(DRIVER_NAME": Wrong disc profile (%x)\n", pd->mmc3_profile); pkt_dbg(2, "Wrong disc profile (%x)\n",
pd->mmc3_profile);
return 0; return 0;
} }
...@@ -2125,7 +2124,7 @@ static noinline_for_stack int pkt_perform_opc(struct pktcdvd_device *pd) ...@@ -2125,7 +2124,7 @@ static noinline_for_stack int pkt_perform_opc(struct pktcdvd_device *pd)
struct request_sense sense; struct request_sense sense;
int ret; int ret;
VPRINTK(DRIVER_NAME": Performing OPC\n"); pkt_dbg(2, "Performing OPC\n");
init_cdrom_command(&cgc, NULL, 0, CGC_DATA_NONE); init_cdrom_command(&cgc, NULL, 0, CGC_DATA_NONE);
cgc.sense = &sense; cgc.sense = &sense;
...@@ -2143,12 +2142,12 @@ static int pkt_open_write(struct pktcdvd_device *pd) ...@@ -2143,12 +2142,12 @@ static int pkt_open_write(struct pktcdvd_device *pd)
unsigned int write_speed, media_write_speed, read_speed; unsigned int write_speed, media_write_speed, read_speed;
if ((ret = pkt_probe_settings(pd))) { if ((ret = pkt_probe_settings(pd))) {
VPRINTK(DRIVER_NAME": %s failed probe\n", pd->name); pkt_dbg(2, "%s failed probe\n", pd->name);
return ret; return ret;
} }
if ((ret = pkt_set_write_settings(pd))) { if ((ret = pkt_set_write_settings(pd))) {
DPRINTK(DRIVER_NAME": %s failed saving write settings\n", pd->name); pkt_dbg(1, "%s failed saving write settings\n", pd->name);
return -EIO; return -EIO;
} }
...@@ -2160,26 +2159,26 @@ static int pkt_open_write(struct pktcdvd_device *pd) ...@@ -2160,26 +2159,26 @@ static int pkt_open_write(struct pktcdvd_device *pd)
case 0x13: /* DVD-RW */ case 0x13: /* DVD-RW */
case 0x1a: /* DVD+RW */ case 0x1a: /* DVD+RW */
case 0x12: /* DVD-RAM */ case 0x12: /* DVD-RAM */
DPRINTK(DRIVER_NAME": write speed %ukB/s\n", write_speed); pkt_dbg(1, "write speed %ukB/s\n", write_speed);
break; break;
default: default:
if ((ret = pkt_media_speed(pd, &media_write_speed))) if ((ret = pkt_media_speed(pd, &media_write_speed)))
media_write_speed = 16; media_write_speed = 16;
write_speed = min(write_speed, media_write_speed * 177); write_speed = min(write_speed, media_write_speed * 177);
DPRINTK(DRIVER_NAME": write speed %ux\n", write_speed / 176); pkt_dbg(1, "write speed %ux\n", write_speed / 176);
break; break;
} }
read_speed = write_speed; read_speed = write_speed;
if ((ret = pkt_set_speed(pd, write_speed, read_speed))) { if ((ret = pkt_set_speed(pd, write_speed, read_speed))) {
DPRINTK(DRIVER_NAME": %s couldn't set write speed\n", pd->name); pkt_dbg(1, "%s couldn't set write speed\n", pd->name);
return -EIO; return -EIO;
} }
pd->write_speed = write_speed; pd->write_speed = write_speed;
pd->read_speed = read_speed; pd->read_speed = read_speed;
if ((ret = pkt_perform_opc(pd))) { if ((ret = pkt_perform_opc(pd))) {
DPRINTK(DRIVER_NAME": %s Optimum Power Calibration failed\n", pd->name); pkt_dbg(1, "%s Optimum Power Calibration failed\n", pd->name);
} }
return 0; return 0;
...@@ -2256,7 +2255,7 @@ static int pkt_open_dev(struct pktcdvd_device *pd, fmode_t write) ...@@ -2256,7 +2255,7 @@ static int pkt_open_dev(struct pktcdvd_device *pd, fmode_t write)
static void pkt_release_dev(struct pktcdvd_device *pd, int flush) static void pkt_release_dev(struct pktcdvd_device *pd, int flush)
{ {
if (flush && pkt_flush_cache(pd)) if (flush && pkt_flush_cache(pd))
DPRINTK(DRIVER_NAME": %s not flushing cache\n", pd->name); pkt_dbg(1, "%s not flushing cache\n", pd->name);
pkt_lock_door(pd, 0); pkt_lock_door(pd, 0);
...@@ -2278,7 +2277,7 @@ static int pkt_open(struct block_device *bdev, fmode_t mode) ...@@ -2278,7 +2277,7 @@ static int pkt_open(struct block_device *bdev, fmode_t mode)
struct pktcdvd_device *pd = NULL; struct pktcdvd_device *pd = NULL;
int ret; int ret;
VPRINTK(DRIVER_NAME": entering open\n"); pkt_dbg(2, "entering\n");
mutex_lock(&pktcdvd_mutex); mutex_lock(&pktcdvd_mutex);
mutex_lock(&ctl_mutex); mutex_lock(&ctl_mutex);
...@@ -2314,7 +2313,7 @@ static int pkt_open(struct block_device *bdev, fmode_t mode) ...@@ -2314,7 +2313,7 @@ static int pkt_open(struct block_device *bdev, fmode_t mode)
out_dec: out_dec:
pd->refcnt--; pd->refcnt--;
out: out:
VPRINTK(DRIVER_NAME": failed open (%d)\n", ret); pkt_dbg(2, "failed (%d)\n", ret);
mutex_unlock(&ctl_mutex); mutex_unlock(&ctl_mutex);
mutex_unlock(&pktcdvd_mutex); mutex_unlock(&pktcdvd_mutex);
return ret; return ret;
...@@ -2395,7 +2394,7 @@ static void pkt_make_request(struct request_queue *q, struct bio *bio) ...@@ -2395,7 +2394,7 @@ static void pkt_make_request(struct request_queue *q, struct bio *bio)
blk_queue_bounce(q, &bio); blk_queue_bounce(q, &bio);
zone = get_zone(bio->bi_sector, pd); zone = get_zone(bio->bi_sector, pd);
VPRINTK("pkt_make_request: start = %6llx stop = %6llx\n", pkt_dbg(2, "start = %6llx stop = %6llx\n",
(unsigned long long)bio->bi_sector, (unsigned long long)bio->bi_sector,
(unsigned long long)bio_end_sector(bio)); (unsigned long long)bio_end_sector(bio));
...@@ -2650,7 +2649,7 @@ static int pkt_new_dev(struct pktcdvd_device *pd, dev_t dev) ...@@ -2650,7 +2649,7 @@ static int pkt_new_dev(struct pktcdvd_device *pd, dev_t dev)
} }
proc_create_data(pd->name, 0, pkt_proc, &pkt_proc_fops, pd); proc_create_data(pd->name, 0, pkt_proc, &pkt_proc_fops, pd);
DPRINTK(DRIVER_NAME": writer %s mapped to %s\n", pd->name, bdevname(bdev, b)); pkt_dbg(1, "writer %s mapped to %s\n", pd->name, bdevname(bdev, b));
return 0; return 0;
out_mem: out_mem:
...@@ -2665,8 +2664,8 @@ static int pkt_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, ...@@ -2665,8 +2664,8 @@ static int pkt_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd,
struct pktcdvd_device *pd = bdev->bd_disk->private_data; struct pktcdvd_device *pd = bdev->bd_disk->private_data;
int ret; int ret;
VPRINTK("pkt_ioctl: cmd %x, dev %d:%d\n", cmd, pkt_dbg(2, "cmd %x, dev %d:%d\n",
MAJOR(bdev->bd_dev), MINOR(bdev->bd_dev)); cmd, MAJOR(bdev->bd_dev), MINOR(bdev->bd_dev));
mutex_lock(&pktcdvd_mutex); mutex_lock(&pktcdvd_mutex);
switch (cmd) { switch (cmd) {
...@@ -2690,7 +2689,7 @@ static int pkt_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, ...@@ -2690,7 +2689,7 @@ static int pkt_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd,
break; break;
default: default:
VPRINTK(DRIVER_NAME": Unknown ioctl for %s (%x)\n", pd->name, cmd); pkt_dbg(2, "Unknown ioctl for %s (%x)\n", pd->name, cmd);
ret = -ENOTTY; ret = -ENOTTY;
} }
mutex_unlock(&pktcdvd_mutex); mutex_unlock(&pktcdvd_mutex);
...@@ -2839,7 +2838,7 @@ static int pkt_remove_dev(dev_t pkt_dev) ...@@ -2839,7 +2838,7 @@ static int pkt_remove_dev(dev_t pkt_dev)
break; break;
} }
if (idx == MAX_WRITERS) { if (idx == MAX_WRITERS) {
DPRINTK(DRIVER_NAME": dev not setup\n"); pkt_dbg(1, "dev not setup\n");
ret = -ENXIO; ret = -ENXIO;
goto out; goto out;
} }
...@@ -2859,7 +2858,7 @@ static int pkt_remove_dev(dev_t pkt_dev) ...@@ -2859,7 +2858,7 @@ static int pkt_remove_dev(dev_t pkt_dev)
blkdev_put(pd->bdev, FMODE_READ | FMODE_NDELAY); blkdev_put(pd->bdev, FMODE_READ | FMODE_NDELAY);
remove_proc_entry(pd->name, pkt_proc); remove_proc_entry(pd->name, pkt_proc);
DPRINTK(DRIVER_NAME": writer %s unmapped\n", pd->name); pkt_dbg(1, "writer %s unmapped\n", pd->name);
del_gendisk(pd->disk); del_gendisk(pd->disk);
blk_cleanup_queue(pd->disk->queue); blk_cleanup_queue(pd->disk->queue);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment