From patchwork Wed Jun 15 07:53:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xing, Beilei" X-Patchwork-Id: 13786 X-Patchwork-Delegate: bruce.richardson@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 47FD8C372; Wed, 15 Jun 2016 09:54:45 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 20B17C166 for ; Wed, 15 Jun 2016 09:54:40 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 15 Jun 2016 00:54:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,475,1459839600"; d="scan'208";a="997953410" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 15 Jun 2016 00:54:39 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id u5F7sbR7016652; Wed, 15 Jun 2016 15:54:37 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u5F7sXtb004178; Wed, 15 Jun 2016 15:54:35 +0800 Received: (from beileixi@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u5F7sXXC004174; Wed, 15 Jun 2016 15:54:33 +0800 From: Beilei Xing To: wenzhuo.lu@intel.com Cc: dev@dpdk.org, Beilei Xing Date: Wed, 15 Jun 2016 15:53:34 +0800 Message-Id: <1465977220-3970-25-git-send-email-beilei.xing@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1465977220-3970-1-git-send-email-beilei.xing@intel.com> References: <1465887596-10346-1-git-send-email-beilei.xing@intel.com> <1465977220-3970-1-git-send-email-beilei.xing@intel.com> Subject: [dpdk-dev] [PATCH v3 24/30] ixgbe/base: unify coding style X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch changes static keyword to STATIC definition, which can be redefined depending on the compiler used. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_x550.c | 38 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index 80f59fb..1137179 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/ixgbe_x550.c @@ -39,8 +39,8 @@ POSSIBILITY OF SUCH DAMAGE. #include "ixgbe_phy.h" STATIC s32 ixgbe_setup_ixfi_x550em(struct ixgbe_hw *hw, ixgbe_link_speed *speed); -static s32 ixgbe_acquire_swfw_sync_X550a(struct ixgbe_hw *, u32 mask); -static void ixgbe_release_swfw_sync_X550a(struct ixgbe_hw *, u32 mask); +STATIC s32 ixgbe_acquire_swfw_sync_X550a(struct ixgbe_hw *, u32 mask); +STATIC void ixgbe_release_swfw_sync_X550a(struct ixgbe_hw *, u32 mask); /** * ixgbe_init_ops_X550 - Inits func ptrs and MAC type @@ -335,7 +335,7 @@ STATIC void ixgbe_setup_mux_ctl(struct ixgbe_hw *hw) * @dev_type: always unused * @phy_data: Pointer to read data from PHY register */ -static s32 ixgbe_read_phy_reg_mdi_22(struct ixgbe_hw *hw, u32 reg_addr, +STATIC s32 ixgbe_read_phy_reg_mdi_22(struct ixgbe_hw *hw, u32 reg_addr, u32 dev_type, u16 *phy_data) { u32 i, data, command; @@ -383,7 +383,7 @@ static s32 ixgbe_read_phy_reg_mdi_22(struct ixgbe_hw *hw, u32 reg_addr, * @dev_type: always unused * @phy_data: Data to write to the PHY register */ -static s32 ixgbe_write_phy_reg_mdi_22(struct ixgbe_hw *hw, u32 reg_addr, +STATIC s32 ixgbe_write_phy_reg_mdi_22(struct ixgbe_hw *hw, u32 reg_addr, u32 dev_type, u16 phy_data) { u32 i, command; @@ -428,7 +428,7 @@ static s32 ixgbe_write_phy_reg_mdi_22(struct ixgbe_hw *hw, u32 reg_addr, * * Returns error code */ -static s32 ixgbe_identify_phy_1g(struct ixgbe_hw *hw) +STATIC s32 ixgbe_identify_phy_1g(struct ixgbe_hw *hw) { u32 swfw_mask = hw->phy.phy_semaphore_mask; u16 phy_id_high; @@ -536,7 +536,7 @@ STATIC s32 ixgbe_write_phy_reg_x550em(struct ixgbe_hw *hw, u32 reg_addr, * * Returns an error code on error. **/ -static s32 ixgbe_read_i2c_combined_generic(struct ixgbe_hw *hw, u8 addr, +STATIC s32 ixgbe_read_i2c_combined_generic(struct ixgbe_hw *hw, u8 addr, u16 reg, u16 *val) { return ixgbe_read_i2c_combined_generic_int(hw, addr, reg, val, true); @@ -551,7 +551,7 @@ static s32 ixgbe_read_i2c_combined_generic(struct ixgbe_hw *hw, u8 addr, * * Returns an error code on error. **/ -static s32 +STATIC s32 ixgbe_read_i2c_combined_generic_unlocked(struct ixgbe_hw *hw, u8 addr, u16 reg, u16 *val) { @@ -567,7 +567,7 @@ ixgbe_read_i2c_combined_generic_unlocked(struct ixgbe_hw *hw, u8 addr, * * Returns an error code on error. **/ -static s32 ixgbe_write_i2c_combined_generic(struct ixgbe_hw *hw, +STATIC s32 ixgbe_write_i2c_combined_generic(struct ixgbe_hw *hw, u8 addr, u16 reg, u16 val) { return ixgbe_write_i2c_combined_generic_int(hw, addr, reg, val, true); @@ -582,7 +582,7 @@ static s32 ixgbe_write_i2c_combined_generic(struct ixgbe_hw *hw, * * Returns an error code on error. **/ -static s32 +STATIC s32 ixgbe_write_i2c_combined_generic_unlocked(struct ixgbe_hw *hw, u8 addr, u16 reg, u16 val) { @@ -864,7 +864,7 @@ s32 ixgbe_init_eeprom_params_X550(struct ixgbe_hw *hw) * ixgbe_enable_eee_x550 - Enable EEE support * @hw: pointer to hardware structure */ -static s32 ixgbe_enable_eee_x550(struct ixgbe_hw *hw) +STATIC s32 ixgbe_enable_eee_x550(struct ixgbe_hw *hw) { u16 autoneg_eee_reg; u32 link_reg; @@ -919,7 +919,7 @@ static s32 ixgbe_enable_eee_x550(struct ixgbe_hw *hw) * ixgbe_disable_eee_x550 - Disable EEE support * @hw: pointer to hardware structure */ -static s32 ixgbe_disable_eee_x550(struct ixgbe_hw *hw) +STATIC s32 ixgbe_disable_eee_x550(struct ixgbe_hw *hw) { u16 autoneg_eee_reg; u32 link_reg; @@ -1595,7 +1595,7 @@ s32 ixgbe_setup_sfp_modules_X550em(struct ixgbe_hw *hw) * ixgbe_setup_sgmii - Set up link for sgmii * @hw: pointer to hardware structure */ -static s32 ixgbe_setup_sgmii(struct ixgbe_hw *hw, ixgbe_link_speed speed, +STATIC s32 ixgbe_setup_sgmii(struct ixgbe_hw *hw, ixgbe_link_speed speed, bool autoneg_wait_to_complete) { struct ixgbe_mac_info *mac = &hw->mac; @@ -1960,7 +1960,7 @@ STATIC s32 ixgbe_setup_kr_speed_x550em(struct ixgbe_hw *hw, * * Must be called while holding the PHY semaphore and token */ -static s32 ixgbe_set_master_slave_mode(struct ixgbe_hw *hw) +STATIC s32 ixgbe_set_master_slave_mode(struct ixgbe_hw *hw) { u16 phy_data; s32 rc; @@ -2007,7 +2007,7 @@ static s32 ixgbe_set_master_slave_mode(struct ixgbe_hw *hw) * * Must be called while holding the PHY semaphore and token */ -static s32 ixgbe_reset_phy_m88_nolock(struct ixgbe_hw *hw) +STATIC s32 ixgbe_reset_phy_m88_nolock(struct ixgbe_hw *hw) { s32 rc; @@ -2052,7 +2052,7 @@ res_out: * ixgbe_reset_phy_m88 - Reset m88 PHY * @hw: pointer to hardware structure */ -static s32 ixgbe_reset_phy_m88(struct ixgbe_hw *hw) +STATIC s32 ixgbe_reset_phy_m88(struct ixgbe_hw *hw) { u32 swfw_mask = hw->phy.phy_semaphore_mask; s32 rc; @@ -2074,7 +2074,7 @@ static s32 ixgbe_reset_phy_m88(struct ixgbe_hw *hw) * ixgbe_setup_m88 - setup m88 PHY * @hw: pointer to hardware structure */ -static s32 ixgbe_setup_m88(struct ixgbe_hw *hw) +STATIC s32 ixgbe_setup_m88(struct ixgbe_hw *hw) { u32 swfw_mask = hw->phy.phy_semaphore_mask; struct ixgbe_phy_info *phy = &hw->phy; @@ -2232,7 +2232,7 @@ s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw) * ixgbe_set_mdio_speed - Set MDIO clock speed * @hw: pointer to hardware structure */ -static void ixgbe_set_mdio_speed(struct ixgbe_hw *hw) +STATIC void ixgbe_set_mdio_speed(struct ixgbe_hw *hw) { u32 hlreg0; @@ -3822,7 +3822,7 @@ void ixgbe_release_swfw_sync_X550em(struct ixgbe_hw *hw, u32 mask) * * Acquires the SWFW semaphore and get the shared phy token as needed */ -static s32 ixgbe_acquire_swfw_sync_X550a(struct ixgbe_hw *hw, u32 mask) +STATIC s32 ixgbe_acquire_swfw_sync_X550a(struct ixgbe_hw *hw, u32 mask) { u32 hmask = mask & ~IXGBE_GSSR_TOKEN_SM; int retries = FW_PHY_TOKEN_RETRIES; @@ -3860,7 +3860,7 @@ static s32 ixgbe_acquire_swfw_sync_X550a(struct ixgbe_hw *hw, u32 mask) * * Releases the SWFW semaphore and puts the shared phy token as needed */ -static void ixgbe_release_swfw_sync_X550a(struct ixgbe_hw *hw, u32 mask) +STATIC void ixgbe_release_swfw_sync_X550a(struct ixgbe_hw *hw, u32 mask) { u32 hmask = mask & ~IXGBE_GSSR_TOKEN_SM;