kernel_optimize_test/drivers/mtd
Julia Lawall 70ec3bb8ea mtd: Use BLOCK_NIL consistently in NFTL/INFTL
Use BLOCK_NIL consistently rather than sometimes 0xffff and sometimes
BLOCK_NIL.

The semantic patch that finds this issue is below
(http://www.emn.fr/x-info/coccinelle/).  On the other hand, the changes
were made by hand, in part because drivers/mtd/inftlcore.c contains dead
code that causes spatch to ignore a relevant function.  Specifically, the
function INFTL_findwriteunit contains a do-while loop, but always takes a
return that leaves the loop on the first iteration.

// <smpl>
@r exists@
identifier f,C;
@@

f(...) { ... return C; }

@s@
identifier r.C;
expression E;
@@

@@
identifier r.f,r.C,I;
expression s.E;
@@

f(...) {
 <...
(
  I
|
- E
+ C
)
 ...>
}

// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-06-27 09:22:10 +01:00
..
chips mtd: CFI 1.0 and CFI 1.1 2009-06-05 17:55:10 +01:00
devices mtd: m25p80 timeout too short for worst-case m25p16 devices 2009-06-26 18:15:21 +01:00
lpddr
maps mtd: maps: Remove BUS_ID_SIZE from integrator_flash 2009-06-24 16:02:06 +01:00
nand mtd: atmel_nand: Fix typo s/parititions/partitions/ 2009-06-25 08:18:36 +01:00
onenand Merge git://git.infradead.org/mtd-2.6 2009-06-22 16:56:22 -07:00
tests
ubi UBI: add reboot notifier 2009-06-10 16:50:50 +03:00
afs.c
ar7part.c
cmdlinepart.c mtd: cmdlineparts: Use 64-bit format when printing a debug message. 2009-06-25 08:18:12 +01:00
ftl.c
inftlcore.c mtd: Use BLOCK_NIL consistently in NFTL/INFTL 2009-06-27 09:22:10 +01:00
inftlmount.c
internal.h
Kconfig trivial: mtd: fix Kconfig comment about 'armflash' 2009-06-12 18:01:45 +02:00
Makefile
mtd_blkdevs.c Merge git://git.infradead.org/mtd-2.6 2009-06-22 16:56:22 -07:00
mtdbdi.c
mtdblock_ro.c
mtdblock.c
mtdchar.c mtd: Fix pointer handling in compat ioctls to use compat_ptr() 2009-05-29 16:09:08 +01:00
mtdconcat.c
mtdcore.c [MTD] Restore suspend/resume support for mtd devices 2009-05-26 16:45:43 +01:00
mtdcore.h
mtdoops.c
mtdpart.c [MTD] Remove option for add_mtd_partitions() to not register partitions. 2009-05-26 16:45:44 +01:00
mtdsuper.c
nftlcore.c mtd: Use BLOCK_NIL consistently in NFTL/INFTL 2009-06-27 09:22:10 +01:00
nftlmount.c
ofpart.c
redboot.c
rfd_ftl.c
ssfdc.c