Re: [PATCH] mac80211: Remove redundant assignment to ret

From: Johannes Berg
Date: Fri Apr 30 2021 - 07:36:50 EST


On Fri, 2021-04-30 at 17:21 +0800, Yang Li wrote:
> Variable 'ret' is set to -ENODEV 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.
>
> Clean up the following clang-analyzer warning:
>
> net/mac80211/debugfs_netdev.c:60:2: warning: Value stored to 'ret' is
> never read [clang-analyzer-deadcode.DeadStores]

Can you just turn that warning off?

It's really quite pointless to churn the tree for effectively nothing.

johannes