[5/6] fm10k: warn if the stat size is unknown

Message ID 20180412181559.4343-5-jacob.e.keller@intel.com
State Accepted
Delegated to: Jeff Kirsher
Headers show
Series
  • [1/6] fm10k: setup VLANs for l2 accelerated macvlan interfaces
Related show

Commit Message

Jacob Keller April 12, 2018, 6:15 p.m.
Change-Id: I80172c86be68bdd1e1df00b650877b686c718b0f
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Title: warn if the stat size is unknown
Change-type: DefectResolution
Reviewed-on: https://git-amr-1.devtools.intel.com/gerrit/198024
Tested-by: nosbuild <nosbuild@intel.com>
---
 drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Singh, Krishneil K May 1, 2018, 9:25 p.m. | #1
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On Behalf Of
> Jacob Keller
> Sent: Thursday, April 12, 2018 11:16 AM
> To: Intel Wired LAN <intel-wired-lan@lists.osuosl.org>
> Subject: [Intel-wired-lan] [PATCH 5/6] fm10k: warn if the stat size is unknown
> 
> Change-Id: I80172c86be68bdd1e1df00b650877b686c718b0f
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Title: warn if the stat size is unknown
> Change-type: DefectResolution
> Reviewed-on: https://git-amr-1.devtools.intel.com/gerrit/198024
> Tested-by: nosbuild <nosbuild@intel.com>
> ---

Tested-by: Krishneil Singh  <krishneil.k.singh@intel.com>

Patch

diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
index e7e0e3c82fb2..e5a1da7ac711 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
@@ -265,6 +265,8 @@  static void __fm10k_add_ethtool_stats(u64 **data, void *pointer,
 			*((*data)++) = *(u8 *)p;
 			break;
 		default:
+			WARN_ONCE(1, "unexpected stat size for %s",
+				  stats[i].stat_string);
 			*((*data)++) = 0;
 		}
 	}