Commit b10b09be authored by Andrew Morton's avatar Andrew Morton Committed by Greg Kroah-Hartman

[PATCH] misc fixes

- unused var warning in pnp_add_irq_resource()

- unused var in fd_mcs.c (Adrian Bunk)

- remove dead code in i810_main.c (a u8 cannot exceed 255) (Adrian Bunk)

- don't truncate dma_addr_t's in gdth.c (Jes Sorensen)

- vgastate.c needs vmalloc.h (Geert Uytterhoeven <geert@linux-m68k.org>)

- revert bogus test from rd_open() - it was a 2.4 forward-port, and 2.5
  doesn't need it.  (The gendisks aren't registered, we cannot get there
  anyway).
parent 71c19018
...@@ -271,9 +271,6 @@ static int rd_open(struct inode * inode, struct file * filp) ...@@ -271,9 +271,6 @@ static int rd_open(struct inode * inode, struct file * filp)
{ {
unsigned unit = minor(inode->i_rdev); unsigned unit = minor(inode->i_rdev);
if (unit >= NUM_RAMDISKS)
return -ENODEV;
/* /*
* Immunize device against invalidate_buffers() and prune_icache(). * Immunize device against invalidate_buffers() and prune_icache().
*/ */
......
...@@ -85,7 +85,6 @@ struct pnp_option * pnp_register_dependent_option(struct pnp_dev *dev, int prior ...@@ -85,7 +85,6 @@ struct pnp_option * pnp_register_dependent_option(struct pnp_dev *dev, int prior
int pnp_register_irq_resource(struct pnp_option *option, struct pnp_irq *data) int pnp_register_irq_resource(struct pnp_option *option, struct pnp_irq *data)
{ {
int i;
struct pnp_irq *ptr; struct pnp_irq *ptr;
if (!option) if (!option)
return -EINVAL; return -EINVAL;
...@@ -101,9 +100,13 @@ int pnp_register_irq_resource(struct pnp_option *option, struct pnp_irq *data) ...@@ -101,9 +100,13 @@ int pnp_register_irq_resource(struct pnp_option *option, struct pnp_irq *data)
option->irq = data; option->irq = data;
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
{
int i;
for (i=0; i<16; i++) for (i=0; i<16; i++)
if (data->map & (1<<i)) if (data->map & (1<<i))
pcibios_penalize_isa_irq(i); pcibios_penalize_isa_irq(i);
}
#endif #endif
return 0; return 0;
} }
......
...@@ -589,7 +589,6 @@ static int TOTAL_INTR = 0; ...@@ -589,7 +589,6 @@ static int TOTAL_INTR = 0;
static int fd_mcs_proc_info(struct Scsi_Host *shpnt, char *buffer, char **start, off_t offset, int length, int inout) static int fd_mcs_proc_info(struct Scsi_Host *shpnt, char *buffer, char **start, off_t offset, int length, int inout)
{ {
int len = 0; int len = 0;
int i;
if (inout) if (inout)
return (-ENOSYS); return (-ENOSYS);
......
...@@ -3662,7 +3662,7 @@ static int gdth_sync_event(int hanum,int service,unchar index,Scsi_Cmnd *scp) ...@@ -3662,7 +3662,7 @@ static int gdth_sync_event(int hanum,int service,unchar index,Scsi_Cmnd *scp)
pci_unmap_single(ha->pdev,scp->SCp.dma_handle, pci_unmap_single(ha->pdev,scp->SCp.dma_handle,
scp->request_bufflen,scp->SCp.Message); scp->request_bufflen,scp->SCp.Message);
if (scp->SCp.buffer) if (scp->SCp.buffer)
pci_unmap_single(ha->pdev,(dma_addr_t)(u32)scp->SCp.buffer, pci_unmap_single(ha->pdev,(dma_addr_t)scp->SCp.buffer,
16,PCI_DMA_FROMDEVICE); 16,PCI_DMA_FROMDEVICE);
#endif #endif
if (ha->status == S_OK) { if (ha->status == S_OK) {
......
...@@ -1075,8 +1075,6 @@ static int i810fb_getcolreg(u8 regno, u8 *red, u8 *green, u8 *blue, ...@@ -1075,8 +1075,6 @@ static int i810fb_getcolreg(u8 regno, u8 *red, u8 *green, u8 *blue,
struct i810fb_par *par = (struct i810fb_par *) info->par; struct i810fb_par *par = (struct i810fb_par *) info->par;
u8 *mmio = par->mmio_start_virtual, temp; u8 *mmio = par->mmio_start_virtual, temp;
if (regno > 255) return 1;
if (info->fix.visual == FB_VISUAL_DIRECTCOLOR) { if (info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
if ((info->var.green.length == 5 && regno > 31) || if ((info->var.green.length == 5 && regno > 31) ||
(info->var.green.length == 6 && regno > 63)) (info->var.green.length == 6 && regno > 63))
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/vmalloc.h>
#include <video/vga.h> #include <video/vga.h>
struct regstate { struct regstate {
......
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