netxen_nic: remove redundant assignment to variable capability
The variable capability is being assigned a value that is never read and is being re-assigned later. The assignment is redundant and can be removed. Also remove empty line before assignment to capability. Cleans up clang scan build warning: drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1189:2: warning: Value stored to 'capability' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/20240206115049.1879389-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
0e0939c0ad
commit
a6c15d7ff2
@ -1186,7 +1186,6 @@ static int
|
|||||||
netxen_p3_has_mn(struct netxen_adapter *adapter)
|
netxen_p3_has_mn(struct netxen_adapter *adapter)
|
||||||
{
|
{
|
||||||
u32 capability, flashed_ver;
|
u32 capability, flashed_ver;
|
||||||
capability = 0;
|
|
||||||
|
|
||||||
/* NX2031 always had MN */
|
/* NX2031 always had MN */
|
||||||
if (NX_IS_REVISION_P2(adapter->ahw.revision_id))
|
if (NX_IS_REVISION_P2(adapter->ahw.revision_id))
|
||||||
@ -1197,7 +1196,6 @@ netxen_p3_has_mn(struct netxen_adapter *adapter)
|
|||||||
flashed_ver = NETXEN_DECODE_VERSION(flashed_ver);
|
flashed_ver = NETXEN_DECODE_VERSION(flashed_ver);
|
||||||
|
|
||||||
if (flashed_ver >= NETXEN_VERSION_CODE(4, 0, 220)) {
|
if (flashed_ver >= NETXEN_VERSION_CODE(4, 0, 220)) {
|
||||||
|
|
||||||
capability = NXRD32(adapter, NX_PEG_TUNE_CAPABILITY);
|
capability = NXRD32(adapter, NX_PEG_TUNE_CAPABILITY);
|
||||||
if (capability & NX_PEG_TUNE_MN_PRESENT)
|
if (capability & NX_PEG_TUNE_MN_PRESENT)
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user