* Re: Build regressions/improvements in v6.4-rc1 [not found] ` <20230508115727.2597864-1-geert@linux-m68k.org> @ 2023-05-08 12:14 ` Geert Uytterhoeven 2023-05-08 15:19 ` Pratyush Yadav ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: Geert Uytterhoeven @ 2023-05-08 12:14 UTC (permalink / raw) To: linux-kernel Cc: Mauro Carvalho Chehab, Laurent Pinchart, Tudor Ambarus, Pratyush Yadav, Richard Weinberger, Anton Ivanov, Johannes Berg, Darrick J. Wong, Chun-Kuang Hu, Philipp Zabel, David S. Miller, linux-um, linux-media, linux-mtd, linux-xfs, linux-mediatek, linux-phy, sparclinux On Mon, 8 May 2023, Geert Uytterhoeven wrote: > Below is the list of build error/warning regressions/improvements in > v6.4-rc1[1] compared to v6.3[2]. > > Summarized: > - build errors: +9/-16 > - build warnings: +1/-1439 > > Happy fixing! ;-) > > Thanks to the linux-next team for providing the build service. > > [1] http://kisskb.ellerman.id.au/kisskb/branch/linus/head/ac9a78681b921877518763ba0e89202254349d1b/ (all 152 configs) > [2] http://kisskb.ellerman.id.au/kisskb/branch/linus/head/457391b0380335d5e9a5babdec90ac53928b23b4/ (all 152 configs) > > > *** ERRORS *** > > 9 error regressions: > + /kisskb/src/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c: error: 'mxc_isi_pm_resume' defined but not used [-Werror=unused-function]: => 328:12 > + /kisskb/src/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c: error: 'mxc_isi_pm_suspend' defined but not used [-Werror=unused-function]: => 314:12 sparc64-gcc{5,11}/sparc-allmodconfig (fix was available before the merge window) > + /kisskb/src/drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c: error: "CONFIG_ARCH_DMA_ADDR_T_64BIT" is not defined [-Werror=undef]: => 66:5, 33:5, 51:5 > + /kisskb/src/drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c: error: "CONFIG_ARCH_DMA_ADDR_T_64BIT" is not defined, evaluates to 0 [-Werror=undef]: => 51:5, 66:5, 33:5 mips-gcc{8,11}/mips-allmodconfig xtensa-gcc11/xtensa-allmodconfig powerpc-gcc5/ppc32_allmodconfig (fix was available before the merge window) > + /kisskb/src/drivers/mtd/spi-nor/spansion.c: error: 'op' is used uninitialized [-Werror=uninitialized]: => 495:27, 364:27 um-x86_64-gcc12/um-allyesconfig > + /kisskb/src/fs/xfs/scrub/scrub.h: error: initializer element is not constant: => 112:28 powerpc-gcc5/ppc64_book3e_allmodconfig powerpc-gcc5/powerpc-allmodconfig powerpc-gcc5/ppc32_allmodconfig powerpc-gcc5/powerpc-allyesconfig powerpc-gcc5/ppc64le_allmodconfig arm64-gcc5/arm64-allmodconfig (fix sent) > + error: modpost: "__floatunsidf" [drivers/phy/mediatek/phy-mtk-hdmi-drv.ko] undefined!: => N/A > + error: modpost: "__gedf2" [drivers/phy/mediatek/phy-mtk-hdmi-drv.ko] undefined!: => N/A > + error: modpost: "__ltdf2" [drivers/phy/mediatek/phy-mtk-hdmi-drv.ko] undefined!: => N/A sparc64-gcc5/sparc64-allmodconfig Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Build regressions/improvements in v6.4-rc1 2023-05-08 12:14 ` Build regressions/improvements in v6.4-rc1 Geert Uytterhoeven @ 2023-05-08 15:19 ` Pratyush Yadav 2023-05-08 15:32 ` Geert Uytterhoeven 2023-05-08 15:46 ` Raghavendra, Vignesh 2023-05-09 19:25 ` [PATCH 1/2] mtd: spi-nor: spansion: make sure local struct does not contain garbage Tudor Ambarus 2023-05-09 19:39 ` [PATCH v2] " Tudor Ambarus 2 siblings, 2 replies; 10+ messages in thread From: Pratyush Yadav @ 2023-05-08 15:19 UTC (permalink / raw) To: Geert Uytterhoeven Cc: linux-kernel, Mauro Carvalho Chehab, Laurent Pinchart, Tudor Ambarus, Pratyush Yadav, Richard Weinberger, Anton Ivanov, Johannes Berg, Darrick J. Wong, Chun-Kuang Hu, Philipp Zabel, David S. Miller, linux-um, linux-media, linux-mtd, linux-xfs, linux-mediatek, linux-phy, sparclinux On Mon, May 08 2023, Geert Uytterhoeven wrote: > On Mon, 8 May 2023, Geert Uytterhoeven wrote: >> Below is the list of build error/warning regressions/improvements in >> v6.4-rc1[1] compared to v6.3[2]. >> >> Summarized: >> - build errors: +9/-16 >> - build warnings: +1/-1439 >> >> Happy fixing! ;-) >> >> Thanks to the linux-next team for providing the build service. >> >> [1] http://kisskb.ellerman.id.au/kisskb/branch/linus/head/ac9a78681b921877518763ba0e89202254349d1b/ (all 152 configs) >> [2] http://kisskb.ellerman.id.au/kisskb/branch/linus/head/457391b0380335d5e9a5babdec90ac53928b23b4/ (all 152 configs) >> >> [...] > >> + /kisskb/src/drivers/mtd/spi-nor/spansion.c: error: 'op' is used uninitialized [-Werror=uninitialized]: => 495:27, 364:27 Hmm, I don't get why we get this warning. Line 495 is in s25fs256t_post_bfpt_fixup(). It declares 'op' and then it does op = (struct spi_mem_op) CYPRESS_NOR_RD_ANY_REG_OP(nor->params->addr_mode_nbytes, SPINOR_REG_CYPRESS_ARCFN, 1, nor->bouncebuf); ret = spi_nor_read_any_reg(nor, &op, nor->reg_proto); which initializes 'op' before using it. Same with line 364 which is in the function cypress_nor_set_addr_mode_nbytes(). Even the compiler warnings [0] don't seem to make much sense to me: /kisskb/src/drivers/mtd/spi-nor/spansion.c: In function 's25fs256t_post_bfpt_fixup': /kisskb/src/drivers/mtd/spi-nor/spansion.c:495:27: error: 'op' is used uninitialized [-Werror=uninitialized] 495 | struct spi_mem_op op; | ^~ /kisskb/src/drivers/mtd/spi-nor/spansion.c:495:27: note: 'op' declared here 495 | struct spi_mem_op op; | ^~ [0] http://kisskb.ellerman.id.au/kisskb/buildresult/14922057/ > > um-x86_64-gcc12/um-allyesconfig > [...] -- Regards, Pratyush Yadav ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Build regressions/improvements in v6.4-rc1 2023-05-08 15:19 ` Pratyush Yadav @ 2023-05-08 15:32 ` Geert Uytterhoeven 2023-05-08 15:46 ` Raghavendra, Vignesh 1 sibling, 0 replies; 10+ messages in thread From: Geert Uytterhoeven @ 2023-05-08 15:32 UTC (permalink / raw) To: Pratyush Yadav Cc: linux-kernel, Mauro Carvalho Chehab, Laurent Pinchart, Tudor Ambarus, Richard Weinberger, Anton Ivanov, Johannes Berg, Darrick J. Wong, Chun-Kuang Hu, Philipp Zabel, David S. Miller, linux-um, linux-media, linux-mtd, linux-xfs, linux-mediatek, linux-phy, sparclinux Hi Pratyush, On Mon, May 8, 2023 at 5:19 PM Pratyush Yadav <pratyush@kernel.org> wrote: > On Mon, May 08 2023, Geert Uytterhoeven wrote: > > On Mon, 8 May 2023, Geert Uytterhoeven wrote: > >> Below is the list of build error/warning regressions/improvements in > >> v6.4-rc1[1] compared to v6.3[2]. > >> > >> Summarized: > >> - build errors: +9/-16 > >> - build warnings: +1/-1439 > >> > >> Happy fixing! ;-) > >> > >> Thanks to the linux-next team for providing the build service. > >> > >> [1] http://kisskb.ellerman.id.au/kisskb/branch/linus/head/ac9a78681b921877518763ba0e89202254349d1b/ (all 152 configs) > >> [2] http://kisskb.ellerman.id.au/kisskb/branch/linus/head/457391b0380335d5e9a5babdec90ac53928b23b4/ (all 152 configs) > >> > >> > [...] > > > >> + /kisskb/src/drivers/mtd/spi-nor/spansion.c: error: 'op' is used uninitialized [-Werror=uninitialized]: => 495:27, 364:27 > > Hmm, I don't get why we get this warning. Line 495 is in > s25fs256t_post_bfpt_fixup(). It declares 'op' and then it does > > op = (struct spi_mem_op) > CYPRESS_NOR_RD_ANY_REG_OP(nor->params->addr_mode_nbytes, > SPINOR_REG_CYPRESS_ARCFN, 1, > nor->bouncebuf); > ret = spi_nor_read_any_reg(nor, &op, nor->reg_proto); > > > which initializes 'op' before using it. Same with line 364 which is in > the function cypress_nor_set_addr_mode_nbytes(). I suspect gcc-12 became stricter, and not all members of the union are initialized. > Even the compiler warnings [0] don't seem to make much sense to me: > > /kisskb/src/drivers/mtd/spi-nor/spansion.c: In function 's25fs256t_post_bfpt_fixup': > /kisskb/src/drivers/mtd/spi-nor/spansion.c:495:27: error: 'op' is used uninitialized [-Werror=uninitialized] > 495 | struct spi_mem_op op; > | ^~ > /kisskb/src/drivers/mtd/spi-nor/spansion.c:495:27: note: 'op' declared here > 495 | struct spi_mem_op op; > | ^~ > > [0] http://kisskb.ellerman.id.au/kisskb/buildresult/14922057/ Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Build regressions/improvements in v6.4-rc1 2023-05-08 15:19 ` Pratyush Yadav 2023-05-08 15:32 ` Geert Uytterhoeven @ 2023-05-08 15:46 ` Raghavendra, Vignesh 1 sibling, 0 replies; 10+ messages in thread From: Raghavendra, Vignesh @ 2023-05-08 15:46 UTC (permalink / raw) To: Pratyush Yadav, Geert Uytterhoeven Cc: linux-kernel, Mauro Carvalho Chehab, Laurent Pinchart, Tudor Ambarus, Richard Weinberger, Anton Ivanov, Johannes Berg, Darrick J. Wong, Chun-Kuang Hu, Philipp Zabel, David S. Miller, linux-um, linux-media, linux-mtd, linux-xfs, linux-mediatek, linux-phy, sparclinux On 5/8/2023 8:49 PM, Pratyush Yadav wrote: > On Mon, May 08 2023, Geert Uytterhoeven wrote: > >> On Mon, 8 May 2023, Geert Uytterhoeven wrote: >>> Below is the list of build error/warning regressions/improvements in >>> v6.4-rc1[1] compared to v6.3[2]. >>> >>> Summarized: >>> - build errors: +9/-16 >>> - build warnings: +1/-1439 >>> >>> Happy fixing! ;-) >>> >>> Thanks to the linux-next team for providing the build service. >>> >>> [1] http://kisskb.ellerman.id.au/kisskb/branch/linus/head/ac9a78681b921877518763ba0e89202254349d1b/ (all 152 configs) >>> [2] http://kisskb.ellerman.id.au/kisskb/branch/linus/head/457391b0380335d5e9a5babdec90ac53928b23b4/ (all 152 configs) >>> >>> > [...] >> >>> + /kisskb/src/drivers/mtd/spi-nor/spansion.c: error: 'op' is used uninitialized [-Werror=uninitialized]: => 495:27, 364:27 > > Hmm, I don't get why we get this warning. Line 495 is in > s25fs256t_post_bfpt_fixup(). It declares 'op' and then it does > > op = (struct spi_mem_op) > CYPRESS_NOR_RD_ANY_REG_OP(nor->params->addr_mode_nbytes, > SPINOR_REG_CYPRESS_ARCFN, 1, > nor->bouncebuf); > ret = spi_nor_read_any_reg(nor, &op, nor->reg_proto); > Not all the fields of struct get initialized if you assign later on in the function vs at the time of declaration... For example cmd.dtr isn't explicitly set to any value here and may have garbage? > > which initializes 'op' before using it. Same with line 364 which is in > the function cypress_nor_set_addr_mode_nbytes(). > > Even the compiler warnings [0] don't seem to make much sense to me: > > /kisskb/src/drivers/mtd/spi-nor/spansion.c: In function 's25fs256t_post_bfpt_fixup': > /kisskb/src/drivers/mtd/spi-nor/spansion.c:495:27: error: 'op' is used uninitialized [-Werror=uninitialized] > 495 | struct spi_mem_op op; > | ^~ > /kisskb/src/drivers/mtd/spi-nor/spansion.c:495:27: note: 'op' declared here > 495 | struct spi_mem_op op; > | ^~ > > [0] http://kisskb.ellerman.id.au/kisskb/buildresult/14922057/ > >> >> um-x86_64-gcc12/um-allyesconfig >> > [...] > ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] mtd: spi-nor: spansion: make sure local struct does not contain garbage 2023-05-08 12:14 ` Build regressions/improvements in v6.4-rc1 Geert Uytterhoeven 2023-05-08 15:19 ` Pratyush Yadav @ 2023-05-09 19:25 ` Tudor Ambarus 2023-05-09 19:25 ` [PATCH 2/2] " Tudor Ambarus 2023-05-09 19:39 ` [PATCH v2] " Tudor Ambarus 2 siblings, 1 reply; 10+ messages in thread From: Tudor Ambarus @ 2023-05-09 19:25 UTC (permalink / raw) To: miquel.raynal Cc: pratyush, michael, richard, vigneshr, Takahiro.Kuwano, linux-mtd, linux-kernel, geert, Tudor Ambarus Following error was seen with um-x86_64-gcc12/um-allyesconfig: + /kisskb/src/drivers/mtd/spi-nor/spansion.c: error: 'op' is used uninitialized [-Werror=uninitialized]: => 495:27, 364:27 Initialise local struct spi_mem_op with all zeros at declaration in order to avoid using garbage data for fields that are not explicitly set afterwards. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Fixes: c87c9b11c53ce ("mtd: spi-nor: spansion: Determine current address mode") Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org> --- drivers/mtd/spi-nor/spansion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c index 15f9a80c10b9..d44ffaac1dba 100644 --- a/drivers/mtd/spi-nor/spansion.c +++ b/drivers/mtd/spi-nor/spansion.c @@ -361,7 +361,7 @@ static int cypress_nor_determine_addr_mode_by_sr1(struct spi_nor *nor, */ static int cypress_nor_set_addr_mode_nbytes(struct spi_nor *nor) { - struct spi_mem_op op; + struct spi_mem_op op = {}; u8 addr_mode; int ret; -- 2.40.1.521.gf1e218fcd8-goog ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/2] mtd: spi-nor: spansion: make sure local struct does not contain garbage 2023-05-09 19:25 ` [PATCH 1/2] mtd: spi-nor: spansion: make sure local struct does not contain garbage Tudor Ambarus @ 2023-05-09 19:25 ` Tudor Ambarus 2023-05-09 19:30 ` Tudor Ambarus 0 siblings, 1 reply; 10+ messages in thread From: Tudor Ambarus @ 2023-05-09 19:25 UTC (permalink / raw) To: miquel.raynal Cc: pratyush, michael, richard, vigneshr, Takahiro.Kuwano, linux-mtd, linux-kernel, geert, Tudor Ambarus Following error was seen with um-x86_64-gcc12/um-allyesconfig: + /kisskb/src/drivers/mtd/spi-nor/spansion.c: error: 'op' is used uninitialized [-Werror=uninitialized]: => 495:27, 364:27 Set the spi_mem_op fields at the time of declaration so that all uninitialized members be initialized to default value. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Fixes: 6afcc84080c41 ("mtd: spi-nor: spansion: Add support for Infineon S25FS256T") Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org> --- drivers/mtd/spi-nor/spansion.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c index d44ffaac1dba..257d05ed4146 100644 --- a/drivers/mtd/spi-nor/spansion.c +++ b/drivers/mtd/spi-nor/spansion.c @@ -492,7 +492,10 @@ s25fs256t_post_bfpt_fixup(struct spi_nor *nor, const struct sfdp_parameter_header *bfpt_header, const struct sfdp_bfpt *bfpt) { - struct spi_mem_op op; + struct spi_mem_op op = + CYPRESS_NOR_RD_ANY_REG_OP(nor->params->addr_mode_nbytes, + SPINOR_REG_CYPRESS_ARCFN, 1, + nor->bouncebuf); int ret; ret = cypress_nor_set_addr_mode_nbytes(nor); @@ -500,10 +503,6 @@ s25fs256t_post_bfpt_fixup(struct spi_nor *nor, return ret; /* Read Architecture Configuration Register (ARCFN) */ - op = (struct spi_mem_op) - CYPRESS_NOR_RD_ANY_REG_OP(nor->params->addr_mode_nbytes, - SPINOR_REG_CYPRESS_ARCFN, 1, - nor->bouncebuf); ret = spi_nor_read_any_reg(nor, &op, nor->reg_proto); if (ret) return ret; -- 2.40.1.521.gf1e218fcd8-goog ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] mtd: spi-nor: spansion: make sure local struct does not contain garbage 2023-05-09 19:25 ` [PATCH 2/2] " Tudor Ambarus @ 2023-05-09 19:30 ` Tudor Ambarus 0 siblings, 0 replies; 10+ messages in thread From: Tudor Ambarus @ 2023-05-09 19:30 UTC (permalink / raw) To: miquel.raynal Cc: pratyush, michael, richard, vigneshr, Takahiro.Kuwano, linux-mtd, linux-kernel, geert On 5/9/23 20:25, Tudor Ambarus wrote: > Following error was seen with um-x86_64-gcc12/um-allyesconfig: > + /kisskb/src/drivers/mtd/spi-nor/spansion.c: error: 'op' is used uninitialized [-Werror=uninitialized]: => 495:27, 364:27 > > Set the spi_mem_op fields at the time of declaration so that all > uninitialized members be initialized to default value. > > Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> > Fixes: 6afcc84080c41 ("mtd: spi-nor: spansion: Add support for Infineon S25FS256T") > Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org> > --- > drivers/mtd/spi-nor/spansion.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c > index d44ffaac1dba..257d05ed4146 100644 > --- a/drivers/mtd/spi-nor/spansion.c > +++ b/drivers/mtd/spi-nor/spansion.c > @@ -492,7 +492,10 @@ s25fs256t_post_bfpt_fixup(struct spi_nor *nor, > const struct sfdp_parameter_header *bfpt_header, > const struct sfdp_bfpt *bfpt) > { > - struct spi_mem_op op; > + struct spi_mem_op op = > + CYPRESS_NOR_RD_ANY_REG_OP(nor->params->addr_mode_nbytes, > + SPINOR_REG_CYPRESS_ARCFN, 1, > + nor->bouncebuf); > int ret; > oops, this is wrong as addr_mode_nbytes is updated just below in cypress_nor_set_addr_mode_nbytes(), so the fix is to init op with {} at declaration, as in the previous patch. > ret = cypress_nor_set_addr_mode_nbytes(nor); > @@ -500,10 +503,6 @@ s25fs256t_post_bfpt_fixup(struct spi_nor *nor, > return ret; > > /* Read Architecture Configuration Register (ARCFN) */ > - op = (struct spi_mem_op) > - CYPRESS_NOR_RD_ANY_REG_OP(nor->params->addr_mode_nbytes, > - SPINOR_REG_CYPRESS_ARCFN, 1, > - nor->bouncebuf); > ret = spi_nor_read_any_reg(nor, &op, nor->reg_proto); > if (ret) > return ret; ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] mtd: spi-nor: spansion: make sure local struct does not contain garbage 2023-05-08 12:14 ` Build regressions/improvements in v6.4-rc1 Geert Uytterhoeven 2023-05-08 15:19 ` Pratyush Yadav 2023-05-09 19:25 ` [PATCH 1/2] mtd: spi-nor: spansion: make sure local struct does not contain garbage Tudor Ambarus @ 2023-05-09 19:39 ` Tudor Ambarus 2023-05-17 7:17 ` Tudor Ambarus 2023-05-22 15:58 ` Miquel Raynal 2 siblings, 2 replies; 10+ messages in thread From: Tudor Ambarus @ 2023-05-09 19:39 UTC (permalink / raw) To: miquel.raynal Cc: pratyush, michael, richard, vigneshr, Takahiro.Kuwano, linux-mtd, linux-kernel, geert, Tudor Ambarus Following errors were seen with um-x86_64-gcc12/um-allyesconfig: + /kisskb/src/drivers/mtd/spi-nor/spansion.c: error: 'op' is used uninitialized [-Werror=uninitialized]: => 495:27, 364:27 Initialise local struct spi_mem_op with all zeros at declaration in order to avoid using garbage data for fields that are not explicitly set afterwards. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Fixes: c87c9b11c53ce ("mtd: spi-nor: spansion: Determine current address mode") Fixes: 6afcc84080c41 ("mtd: spi-nor: spansion: Add support for Infineon S25FS256T") Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org> --- v2: - init both local vars with all zeros at declaration - squash patches as the blamed commits were just introduced in this merge window. drivers/mtd/spi-nor/spansion.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c index 15f9a80c10b9..36876aa849ed 100644 --- a/drivers/mtd/spi-nor/spansion.c +++ b/drivers/mtd/spi-nor/spansion.c @@ -361,7 +361,7 @@ static int cypress_nor_determine_addr_mode_by_sr1(struct spi_nor *nor, */ static int cypress_nor_set_addr_mode_nbytes(struct spi_nor *nor) { - struct spi_mem_op op; + struct spi_mem_op op = {}; u8 addr_mode; int ret; @@ -492,7 +492,7 @@ s25fs256t_post_bfpt_fixup(struct spi_nor *nor, const struct sfdp_parameter_header *bfpt_header, const struct sfdp_bfpt *bfpt) { - struct spi_mem_op op; + struct spi_mem_op op = {}; int ret; ret = cypress_nor_set_addr_mode_nbytes(nor); -- 2.40.1.521.gf1e218fcd8-goog ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2] mtd: spi-nor: spansion: make sure local struct does not contain garbage 2023-05-09 19:39 ` [PATCH v2] " Tudor Ambarus @ 2023-05-17 7:17 ` Tudor Ambarus 2023-05-22 15:58 ` Miquel Raynal 1 sibling, 0 replies; 10+ messages in thread From: Tudor Ambarus @ 2023-05-17 7:17 UTC (permalink / raw) To: miquel.raynal Cc: pratyush, michael, richard, vigneshr, Takahiro.Kuwano, linux-mtd, linux-kernel, geert Miquel, please consider this fix for -rc3. cheers, ta On 5/9/23 20:39, Tudor Ambarus wrote: > Following errors were seen with um-x86_64-gcc12/um-allyesconfig: > + /kisskb/src/drivers/mtd/spi-nor/spansion.c: error: 'op' is used uninitialized [-Werror=uninitialized]: => 495:27, 364:27 > > Initialise local struct spi_mem_op with all zeros at declaration in > order to avoid using garbage data for fields that are not explicitly > set afterwards. > > Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> > Fixes: c87c9b11c53ce ("mtd: spi-nor: spansion: Determine current address mode") > Fixes: 6afcc84080c41 ("mtd: spi-nor: spansion: Add support for Infineon S25FS256T") > Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org> > --- > v2: > - init both local vars with all zeros at declaration > - squash patches as the blamed commits were just introduced in this > merge window. > > drivers/mtd/spi-nor/spansion.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c > index 15f9a80c10b9..36876aa849ed 100644 > --- a/drivers/mtd/spi-nor/spansion.c > +++ b/drivers/mtd/spi-nor/spansion.c > @@ -361,7 +361,7 @@ static int cypress_nor_determine_addr_mode_by_sr1(struct spi_nor *nor, > */ > static int cypress_nor_set_addr_mode_nbytes(struct spi_nor *nor) > { > - struct spi_mem_op op; > + struct spi_mem_op op = {}; > u8 addr_mode; > int ret; > > @@ -492,7 +492,7 @@ s25fs256t_post_bfpt_fixup(struct spi_nor *nor, > const struct sfdp_parameter_header *bfpt_header, > const struct sfdp_bfpt *bfpt) > { > - struct spi_mem_op op; > + struct spi_mem_op op = {}; > int ret; > > ret = cypress_nor_set_addr_mode_nbytes(nor); ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] mtd: spi-nor: spansion: make sure local struct does not contain garbage 2023-05-09 19:39 ` [PATCH v2] " Tudor Ambarus 2023-05-17 7:17 ` Tudor Ambarus @ 2023-05-22 15:58 ` Miquel Raynal 1 sibling, 0 replies; 10+ messages in thread From: Miquel Raynal @ 2023-05-22 15:58 UTC (permalink / raw) To: Tudor Ambarus, miquel.raynal Cc: pratyush, michael, richard, vigneshr, Takahiro.Kuwano, linux-mtd, linux-kernel, geert On Tue, 2023-05-09 at 19:39:00 UTC, Tudor Ambarus wrote: > Following errors were seen with um-x86_64-gcc12/um-allyesconfig: > + /kisskb/src/drivers/mtd/spi-nor/spansion.c: error: 'op' is used uninitialized [-Werror=uninitialized]: => 495:27, 364:27 > > Initialise local struct spi_mem_op with all zeros at declaration in > order to avoid using garbage data for fields that are not explicitly > set afterwards. > > Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> > Fixes: c87c9b11c53ce ("mtd: spi-nor: spansion: Determine current address mode") > Fixes: 6afcc84080c41 ("mtd: spi-nor: spansion: Add support for Infineon S25FS256T") > Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org> Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/fixes, thanks. Miquel ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-05-22 15:59 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAHk-=wiUxm-NZ1si8dXWVTTJ9n3c+1SRTC0V+Lk7hOE4bDVwJQ@mail.gmail.com>
[not found] ` <20230508115727.2597864-1-geert@linux-m68k.org>
2023-05-08 12:14 ` Build regressions/improvements in v6.4-rc1 Geert Uytterhoeven
2023-05-08 15:19 ` Pratyush Yadav
2023-05-08 15:32 ` Geert Uytterhoeven
2023-05-08 15:46 ` Raghavendra, Vignesh
2023-05-09 19:25 ` [PATCH 1/2] mtd: spi-nor: spansion: make sure local struct does not contain garbage Tudor Ambarus
2023-05-09 19:25 ` [PATCH 2/2] " Tudor Ambarus
2023-05-09 19:30 ` Tudor Ambarus
2023-05-09 19:39 ` [PATCH v2] " Tudor Ambarus
2023-05-17 7:17 ` Tudor Ambarus
2023-05-22 15:58 ` Miquel Raynal
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox