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, | |||
228 | void *cpu_end = loaf->cpu_free + len; | 228 | void *cpu_end = loaf->cpu_free + len; |
229 | void *cpu_addr = loaf->cpu_free; | 229 | void *cpu_addr = loaf->cpu_free; |
230 | 230 | ||
231 | if (cpu_end > loaf->cpu_base + loaf->length) | 231 | BUG_ON(cpu_end > loaf->cpu_base + loaf->length); |
232 | BUG(); | ||
233 | *dma_handle = loaf->dma_free; | 232 | *dma_handle = loaf->dma_free; |
234 | loaf->cpu_free = cpu_end; | 233 | loaf->cpu_free = cpu_end; |
235 | loaf->dma_free += len; | 234 | 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 | |||
401 | 401 | ||
402 | config BLK_DEV_INITRD | 402 | config BLK_DEV_INITRD |
403 | bool "Initial RAM disk (initrd) support" | 403 | bool "Initial RAM disk (initrd) support" |
404 | depends on BLK_DEV_RAM=y | ||
405 | help | 404 | help |
406 | The initial RAM disk is a RAM disk that is loaded by the boot loader | 405 | The initial RAM disk is a RAM disk that is loaded by the boot loader |
407 | (loadlin or lilo) and that is mounted as root before the normal boot | 406 | (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 @@ | |||
7 | 7 | ||
8 | obj-$(CONFIG_MAC_FLOPPY) += swim3.o | 8 | obj-$(CONFIG_MAC_FLOPPY) += swim3.o |
9 | obj-$(CONFIG_BLK_DEV_FD) += floppy.o | 9 | obj-$(CONFIG_BLK_DEV_FD) += floppy.o |
10 | obj-$(CONFIG_BLK_DEV_FD98) += floppy98.o | ||
11 | obj-$(CONFIG_AMIGA_FLOPPY) += amiflop.o | 10 | obj-$(CONFIG_AMIGA_FLOPPY) += amiflop.o |
12 | obj-$(CONFIG_ATARI_FLOPPY) += ataflop.o | 11 | obj-$(CONFIG_ATARI_FLOPPY) += ataflop.o |
13 | obj-$(CONFIG_BLK_DEV_SWIM_IOP) += swim_iop.o | 12 | 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 */ | |||
271 | static unsigned long PhysDMABuffer; /* physical address */ | 271 | static unsigned long PhysDMABuffer; /* physical address */ |
272 | 272 | ||
273 | static int UseTrackbuffer = -1; /* Do track buffering? */ | 273 | static int UseTrackbuffer = -1; /* Do track buffering? */ |
274 | MODULE_PARM(UseTrackbuffer, "i"); | 274 | module_param(UseTrackbuffer, int, 0); |
275 | 275 | ||
276 | unsigned char *TrackBuffer; /* buffer for reads */ | 276 | unsigned char *TrackBuffer; /* buffer for reads */ |
277 | static unsigned long PhysTrackBuffer; /* physical address */ | 277 | static unsigned long PhysTrackBuffer; /* physical address */ |
@@ -296,7 +296,7 @@ static int MotorOn = 0, MotorOffTrys; | |||
296 | static int IsFormatting = 0, FormatError; | 296 | static int IsFormatting = 0, FormatError; |
297 | 297 | ||
298 | static int UserSteprate[FD_MAX_UNITS] = { -1, -1 }; | 298 | static int UserSteprate[FD_MAX_UNITS] = { -1, -1 }; |
299 | MODULE_PARM(UserSteprate, "1-" __MODULE_STRING(FD_MAX_UNITS) "i"); | 299 | module_param_array(UserSteprate, int, NULL, 0); |
300 | 300 | ||
301 | /* Synchronization of FDC access. */ | 301 | /* Synchronization of FDC access. */ |
302 | static volatile int fdc_busy = 0; | 302 | 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: | |||
2361 | if (!creq) | 2361 | if (!creq) |
2362 | goto startio; | 2362 | goto startio; |
2363 | 2363 | ||
2364 | if (creq->nr_phys_segments > MAXSGENTRIES) | 2364 | BUG_ON(creq->nr_phys_segments > MAXSGENTRIES); |
2365 | BUG(); | ||
2366 | 2365 | ||
2367 | if (( c = cmd_alloc(h, 1)) == NULL) | 2366 | if (( c = cmd_alloc(h, 1)) == NULL) |
2368 | goto full; | 2367 | 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 | |||
1316 | 1316 | ||
1317 | cp->Request.Timeout = 0; | 1317 | cp->Request.Timeout = 0; |
1318 | memset(cp->Request.CDB, 0, sizeof(cp->Request.CDB)); | 1318 | memset(cp->Request.CDB, 0, sizeof(cp->Request.CDB)); |
1319 | if (cmd->cmd_len > sizeof(cp->Request.CDB)) BUG(); | 1319 | BUG_ON(cmd->cmd_len > sizeof(cp->Request.CDB)); |
1320 | cp->Request.CDBLen = cmd->cmd_len; | 1320 | cp->Request.CDBLen = cmd->cmd_len; |
1321 | memcpy(cp->Request.CDB, cmd->cmnd, cmd->cmd_len); | 1321 | memcpy(cp->Request.CDB, cmd->cmnd, cmd->cmd_len); |
1322 | cp->Request.Type.Type = TYPE_CMD; | 1322 | 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: | |||
906 | if (!creq) | 906 | if (!creq) |
907 | goto startio; | 907 | goto startio; |
908 | 908 | ||
909 | if (creq->nr_phys_segments > SG_MAX) | 909 | BUG_ON(creq->nr_phys_segments > SG_MAX); |
910 | BUG(); | ||
911 | 910 | ||
912 | if ((c = cmd_alloc(h,1)) == NULL) | 911 | if ((c = cmd_alloc(h,1)) == NULL) |
913 | goto startio; | 912 | 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) | |||
4594 | } | 4594 | } |
4595 | } | 4595 | } |
4596 | 4596 | ||
4597 | int init_module(void) | 4597 | int __init init_module(void) |
4598 | { | 4598 | { |
4599 | if (floppy) | 4599 | if (floppy) |
4600 | parse_floppy_cfg_string(floppy); | 4600 | 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) | |||
639 | int err = -ENOMEM; | 639 | int err = -ENOMEM; |
640 | int i; | 640 | int i; |
641 | 641 | ||
642 | if (sizeof(struct nbd_request) != 28) { | 642 | BUILD_BUG_ON(sizeof(struct nbd_request) != 28); |
643 | printk(KERN_CRIT "nbd: sizeof nbd_request needs to be 28 in order to work!\n" ); | ||
644 | return -EIO; | ||
645 | } | ||
646 | 643 | ||
647 | if (nbds_max > MAX_NBD) { | 644 | if (nbds_max > MAX_NBD) { |
648 | printk(KERN_CRIT "nbd: cannot allocate more than %u nbds; %u requested.\n", MAX_NBD, | 645 | 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 ) | |||
60 | 60 | ||
61 | case 2: | 61 | case 2: |
62 | case 3: | 62 | case 3: |
63 | case 4: w3(r+0x20); r1(); | 63 | case 4: w3(r+0x20); (void)r1(); |
64 | w2(0x24); h = r4(); w2(4); | 64 | w2(0x24); h = r4(); w2(4); |
65 | return h; | 65 | return h; |
66 | 66 | ||
@@ -82,7 +82,7 @@ static void comm_write_regr( PIA *pi, int cont, int regr, int val ) | |||
82 | 82 | ||
83 | case 2: | 83 | case 2: |
84 | case 3: | 84 | case 3: |
85 | case 4: w3(r); r1(); w4(val); | 85 | case 4: w3(r); (void)r1(); w4(val); |
86 | break; | 86 | break; |
87 | } | 87 | } |
88 | } | 88 | } |
@@ -126,17 +126,17 @@ static void comm_read_block( PIA *pi, char * buf, int count ) | |||
126 | w2(4); | 126 | w2(4); |
127 | break; | 127 | break; |
128 | 128 | ||
129 | case 2: w3(0x68); r1(); w2(0x24); | 129 | case 2: w3(0x68); (void)r1(); w2(0x24); |
130 | for (i=0;i<count;i++) buf[i] = r4(); | 130 | for (i=0;i<count;i++) buf[i] = r4(); |
131 | w2(4); | 131 | w2(4); |
132 | break; | 132 | break; |
133 | 133 | ||
134 | case 3: w3(0x68); r1(); w2(0x24); | 134 | case 3: w3(0x68); (void)r1(); w2(0x24); |
135 | for (i=0;i<count/2;i++) ((u16 *)buf)[i] = r4w(); | 135 | for (i=0;i<count/2;i++) ((u16 *)buf)[i] = r4w(); |
136 | w2(4); | 136 | w2(4); |
137 | break; | 137 | break; |
138 | 138 | ||
139 | case 4: w3(0x68); r1(); w2(0x24); | 139 | case 4: w3(0x68); (void)r1(); w2(0x24); |
140 | for (i=0;i<count/4;i++) ((u32 *)buf)[i] = r4l(); | 140 | for (i=0;i<count/4;i++) ((u32 *)buf)[i] = r4l(); |
141 | w2(4); | 141 | w2(4); |
142 | break; | 142 | break; |
@@ -160,15 +160,15 @@ static void comm_write_block( PIA *pi, char * buf, int count ) | |||
160 | w2(5); w2(4); | 160 | w2(5); w2(4); |
161 | break; | 161 | break; |
162 | 162 | ||
163 | case 2: w3(0x48); r1(); | 163 | case 2: w3(0x48); (void)r1(); |
164 | for (k=0;k<count;k++) w4(buf[k^1]); | 164 | for (k=0;k<count;k++) w4(buf[k^1]); |
165 | break; | 165 | break; |
166 | 166 | ||
167 | case 3: w3(0x48); r1(); | 167 | case 3: w3(0x48); (void)r1(); |
168 | for (k=0;k<count/2;k++) w4w(pi_swab16(buf,k)); | 168 | for (k=0;k<count/2;k++) w4w(pi_swab16(buf,k)); |
169 | break; | 169 | break; |
170 | 170 | ||
171 | case 4: w3(0x48); r1(); | 171 | case 4: w3(0x48); (void)r1(); |
172 | for (k=0;k<count/4;k++) w4l(pi_swab32(buf,k)); | 172 | for (k=0;k<count/4;k++) w4l(pi_swab32(buf,k)); |
173 | break; | 173 | break; |
174 | 174 | ||
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 ) | |||
66 | case 3: | 66 | case 3: |
67 | case 4: w3(1); w3(1); w2(5); w4(r); w2(4); | 67 | case 4: w3(1); w3(1); w2(5); w4(r); w2(4); |
68 | w3(0); w3(0); w2(0x24); a = r4(); w2(4); | 68 | w3(0); w3(0); w2(0x24); a = r4(); w2(4); |
69 | w2(0x24); r4(); w2(4); | 69 | w2(0x24); (void)r4(); w2(4); |
70 | return a; | 70 | return a; |
71 | 71 | ||
72 | } | 72 | } |
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, | |||
186 | */ | 186 | */ |
187 | static int ramdisk_set_page_dirty(struct page *page) | 187 | static int ramdisk_set_page_dirty(struct page *page) |
188 | { | 188 | { |
189 | SetPageDirty(page); | 189 | if (!TestSetPageDirty(page)) |
190 | return 1; | ||
190 | return 0; | 191 | return 0; |
191 | } | 192 | } |
192 | 193 | ||