diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-12-03 15:32:21 +0200 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-01-26 10:14:23 +0200 |
commit | 2fff570e7c8f97e411cd852d64b77b92d9ab8da9 (patch) | |
tree | 4f5ad38da8a911a887422c9ecef97644cf8e07d9 /drivers/mtd/ubi | |
parent | e8cfe009436f9ab6f4234e1f7c406c231747925c (diff) | |
download | op-kernel-dev-2fff570e7c8f97e411cd852d64b77b92d9ab8da9.zip op-kernel-dev-2fff570e7c8f97e411cd852d64b77b92d9ab8da9.tar.gz |
UBI: add a commentary about allocating VID header buffer on stack
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r-- | drivers/mtd/ubi/io.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index 668d240..65915a6 100644 --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c @@ -480,6 +480,13 @@ static int nor_erase_prepare(struct ubi_device *ubi, int pnum) size_t written; loff_t addr; uint32_t data = 0; + /* + * Note, we cannot generally define VID header buffers on stack, + * because of the way we deal with these buffers (see the header + * comment in this file). But we know this is a NOR-specific piece of + * code, so we can do this. But yes, this is error-prone and we should + * (pre-)allocate VID header buffer instead. + */ struct ubi_vid_hdr vid_hdr; /* |