From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: linux-arch <linux-arch@vger.kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
linux-s390@vger.kernel.org, Mathieu Malaterre <malat@debian.org>,
x86@kernel.org, Heiko Carstens <heiko.carstens@de.ibm.com>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
Ingo Molnar <mingo@redhat.com>,
linux-mtd@lists.infradead.org,
Andrew Morton <akpm@linux-foundation.org>,
linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [RESEND PATCH v3 05/11] mtd: rawnand: vf610_nfc: add initializer to avoid -Wmaybe-uninitialized
Date: Thu, 2 May 2019 16:13:46 +0200 [thread overview]
Message-ID: <20190502161346.07c15187@xps13> (raw)
In-Reply-To: <20190423034959.13525-6-yamada.masahiro@socionext.com>
Hi Masahiro,
Masahiro Yamada <yamada.masahiro@socionext.com> wrote on Tue, 23 Apr
2019 12:49:53 +0900:
> This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common
> place. We need to eliminate potential issues beforehand.
>
> Kbuild test robot has never reported -Wmaybe-uninitialized warning
> for this probably because vf610_nfc_run() is inlined by the x86
> compiler's inlining heuristic.
>
> If CONFIG_OPTIMIZE_INLINING is enabled for a different architecture
> and vf610_nfc_run() is not inlined, the following warning is reported:
>
> drivers/mtd/nand/raw/vf610_nfc.c: In function ‘vf610_nfc_cmd’:
> drivers/mtd/nand/raw/vf610_nfc.c:455:3: warning: ‘offset’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> vf610_nfc_rd_from_sram(instr->ctx.data.buf.in + offset,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> nfc->regs + NFC_MAIN_AREA(0) + offset,
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> trfr_sz, !nfc->data_access);
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
IMHO this patch has no dependencies with this series.
Would you mind sending it alone with the proper Fixes tag?
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> Changes in v3: None
> Changes in v2:
> - split into a separate patch
>
> drivers/mtd/nand/raw/vf610_nfc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/raw/vf610_nfc.c b/drivers/mtd/nand/raw/vf610_nfc.c
> index a662ca1970e5..19792d725ec2 100644
> --- a/drivers/mtd/nand/raw/vf610_nfc.c
> +++ b/drivers/mtd/nand/raw/vf610_nfc.c
> @@ -364,7 +364,7 @@ static int vf610_nfc_cmd(struct nand_chip *chip,
> {
> const struct nand_op_instr *instr;
> struct vf610_nfc *nfc = chip_to_nfc(chip);
> - int op_id = -1, trfr_sz = 0, offset;
> + int op_id = -1, trfr_sz = 0, offset = 0;
> u32 col = 0, row = 0, cmd1 = 0, cmd2 = 0, code = 0;
> bool force8bit = false;
>
Thanks,
Miquèl
next prev parent reply other threads:[~2019-05-02 15:15 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-23 3:49 [RESEND PATCH v3 00/11] compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING Masahiro Yamada
2019-04-23 3:49 ` [RESEND PATCH v3 01/11] ARM: prevent tracing IPI_CPU_BACKTRACE Masahiro Yamada
2019-04-23 3:49 ` [RESEND PATCH v3 02/11] arm64: mark (__)cpus_have_const_cap as __always_inline Masahiro Yamada
2019-04-23 11:31 ` Mark Rutland
2019-04-23 3:49 ` [RESEND PATCH v3 03/11] MIPS: mark mult_sh_align_mod() " Masahiro Yamada
2019-04-23 3:49 ` [RESEND PATCH v3 04/11] s390/cpacf: mark scpacf_query() " Masahiro Yamada
2019-05-16 23:01 ` Laura Abbott
2019-05-17 4:23 ` Masahiro Yamada
2019-04-23 3:49 ` [RESEND PATCH v3 05/11] mtd: rawnand: vf610_nfc: add initializer to avoid -Wmaybe-uninitialized Masahiro Yamada
2019-05-02 14:13 ` Miquel Raynal [this message]
2019-05-03 10:36 ` Masahiro Yamada
2019-05-03 11:11 ` Miquel Raynal
2019-04-23 3:49 ` [RESEND PATCH v3 06/11] MIPS: mark __fls() and __ffs() as __always_inline Masahiro Yamada
2019-04-23 3:49 ` [RESEND PATCH v3 07/11] ARM: mark setup_machine_tags() stub as __init __noreturn Masahiro Yamada
2019-04-23 3:49 ` [RESEND PATCH v3 08/11] powerpc/prom_init: mark prom_getprop() and prom_getproplen() as __init Masahiro Yamada
2019-04-23 3:49 ` [RESEND PATCH v3 09/11] powerpc/mm/radix: mark __radix__flush_tlb_range_psize() as __always_inline Masahiro Yamada
2019-04-29 15:35 ` Christophe Leroy
2019-05-03 13:40 ` Masahiro Yamada
2019-04-23 3:49 ` [RESEND PATCH v3 10/11] powerpc/mm/radix: mark as __tlbie_pid() and friends as__always_inline Masahiro Yamada
2019-05-16 22:55 ` Laura Abbott
2019-05-17 4:18 ` Masahiro Yamada
2019-04-23 3:49 ` [RESEND PATCH v3 11/11] compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190502161346.07c15187@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=malat@debian.org \
--cc=mingo@redhat.com \
--cc=x86@kernel.org \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).