diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2012-09-03 17:00:01 +0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-09-29 18:34:30 +0400 |
commit | 1749c00ffc909db4ebf1b2f17fd52cdb6e7b149c (patch) | |
tree | 2a4aa7b96f2aa66718500c7e96e734092864d000 /drivers/mtd/tests/mtd_pagetest.c | |
parent | c5b8384abc11fd566a3633b7bd7d476ff04c31af (diff) | |
download | linux-1749c00ffc909db4ebf1b2f17fd52cdb6e7b149c.tar.xz |
mtd: mtd_nandecctest: ensure alignment requirement for bitops
Currently the data blocks which is used to test single bit error
correction is allocated statically and injecting single bit error is
implemented by using __change_bit() which must operate on the memory
aligned to the size of an "unsigned long". But there is no such
guarantee for statically allocated array.
This fix the issue by allocating the data block dynamically by
kmalloc(). It also allocate the ecc code dynamically instead of
allocating statically on stack.
The reason to allocate the ecc code dynamically is that later change
will add tests which inject bit errors into the ecc code by bitops.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/tests/mtd_pagetest.c')
0 files changed, 0 insertions, 0 deletions