From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org
Cc: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>,
netdev@vger.kernel.org, sassmann@redhat.com,
anthony.l.nguyen@intel.com,
Tony Brelinski <tonyx.brelinski@intel.com>
Subject: [PATCH net-next 14/15] ice: remove return variable
Date: Wed, 14 Apr 2021 17:30:12 -0700 [thread overview]
Message-ID: <20210415003013.19717-15-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20210415003013.19717-1-anthony.l.nguyen@intel.com>
From: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
We were saving the return value from ice_vsi_manage_rss_lut(), but
the errors from that function are not critical so change it to
return void and remove the code that saved the value.
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_lib.c | 8 +++-----
drivers/net/ethernet/intel/ice/ice_lib.h | 2 +-
drivers/net/ethernet/intel/ice/ice_main.c | 4 ++--
3 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index eb6e352d3387..82e2ce23df3d 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -1313,14 +1313,13 @@ static int ice_vsi_alloc_rings(struct ice_vsi *vsi)
* LUT, while in the event of enable request for RSS, it will reconfigure RSS
* LUT.
*/
-int ice_vsi_manage_rss_lut(struct ice_vsi *vsi, bool ena)
+void ice_vsi_manage_rss_lut(struct ice_vsi *vsi, bool ena)
{
- int err = 0;
u8 *lut;
lut = kzalloc(vsi->rss_table_size, GFP_KERNEL);
if (!lut)
- return -ENOMEM;
+ return;
if (ena) {
if (vsi->rss_lut_user)
@@ -1330,9 +1329,8 @@ int ice_vsi_manage_rss_lut(struct ice_vsi *vsi, bool ena)
vsi->rss_size);
}
- err = ice_set_rss_lut(vsi, lut, vsi->rss_table_size);
+ ice_set_rss_lut(vsi, lut, vsi->rss_table_size);
kfree(lut);
- return err;
}
/**
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.h b/drivers/net/ethernet/intel/ice/ice_lib.h
index f48c5ccb8036..511c2316c40c 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.h
+++ b/drivers/net/ethernet/intel/ice/ice_lib.h
@@ -85,7 +85,7 @@ void ice_vsi_free_rx_rings(struct ice_vsi *vsi);
void ice_vsi_free_tx_rings(struct ice_vsi *vsi);
-int ice_vsi_manage_rss_lut(struct ice_vsi *vsi, bool ena);
+void ice_vsi_manage_rss_lut(struct ice_vsi *vsi, bool ena);
void ice_update_tx_ring_stats(struct ice_ring *ring, u64 pkts, u64 bytes);
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 02672be04f78..6dbaa9099fdf 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -5112,10 +5112,10 @@ ice_set_features(struct net_device *netdev, netdev_features_t features)
* separate if/else statements to guarantee each feature is checked
*/
if (features & NETIF_F_RXHASH && !(netdev->features & NETIF_F_RXHASH))
- ret = ice_vsi_manage_rss_lut(vsi, true);
+ ice_vsi_manage_rss_lut(vsi, true);
else if (!(features & NETIF_F_RXHASH) &&
netdev->features & NETIF_F_RXHASH)
- ret = ice_vsi_manage_rss_lut(vsi, false);
+ ice_vsi_manage_rss_lut(vsi, false);
if ((features & NETIF_F_HW_VLAN_CTAG_RX) &&
!(netdev->features & NETIF_F_HW_VLAN_CTAG_RX))
--
2.26.2
next prev parent reply other threads:[~2021-04-15 0:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-15 0:29 [PATCH net-next 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2021-04-14 Tony Nguyen
2021-04-15 0:29 ` [PATCH net-next 01/15] ice: use kernel definitions for IANA protocol ports and ether-types Tony Nguyen
2021-04-15 0:30 ` [PATCH net-next 02/15] ice: Drop leading underscores in enum ice_pf_state Tony Nguyen
2021-04-15 0:30 ` [PATCH net-next 03/15] ice: Add new VSI states to track netdev alloc/registration Tony Nguyen
2021-04-15 16:39 ` Jakub Kicinski
2021-04-15 0:30 ` [PATCH net-next 04/15] ice: refactor interrupt moderation writes Tony Nguyen
2021-04-15 0:30 ` [PATCH net-next 05/15] ice: replace custom AIM algorithm with kernel's DIM library Tony Nguyen
2021-04-15 16:46 ` Jakub Kicinski
2021-04-15 17:03 ` Keller, Jacob E
2021-04-15 17:07 ` Jakub Kicinski
2021-04-15 0:30 ` [PATCH net-next 06/15] ice: manage interrupts during poll exit Tony Nguyen
2021-04-15 0:30 ` [PATCH net-next 07/15] ice: refactor ITR data structures Tony Nguyen
2021-04-15 0:30 ` [PATCH net-next 08/15] ice: Reimplement module reads used by ethtool Tony Nguyen
2021-04-15 0:30 ` [PATCH net-next 09/15] ice: print name in /proc/iomem Tony Nguyen
2021-04-15 0:30 ` [PATCH net-next 10/15] ice: use local for consistency Tony Nguyen
2021-04-15 0:30 ` [PATCH net-next 11/15] ice: remove unused struct member Tony Nguyen
2021-04-15 0:30 ` [PATCH net-next 12/15] ice: Set vsi->vf_id as ICE_INVAL_VFID for non VF VSI types Tony Nguyen
2021-04-15 0:30 ` [PATCH net-next 13/15] ice: suppress false cppcheck issues Tony Nguyen
2021-04-15 0:30 ` Tony Nguyen [this message]
2021-04-15 0:30 ` [PATCH net-next 15/15] ice: reduce scope of variable Tony Nguyen
2021-04-15 23:50 ` [PATCH net-next 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2021-04-14 patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210415003013.19717-15-anthony.l.nguyen@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paul.m.stillwell.jr@intel.com \
--cc=sassmann@redhat.com \
--cc=tonyx.brelinski@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).