From patchwork Tue Mar 19 17:26:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 160600 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4139909jad; Tue, 19 Mar 2019 10:28:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqydLAQC4TyDI3DvtN0nsEGReVXY4soulWP4mbYoavaeEsbZ5RVskNMSu8rFMi0ZzMubFMFi X-Received: by 2002:a65:654d:: with SMTP id a13mr24480251pgw.181.1553016480045; Tue, 19 Mar 2019 10:28:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553016480; cv=none; d=google.com; s=arc-20160816; b=Ti3IxaXEwGCXKxnCzJrwgW6a47VPAFZ5UQGEMnM9pFvm+xOfN6V+MZQprKk8H0pGxU aB6D1zvtuTEGLjo/lRsdBNBTgnCQhUnd2dJw6kL2zsW/M1xbgyku26WJcxU965NPlfDh beIrX8zpPN3OOTTm7zRbrpfPa4BDgu/d4kI/nGPBBhT7EyrGWF1W8Bp524eHS+ZlhWU3 o1tT9kb1uTm54kFI1gHS6sgHLFxHpY4KWWALAc90msCbm1QR0y2uiQrLs37Pa/AOeY7f h4qI81yMoPGvGmMU2DQlnb/eEJ5sK0INfUWnej8kypMWs+1bqoeuZC8fAqyvt/nITUvU acYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=/eXXnbyeXFctQ7VxAcrpv2Z0MSDXtIQMGy69zq2cvxc=; b=C9QU6nk8PETZOWOu+WOfrjPWZZiYkO5ubzbxx2lbSOm5C2F8zDin2XdUQp1QzRB0H4 zNrUGloOPG2k5uOj2419QdinavtHx7g+90az9uqlC17qbyf/+E4HooBXhHifU6gGBGo1 B4HssJAjx/gLhdtKBEn2gDAZT2hNIxCq0zmIy1T+zLt+2n2U7IRvY8dbkKZJQL9t9r+U WD3wOzt2ScFYt+mPDORMfcNf+Ox0hHgCs+izPCuZRf+YlM0YBebXdAmJXuJdxTjCWLOO iLRnmVOoC9G1RCSwHYKElg3kL47GacQK0sItfRZIHvNjSrsMulULTsJ4qNp9kSN9zrPs E2kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=rXV8vIqM; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si12408894ply.232.2019.03.19.10.27.59; Tue, 19 Mar 2019 10:28:00 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=rXV8vIqM; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727416AbfCSR1Y (ORCPT + 31 others); Tue, 19 Mar 2019 13:27:24 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:42110 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726776AbfCSR1X (ORCPT ); Tue, 19 Mar 2019 13:27:23 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x2JHRHBh030867; Tue, 19 Mar 2019 12:27:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1553016437; bh=/eXXnbyeXFctQ7VxAcrpv2Z0MSDXtIQMGy69zq2cvxc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=rXV8vIqMgyILN2ZlNYEzWfg4eNqywgHoybwA80lhoO5rOQyGvEdBmWRjMUE6HiCRR zSwD3Ec+trrqcMe2sEmfiv5Qdc8QMtQeu686UUdkJ0HD8HOtZqi5Wf86v1INf+Yr6I 2dPgLu08ad0UQ/oOiQWwriW62kl3eXrNvdlD4w8Q= Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x2JHRHHk080028 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 19 Mar 2019 12:27:17 -0500 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 19 Mar 2019 12:27:16 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1713.5 via Frontend Transport; Tue, 19 Mar 2019 12:27:16 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x2JHRG4i008318; Tue, 19 Mar 2019 12:27:16 -0500 From: Dan Murphy To: , , CC: , , , Dan Murphy Subject: [PATCH v11 5/5] can: m_can: Fix checkpatch issues on existing code Date: Tue, 19 Mar 2019 12:26:51 -0500 Message-ID: <20190319172651.10012-5-dmurphy@ti.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20190319172651.10012-1-dmurphy@ti.com> References: <20190319172651.10012-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix checkpatch issues found during the m_can framework creation. The code the issues were in, was in untouched code and these changes should be done separately as to not be confused with the framework changes. Fix these 3 check issues: CHECK: Unnecessary parentheses around 'cdev->can.state != CAN_STATE_ERROR_WARNING' if (psr & PSR_EW && (cdev->can.state != CAN_STATE_ERROR_WARNING)) { CHECK: Unnecessary parentheses around 'cdev->can.state != CAN_STATE_ERROR_PASSIVE' if ((psr & PSR_EP) && (cdev->can.state != CAN_STATE_ERROR_PASSIVE)) { CHECK: Unnecessary parentheses around 'cdev->can.state != CAN_STATE_BUS_OFF' if ((psr & PSR_BO) && (cdev->can.state != CAN_STATE_BUS_OFF)) { Signed-off-by: Dan Murphy --- v11 - New change to clean up last remaining checkpatch issues on original code. drivers/net/can/m_can/m_can.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) -- 2.20.1.390.gb5101f9297 diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 0759c61a7e5a..1245da6f79ff 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -750,22 +750,19 @@ static int m_can_handle_state_errors(struct net_device *dev, u32 psr) struct m_can_classdev *cdev = netdev_priv(dev); int work_done = 0; - if ((psr & PSR_EW) && - (cdev->can.state != CAN_STATE_ERROR_WARNING)) { + if (psr & PSR_EW && cdev->can.state != CAN_STATE_ERROR_WARNING) { netdev_dbg(dev, "entered error warning state\n"); work_done += m_can_handle_state_change(dev, CAN_STATE_ERROR_WARNING); } - if ((psr & PSR_EP) && - (cdev->can.state != CAN_STATE_ERROR_PASSIVE)) { + if (psr & PSR_EP && cdev->can.state != CAN_STATE_ERROR_PASSIVE) { netdev_dbg(dev, "entered error passive state\n"); work_done += m_can_handle_state_change(dev, CAN_STATE_ERROR_PASSIVE); } - if ((psr & PSR_BO) && - (cdev->can.state != CAN_STATE_BUS_OFF)) { + if (psr & PSR_BO && cdev->can.state != CAN_STATE_BUS_OFF) { netdev_dbg(dev, "entered error bus off state\n"); work_done += m_can_handle_state_change(dev, CAN_STATE_BUS_OFF);