Skip to content

Commit 4622daf

Browse files
Arseniy Krasnovmiquelraynal
authored andcommitted
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: 0e1db39 ("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
1 parent e253242 commit 4622daf

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

drivers/mtd/nand/raw/meson_nand.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -229,20 +229,20 @@ NAND_ECC_CAPS_SINGLE(meson_gxl_ecc_caps,
229229
meson_nand_calc_ecc_bytes, 1024, 8, 24, 30, 40, 50, 60);
230230

231231
static const int axg_stepinfo_strengths[] = { 8 };
232-
static const struct nand_ecc_step_info axg_stepinfo_1024 = {
233-
.stepsize = 1024,
234-
.strengths = axg_stepinfo_strengths,
235-
.nstrengths = ARRAY_SIZE(axg_stepinfo_strengths)
236-
};
237232

238-
static const struct nand_ecc_step_info axg_stepinfo_512 = {
239-
.stepsize = 512,
240-
.strengths = axg_stepinfo_strengths,
241-
.nstrengths = ARRAY_SIZE(axg_stepinfo_strengths)
233+
static const struct nand_ecc_step_info axg_stepinfo[] = {
234+
{
235+
.stepsize = 1024,
236+
.strengths = axg_stepinfo_strengths,
237+
.nstrengths = ARRAY_SIZE(axg_stepinfo_strengths)
238+
},
239+
{
240+
.stepsize = 512,
241+
.strengths = axg_stepinfo_strengths,
242+
.nstrengths = ARRAY_SIZE(axg_stepinfo_strengths)
243+
},
242244
};
243245

244-
static const struct nand_ecc_step_info axg_stepinfo[] = { axg_stepinfo_1024, axg_stepinfo_512 };
245-
246246
static const struct nand_ecc_caps meson_axg_ecc_caps = {
247247
.stepinfos = axg_stepinfo,
248248
.nstepinfos = ARRAY_SIZE(axg_stepinfo),

0 commit comments

Comments
 (0)