projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8cfe00
)
UBI: add a commentary about allocating VID header buffer on stack
author
Artem Bityutskiy
<Artem.Bityutskiy@nokia.com>
Fri, 3 Dec 2010 13:32:21 +0000
(15:32 +0200)
committer
Artem Bityutskiy
<Artem.Bityutskiy@nokia.com>
Wed, 26 Jan 2011 08:14:23 +0000
(10:14 +0200)
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/ubi/io.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/ubi/io.c
b/drivers/mtd/ubi/io.c
index 668d24005106ceb05452cb09021723d101fcb5ce..65915a649861b9664bde93b0020fe13b563c9791 100644
(file)
--- 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;
/*