Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1650071ybz; Thu, 16 Apr 2020 12:59:54 -0700 (PDT) X-Google-Smtp-Source: APiQypK5F/3940/RDJ3NMK/KBXUqLimP2PdGiR3dq5xx7cST4QbtZqqmD51mp7jt4ymcT1mR9VFN X-Received: by 2002:a17:906:4810:: with SMTP id w16mr11009041ejq.226.1587067194396; Thu, 16 Apr 2020 12:59:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587067194; cv=none; d=google.com; s=arc-20160816; b=sfeXU5nD5cH6H2uKskW6hx3OtXQhnlP7sb7GlF0dxxmT5cLOJMu1wDQMqzMnyPNHVx rilpBKf/lU+RGVKq/Ec/hoPgG5W4M3PwFt+z+uNTc9zIVpyErM2y7qbyyvqo9PGdbJ4R Zi5UluqSLQAJ/h76sHxT7TmE9uX2QuC+725bivdaXc/Ru8T3rWOtkUcMNuXl2tef/yuu 2+WSKLAmsO77SpO2c1MDAEQ0HOFiCup7HZyNPGQEqs5sPiy7okcQLNpBDoc4zejEFtMA DOdpewqfrwbUlcEaNGtn/9lynMYMhtj2qecFw+8Y37ZG8SHEi5CqlyPYbuvVpcYqIZ4f TQuw== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=b3HGwQMVCeInt+IgWMnXkueW9CxZmtk4XEFLKzcL3B4=; b=ZKpsGWzNd5HszoX9jKHupCzmZ0AI+V0Dm+40Z4gKd804sWgN7dXtGCxJSKkKE9/hV+ A8maztQF+nEDk3PGgE1yEU+3aupx5sfN41ti07LrgUxGAsc0oGoEjC1b2lZYrS6JkJ/+ Xl6OUrq2K1PbahSRwAgr9YdQLUnjzjsYLXN13fJown3H2ZSk33cilOMn3F9xOz7oq4hz qIYlRoq1Mc7lCPZVITaf+9TATZXfrfPO5nC8cvzFRXGRR7C9A4wpJ+xvMXCcFLlo0mFl HFcr8TCZ1IB94wpm5FXhArwdc5RcowwCG8aw89LSmVqQQp86taHfcP6tfpA9Lls446Pl rTKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Z0WJil4s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r13si1448508edy.337.2020.04.16.12.59.31; Thu, 16 Apr 2020 12:59:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Z0WJil4s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2898337AbgDPNlj (ORCPT + 99 others); Thu, 16 Apr 2020 09:41:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:42822 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2896549AbgDPNcz (ORCPT ); Thu, 16 Apr 2020 09:32:55 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E723E2222C; Thu, 16 Apr 2020 13:31:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587043898; bh=fVibvqL9DMu1Yg/IVcb6cWJg7YBQvJjwZVNu2jm5AaM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z0WJil4sqgcoR5FJZvTOuLlE2hoDQvc+F/p+ahTfIGAqDpG21T1A7UD8tS0lJDlCh J1t2kyQwl2r702hT6SQA1Y42AbJsRX+M3sGU/uj/Mg15WEAHkE8tWExV/dMfe3gJrA SxBm0rh7O1eD+5sYg73W8J/PNFTq7qBHjRmBt9eQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nick Desaulniers , Nathan Chancellor , Sasha Levin Subject: [PATCH 4.19 145/146] misc: echo: Remove unnecessary parentheses and simplify check for zero Date: Thu, 16 Apr 2020 15:24:46 +0200 Message-Id: <20200416131302.195343029@linuxfoundation.org> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200416131242.353444678@linuxfoundation.org> References: <20200416131242.353444678@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor [ Upstream commit 85dc2c65e6c975baaf36ea30f2ccc0a36a8c8add ] Clang warns when multiple pairs of parentheses are used for a single conditional statement. drivers/misc/echo/echo.c:384:27: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((ec->nonupdate_dwell == 0)) { ~~~~~~~~~~~~~~~~~~~~^~~~ drivers/misc/echo/echo.c:384:27: note: remove extraneous parentheses around the comparison to silence this warning if ((ec->nonupdate_dwell == 0)) { ~ ^ ~ drivers/misc/echo/echo.c:384:27: note: use '=' to turn this equality comparison into an assignment if ((ec->nonupdate_dwell == 0)) { ^~ = 1 warning generated. Remove them and while we're at it, simplify the zero check as '!var' is used more than 'var == 0'. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/misc/echo/echo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/echo/echo.c b/drivers/misc/echo/echo.c index 8a5adc0d2e887..3ebe5d75ad6a2 100644 --- a/drivers/misc/echo/echo.c +++ b/drivers/misc/echo/echo.c @@ -381,7 +381,7 @@ int16_t oslec_update(struct oslec_state *ec, int16_t tx, int16_t rx) */ ec->factor = 0; ec->shift = 0; - if ((ec->nonupdate_dwell == 0)) { + if (!ec->nonupdate_dwell) { int p, logp, shift; /* Determine: -- 2.20.1