diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/DAC960.c | 3 | ||||
-rw-r--r-- | drivers/block/Kconfig | 1 | ||||
-rw-r--r-- | drivers/block/Makefile | 1 | ||||
-rw-r--r-- | drivers/block/ataflop.c | 4 | ||||
-rw-r--r-- | drivers/block/cciss.c | 3 | ||||
-rw-r--r-- | drivers/block/cciss_scsi.c | 2 | ||||
-rw-r--r-- | drivers/block/cpqarray.c | 3 | ||||
-rw-r--r-- | drivers/block/floppy.c | 2 | ||||
-rw-r--r-- | drivers/block/nbd.c | 5 | ||||
-rw-r--r-- | drivers/block/paride/comm.c | 16 | ||||
-rw-r--r-- | drivers/block/paride/on26.c | 2 | ||||
-rw-r--r-- | drivers/block/rd.c | 3 |
12 files changed, 19 insertions, 26 deletions
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 37b8cda3e8bc..9bdea2a5cf0e 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c @@ -228,8 +228,7 @@ static void *slice_dma_loaf(struct dma_loaf *loaf, size_t len, void *cpu_end = loaf->cpu_free + len; void *cpu_addr = loaf->cpu_free; - if (cpu_end > loaf->cpu_base + loaf->length) - BUG(); + BUG_ON(cpu_end > loaf->cpu_base + loaf->length); *dma_handle = loaf->dma_free; loaf->cpu_free = cpu_end; loaf->dma_free += len; diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index 8b1331677407..e57ac5a43246 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig @@ -401,7 +401,6 @@ config BLK_DEV_RAM_SIZE config BLK_DEV_INITRD bool "Initial RAM disk (initrd) support" - depends on BLK_DEV_RAM=y help The initial RAM disk is a RAM disk that is loaded by the boot loader (loadlin or lilo) and that is mounted as root before the normal boot diff --git a/drivers/block/Makefile b/drivers/block/Makefile index 3ec1f8df87b1..410f259a8031 100644 --- a/drivers/block/Makefile +++ b/drivers/block/Makefile @@ -7,7 +7,6 @@ obj-$(CONFIG_MAC_FLOPPY) += swim3.o obj-$(CONFIG_BLK_DEV_FD) += floppy.o -obj-$(CONFIG_BLK_DEV_FD98) += floppy98.o obj-$(CONFIG_AMIGA_FLOPPY) += amiflop.o obj-$(CONFIG_ATARI_FLOPPY) += ataflop.o obj-$(CONFIG_BLK_DEV_SWIM_IOP) += swim_iop.o diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c index f8ce235ccfc3..c39650920bdf 100644 --- a/drivers/block/ataflop.c +++ b/drivers/block/ataflop.c @@ -271,7 +271,7 @@ unsigned char *DMABuffer; /* buffer for writes */ static unsigned long PhysDMABuffer; /* physical address */ static int UseTrackbuffer = -1; /* Do track buffering? */ -MODULE_PARM(UseTrackbuffer, "i"); +module_param(UseTrackbuffer, int, 0); unsigned char *TrackBuffer; /* buffer for reads */ static unsigned long PhysTrackBuffer; /* physical address */ @@ -296,7 +296,7 @@ static int MotorOn = 0, MotorOffTrys; static int IsFormatting = 0, FormatError; static int UserSteprate[FD_MAX_UNITS] = { -1, -1 }; -MODULE_PARM(UserSteprate, "1-" __MODULE_STRING(FD_MAX_UNITS) "i"); +module_param_array(UserSteprate, int, NULL, 0); /* Synchronization of FDC access. */ static volatile int fdc_busy = 0; diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 1f2890989b56..71ec9e664383 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -2361,8 +2361,7 @@ queue: if (!creq) goto startio; - if (creq->nr_phys_segments > MAXSGENTRIES) - BUG(); + BUG_ON(creq->nr_phys_segments > MAXSGENTRIES); if (( c = cmd_alloc(h, 1)) == NULL) goto full; diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c index 9e35de05d5c5..0e66e904bd8c 100644 --- a/drivers/block/cciss_scsi.c +++ b/drivers/block/cciss_scsi.c @@ -1316,7 +1316,7 @@ cciss_scsi_queue_command (struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd cp->Request.Timeout = 0; memset(cp->Request.CDB, 0, sizeof(cp->Request.CDB)); - if (cmd->cmd_len > sizeof(cp->Request.CDB)) BUG(); + BUG_ON(cmd->cmd_len > sizeof(cp->Request.CDB)); cp->Request.CDBLen = cmd->cmd_len; memcpy(cp->Request.CDB, cmd->cmnd, cmd->cmd_len); cp->Request.Type.Type = TYPE_CMD; diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c index 862b9abac0ae..b6ea2f0c7276 100644 --- a/drivers/block/cpqarray.c +++ b/drivers/block/cpqarray.c @@ -906,8 +906,7 @@ queue_next: if (!creq) goto startio; - if (creq->nr_phys_segments > SG_MAX) - BUG(); + BUG_ON(creq->nr_phys_segments > SG_MAX); if ((c = cmd_alloc(h,1)) == NULL) goto startio; diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index fb2d0be7cdeb..840919bba76c 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -4594,7 +4594,7 @@ static void __init parse_floppy_cfg_string(char *cfg) } } -int init_module(void) +int __init init_module(void) { if (floppy) parse_floppy_cfg_string(floppy); diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index a9bde30dadad..8bca4905d7f7 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -639,10 +639,7 @@ static int __init nbd_init(void) int err = -ENOMEM; int i; - if (sizeof(struct nbd_request) != 28) { - printk(KERN_CRIT "nbd: sizeof nbd_request needs to be 28 in order to work!\n" ); - return -EIO; - } + BUILD_BUG_ON(sizeof(struct nbd_request) != 28); if (nbds_max > MAX_NBD) { printk(KERN_CRIT "nbd: cannot allocate more than %u nbds; %u requested.\n", MAX_NBD, diff --git a/drivers/block/paride/comm.c b/drivers/block/paride/comm.c index d842956edf76..43d61359d8ec 100644 --- a/drivers/block/paride/comm.c +++ b/drivers/block/paride/comm.c @@ -60,7 +60,7 @@ static int comm_read_regr( PIA *pi, int cont, int regr ) case 2: case 3: - case 4: w3(r+0x20); r1(); + case 4: w3(r+0x20); (void)r1(); w2(0x24); h = r4(); w2(4); return h; @@ -82,7 +82,7 @@ static void comm_write_regr( PIA *pi, int cont, int regr, int val ) case 2: case 3: - case 4: w3(r); r1(); w4(val); + case 4: w3(r); (void)r1(); w4(val); break; } } @@ -126,17 +126,17 @@ static void comm_read_block( PIA *pi, char * buf, int count ) w2(4); break; - case 2: w3(0x68); r1(); w2(0x24); + case 2: w3(0x68); (void)r1(); w2(0x24); for (i=0;i<count;i++) buf[i] = r4(); w2(4); break; - case 3: w3(0x68); r1(); w2(0x24); + case 3: w3(0x68); (void)r1(); w2(0x24); for (i=0;i<count/2;i++) ((u16 *)buf)[i] = r4w(); w2(4); break; - case 4: w3(0x68); r1(); w2(0x24); + case 4: w3(0x68); (void)r1(); w2(0x24); for (i=0;i<count/4;i++) ((u32 *)buf)[i] = r4l(); w2(4); break; @@ -160,15 +160,15 @@ static void comm_write_block( PIA *pi, char * buf, int count ) w2(5); w2(4); break; - case 2: w3(0x48); r1(); + case 2: w3(0x48); (void)r1(); for (k=0;k<count;k++) w4(buf[k^1]); break; - case 3: w3(0x48); r1(); + case 3: w3(0x48); (void)r1(); for (k=0;k<count/2;k++) w4w(pi_swab16(buf,k)); break; - case 4: w3(0x48); r1(); + case 4: w3(0x48); (void)r1(); for (k=0;k<count/4;k++) w4l(pi_swab32(buf,k)); break; diff --git a/drivers/block/paride/on26.c b/drivers/block/paride/on26.c index 9f837d9a3639..0f833caa2101 100644 --- a/drivers/block/paride/on26.c +++ b/drivers/block/paride/on26.c @@ -66,7 +66,7 @@ static int on26_read_regr( PIA *pi, int cont, int regr ) case 3: case 4: w3(1); w3(1); w2(5); w4(r); w2(4); w3(0); w3(0); w2(0x24); a = r4(); w2(4); - w2(0x24); r4(); w2(4); + w2(0x24); (void)r4(); w2(4); return a; } diff --git a/drivers/block/rd.c b/drivers/block/rd.c index 1c54f46d3f70..940bfd7951e5 100644 --- a/drivers/block/rd.c +++ b/drivers/block/rd.c @@ -186,7 +186,8 @@ static int ramdisk_writepages(struct address_space *mapping, */ static int ramdisk_set_page_dirty(struct page *page) { - SetPageDirty(page); + if (!TestSetPageDirty(page)) + return 1; return 0; } |