Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jul 2017 00:10:51 +0000 (UTC)
From:      Ryan Libby <rlibby@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320977 - head/sys/dev/ixl
Message-ID:  <201707140010.v6E0ApLQ052889@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rlibby
Date: Fri Jul 14 00:10:51 2017
New Revision: 320977
URL: https://svnweb.freebsd.org/changeset/base/320977

Log:
  ixl: gcc build errors
  
  Fix minor -Werror issues when building with gcc from -Wredundant-decls,
  -Wunused, -Wbool-operations.  Also ensure the M_IXL malloc type is only
  defined once.
  
  Reviewed by:	efj
  Approved by:	markj (mentor)
  Sponsored by:	Dell EMC Isilon
  Differential Revision:	https://reviews.freebsd.org/D11414

Modified:
  head/sys/dev/ixl/i40e_prototype.h
  head/sys/dev/ixl/if_ixlv.c
  head/sys/dev/ixl/ixl.h
  head/sys/dev/ixl/ixl_pf.h
  head/sys/dev/ixl/ixl_pf_main.c
  head/sys/dev/ixl/ixl_txrx.c

Modified: head/sys/dev/ixl/i40e_prototype.h
==============================================================================
--- head/sys/dev/ixl/i40e_prototype.h	Thu Jul 13 23:48:05 2017	(r320976)
+++ head/sys/dev/ixl/i40e_prototype.h	Fri Jul 14 00:10:51 2017	(r320977)
@@ -538,6 +538,4 @@ enum i40e_status_code i40e_read_phy_register(struct i4
 enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,
 				u8 page, u16 reg, u8 phy_addr, u16 value);
 u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num);
-enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,
-					      u32 time, u32 interval);
 #endif /* _I40E_PROTOTYPE_H_ */

Modified: head/sys/dev/ixl/if_ixlv.c
==============================================================================
--- head/sys/dev/ixl/if_ixlv.c	Thu Jul 13 23:48:05 2017	(r320976)
+++ head/sys/dev/ixl/if_ixlv.c	Fri Jul 14 00:10:51 2017	(r320977)
@@ -1074,7 +1074,7 @@ retry_send:
 		if (error == ETIMEDOUT) {
 			if (!send_api_ver_retried) {
 				/* Resend message, one more time */
-				send_api_ver_retried++;
+				send_api_ver_retried = true;
 				device_printf(dev,
 				    "%s: Timeout while verifying API version on first"
 				    " try!\n", __func__);

Modified: head/sys/dev/ixl/ixl.h
==============================================================================
--- head/sys/dev/ixl/ixl.h	Thu Jul 13 23:48:05 2017	(r320976)
+++ head/sys/dev/ixl/ixl.h	Fri Jul 14 00:10:51 2017	(r320977)
@@ -664,8 +664,7 @@ struct ixl_sysctl_info {
 	char	*description;
 };
 
-static uint8_t ixl_bcast_addr[ETHER_ADDR_LEN] =
-    {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+extern const uint8_t ixl_bcast_addr[ETHER_ADDR_LEN];
 
 /*********************************************************************
  *  TXRX Function prototypes

Modified: head/sys/dev/ixl/ixl_pf.h
==============================================================================
--- head/sys/dev/ixl/ixl_pf.h	Thu Jul 13 23:48:05 2017	(r320976)
+++ head/sys/dev/ixl/ixl_pf.h	Fri Jul 14 00:10:51 2017	(r320977)
@@ -168,16 +168,9 @@ struct ixl_pf {
 "\nExecutes a \"Get Link Status\" command on the Admin Queue, and displays" \
 " the response."			\
 
-static char *ixl_fc_string[6] = {
-	"None",
-	"Rx",
-	"Tx",
-	"Full",
-	"Priority",
-	"Default"
-};
+extern const char * const ixl_fc_string[6];
 
-static MALLOC_DEFINE(M_IXL, "ixl", "ixl driver allocations");
+MALLOC_DECLARE(M_IXL);
 
 /*** Functions / Macros ***/
 /* Adjust the level here to 10 or over to print stats messages */
@@ -299,8 +292,8 @@ int	ixl_rebuild_hw_structs_after_reset(struct ixl_pf *
 void	ixl_set_queue_rx_itr(struct ixl_queue *);
 void	ixl_set_queue_tx_itr(struct ixl_queue *);
 
-void	ixl_add_filter(struct ixl_vsi *, u8 *, s16 vlan);
-void	ixl_del_filter(struct ixl_vsi *, u8 *, s16 vlan);
+void	ixl_add_filter(struct ixl_vsi *, const u8 *, s16 vlan);
+void	ixl_del_filter(struct ixl_vsi *, const u8 *, s16 vlan);
 void	ixl_reconfigure_filters(struct ixl_vsi *vsi);
 
 int	ixl_disable_rings(struct ixl_vsi *);
@@ -331,7 +324,7 @@ void	ixl_init_filters(struct ixl_vsi *);
 void	ixl_add_hw_filters(struct ixl_vsi *, int, int);
 void	ixl_del_hw_filters(struct ixl_vsi *, int);
 struct ixl_mac_filter *
-		ixl_find_filter(struct ixl_vsi *, u8 *, s16);
+		ixl_find_filter(struct ixl_vsi *, const u8 *, s16);
 void	ixl_add_mc_filter(struct ixl_vsi *, u8 *);
 void	ixl_free_mac_filters(struct ixl_vsi *vsi);
 void	ixl_update_vsi_stats(struct ixl_vsi *);

Modified: head/sys/dev/ixl/ixl_pf_main.c
==============================================================================
--- head/sys/dev/ixl/ixl_pf_main.c	Thu Jul 13 23:48:05 2017	(r320976)
+++ head/sys/dev/ixl/ixl_pf_main.c	Fri Jul 14 00:10:51 2017	(r320977)
@@ -89,6 +89,20 @@ static int	ixl_sysctl_qrx_tail_handler(SYSCTL_HANDLER_
 extern int ixl_enable_iwarp;
 #endif
 
+const uint8_t ixl_bcast_addr[ETHER_ADDR_LEN] =
+    {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+
+const char * const ixl_fc_string[6] = {
+	"None",
+	"Rx",
+	"Tx",
+	"Full",
+	"Priority",
+	"Default"
+};
+
+MALLOC_DEFINE(M_IXL, "ixl", "ixl driver allocations");
+
 void
 ixl_debug_core(struct ixl_pf *pf, enum ixl_dbg_mask mask, char *fmt, ...)
 {
@@ -3193,7 +3207,7 @@ ixl_reconfigure_filters(struct ixl_vsi *vsi)
 ** This routine adds macvlan filters
 */
 void
-ixl_add_filter(struct ixl_vsi *vsi, u8 *macaddr, s16 vlan)
+ixl_add_filter(struct ixl_vsi *vsi, const u8 *macaddr, s16 vlan)
 {
 	struct ixl_mac_filter	*f, *tmp;
 	struct ixl_pf		*pf;
@@ -3239,7 +3253,7 @@ ixl_add_filter(struct ixl_vsi *vsi, u8 *macaddr, s16 v
 }
 
 void
-ixl_del_filter(struct ixl_vsi *vsi, u8 *macaddr, s16 vlan)
+ixl_del_filter(struct ixl_vsi *vsi, const u8 *macaddr, s16 vlan)
 {
 	struct ixl_mac_filter *f;
 
@@ -3264,7 +3278,7 @@ ixl_del_filter(struct ixl_vsi *vsi, u8 *macaddr, s16 v
 ** Find the filter with both matching mac addr and vlan id
 */
 struct ixl_mac_filter *
-ixl_find_filter(struct ixl_vsi *vsi, u8 *macaddr, s16 vlan)
+ixl_find_filter(struct ixl_vsi *vsi, const u8 *macaddr, s16 vlan)
 {
 	struct ixl_mac_filter	*f;
 	bool			match = FALSE;

Modified: head/sys/dev/ixl/ixl_txrx.c
==============================================================================
--- head/sys/dev/ixl/ixl_txrx.c	Thu Jul 13 23:48:05 2017	(r320976)
+++ head/sys/dev/ixl/ixl_txrx.c	Fri Jul 14 00:10:51 2017	(r320977)
@@ -63,8 +63,6 @@ static inline void ixl_rx_input(struct rx_ring *, stru
 		    struct mbuf *, u8);
 
 static inline bool ixl_tso_detect_sparse(struct mbuf *mp);
-static int	ixl_tx_setup_offload(struct ixl_queue *que,
-    struct mbuf *mp, u32 *cmd, u32 *off);
 static inline u32 ixl_get_tx_head(struct ixl_queue *que);
 
 #ifdef DEV_NETMAP



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707140010.v6E0ApLQ052889>