From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Colin King <colin.king@canonical.com>
Cc: Joern Engel <joern@lazybastard.org>,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Boris Brezillon <boris.brezillon@free-electrons.com>,
Marek Vasut <marek.vasut@gmail.com>,
Richard Weinberger <richard@nod.at>,
Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>,
linux-mtd@lists.infradead.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: block2mtd: remove redundant initialization of 'bdev'
Date: Sun, 18 Mar 2018 21:21:19 +0000 [thread overview]
Message-ID: <20180318222119.126754d4@bbrezillon> (raw)
In-Reply-To: <20180120220934.21992-1-colin.king@canonical.com>
On Sat, 20 Jan 2018 22:09:34 +0000
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Pointer bdev is being initialized however this value is never
> read as bdev is assigned an updated value from the returned
> call to blkdev_get_by_path. Remove the redundant assignment.
>
> Cleans up clang warning:
> drivers/mtd/devices/block2mtd.c:228:23: warning: Value stored to
> 'bdev' during its initialization is never read
>
Applied.
Thanks,
Boris
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/mtd/devices/block2mtd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
> index 62fd6905c648..bb0734600a07 100644
> --- a/drivers/mtd/devices/block2mtd.c
> +++ b/drivers/mtd/devices/block2mtd.c
> @@ -225,7 +225,7 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size,
> int i;
> #endif
> const fmode_t mode = FMODE_READ | FMODE_WRITE | FMODE_EXCL;
> - struct block_device *bdev = ERR_PTR(-ENODEV);
> + struct block_device *bdev;
> struct block2mtd_dev *dev;
> char *name;
>
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2018-03-18 21:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-20 22:09 [PATCH] mtd: block2mtd: remove redundant initialization of 'bdev' Colin King
2018-03-18 21:21 ` Boris Brezillon [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=20180318222119.126754d4@bbrezillon \
--to=boris.brezillon@bootlin.com \
--cc=boris.brezillon@free-electrons.com \
--cc=colin.king@canonical.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@wedev4u.fr \
--cc=dwmw2@infradead.org \
--cc=joern@lazybastard.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=richard@nod.at \
/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