Commit 77a32d76 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] various fixes

- 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)
parent eef57ec4
...@@ -369,11 +369,11 @@ static int pf_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un ...@@ -369,11 +369,11 @@ static int pf_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un
return -EINVAL; return -EINVAL;
capacity = get_capacity(pf->disk); capacity = get_capacity(pf->disk);
if (capacity < PF_FD_MAX) { 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.heads = PF_FD_HDS;
g.sectors = PF_FD_SPT; g.sectors = PF_FD_SPT;
} else { } 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.heads = PF_HD_HDS;
g.sectors = PF_HD_SPT; g.sectors = PF_HD_SPT;
} }
......
...@@ -1803,7 +1803,7 @@ static void vortex_tx_timeout(struct net_device *dev) ...@@ -1803,7 +1803,7 @@ static void vortex_tx_timeout(struct net_device *dev)
dev->name, inb(ioaddr + TxStatus), dev->name, inb(ioaddr + TxStatus),
inw(ioaddr + EL3_STATUS)); inw(ioaddr + EL3_STATUS));
EL3WINDOW(4); 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_NetDiag),
inw(ioaddr + Wn4_Media), inw(ioaddr + Wn4_Media),
inl(ioaddr + PktStatus), inl(ioaddr + PktStatus),
...@@ -2643,7 +2643,7 @@ dump_tx_ring(struct net_device *dev) ...@@ -2643,7 +2643,7 @@ dump_tx_ring(struct net_device *dev)
vp->full_bus_master_tx, vp->full_bus_master_tx,
vp->dirty_tx, vp->dirty_tx % TX_RING_SIZE, vp->dirty_tx, vp->dirty_tx % TX_RING_SIZE,
vp->cur_tx, vp->cur_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), inl(ioaddr + DownListPtr),
&vp->tx_ring[vp->dirty_tx % TX_RING_SIZE]); &vp->tx_ring[vp->dirty_tx % TX_RING_SIZE]);
issue_and_wait(dev, DownStall); issue_and_wait(dev, DownStall);
......
...@@ -254,11 +254,12 @@ static int isofs_readdir(struct file *filp, ...@@ -254,11 +254,12 @@ static int isofs_readdir(struct file *filp,
struct iso_directory_record * tmpde; struct iso_directory_record * tmpde;
struct inode *inode = filp->f_dentry->d_inode; struct inode *inode = filp->f_dentry->d_inode;
lock_kernel();
tmpname = (char *) __get_free_page(GFP_KERNEL); tmpname = (char *)__get_free_page(GFP_KERNEL);
if (!tmpname) if (tmpname == NULL)
return -ENOMEM; return -ENOMEM;
lock_kernel();
tmpde = (struct iso_directory_record *) (tmpname+1024); tmpde = (struct iso_directory_record *) (tmpname+1024);
result = do_isofs_readdir(inode, filp, dirent, filldir, tmpname, tmpde); result = do_isofs_readdir(inode, filp, dirent, filldir, tmpname, tmpde);
......
...@@ -1526,7 +1526,7 @@ void shrink_journal_memory(void) ...@@ -1526,7 +1526,7 @@ void shrink_journal_memory(void)
* Simple support for retying memory allocations. Introduced to help to * Simple support for retying memory allocations. Introduced to help to
* debug different VM deadlock avoidance strategies. * 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; void *p;
static unsigned long last_warning; static unsigned long last_warning;
......
...@@ -54,7 +54,7 @@ extern int journal_enable_debug; ...@@ -54,7 +54,7 @@ extern int journal_enable_debug;
#define jbd_debug(f, a...) /**/ #define jbd_debug(f, a...) /**/
#endif #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) \ #define jbd_kmalloc(size, flags) \
__jbd_kmalloc(__FUNCTION__, (size), (flags), journal_oom_retry) __jbd_kmalloc(__FUNCTION__, (size), (flags), journal_oom_retry)
#define jbd_rep_kmalloc(size, flags) \ #define jbd_rep_kmalloc(size, flags) \
......
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