Commit 6828208a authored by Shannon Nelson's avatar Shannon Nelson Committed by David S. Miller
Browse files

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: default avatarShannon Nelson <shannon.nelson@amd.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7c4f4c4f
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -402,6 +402,7 @@ static int pdsc_core_init(struct pdsc *pdsc)

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 ");