Skip to contentSkip to conversation

drivers/block/pktcdvd.c: remove write-only variable in pkt_iosched_process_queue()

PATCH In review Adrian Bunk 2 participants 2 messages Nov 2, 2005 – Nov 4, 2005 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/block/pktcdvd.c: remove write-only variable in pkt_iosched_process_queue()

Found this on Coverty's linux bug database (http://linuxbugsdb.coverity.com).

The function pkt_iosched_process_queue makes a call to bdev_get_queue and stores the result but never uses it, so it looks like it can be safely removed.

From: Gabriel A. Devenyi <[email protected]>

drivers/block/pktcdvd.c +0 -3
@@ -501,14 +501,11 @@ static void pkt_queue_bio(struct pktcdvd
  */
 static void pkt_iosched_process_queue(struct pktcdvd_device *pd)
 {
-	request_queue_t *q;
 
 	if (atomic_read(&pd->iosched.attention) == 0)
 		return;
 	atomic_set(&pd->iosched.attention, 0);
 
-	q = bdev_get_queue(pd->bdev);
-
 	for (;;) {
 		struct bio *bio;
 		int reads_queued, writes_queued;
#1 lore raw
Quoted 7 lines · Adrian Bunk

Found this on Coverty's linux bug database (http://linuxbugsdb.coverity.com).

The function pkt_iosched_process_queue makes a call to bdev_get_queue and stores the result but never uses it, so it looks like it can be safely removed.

From: Gabriel A. Devenyi <[email protected]>

Thanks. The patch looks good.

Signature · 2 lines
Peter Osterlund - [email protected]
http://web.telia.com/~u89404340