Received: by 10.223.164.221 with SMTP id h29csp2218930wrb; Thu, 2 Nov 2017 07:37:44 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Qvr0e2EH4A51Wj6JW/XQSFO9MyPgLPQ49kTRyy1g1yb/sZJS9pLn9TwqqcgNrlZbGeRkSa X-Received: by 10.99.64.5 with SMTP id n5mr3778504pga.244.1509633464133; Thu, 02 Nov 2017 07:37:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509633464; cv=none; d=google.com; s=arc-20160816; b=bpWK/18QjB4gX3Br/wBWJlvwv/YS5lY4Xh6vIZ21q6ShFCdn5+ny/pWRoMbdv/vZet 64Jv5OZHlHHiE7Jn1EofpKxZGSRT5yk5RTetNj7ZUzH0iP7s3G8khS4J83uxcc0KluWD P5Mdp6rWd5oIurd2UqvNLTkZATMTfxucqbc2CFzYxiAYIxfNzZbI30bvIgy/45/7orJ1 pD+aNbo2HFvxckHKIihx0QfC9adqsHyE/n65RQOteTnoJARQuT6yBxieH9WHWCg94/d4 V4wQv9yc2sDCRbXTKsoKSnj+GVMV2Q74ISN+kyEVyXCEb+udfOrYIDxKD6Z8YNR0gL5V Y8fQ== 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:in-reply-to :references:subject:cc:to:mime-version:user-agent:reply-to:from:date :message-id:arc-authentication-results; bh=oQFl5yfYBUmY24ARv3QQt83pJeXiWQKQqEnAVvnnQtk=; b=HRA/Sl25IIyCAbKR74io4DLo7gmS7QNO4CDj1Cu6Qf0iVCXOiTMExDeAPzMSnfRGM/ 2I78oTiBmm3QOFv1gGU05k0FqPLpGBq5wnh4DY6DdtNpJAU4uYJXjSrc7cdMRprhwthG qqQqDQVzRT8E4/4WbETSZ1wMINBuWx44lrFM/OiD8XbfjmBkbYSBMRcXcFjjxyBTn5OH gkJ9F7VH0zK0iAIYuhowg62ZOpNwmyyBaT5VVD8IApnvDGOmP335spUrQ74tlocpFMeo fTbPwIFH0+OH8vm4jD7FY+2xdY8tVmBptvfIIEV4MK24ODnqrF56QisGV5BhO9oCxYWe hOPA== 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 u25si3928341pfk.246.2017.11.02.07.37.29; Thu, 02 Nov 2017 07:37:44 -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 S933548AbdKBOgi (ORCPT + 96 others); Thu, 2 Nov 2017 10:36:38 -0400 Received: from mx02-sz.bfs.de ([194.94.69.103]:50236 "EHLO mx02-sz.bfs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933366AbdKBOgg (ORCPT ); Thu, 2 Nov 2017 10:36:36 -0400 Received: from localhost (localhost [127.0.0.1]) by mx02-sz.bfs.de (Postfix) with ESMTP id DE8583EB; Thu, 2 Nov 2017 15:36:34 +0100 (CET) X-Virus-Scanned: amavisd-new at bfs.de Received: from mx02-sz.bfs.de ([127.0.0.1]) by localhost (mx02-sz.bfs.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nghy2e2GuPUQ; Thu, 2 Nov 2017 15:36:32 +0100 (CET) Received: from mail-fr.bfs.de (mail-fr.bfs.de [10.177.18.200]) by mx02-sz.bfs.de (Postfix) with ESMTPS; Thu, 2 Nov 2017 15:36:32 +0100 (CET) Received: from [134.92.181.33] (unknown [134.92.181.33]) by mail-fr.bfs.de (Postfix) with ESMTPS id 24208BEE6D; Thu, 2 Nov 2017 15:36:32 +0100 (CET) Message-ID: <59FB2D6F.4030806@bfs.de> Date: Thu, 02 Nov 2017 15:36:31 +0100 From: walter harms Reply-To: wharms@bfs.de User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.16) Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11 MIME-Version: 1.0 To: Colin Ian King CC: Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] tty: max3100: remove unused variable rts and remove unused assignment References: <20171102140144.21514-1-colin.king@canonical.com> <59FB2849.6020108@bfs.de> <026e02c7-745e-af05-8d20-4588420888b3@canonical.com> <4ab49f27-4122-15bd-bc36-2e28f96255b7@canonical.com> In-Reply-To: <4ab49f27-4122-15bd-bc36-2e28f96255b7@canonical.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 02.11.2017 15:22, schrieb Colin Ian King: > On 02/11/17 14:21, Colin Ian King wrote: >> On 02/11/17 14:14, walter harms wrote: >>> >>> >>> Am 02.11.2017 15:01, schrieb Colin King: >>>> From: Colin Ian King >>>> >>>> Variable rts is being assigned but it is never read, hence it can be >>>> removed. The assignment to param_new to zero is redundant as it is >>>> being updates a few statements later, so remove this redundant >>>> assignment. Cleans up two clang warnings: >>>> >>>> drivers/tty/serial/max3100.c:277:3: warning: Value stored to 'rts' >>>> is never read >>>> drivers/tty/serial/max3100.c:439:2: warning: Value stored to 'param_new' >>>> is never read >>>> >>>> Signed-off-by: Colin Ian King >>>> --- >>>> drivers/tty/serial/max3100.c | 4 +--- >>>> 1 file changed, 1 insertion(+), 3 deletions(-) >>>> >>>> diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c >>>> index b6b3453e8c1f..f691f3cdb5b1 100644 >>>> --- a/drivers/tty/serial/max3100.c >>>> +++ b/drivers/tty/serial/max3100.c >>>> @@ -263,7 +263,7 @@ static void max3100_work(struct work_struct *w) >>>> struct max3100_port *s = container_of(w, struct max3100_port, work); >>>> int rxchars; >>>> u16 tx, rx; >>>> - int conf, cconf, rts, crts; >>>> + int conf, cconf, crts; >>>> struct circ_buf *xmit = &s->port.state->xmit; >>>> >>>> dev_dbg(&s->spi->dev, "%s\n", __func__); >>>> @@ -274,7 +274,6 @@ static void max3100_work(struct work_struct *w) >>>> conf = s->conf; >>>> cconf = s->conf_commit; >>>> s->conf_commit = 0; >>>> - rts = s->rts; >>>> crts = s->rts_commit; >>>> s->rts_commit = 0; >>>> spin_unlock(&s->conf_lock); >>>> @@ -436,7 +435,6 @@ max3100_set_termios(struct uart_port *port, struct ktermios *termios, >>>> dev_dbg(&s->spi->dev, "%s\n", __func__); >>>> >>>> cflag = termios->c_cflag; >>>> - param_new = 0; >>>> param_mask = 0; >>>> >>>> baud = tty_termios_baud_rate(termios); >>> >>> are you sure ? >> >> Yep. So are my compilers >> >>> >>> based on this code: >>> https://lxr.missinglinkelectronics.com/linux/drivers/tty/serial/max3100.c >> >> 438 cflag = termios->c_cflag; >> 439 param_new = 0; >> 440 param_mask = 0; >> 441 >> 442 baud = tty_termios_baud_rate(termios); >> 443 param_new = s->conf & MAX3100_BAUD; >> >> param_new is being updated again on line 440, so line 439 is redundant. > I mean "again on line 443" > yep, i missed 443, sorry for the noise. re, wh >> >>> >>> the default case will not set param_new >>> >>> re, >>> wh >>> >>> -- >>> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in >>> the body of a message to majordomo@vger.kernel.org >>> More majordomo info at http://vger.kernel.org/majordomo-info.html >>> >> > > -- > To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > From 1582964539390174638@xxx Thu Nov 02 14:23:44 +0000 2017 X-GM-THRID: 1582963332614465548 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread