From patchwork Thu Aug 25 04:44:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9298675 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F288A60757 for ; Thu, 25 Aug 2016 04:57:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4A0D291C0 for ; Thu, 25 Aug 2016 04:57:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D8F0C291C1; Thu, 25 Aug 2016 04:57:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A37A291CA for ; Thu, 25 Aug 2016 04:57:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751971AbcHYEzz (ORCPT ); Thu, 25 Aug 2016 00:55:55 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36644 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751611AbcHYExM (ORCPT ); Thu, 25 Aug 2016 00:53:12 -0400 Received: by mail-wm0-f67.google.com with SMTP id i138so5622658wmf.3 for ; Wed, 24 Aug 2016 21:53:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=6ErXMa0M5sMR1CRmIN46sZCMYIicVcNXi8dFVDSVxx4=; b=p/oMvnuS+yUWdFFTFDz65hvhdbQehlAlpn6UwyfF3lmTT0IJaKwcCmDjb2e1H4CO6x 6/TRRuyJ+MOMQlf5CjwElyPglxsaB8quG+UCGPOMm64E1ZTQJcpT7vmeXtFC+F4KiEVv RwZGtFCYR6AvnEjxDvofmLI+nuh3PT4mlP4wclElKRqxNRQ88rdcNf13WX1xel0tm6+/ GWQT/LkysCNGAzKewz4dSeWCzBIXR4EuIdCQIC78sOOuYyBYfTjmf9C1A0eZjjIEr9zl x//CaWrKs3WgLXLgYmL1GqBOSlN4XQaKGpjpV17qK1KTXfqRbOhNaLdw1Exq+2N0fT6Z ZNDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=6ErXMa0M5sMR1CRmIN46sZCMYIicVcNXi8dFVDSVxx4=; b=hOCP4X1A3IePaRVbZrK+pT0m0kgAfo0H+vL3kA6hfG3RIcg1444LejaxKyjdsQK1bN zdBnDjqhEEWnTCqkgbWGf9k57KeL+6gCoQ0H2bk5lQj5bg3UYoGORZMUfxORZDFI5n57 njLsXqX4h7NBu0iz9MEx1evfGBmJ5b44lP2tSmtJLibVsTXjAe4004K1FX8gowhRutFj ztdHEi8IW9SyndO6TYAXO4KslFaeEOk279rgcK2Wmc+/K3hhU8rHJ+gWWUbNh0AI6Zvj Ghw1dDfPnQhCsgQpOSSMTmzl1uOY5oFCItOpGVXpNPc6b5C+3iRteILKe32FHBq08qve na1w== X-Gm-Message-State: AEkoousdq32QDzwlTDiYWcqUq25CZBuMy7SzzkcqD+wo0yHend9VxL0jUKu1QcNTI2KFvQ== X-Received: by 10.194.95.36 with SMTP id dh4mr5882102wjb.149.1472100790808; Wed, 24 Aug 2016 21:53:10 -0700 (PDT) Received: from ?IPv6:2003:62:5f43:9500:dd82:2805:e44f:720e? (p200300625F439500DD822805E44F720E.dip0.t-ipconnect.de. [2003:62:5f43:9500:dd82:2805:e44f:720e]) by smtp.googlemail.com with ESMTPSA id g7sm13143290wjx.10.2016.08.24.21.53.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Aug 2016 21:53:10 -0700 (PDT) From: Heiner Kallweit Subject: [PATCH 03/23] spi: fsl-espi: remove unused elements n_rx and n_tx in struct fsl_espi_transfer To: Mark Brown References: Cc: "linux-spi@vger.kernel.org" Message-ID: Date: Thu, 25 Aug 2016 06:44:19 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Both elements are not used, so remove them. Signed-off-by: Heiner Kallweit --- drivers/spi/spi-fsl-espi.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) 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;