]> git.hungrycats.org Git - linux/commitdiff
[PATCH] various fixes
authorAndrew Morton <akpm@digeo.com>
Fri, 11 Oct 2002 13:03:05 +0000 (06:03 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Fri, 11 Oct 2002 13:03:05 +0000 (06:03 -0700)
- Fix some printk warnings in 3c59x.c (inl() now returns a long).

- ext3 warning fix from Stephen Hemminger: "__FUNCTION__ is a
  constant and gcc warns about passing it as a mutuable string."

- Fix a return-with-BKL-held in isofs_readdir()

- paride 64-bit sector_t fix (Bill Irwin)

drivers/block/paride/pf.c
drivers/net/3c59x.c
fs/isofs/dir.c
fs/jbd/journal.c
include/linux/jbd.h

index a7e73e09d1625bd319eb9dbbb03227c0469c536b..becf37efd5ecd2b8a3a21c184edab23bf191a37c 100644 (file)
@@ -369,11 +369,11 @@ static int pf_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un
                return -EINVAL;
        capacity = get_capacity(pf->disk);
        if (capacity < PF_FD_MAX) {
-               g.cylinders = capacity / (PF_FD_HDS * PF_FD_SPT);
+               g.cylinders = sector_div(capacity, PF_FD_HDS * PF_FD_SPT);
                g.heads = PF_FD_HDS;
                g.sectors = PF_FD_SPT;
        } else {
-               g.cylinders = capacity / (PF_HD_HDS * PF_HD_SPT);
+               g.cylinders = sector_div(capacity, PF_HD_HDS * PF_HD_SPT);
                g.heads = PF_HD_HDS;
                g.sectors = PF_HD_SPT;
        }
index b172b133b88cd0da1621635432510e281f462e4c..47bf73b1fa1d62b281d6d0c9b56cca7afb9f4b39 100644 (file)
@@ -1803,7 +1803,7 @@ static void vortex_tx_timeout(struct net_device *dev)
                   dev->name, inb(ioaddr + TxStatus),
                   inw(ioaddr + EL3_STATUS));
        EL3WINDOW(4);
-       printk(KERN_ERR "  diagnostics: net %04x media %04x dma %08x fifo %04x\n",
+       printk(KERN_ERR "  diagnostics: net %04x media %04x dma %08lx fifo %04x\n",
                        inw(ioaddr + Wn4_NetDiag),
                        inw(ioaddr + Wn4_Media),
                        inl(ioaddr + PktStatus),
@@ -2643,7 +2643,7 @@ dump_tx_ring(struct net_device *dev)
                                        vp->full_bus_master_tx,
                                        vp->dirty_tx, vp->dirty_tx % TX_RING_SIZE,
                                        vp->cur_tx, vp->cur_tx % TX_RING_SIZE);
-                       printk(KERN_ERR "  Transmit list %8.8x vs. %p.\n",
+                       printk(KERN_ERR "  Transmit list %8.8lx vs. %p.\n",
                                   inl(ioaddr + DownListPtr),
                                   &vp->tx_ring[vp->dirty_tx % TX_RING_SIZE]);
                        issue_and_wait(dev, DownStall);
index 7e7ff59c10958c9e5f9f40af5fe28aa53cd6d6f3..1f2f92ab346625cb6d762b3fc5fc8606c9a16662 100644 (file)
@@ -254,11 +254,12 @@ static int isofs_readdir(struct file *filp,
        struct iso_directory_record * tmpde;
        struct inode *inode = filp->f_dentry->d_inode;
 
-       lock_kernel();
 
-       tmpname = (char *) __get_free_page(GFP_KERNEL);
-       if (!tmpname)
+       tmpname = (char *)__get_free_page(GFP_KERNEL);
+       if (tmpname == NULL)
                return -ENOMEM;
+
+       lock_kernel();
        tmpde = (struct iso_directory_record *) (tmpname+1024);
 
        result = do_isofs_readdir(inode, filp, dirent, filldir, tmpname, tmpde);
index aa7c3df8379010c37f4ae00da14a013060ba2979..0fa6fcfe61b0348d8406896894d4153bda24ad52 100644 (file)
@@ -1526,7 +1526,7 @@ void shrink_journal_memory(void)
  * Simple support for retying memory allocations.  Introduced to help to
  * debug different VM deadlock avoidance strategies. 
  */
-void * __jbd_kmalloc (char *where, size_t size, int flags, int retry)
+void * __jbd_kmalloc (const char *where, size_t size, int flags, int retry)
 {
        void *p;
        static unsigned long last_warning;
index fafb868eec1151f6ad7b1bdf4869b5d81291b3bd..5b1657fca68a67f8fe0565653cea9a2259bb40bc 100644 (file)
@@ -54,7 +54,7 @@ extern int journal_enable_debug;
 #define jbd_debug(f, a...)     /**/
 #endif
 
-extern void * __jbd_kmalloc (char *where, size_t size, int flags, int retry);
+extern void * __jbd_kmalloc (const char *where, size_t size, int flags, int retry);
 #define jbd_kmalloc(size, flags) \
        __jbd_kmalloc(__FUNCTION__, (size), (flags), journal_oom_retry)
 #define jbd_rep_kmalloc(size, flags) \