- 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)
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;
}
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),
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);
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);
* 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;
#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) \