summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorArseniy Krasnov <AVKrasnov@sberdevices.ru>2023-07-28 12:38:10 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2023-07-28 14:32:31 +0200
commit4622daf4b5c89cd6a689910c523b8185b8a20338 (patch)
tree18e691a6335877f808437b1a106ecff6578a5da0 /drivers/mtd
parente2532429312d089cf0d13bcb411433d85aef98f0 (diff)
mtd: rawnand: meson: fix build error
Fixes the following build error: drivers/mtd/nand/raw/meson_nand.c:244:59: error: initializer element is not a compile-time constant static const struct nand_ecc_step_info axg_stepinfo[] = { axg_stepinfo_1024, axg_stepinfo_512 }; ^~~~~~~~~~~~~~~~~ Fixes: 0e1db39336d8 ("mtd: rawnand: meson: support for 512B ECC step size") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202307281007.MMuVjmJ9-lkp@intel.com/ Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230728093810.2985324-1-AVKrasnov@sberdevices.ru
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/raw/meson_nand.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c
index 9bdea97abe4c..04c3fdf713e7 100644
--- a/drivers/mtd/nand/raw/meson_nand.c
+++ b/drivers/mtd/nand/raw/meson_nand.c
@@ -229,20 +229,20 @@ NAND_ECC_CAPS_SINGLE(meson_gxl_ecc_caps,
meson_nand_calc_ecc_bytes, 1024, 8, 24, 30, 40, 50, 60);
static const int axg_stepinfo_strengths[] = { 8 };
-static const struct nand_ecc_step_info axg_stepinfo_1024 = {
- .stepsize = 1024,
- .strengths = axg_stepinfo_strengths,
- .nstrengths = ARRAY_SIZE(axg_stepinfo_strengths)
-};
-static const struct nand_ecc_step_info axg_stepinfo_512 = {
- .stepsize = 512,
- .strengths = axg_stepinfo_strengths,
- .nstrengths = ARRAY_SIZE(axg_stepinfo_strengths)
+static const struct nand_ecc_step_info axg_stepinfo[] = {
+ {
+ .stepsize = 1024,
+ .strengths = axg_stepinfo_strengths,
+ .nstrengths = ARRAY_SIZE(axg_stepinfo_strengths)
+ },
+ {
+ .stepsize = 512,
+ .strengths = axg_stepinfo_strengths,
+ .nstrengths = ARRAY_SIZE(axg_stepinfo_strengths)
+ },
};
-static const struct nand_ecc_step_info axg_stepinfo[] = { axg_stepinfo_1024, axg_stepinfo_512 };
-
static const struct nand_ecc_caps meson_axg_ecc_caps = {
.stepinfos = axg_stepinfo,
.nstepinfos = ARRAY_SIZE(axg_stepinfo),