From patchwork Sun Sep 4 07:53:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9312401 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 B81A0600CA for ; Sun, 4 Sep 2016 08:07:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9163C287DA for ; Sun, 4 Sep 2016 08:07:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F6DF28946; Sun, 4 Sep 2016 08:07:28 +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=-4.4 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 4459C287DA for ; Sun, 4 Sep 2016 08:07:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752003AbcIDIH0 (ORCPT ); Sun, 4 Sep 2016 04:07:26 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33237 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750922AbcIDIHX (ORCPT ); Sun, 4 Sep 2016 04:07:23 -0400 Received: by mail-wm0-f65.google.com with SMTP id w207so8683033wmw.0 for ; Sun, 04 Sep 2016 01:07:23 -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=JFCI4y9tBmQBT3F8sAIumd8UDswXixdza41G4H/gS2Y=; b=cv8JKEfvpxnCb9ytVeQxwRqmdMJoCoMulTgAKXqjs9Qd5VgzDDfw/jH/tJdGnq9uHl Bj40XqYPkdA33KWlqclNrIY++tCPAB1FYRPVZfYaLOQnPJRe36vsrMAqK7wyhaQK//1q AFVMy/EYs7De60CJ2N1Hlm8dYPxll/ROYPa/LHydG/S/ShL04cXnzJ5RUn4oRkBdfp/Z PBf1npQapE41qUXX5vqQuLFO4F+xtBNJIb67F+OzpKcKIccTwyhXzZUjQS7LaxlDZ2UU n7yQzpVcCgTQ3oPFcwj+1BXwA7PyKfeAU65wu2gQWhNKbY4DSDLH0czcxEjjKKarLmn3 W3/g== 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=JFCI4y9tBmQBT3F8sAIumd8UDswXixdza41G4H/gS2Y=; b=IROC91aWF/0oYK+f9nzwv92pokxTujiuKMG9y00sJye4YLHJMgFVjpAOg8ghRwmWol JhjdIBV4vKrLIpOyQ7fWMTAWvI/eTK2GUIjVjKuPkG3xODqq6jsNvtjNRY7wt/LabEs6 l8fOLSbH0jUsw7HHrSdQ6mvVz2p3WB55MyNUCjDruE+89/dC12SQQwkMjMCvv9U+4O3p Ny4moMiKz6mAy7byCPHQ2VyRTXX1KExvbkMQdLQUZcOwFFYDy4ON/RnxHkIakc+6wbCN sz0839GHy465NDXkXAWRkyJaLngWpmlaOjkLgFM/HsATIw8slgx6hbUM8ZMseNHR6LwI WwIg== X-Gm-Message-State: AE9vXwMUkCROMLNFmU062hoNa+3/ifmMKR5scSAipagWEx1zgILzhTRDg87F0MkVw7nlWA== X-Received: by 10.194.161.169 with SMTP id xt9mr12132466wjb.106.1472976442086; Sun, 04 Sep 2016 01:07:22 -0700 (PDT) Received: from ?IPv6:2003:62:5f43:9500:c1f5:c528:a3d:f8c4? (p200300625F439500C1F5C5280A3DF8C4.dip0.t-ipconnect.de. [2003:62:5f43:9500:c1f5:c528:a3d:f8c4]) by smtp.googlemail.com with ESMTPSA id d8sm13032014wmi.0.2016.09.04.01.07.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Sep 2016 01:07:21 -0700 (PDT) From: Heiner Kallweit Subject: [PATCH v2 01/18] 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: <768db945-1d61-d258-e82d-24db9a7ecc9c@gmail.com> Date: Sun, 4 Sep 2016 09:53:01 +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 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;