aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorShannon Nelson <shannon.nelson@amd.com>2025-04-25 13:46:18 -0700
committerDavid S. Miller <davem@davemloft.net>2025-04-30 12:55:59 +0100
commit6828208a45c1839e94a87500e0721618d03783e7 (patch)
tree8957235b628105a9251d200140ae80b136b6fdb4
parentpds_core: smaller adminq poll starting interval (diff)
downloadwireguard-linux-6828208a45c1839e94a87500e0721618d03783e7.tar.xz
wireguard-linux-6828208a45c1839e94a87500e0721618d03783e7.zip
pds_core: init viftype default in declaration
Initialize the .enabled field of the FWCTL viftype default in the declaration rather than as a bit of code as it is always to be enabled and needs no logic around it. Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/amd/pds_core/core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/amd/pds_core/core.c b/drivers/net/ethernet/amd/pds_core/core.c
index 0e408f990f0b..076dfe2910c7 100644
--- a/drivers/net/ethernet/amd/pds_core/core.c
+++ b/drivers/net/ethernet/amd/pds_core/core.c
@@ -402,6 +402,7 @@ err_out_uninit:
static struct pdsc_viftype pdsc_viftype_defaults[] = {
[PDS_DEV_TYPE_FWCTL] = { .name = PDS_DEV_TYPE_FWCTL_STR,
+ .enabled = true,
.vif_id = PDS_DEV_TYPE_FWCTL,
.dl_id = -1 },
[PDS_DEV_TYPE_VDPA] = { .name = PDS_DEV_TYPE_VDPA_STR,
@@ -432,9 +433,6 @@ static int pdsc_viftypes_init(struct pdsc *pdsc)
/* See what the Core device has for support */
vt_support = !!le16_to_cpu(pdsc->dev_ident.vif_types[vt]);
- if (vt == PDS_DEV_TYPE_FWCTL)
- pdsc->viftype_status[vt].enabled = true;
-
dev_dbg(pdsc->dev, "VIF %s is %ssupported\n",
pdsc->viftype_status[vt].name,
vt_support ? "" : "not ");