Re: [PATCH] advansys: Remove redundant assignment to err and n_q_required
From: Matthew Wilcox
Date: Fri Apr 30 2021 - 07:36:39 EST
On Fri, Apr 30, 2021 at 05:25:28PM +0800, Jiapeng Chong wrote:
> Variable err and n_q_required is set to '-ENOMEM' and '1', but they are
> either overwritten or unused later on, so these are redundant assignments
> that can be removed.
>
> Clean up the following clang-analyzer warning:
>
> drivers/scsi/advansys.c:11235:2: warning: Value stored to 'err' is never
> read [clang-analyzer-deadcode.DeadStores].
>
> drivers/scsi/advansys.c:8091:2: warning: Value stored to 'n_q_required'
> is never read [clang-analyzer-deadcode.DeadStores].
>
> drivers/scsi/advansys.c:11484:2: warning: Value stored to 'err' is never
> read [clang-analyzer-deadcode.DeadStores].
I don't want to spend any time figuring out if this is a legitimate patch
or not. Please stop running these analysers on this driver, and thank
the University of Minnesota for making me suspicious.