Re: [PATCH] nfp: flower: Remove redundant assignment to mask

From: Jakub Kicinski
Date: Wed Apr 28 2021 - 15:14:08 EST


On Wed, 28 Apr 2021 18:05:30 +0800 Jiapeng Chong wrote:
> The value stored to mask in the calculations this patch removes is
> not used, so the calculation and the assignment can be removed.
>
> Cleans up the following clang-analyzer warning:
>
> drivers/net/ethernet/netronome/nfp/flower/offload.c:1230:3: warning:
> Value stored to 'mask' is never read
> [clang-analyzer-deadcode.DeadStores].
>
> Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx>

Seems cleaner to always move ext and mask, in case some code
is added later in the function and starts accessing mask.