Commit 6165feda authored by Simon Horman's avatar Simon Horman Committed by Jakub Kicinski
Browse files

net: tulip: avoid unused variable warning



There is an effort to achieve W=1 kernel builds without warnings.
As part of that effort Helge Deller highlighted the following warnings
in the tulip driver when compiling with W=1 and CONFIG_TULIP_MWI=n:

  .../tulip_core.c: In function ‘tulip_init_one’:
  .../tulip_core.c:1309:22: warning: variable ‘force_csr0’ set but not used

This patch addresses that problem using IS_ENABLED(). This approach has
the added benefit of reducing conditionally compiled code. And thus
increasing compile coverage. E.g. for allmodconfig builds which enable
CONFIG_TULIP_MWI.

Compile tested only.
No run-time effect intended.

Acked-by: default avatarHelge Deller <deller@gmx.de>
Signed-off-by: default avatarSimon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250318-tulip-w1-v3-1-a813fadd164d@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 5555b34c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment