[52/69] net/i40e/base: exposing missing LED functionality
diff mbox series

Message ID 20191202074935.97629-53-xiaolong.ye@intel.com
State New
Delegated to: xiaolong ye
Headers show
Series
  • update for i40e base code
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Ye Xiaolong Dec. 2, 2019, 7:49 a.m. UTC
The previous code had the LED code wrapped such that, it was
static to the file and not usable outside of it. It is now available.

Signed-off-by: Rusinski <mateusz.rusinski@intel.com>
Reviewed-by: Kirsher Jeffrey T <jeffrey.t.kirsher@intel.com>
Reviewed-by: Michael Alice <alice.michael@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/i40e/base/i40e_common.c    | 10 ++++++++++
 drivers/net/i40e/base/i40e_prototype.h |  7 ++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

Comments

Stillwell Jr, Paul M Dec. 2, 2019, 7:13 p.m. UTC | #1
NACK, this code is not properly stripped and should not be released externally. Additionally, the commit message shouldn't mention anything about wrapping the code so if you want to include this you will need to re-write the commit message to make sense without mentioning wrapping the code.

Paul

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Xiaolong Ye
> Sent: Sunday, December 1, 2019 11:49 PM
> To: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Ye, Xiaolong <xiaolong.ye@intel.com>; Rusinski, Mateusz
> <mateusz.rusinski@intel.com>
> Subject: [dpdk-dev] [PATCH 52/69] net/i40e/base: exposing missing LED
> functionality
> 
> The previous code had the LED code wrapped such that, it was static to the
> file and not usable outside of it. It is now available.
> 
> Signed-off-by: Rusinski <mateusz.rusinski@intel.com>
> Reviewed-by: Kirsher Jeffrey T <jeffrey.t.kirsher@intel.com>
> Reviewed-by: Michael Alice <alice.michael@intel.com>
> Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
> ---
>  drivers/net/i40e/base/i40e_common.c    | 10 ++++++++++
>  drivers/net/i40e/base/i40e_prototype.h |  7 ++++++-
>  2 files changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/i40e/base/i40e_common.c
> b/drivers/net/i40e/base/i40e_common.c
> index c655f3359..aebbd6004 100644
> --- a/drivers/net/i40e/base/i40e_common.c
> +++ b/drivers/net/i40e/base/i40e_common.c
> @@ -6950,8 +6950,13 @@ enum i40e_status_code
> i40e_blink_phy_link_led(struct i40e_hw *hw,
>   * @led_addr: LED register address
>   * @reg_val: read register value
>   **/
> +#ifndef LINUX_SUPPORT
> +enum i40e_status_code i40e_led_get_reg(struct i40e_hw *hw, u16
> led_addr,
> +				       u32 *reg_val)
> +#else
>  static enum i40e_status_code i40e_led_get_reg(struct i40e_hw *hw, u16
> led_addr,
>  					      u32 *reg_val)
> +#endif
>  {
>  	enum i40e_status_code status;
>  	u8 phy_addr = 0;
> @@ -6979,8 +6984,13 @@ static enum i40e_status_code
> i40e_led_get_reg(struct i40e_hw *hw, u16 led_addr,
>   * @led_addr: LED register address
>   * @reg_val: register value to write
>   **/
> +#ifndef LINUX_SUPPORT
> +enum i40e_status_code i40e_led_set_reg(struct i40e_hw *hw, u16
> led_addr,
> +				       u32 reg_val)
> +#else
>  static enum i40e_status_code i40e_led_set_reg(struct i40e_hw *hw, u16
> led_addr,
>  					      u32 reg_val)
> +#endif
>  {
>  	enum i40e_status_code status;
>  	u8 phy_addr = 0;
> diff --git a/drivers/net/i40e/base/i40e_prototype.h
> b/drivers/net/i40e/base/i40e_prototype.h
> index 65a5d3658..1b132b9b1 100644
> --- a/drivers/net/i40e/base/i40e_prototype.h
> +++ b/drivers/net/i40e/base/i40e_prototype.h
> @@ -73,7 +73,12 @@ enum i40e_status_code i40e_led_get_phy(struct
> i40e_hw *hw, u16 *led_addr,
>  				       u16 *val);
>  enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,
>  					      u32 time, u32 interval);
> -
> +#ifndef LINUX_SUPPORT
> +enum i40e_status_code i40e_led_get_reg(struct i40e_hw *hw, u16
> led_addr,
> +				       u32 *reg_val);
> +enum i40e_status_code i40e_led_set_reg(struct i40e_hw *hw, u16
> led_addr,
> +				       u32 reg_val);
> +#endif
>  enum i40e_status_code i40e_get_phy_lpi_status(struct i40e_hw *hw,
>  					      struct i40e_hw_port_stats *stats);
> enum i40e_status_code i40e_get_lpi_counters(struct i40e_hw *hw, u32
> *tx_counter,
> --
> 2.17.1

Patch
diff mbox series

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index c655f3359..aebbd6004 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -6950,8 +6950,13 @@  enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,
  * @led_addr: LED register address
  * @reg_val: read register value
  **/
+#ifndef LINUX_SUPPORT
+enum i40e_status_code i40e_led_get_reg(struct i40e_hw *hw, u16 led_addr,
+				       u32 *reg_val)
+#else
 static enum i40e_status_code i40e_led_get_reg(struct i40e_hw *hw, u16 led_addr,
 					      u32 *reg_val)
+#endif
 {
 	enum i40e_status_code status;
 	u8 phy_addr = 0;
@@ -6979,8 +6984,13 @@  static enum i40e_status_code i40e_led_get_reg(struct i40e_hw *hw, u16 led_addr,
  * @led_addr: LED register address
  * @reg_val: register value to write
  **/
+#ifndef LINUX_SUPPORT
+enum i40e_status_code i40e_led_set_reg(struct i40e_hw *hw, u16 led_addr,
+				       u32 reg_val)
+#else
 static enum i40e_status_code i40e_led_set_reg(struct i40e_hw *hw, u16 led_addr,
 					      u32 reg_val)
+#endif
 {
 	enum i40e_status_code status;
 	u8 phy_addr = 0;
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index 65a5d3658..1b132b9b1 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -73,7 +73,12 @@  enum i40e_status_code i40e_led_get_phy(struct i40e_hw *hw, u16 *led_addr,
 				       u16 *val);
 enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,
 					      u32 time, u32 interval);
-
+#ifndef LINUX_SUPPORT
+enum i40e_status_code i40e_led_get_reg(struct i40e_hw *hw, u16 led_addr,
+				       u32 *reg_val);
+enum i40e_status_code i40e_led_set_reg(struct i40e_hw *hw, u16 led_addr,
+				       u32 reg_val);
+#endif
 enum i40e_status_code i40e_get_phy_lpi_status(struct i40e_hw *hw,
 					      struct i40e_hw_port_stats *stats);
 enum i40e_status_code i40e_get_lpi_counters(struct i40e_hw *hw, u32 *tx_counter,