[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20210510104350.11011-1-miquel.raynal@bootlin.com>
Date: Mon, 10 May 2021 12:43:50 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
miquel.raynal@...tlin.com
Cc: richard@....at, vigneshr@...com, linux-mtd@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mtd: mtd_oobtest: Remove redundant assignment to err
On Sun, 2021-04-25 at 10:28:18 UTC, Jiapeng Chong wrote:
> Variable err is set to zero but this value is never read as it is
> overwritten with a new value later on, hence it is a redundant
> assignment and can be removed.
>
> Cleans up the following clang-analyzer warning:
>
> drivers/mtd/tests/oobtest.c:626:4: warning: Value stored to 'err' is
> never read [clang-analyzer-deadcode.DeadStores].
>
> drivers/mtd/tests/oobtest.c:603:4: warning: Value stored to 'err' is
> never read [clang-analyzer-deadcode.DeadStores].
>
> drivers/mtd/tests/oobtest.c:579:4: warning: Value stored to 'err' is
> never read [clang-analyzer-deadcode.DeadStores].
>
> drivers/mtd/tests/oobtest.c:556:4: warning: Value stored to 'err' is
> never read [clang-analyzer-deadcode.DeadStores].
>
> drivers/mtd/tests/oobtest.c:532:3: warning: Value stored to 'err' is
> never read [clang-analyzer-deadcode.DeadStores].
>
> drivers/mtd/tests/oobtest.c:509:3: warning: Value stored to 'err' is
> never read [clang-analyzer-deadcode.DeadStores].
>
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
Powered by blists - more mailing lists