Re: 2.3.46: error in nbd.c

From: Andrea Arcangeli (andrea@suse.de)
Date: Thu Feb 17 2000 - 08:13:04 EST


On Thu, 17 Feb 2000, Alexandre Hautequest wrote:

>gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2
>-fomit-frame-pointer -fno-strict-aliasing -pipe -DCPU=586 -march=i586
>-DMODULE -DMODVERSIONS -include
>/usr/src/linux/include/linux/modversions.h -c -o nbd.o nbd.c
>nbd.c: In function `nbd_clear_que':
>nbd.c:251: warning: unused variable `flags'
>nbd.c: In function `do_nbd_request':
>nbd.c:291: `QUEUE_EMPTY' undeclared (first use in this function)
>nbd.c:291: (Each undeclared identifier is reported only once
>nbd.c:291: for each function it appears in.)
>nbd.c: In function `nbd_ioctl':
>nbd.c:409: warning: format argument is not a pointer (arg 3)

Are you sure you patched correctly?

The below patch fixes two compiler warnings, it's against 2.3.46. I don't
see other problems and nbd compiles fine in 2.3.46 here.

--- 2.3.46pre5aa1-alpha/drivers/block/nbd.c.~1~ Thu Feb 17 02:22:27 2000
+++ 2.3.46pre5aa1-alpha/drivers/block/nbd.c Thu Feb 17 14:09:59 2000
@@ -248,7 +248,6 @@
 void nbd_clear_que(struct nbd_device *lo)
 {
         struct request *req;
- unsigned long flags;
 
         while (!list_empty(&lo->queue_head)) {
                 req = blkdev_entry_prev_request(&lo->queue_head);
@@ -405,8 +404,8 @@
                 return 0;
 #ifdef PARANOIA
         case NBD_PRINT_DEBUG:
- printk(KERN_INFO "NBD device %d: queue_head = %p. Global: in %d, out %d\n",
- dev, lo->queue_head, requests_in, requests_out);
+ printk(KERN_INFO "NBD device %d: next = %p, prev = %p. Global: in %d, out %d\n",
+ dev, lo->queue_head.next, lo->queue_head.prev, requests_in, requests_out);
                 return 0;
 #endif
         case BLKGETSIZE:

Andrea

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Feb 23 2000 - 21:00:18 EST