aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-09-23 11:20:48 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-09-23 11:20:48 -0400
commit08d3ad6a518051bfaefd5d6a8005e20c036996c3 (patch)
treed1bdfe06ce6705d0d62d3ce0b005c3ed2cbcb550
parent9a05eded5d17a425b9d9ed9dd80f518429dde4e8 (diff)
[MTD] Whitespace cleanup in SSFDC driver.
Says akpm: ' - search for "( " and " )", fix.' Signed-off-by: David Woodhouse <dwmw2@infradead.org>
-rw-r--r--drivers/mtd/ssfdc.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/mtd/ssfdc.c b/drivers/mtd/ssfdc.c
index cf60a5e87f19..79d3bb659bfe 100644
--- a/drivers/mtd/ssfdc.c
+++ b/drivers/mtd/ssfdc.c
@@ -127,11 +127,11 @@ static int get_valid_cis_sector(struct mtd_info *mtd)
127 sect_buf); 127 sect_buf);
128 128
129 /* CIS pattern match on the sector buffer */ 129 /* CIS pattern match on the sector buffer */
130 if ( ret < 0 || retlen != SECTOR_SIZE ) { 130 if (ret < 0 || retlen != SECTOR_SIZE) {
131 printk(KERN_WARNING 131 printk(KERN_WARNING
132 "SSFDC_RO:can't read CIS/IDI sector\n"); 132 "SSFDC_RO:can't read CIS/IDI sector\n");
133 } else if ( !memcmp(sect_buf, cis_numbers, 133 } else if (!memcmp(sect_buf, cis_numbers,
134 sizeof(cis_numbers)) ) { 134 sizeof(cis_numbers))) {
135 /* Found */ 135 /* Found */
136 cis_sector = (int)(offset >> SECTOR_SHIFT); 136 cis_sector = (int)(offset >> SECTOR_SHIFT);
137 } else { 137 } else {
@@ -233,7 +233,7 @@ static int get_logical_address(uint8_t *oob_buf)
233 } 233 }
234 } 234 }
235 235
236 if ( !ok ) 236 if (!ok)
237 block_address = -2; 237 block_address = -2;
238 238
239 DEBUG(MTD_DEBUG_LEVEL3, "SSFDC_RO: get_logical_address() %d\n", 239 DEBUG(MTD_DEBUG_LEVEL3, "SSFDC_RO: get_logical_address() %d\n",
@@ -251,8 +251,8 @@ static int build_logical_block_map(struct ssfdcr_record *ssfdc)
251 struct mtd_info *mtd = ssfdc->mbd.mtd; 251 struct mtd_info *mtd = ssfdc->mbd.mtd;
252 252
253 DEBUG(MTD_DEBUG_LEVEL1, "SSFDC_RO: build_block_map() nblks=%d (%luK)\n", 253 DEBUG(MTD_DEBUG_LEVEL1, "SSFDC_RO: build_block_map() nblks=%d (%luK)\n",
254 ssfdc->map_len, (unsigned long)ssfdc->map_len * 254 ssfdc->map_len,
255 ssfdc->erase_size / 1024 ); 255 (unsigned long)ssfdc->map_len * ssfdc->erase_size / 1024);
256 256
257 /* Scan every physical block, skip CIS block */ 257 /* Scan every physical block, skip CIS block */
258 for (phys_block = ssfdc->cis_block + 1; phys_block < ssfdc->map_len; 258 for (phys_block = ssfdc->cis_block + 1; phys_block < ssfdc->map_len;
@@ -329,21 +329,21 @@ static void ssfdcr_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
329 /* Set geometry */ 329 /* Set geometry */
330 ssfdc->heads = 16; 330 ssfdc->heads = 16;
331 ssfdc->sectors = 32; 331 ssfdc->sectors = 32;
332 get_chs( mtd->size, NULL, &ssfdc->heads, &ssfdc->sectors); 332 get_chs(mtd->size, NULL, &ssfdc->heads, &ssfdc->sectors);
333 ssfdc->cylinders = (unsigned short)((mtd->size >> SECTOR_SHIFT) / 333 ssfdc->cylinders = (unsigned short)((mtd->size >> SECTOR_SHIFT) /
334 ((long)ssfdc->sectors * (long)ssfdc->heads)); 334 ((long)ssfdc->sectors * (long)ssfdc->heads));
335 335
336 DEBUG(MTD_DEBUG_LEVEL1, "SSFDC_RO: using C:%d H:%d S:%d == %ld sects\n", 336 DEBUG(MTD_DEBUG_LEVEL1, "SSFDC_RO: using C:%d H:%d S:%d == %ld sects\n",
337 ssfdc->cylinders, ssfdc->heads , ssfdc->sectors, 337 ssfdc->cylinders, ssfdc->heads , ssfdc->sectors,
338 (long)ssfdc->cylinders * (long)ssfdc->heads * 338 (long)ssfdc->cylinders * (long)ssfdc->heads *
339 (long)ssfdc->sectors ); 339 (long)ssfdc->sectors);
340 340
341 ssfdc->mbd.size = (long)ssfdc->heads * (long)ssfdc->cylinders * 341 ssfdc->mbd.size = (long)ssfdc->heads * (long)ssfdc->cylinders *
342 (long)ssfdc->sectors; 342 (long)ssfdc->sectors;
343 343
344 /* Allocate logical block map */ 344 /* Allocate logical block map */
345 ssfdc->logic_block_map = kmalloc( sizeof(ssfdc->logic_block_map[0]) * 345 ssfdc->logic_block_map = kmalloc(sizeof(ssfdc->logic_block_map[0]) *
346 ssfdc->map_len, GFP_KERNEL); 346 ssfdc->map_len, GFP_KERNEL);
347 if (!ssfdc->logic_block_map) { 347 if (!ssfdc->logic_block_map) {
348 printk(KERN_WARNING 348 printk(KERN_WARNING
349 "SSFDC_RO: out of memory for data structures\n"); 349 "SSFDC_RO: out of memory for data structures\n");
@@ -414,7 +414,7 @@ static int ssfdcr_readsect(struct mtd_blktrans_dev *dev,
414 "SSFDC_RO: ssfdcr_readsect() phys_sect_no=%lu\n", 414 "SSFDC_RO: ssfdcr_readsect() phys_sect_no=%lu\n",
415 sect_no); 415 sect_no);
416 416
417 if (read_physical_sector( ssfdc->mbd.mtd, buf, sect_no ) < 0) 417 if (read_physical_sector(ssfdc->mbd.mtd, buf, sect_no) < 0)
418 return -EIO; 418 return -EIO;
419 } else { 419 } else {
420 memset(buf, 0xff, SECTOR_SIZE); 420 memset(buf, 0xff, SECTOR_SIZE);