Commit 95ea8516 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] misc fixes

- shmem: remove unneeded test for null inode->i_sb (James Morris)

- kill unused var warning in traps.c (Geert Uytterhoeven)

- s/u64/__u64/ in bitops.h (needed for klibc)

- comment fix in gfp.h (Matthew Dobson <colpatch@us.ibm.com>)

- fix smbfs constant overflow warning (Flameeyes <daps_mls@libero.it>)

- yam.c irqreturn_t fix.

- Remove some unused variables from baycom_epp.c (Adrian Bunk)

- Remove 5-year-old unreferenced RCS string from xirc2ps_cs.c (Adrian Bunk)
parent b8a105ff
......@@ -94,7 +94,6 @@ static int kstack_depth_to_print = 24;
void show_trace(struct task_struct *task, unsigned long * stack)
{
int i;
unsigned long addr;
if (!stack)
......@@ -104,7 +103,6 @@ void show_trace(struct task_struct *task, unsigned long * stack)
#ifdef CONFIG_KALLSYMS
printk("\n");
#endif
i = 1;
while (((long) stack & (THREAD_SIZE-1)) != 0) {
addr = *stack++;
if (kernel_text_address(addr)) {
......
......@@ -376,7 +376,6 @@ static int eppconfig(struct baycom_state *bc)
char portarg[16];
char *argv[] = { eppconfig_path, "-s", "-p", portarg, "-m", modearg,
NULL };
int ret;
/* set up arguments */
sprintf(modearg, "%sclk,%smodem,fclk=%d,bps=%d,divider=%d%s,extstat",
......@@ -1164,7 +1163,6 @@ static int baycom_setmode(struct baycom_state *bc, const char *modestr)
static int baycom_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
struct baycom_state *bc;
struct baycom_ioctl bi;
struct hdlcdrv_ioctl hi;
baycom_paranoia_check(dev, "baycom_ioctl", -EINVAL);
......
......@@ -721,7 +721,7 @@ static irqreturn_t yam_interrupt(int irq, void *dev_id, struct pt_regs *regs)
unsigned char iir;
int counter = 100;
int i;
int handled = 0;
for (i = 0; i < NR_PORTS; i++) {
yp = &yam_ports[i];
......@@ -735,14 +735,17 @@ static irqreturn_t yam_interrupt(int irq, void *dev_id, struct pt_regs *regs)
unsigned char lsr = inb(LSR(dev->base_addr));
unsigned char rxb;
handled = 1;
if (lsr & LSR_OE)
++yp->stats.rx_fifo_errors;
yp->dcd = (msr & RX_DCD) ? 1 : 0;
if (--counter <= 0) {
printk(KERN_ERR "%s: too many irq iir=%d\n", dev->name, iir);
return;
printk(KERN_ERR "%s: too many irq iir=%d\n",
dev->name, iir);
goto out;
}
if (msr & TX_RDY) {
++yp->nb_mdint;
......@@ -758,7 +761,8 @@ static irqreturn_t yam_interrupt(int irq, void *dev_id, struct pt_regs *regs)
}
}
}
return IRQ_HANDLED;
out:
return IRQ_RETVAL(handled);
}
static int yam_net_get_info(char *buffer, char **start, off_t offset, int length)
......
......@@ -225,9 +225,7 @@ MODULE_PARM(pc_debug, "i");
#else
#define DEBUG(n, args...)
#endif
static char *version =
"xirc2ps_cs.c 1.31 1998/12/09 19:32:55 (dd9jn+kvh)";
/* !--- CVS revision */
#define KDBG_XIRC KERN_DEBUG "xirc2ps_cs: "
#define KERR_XIRC KERN_ERR "xirc2ps_cs: "
#define KWRN_XIRC KERN_WARNING "xirc2ps_cs: "
......
......@@ -108,7 +108,7 @@ static inline unsigned int generic_hweight8(unsigned int w)
return (res & 0x0F) + ((res >> 4) & 0x0F);
}
static inline unsigned long generic_hweight64(u64 w)
static inline unsigned long generic_hweight64(__u64 w)
{
#if BITS_PER_LONG < 64
return generic_hweight32((unsigned int)(w >> 32)) +
......
......@@ -7,7 +7,7 @@
/*
* GFP bitmasks..
*/
/* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low four bits) */
/* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low two bits) */
#define __GFP_DMA 0x01
#define __GFP_HIGHMEM 0x02
......
......@@ -347,8 +347,8 @@
#define SMB_MODE_NO_CHANGE 0xFFFFFFFF
#define SMB_UID_NO_CHANGE 0xFFFFFFFF
#define SMB_GID_NO_CHANGE 0xFFFFFFFF
#define SMB_TIME_NO_CHANGE 0xFFFFFFFFFFFFFFFF
#define SMB_SIZE_NO_CHANGE 0xFFFFFFFFFFFFFFFF
#define SMB_TIME_NO_CHANGE 0xFFFFFFFFFFFFFFFFULL
#define SMB_SIZE_NO_CHANGE 0xFFFFFFFFFFFFFFFFULL
/* UNIX filetype mappings. */
#define UNIX_TYPE_FILE 0
......
......@@ -1010,7 +1010,7 @@ static int shmem_mmap(struct file *file, struct vm_area_struct *vma)
struct inode *inode = file->f_dentry->d_inode;
ops = &shmem_vm_ops;
if (!inode->i_sb || !S_ISREG(inode->i_mode))
if (!S_ISREG(inode->i_mode))
return -EACCES;
update_atime(inode);
vma->vm_ops = ops;
......
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