lkml.org 
[lkml]   [2021]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] nfp: flower: Remove redundant assignment to mask
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@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

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

\
 
 \ /
  Last update: 2021-04-28 21:14    [W:0.023 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site