diff mbox

[03/23] spi: fsl-espi: remove unused elements n_rx and n_tx in struct fsl_espi_transfer

Message ID b5777cc4-1ab7-d7cb-00be-c597060e7af6@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Heiner Kallweit Aug. 25, 2016, 4:44 a.m. UTC
Both elements are not used, so remove them.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/spi/spi-fsl-espi.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

Comments

Mark Brown Sept. 1, 2016, 8:14 p.m. UTC | #1
On Thu, Aug 25, 2016 at 06:44:19AM +0200, Heiner Kallweit wrote:
> Both elements are not used, so remove them.

Mechanical changes like this are better done before more substantial
optimisations and enhancements like the previous patch, that way they
won't get blocked if there's a problem with the previous patch as is the
case here.
diff mbox

Patch

diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c
index 2c4b2f8..12cb0c5 100644
--- a/drivers/spi/spi-fsl-espi.c
+++ b/drivers/spi/spi-fsl-espi.c
@@ -41,8 +41,6 @@  struct fsl_espi_transfer {
 	const void *tx_buf;
 	void *rx_buf;
 	unsigned len;
-	unsigned n_tx;
-	unsigned n_rx;
 	unsigned actual_length;
 	int status;
 };
@@ -372,26 +370,18 @@  static int fsl_espi_do_one_msg(struct spi_master *master,
 	struct mpc8xxx_spi *mspi = spi_master_get_devdata(master);
 	struct spi_transfer *t;
 	u8 *rx_buf = NULL;
-	unsigned int n_tx = 0;
-	unsigned int n_rx = 0;
 	unsigned int xfer_len = 0;
 	struct fsl_espi_transfer espi_trans;
 
 	memset(mspi->local_buf, 0, SPCOM_TRANLEN_MAX);
 
 	list_for_each_entry(t, &m->transfers, transfer_list) {
-		if (t->tx_buf)
-			n_tx += t->len;
-		if (t->rx_buf) {
-			n_rx += t->len;
+		if (t->rx_buf)
 			rx_buf = t->rx_buf;
-		}
 		if ((t->tx_buf) || (t->rx_buf))
 			xfer_len += t->len;
 	}
 
-	espi_trans.n_tx = n_tx;
-	espi_trans.n_rx = n_rx;
 	espi_trans.len = xfer_len;
 	espi_trans.actual_length = 0;
 	espi_trans.status = 0;