Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp3069279imd; Mon, 29 Oct 2018 00:53:40 -0700 (PDT) X-Google-Smtp-Source: AJdET5e+kh6hEd3sf+Jn8FaaXKDgcEl/IpRxPL4ljSHmO6YEi03FS5adsspThQjoNBQiOqIcP0to X-Received: by 2002:a63:82c6:: with SMTP id w189mr12969907pgd.344.1540799620279; Mon, 29 Oct 2018 00:53:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540799620; cv=none; d=google.com; s=arc-20160816; b=oQGYLRSV8oVybPFqXdD/CUGzpD+qpkxcrBJhk8N8VEVYVtOm4WPBxY7C5WMc5OGGh8 kevEhm5fJ+TIGQ7ru0n0pOGn23Y50xjHvoELI3CrVqhPa58ydD47cM3/X6A2MhglDK55 WGePpvYwNHqc/H+z5/igcpg1oz+NKGZMKpJNxf2Wc+lEvhIc1OQOAOOSc6X2TBXG0uB4 7tW0u1Ci059gAuOvB7ClPfQR7EdN9wjtL/TxpNwFnm8Ez7/yKKSypR2zmV3jFIsqzoCq cI3bGnuxe7O9oNx8mjoOtVTXaVeYwXbgDGs5UnO5FUZCvCmMVbHISZyJIPpPCNKht23B GWEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=QoqPopP5hDNn4zPaBhD6xQ8AfAMVtwRgemnUmVQNHO0=; b=pWYMpHUtL9VtQHpEUe2f/2sDtlV9YUghUYBO6QXQIkCdNqJcxwaII0761lhxbfYLuS y5LC8tTy3b/LzdCjem8P+W022K1kpZFCRd0g6b5Ae3vUkdo85L6+T1fDY6wcgM3stNWw UqZmtjgf6XsAoqq5TDxzko39u8iVejfZPbQnt+XHo1XaDwJBUysWSKh13vJrLxnYe4je y6VbDYrLTTQ+WJbGxgTkBFJ7f0PfpxqdU8pW6AQdfdhDwV+wMPIQnCr4EkN2t69ac59J OJGpx+9ocBs0+o8Xj5E3jEdatEPNTri2/sOjVa5HnCT3gMHBI/QDfNTEMOBcZ3NsgPkT cG5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x15-v6si20312899pgf.307.2018.10.29.00.53.24; Mon, 29 Oct 2018 00:53:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729314AbeJ2Qkd (ORCPT + 99 others); Mon, 29 Oct 2018 12:40:33 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:35713 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725969AbeJ2Qkc (ORCPT ); Mon, 29 Oct 2018 12:40:32 -0400 Received: by mail-wr1-f68.google.com with SMTP id w5-v6so7525322wrt.2; Mon, 29 Oct 2018 00:53:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=QoqPopP5hDNn4zPaBhD6xQ8AfAMVtwRgemnUmVQNHO0=; b=VUTN6MLdClvLtwm0g48Db6veJvf9pTfgCzJXQ+VBQ44sBXLsM5VMflSVj4+MYswIvs ATPItDsk8E+5bk7TMW/q/DoPErwvNomOyhx2wlnKlOTXnXwALOS8pjmGK9kfnB8bkAjx 9ew4FOO0patiizOM1pL3dVtMpNZthghD+65GIaAV0JPCmE3RTJL+cFlEsU2fasrENk6R dIEwVX5rq895pnoqHarZa7UV6xn/wPTxzw946Swiw0/TTGNNx2WfvrLmibJGRO24CjY9 TB2Ff/5aAtC3wUeuTtwrLzAbUp0BwHqlm13YyduE2ZShd4VMnSETngzn3jOpJ/687Snt 4X4Q== X-Gm-Message-State: AGRZ1gLCa5MRFFGhxfy9CjIGspHZYwfGiSJXmyrOXWcOuf3j0Cj9LocY N89S22ov6HlGz7Vih8iFBklRdIpg X-Received: by 2002:a5d:4c4f:: with SMTP id n15-v6mr11993055wrt.298.1540799580789; Mon, 29 Oct 2018 00:53:00 -0700 (PDT) Received: from ?IPv6:2a01:4240:2e27:ad85:aaaa::70f? ([2a01:4240:2e27:ad85:aaaa::70f]) by smtp.gmail.com with ESMTPSA id 4-v6sm159832wmg.21.2018.10.29.00.52.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 00:53:00 -0700 (PDT) Subject: Re: [PATCH] pch_uart: remove set but not used variable 'tx_empty' To: zhong jiang , gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org References: <1540300894-27202-1-git-send-email-zhongjiang@huawei.com> From: Jiri Slaby Openpgp: preference=signencrypt Autocrypt: addr=jslaby@suse.cz; prefer-encrypt=mutual; keydata= xsFNBE6S54YBEACzzjLwDUbU5elY4GTg/NdotjA0jyyJtYI86wdKraekbNE0bC4zV+ryvH4j rrcDwGs6tFVrAHvdHeIdI07s1iIx5R/ndcHwt4fvI8CL5PzPmn5J+h0WERR5rFprRh6axhOk rSD5CwQl19fm4AJCS6A9GJtOoiLpWn2/IbogPc71jQVrupZYYx51rAaHZ0D2KYK/uhfc6neJ i0WqPlbtIlIrpvWxckucNu6ZwXjFY0f3qIRg3Vqh5QxPkojGsq9tXVFVLEk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rDk+gRNvKnGwFNeTkTKtJ0P8jYd7P1gZb9Fwj 9YLxjhn/sVIhNmEBLBoI7PL+9fbILqJPHgAwW35rpnq4f/EYTykbk1sa13Tav6btJ+4QOgbc ezWIwZ5w/JVfEJW9JXp3BFAVzRQ5nVrrLDAJZ8Y5ioWcm99JtSIIxXxt9FJaGc1Bgsi5K/+d yTKLwLMJgiBzbVx8G+fCJJ9YtlNOPWhbKPlrQ8+AY52Aagi9WNhe6XfJdh5g6ptiOILm330m kR4gW6nEgZVyIyTq3ekOuruftWL99qpP5zi+eNrMmLRQx9iecDNgFr342R9bTDlb1TLuRb+/ tJ98f/bIWIr0cqQmqQ33FgRhrG1+Xml6UXyJ2jExmlO8JljuOGeXYh6ZkIEyzqzffzBLXZCu jlYQDFXpyMNVJ2ZwPmX2mWEoYuaBU0JN7wM+/zWgOf2zRwhEuD3A2cO2PxoiIfyUEfB9SSmf faK/S4xXoB6wvGENZ85Hg37C7WDNdaAt6Xh2uQIly5grkgvWppkNy4ZHxE+jeNsU7tg= Message-ID: Date: Mon, 29 Oct 2018 08:52:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <1540300894-27202-1-git-send-email-zhongjiang@huawei.com> Content-Type: text/plain; charset=iso-8859-2 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23. 10. 18, 15:21, zhong jiang wrote: > tx_empty is not used after setting its value. It is safe to remove > the unused variable. > > Signed-off-by: zhong jiang Reviewed-by: Jiri Slaby > --- > drivers/tty/serial/pch_uart.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c > index cb85002..9ed121f 100644 > --- a/drivers/tty/serial/pch_uart.c > +++ b/drivers/tty/serial/pch_uart.c > @@ -933,7 +933,6 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv) > struct scatterlist *sg; > int nent; > int fifo_size; > - int tx_empty; > struct dma_async_tx_descriptor *desc; > int num; > int i; > @@ -958,11 +957,9 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv) > } > > fifo_size = max(priv->fifo_size, 1); > - tx_empty = 1; > if (pop_tx_x(priv, xmit->buf)) { > pch_uart_hal_write(priv, xmit->buf, 1); > port->icount.tx++; > - tx_empty = 0; > fifo_size--; > } > > thanks, -- js suse labs