From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Boris Brezillon <boris.brezillon@collabora.com>,
Tudor Ambarus <tudor.ambarus@microchip.com>,
Manivannan Sadhasivam <mani@kernel.org>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] mtd: rawnand: silence static checker warning in nand_setup_interface()
Date: Mon, 10 May 2021 12:02:32 +0200 [thread overview]
Message-ID: <20210510100233.6865-1-miquel.raynal@bootlin.com> (raw)
In-Reply-To: <YH6Ugwz3gcga+q8X@mwanda>
On Tue, 2021-04-20 at 08:44:51 UTC, Dan Carpenter wrote:
> Smatch complains that the error code is not set on this error path:
>
> drivers/mtd/nand/raw/nand_base.c:842 nand_setup_interface()
> warn: missing error code 'ret'
>
> But actually returning success is intentional because the NAND chip will
> still work in mode 0. This patch adds a "ret = 0;" assignment to make
> the intent more clear and to silence the static checker warning. It
> doesn't affect the compiled code because GCC optimises the assignment
> away.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
prev parent reply other threads:[~2021-05-10 10:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-20 8:44 Dan Carpenter
2021-05-10 10:02 ` Miquel Raynal [this message]
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=20210510100233.6865-1-miquel.raynal@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=boris.brezillon@collabora.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mani@kernel.org \
--cc=richard@nod.at \
--cc=tudor.ambarus@microchip.com \
--cc=vigneshr@ti.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
all inboxes | Powered by JetHome®