From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 08553A04B1; Tue, 24 Nov 2020 04:32:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A98BDC914; Tue, 24 Nov 2020 04:32:23 +0100 (CET) Received: from smtpbguseast2.qq.com (smtpbguseast2.qq.com [54.204.34.130]) by dpdk.org (Postfix) with ESMTP id C421FC912 for ; Tue, 24 Nov 2020 04:32:21 +0100 (CET) X-QQ-mid: bizesmtp22t1606188731tcy3qrww Received: from jiawenwu (unknown [183.129.236.74]) by esmtp6.qq.com (ESMTP) with id ; Tue, 24 Nov 2020 11:32:10 +0800 (CST) X-QQ-SSF: 01400000000000C0D000000A0000000 X-QQ-FEAT: gIpqWeapPLIfmed2Gl+mlfP5+deGufd42q1brnla4LScQdM3oMQR8jDd8EP6I W6ZvSZlrspas5o4VHRrWEH8/dLEuT7ZfKdWnvVpXT2viUWAXZL2/4+QpBjYa3ow8bG+4j02 7iq+GoDl8Pvl+P1rA9tWfg6PCC+CEEQXk5TeWI0D+eVEtkIFYpCUFjE9Pm3fF2Z9s7IAHnA vo8zg2iT1E3USN5e3vUESbISg7dusMiKNEmy75VjOLUMmGX+u/tsgCoNJpuwjf7FqIPFb+f FMSNY2MenM+0Cg+S7Kb8m/KDvQ5825T3CD68HRz4WEQ9eSjEAWhKtMLICyLm7AXwu9pNxrr sZStH8Pzp1S8s8jkgA= X-QQ-GoodBg: 2 From: "Jiawen Wu" To: "'Ferruh Yigit'" Cc: References: <20201119035238.3653702-1-ferruh.yigit@intel.com> In-Reply-To: <20201119035238.3653702-1-ferruh.yigit@intel.com> Date: Tue, 24 Nov 2020 11:32:10 +0800 Message-ID: <001501d6c212$65240e70$2f6c2b50$@trustnetic.com>+0DCCFC3E6054F2AE MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQFiynVIenpi+p0DrMUeizE2LepYBaq+jJYg Content-Language: zh-cn X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:trustnetic.com:qybgforeign:qybgforeign6 X-QQ-Bgrelay: 1 Subject: Re: [dpdk-dev] [RFC] remove unused functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thursday, November 19, 2020 11:53 AM, Ferruh Yigit wrote: > Removing unused functions, reported by cppcheck. > > Easy way to remove clutter, since the code is already in the git repo, > they can be added back when needed. > > Signed-off-by: Ferruh Yigit > --- > drivers/net/txgbe/base/txgbe_eeprom.c | 72 - > drivers/net/txgbe/base/txgbe_eeprom.h | 2 - > > diff --git a/drivers/net/txgbe/base/txgbe_eeprom.c > b/drivers/net/txgbe/base/txgbe_eeprom.c > index 72cd3ff307..fedaecf26d 100644 > --- a/drivers/net/txgbe/base/txgbe_eeprom.c > +++ b/drivers/net/txgbe/base/txgbe_eeprom.c > @@ -274,42 +274,6 @@ s32 txgbe_ee_read32(struct txgbe_hw *hw, u32 > addr, u32 *data) > return err; > } > > -/** > - * txgbe_ee_read_buffer - Read EEPROM byte(s) using hostif > - * @hw: pointer to hardware structure > - * @addr: offset of bytes in the EEPROM to read > - * @len: number of bytes > - * @data: byte(s) read from the EEPROM > - * > - * Reads a 8 bit byte(s) from the EEPROM using the hostif. > - **/ > -s32 txgbe_ee_read_buffer(struct txgbe_hw *hw, > - u32 addr, u32 len, void *data) > -{ > - const u32 mask = TXGBE_MNGSEM_SWMBX | > TXGBE_MNGSEM_SWFLASH; > - u8 *buf = (u8 *)data; > - int err; > - > - err = hw->mac.acquire_swfw_sync(hw, mask); > - if (err) > - return err; > - > - while (len) { > - u32 seg = (len <= TXGBE_PMMBX_DATA_SIZE > - ? len : TXGBE_PMMBX_DATA_SIZE); > - > - err = txgbe_hic_sr_read(hw, addr, buf, seg); > - if (err) > - break; > - > - len -= seg; > - buf += seg; > - } > - > - hw->mac.release_swfw_sync(hw, mask); > - return err; > -} > - > /** > * txgbe_ee_write - Write EEPROM word using hostif > * @hw: pointer to hardware structure > @@ -420,42 +384,6 @@ s32 txgbe_ee_write32(struct txgbe_hw *hw, u32 > addr, u32 data) > return err; > } > > -/** > - * txgbe_ee_write_buffer - Write EEPROM byte(s) using hostif > - * @hw: pointer to hardware structure > - * @addr: offset of bytes in the EEPROM to write > - * @len: number of bytes > - * @data: word(s) write to the EEPROM > - * > - * Write a 8 bit byte(s) to the EEPROM using the hostif. > - **/ > -s32 txgbe_ee_write_buffer(struct txgbe_hw *hw, > - u32 addr, u32 len, void *data) > -{ > - const u32 mask = TXGBE_MNGSEM_SWMBX | > TXGBE_MNGSEM_SWFLASH; > - u8 *buf = (u8 *)data; > - int err; > - > - err = hw->mac.acquire_swfw_sync(hw, mask); > - if (err) > - return err; > - > - while (len) { > - u32 seg = (len <= TXGBE_PMMBX_DATA_SIZE > - ? len : TXGBE_PMMBX_DATA_SIZE); > - > - err = txgbe_hic_sr_write(hw, addr, buf, seg); > - if (err) > - break; > - > - len -= seg; > - buf += seg; > - } > - > - hw->mac.release_swfw_sync(hw, mask); > - return err; > -} > - > /** > * txgbe_calc_eeprom_checksum - Calculates and returns the checksum > * @hw: pointer to hardware structure > diff --git a/drivers/net/txgbe/base/txgbe_eeprom.h > b/drivers/net/txgbe/base/txgbe_eeprom.h > index d0e142dba5..78b8af978b 100644 > --- a/drivers/net/txgbe/base/txgbe_eeprom.h > +++ b/drivers/net/txgbe/base/txgbe_eeprom.h > @@ -51,14 +51,12 @@ s32 txgbe_ee_readw_sw(struct txgbe_hw *hw, u32 > offset, u16 *data); > s32 txgbe_ee_readw_buffer(struct txgbe_hw *hw, u32 offset, u32 words, > void *data); > s32 txgbe_ee_read32(struct txgbe_hw *hw, u32 addr, u32 *data); > -s32 txgbe_ee_read_buffer(struct txgbe_hw *hw, u32 addr, u32 len, void > *data); > > s32 txgbe_ee_write16(struct txgbe_hw *hw, u32 offset, u16 data); > s32 txgbe_ee_writew_sw(struct txgbe_hw *hw, u32 offset, u16 data); > s32 txgbe_ee_writew_buffer(struct txgbe_hw *hw, u32 offset, u32 words, > void *data); > s32 txgbe_ee_write32(struct txgbe_hw *hw, u32 addr, u32 data); > -s32 txgbe_ee_write_buffer(struct txgbe_hw *hw, u32 addr, u32 len, void > *data); > > > #endif /* _TXGBE_EEPROM_H_ */ Reviewed-by: Jiawen Wu Thanks.