Warning fix in drivers/mtd/mtdblock.c

Warning fix in drivers/mtd/mtdblock.c

Post by Krishnakumar. » Fri, 09 May 2003 10:10:12



Hi,

The following patch will remove the compilation warning
of  "unused variable" from the drivers/mtd/mtdblock.c.
Please apply.

Regards
KK

diffstat -p1 mtdblock-2.5.69.patch
===========================
drivers/mtd/mtdblock.c |    1 -
1 files changed, 1 deletion(-)

--- linux-2.5.69/drivers/mtd/mtdblock.c.orig    Mon May  5 05:23:13 2003

 static void mtd_notify_add(struct mtd_info* mtd)
 {
        struct gendisk *disk;
-        char name[16];

         if (!mtd || mtd->type == MTD_ABSENT)
                 return;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. 2.5.45: drivers/mtd/mtdblock.c won't compile -- misordered declaration

When I compile 2.5.45, I get the following errors:

     v850e-elf-gcc -Wp,-MD,drivers/mtd/.mtdblock.o.d -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -g -fomit-frame-pointer -fno-strict-aliasing -fno-common -mv850e -ffixed-r16 -mno-prolog-function -fno-builtin -D__linux__ -DUTS_SYSNAME=\"uClinux\" -nostdinc -iwithprefix include    -DKBUILD_BASENAME=mtdblock   -c -o drivers/mtd/mtdblock.o drivers/mtd/mtdblock.c
   drivers/mtd/mtdblock.c:398: parse error before `struct'
   drivers/mtd/mtdblock.c:399: `p' undeclared (first use in this function)

I fixed this locally as follows:

diff -ruN -X../cludes ../orig/linux-2.5.45-uc1/drivers/mtd/mtdblock.c drivers/mtd/mtdblock.c
--- ../orig/linux-2.5.45-uc1/drivers/mtd/mtdblock.c     2002-10-31 11:41:04.000000000 +0900

        unsigned int res;

        while (!blk_queue_empty(&mtd_queue)) {
+               struct mtdblk_dev **p;
                struct request *req = elv_next_request(&mtd_queue);
                spin_unlock_irq(mtd_queue.queue_lock);
-               struct mtdblk_dev **p = req->rq_disk->private_data;
+               p = req->rq_disk->private_data;
                mtdblk = *p;
                res = 0;

Thanks,

-Miles
--
Quidquid latine dictum sit, altum viditur.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. CGI-parser

3. Add a missing right-paren in drivers/mtd/mtdblock.c

4. What HW for NFS-Server?

5. New: Build error on file drivers/mtd/mtdblock.c

6. Quota Help

7. (trivial 2.5.74) compilation fix drivers/mtd/mtd_blkdevs.c

8. Problems with syslog

9. Patch: linux-2.5.2-pre8/drivers/mtd compilation fixes

10. fix missing cfi_cmdset_0020 in drivers/mtd/chips/Makefile

11. Fix mtdblock / mtdpart / mtdconcat

12. : (resend) tivial mtdblock.c fix

13. M-Systems DOC binary driver compatible with Linux-MTD driver?