From patchwork Fri Sep 2 20:02:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9311587 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 419F660760 for ; Fri, 2 Sep 2016 20:03:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3316E29858 for ; Fri, 2 Sep 2016 20:03:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27F582985A; Fri, 2 Sep 2016 20:03:48 +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=-5.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 BAA5029858 for ; Fri, 2 Sep 2016 20:03:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932767AbcIBUDr (ORCPT ); Fri, 2 Sep 2016 16:03:47 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35112 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932403AbcIBUDq (ORCPT ); Fri, 2 Sep 2016 16:03:46 -0400 Received: by mail-wm0-f65.google.com with SMTP id c133so4162026wmd.2 for ; Fri, 02 Sep 2016 13:03:45 -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=GF0Q5JHOGW4KerCLoJErIii/uPHuYYfI7pBXEGZ6gNM=; b=H0zlIF+wPLMe5iA8EHyKm8dVY++5NTONpexpZLImJgwq6TeRA2Xx6A8fJLfWQN3qWn waROcmNj7AAzu3LiNTMYQCv9UtFULGr1XuRy58NTO+ZVj1YSEpKxangginDOjAYEXi3E amH1mjicnSvb7TyK/0fnGJOHpFlu96N4nKtX1tmU16Ot85o7KxcYYA4SawsNnwhvYsDL cclurn2IyjKH/8u/BlKYqh5mPh5SYAsUJBNzSfu4s02iHV6f+6aGKXgTrp55/nY+/HxJ UUSKMT9eTJioL9BEkanf0G/1lyU9T1qpWXniWLkZkBP/fq9bpeGFfPDH9eNiDANgv4sv heOg== 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=GF0Q5JHOGW4KerCLoJErIii/uPHuYYfI7pBXEGZ6gNM=; b=PbxmzryhgEkW3i/tCNY9jq3WSvhOaN6AsIpL6c/UuylLh69lynoxgC4Y8ahQUTPgXE eXt/nKMjkaRJq24PahKBNc5iHYQFVyPnlCTLMMPmhMm78Vw1SlFUpaqFoB29kPA/b7uT DDikHdJ+mKILxofPswIK9muxfNvSUam7soZLyWgXmTOaS0BOA33VYt8Bx4GiJiJVaDE+ 7u960FwfztDajfz4eEcTQ9oY8ymxYxCjCrPKXpEP2hL6U/eLZqQBw4npR7+xcoyKQtXw +/k84E4tGGESraYpJUYXvHn/lltGrUC5AlBT2Qh8wpFUD0CdJVOhoNn92VSWsXVBQYHz 6Qaw== X-Gm-Message-State: AE9vXwMIC9CASIR2tbBnSzp7MRqzYzy47kzrET+JwRAe7r9BWLusVmA8x+1qOmeiVxv/+Q== X-Received: by 10.28.232.67 with SMTP id f64mr4713057wmh.15.1472846624509; Fri, 02 Sep 2016 13:03:44 -0700 (PDT) Received: from ?IPv6:2003:62:5f43:9500:39ed:a1fb:9a43:e02d? (p200300625F43950039EDA1FB9A43E02D.dip0.t-ipconnect.de. [2003:62:5f43:9500:39ed:a1fb:9a43:e02d]) by smtp.googlemail.com with ESMTPSA id o2sm12025499wjo.3.2016.09.02.13.03.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Sep 2016 13:03:44 -0700 (PDT) From: Heiner Kallweit Subject: [PATCH v2 02/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: <52c5893a-5927-4c83-4838-d618d434922c@gmail.com> Date: Fri, 2 Sep 2016 22:02:34 +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 --- v2: - switch order of patches 2 and 3 to do the trivial changes first --- 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 f9ef504..a9004fe 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; }; @@ -371,24 +369,16 @@ static int fsl_espi_do_one_msg(struct spi_master *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; 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;