diff options
| author | Rosen Penev <rosenp@gmail.com> | 2026-03-05 14:44:10 -0800 |
|---|---|---|
| committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2026-03-11 16:23:57 +0100 |
| commit | e19eaffc5213fdd6179e849d3032929fae0d8c2c (patch) | |
| tree | 2ef7eb7081bbe661bf7528ee357166192ec0e75f /include/linux | |
| parent | c685e6e8d88d544e8c4429b06c3e6795cbba32dd (diff) | |
mtd: concat: replace alloc + calloc with 1 alloc
A flex array can be used to reduce the allocation to 1.
And actually mtdconcat was using the pointer + 1 trick to point to the
overallocated area. Better alternatives exist.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mtd/concat.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/mtd/concat.h b/include/linux/mtd/concat.h index 2cd9d48958a8..f8d4d6ac1fc1 100644 --- a/include/linux/mtd/concat.h +++ b/include/linux/mtd/concat.h @@ -18,7 +18,7 @@ struct mtd_concat { struct mtd_info mtd; int num_subdev; - struct mtd_info **subdev; + struct mtd_info *subdev[]; }; struct mtd_info *mtd_concat_create( |
