DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Jiawen Wu" <jiawenwu@trustnetic.com>
To: "'Ferruh Yigit'" <ferruh.yigit@intel.com>
Cc: <dev@dpdk.org>
Subject: Re: [dpdk-dev] [RFC] remove unused functions
Date: Tue, 24 Nov 2020 11:32:10 +0800	[thread overview]
Message-ID: <001501d6c212$65240e70$2f6c2b50$@trustnetic.com> (raw)
In-Reply-To: <20201119035238.3653702-1-ferruh.yigit@intel.com>

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 <ferruh.yigit@intel.com>
> ---
>  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 <jiawenwu@trustnetic.com>

Thanks.




  parent reply	other threads:[~2020-11-24  3:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19  3:52 Ferruh Yigit
2020-11-19  7:22 ` Xu, Rosen
2020-11-19 19:01 ` Stephen Hemminger
2020-11-23  2:55 ` Zhang, Tianfei
2020-11-23  9:56   ` Ferruh Yigit
2020-11-23 16:07     ` Stephen Hemminger
2020-11-24 10:01       ` Zhang, Tianfei
2020-11-24 10:00     ` Zhang, Tianfei
2020-11-24 10:26       ` Ferruh Yigit
2020-11-24 11:01         ` Zhang, Tianfei
2020-11-24 11:31           ` Ferruh Yigit
2020-11-24 12:17             ` Zhang, Tianfei
2020-11-23 16:20 ` Maxime Coquelin
2020-11-24  3:32 ` Jiawen Wu [this message]
2021-02-11 11:29 ` Burakov, Anatoly
2023-06-14 21:59 ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001501d6c212$65240e70$2f6c2b50$@trustnetic.com' \
    --to=jiawenwu@trustnetic.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).