From patchwork Thu May 9 16:11:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 163717 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp1180646ilr; Thu, 9 May 2019 09:11:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqwvfrG1q+9HZWm/QBXtxgk6MnFrrS91JwfCJMmTUPRmZzmLZP5GPClfAdwKCS2Fk4WkkvC3 X-Received: by 2002:a65:5086:: with SMTP id r6mr6705676pgp.301.1557418278704; Thu, 09 May 2019 09:11:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557418278; cv=none; d=google.com; s=arc-20160816; b=ho4hOekFNt+29L8Xbp188hY4ATCBHiCK0oc25mPXBWBnj8vxbiUfLPdcZIT2fc++kz rxqxUdkpVb//Xa9GA0BIBCX6JEEB2q/NMq1pZwoN5fcJtIXZP54hf/jL2QtB15cWXAGE wDdJ4NyBS7pITNXa4LInE3tUQ2rs6rqzqtTLbEOloOSw48aMFQPDbFhQ0wazItAshJsF 021tUCyTvFguwsRc5wCp6ro/J0Kr45GnWrWGB3rPoK/bWSCByl+5v0uvvUjE1mipmve0 uB780n8Bn6/el8unST7idW+66Au2B/Co4egaKMejJBFktN1hGd0Nlc9p7PbynP+C2F2g qHjA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vYDEaMEL5i/DNwQ5MyfpbPCp2Sb+a1ukplyuBk6CKH4=; b=R9nzZFI5rZ2NiRgGOlk5h6qe0AOh/RnfTq8/RQJ1b2MxDi40MScczmp8Q+vpJVdijm OmPCFTA+jcyN3yb42wGJnjxIMroCUgdPKB1hrMd3uvT883pZttrCLwpHHJH0Sm+lSzb3 bAuwA1zq+RW9uo6h7wjrAIzwLDn+vlMeHHDfv5LgLwMJuZrc40Q8KSU/LLeGHBcziOK7 K6t6l5QGRgxl+p6ALHi6dd3F89+x2gOKTMD0WdDdg8Y/+UwToBDl8uMcbS2yXmwxeDvV v0SqNDMGu/M+yxiDGVe6LD+ncKmpj0DNY3WVUbLjaCu3wLEhyCEszGqYRJcT2sItGyzs QgWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=OzGwQQg2; 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 p16si3535484pgg.59.2019.05.09.09.11.16; Thu, 09 May 2019 09:11:18 -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=OzGwQQg2; 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 S1726711AbfEIQLP (ORCPT + 30 others); Thu, 9 May 2019 12:11:15 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:32906 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726469AbfEIQLO (ORCPT ); Thu, 9 May 2019 12:11:14 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x49GB3I2109737; Thu, 9 May 2019 11:11:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1557418263; bh=vYDEaMEL5i/DNwQ5MyfpbPCp2Sb+a1ukplyuBk6CKH4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=OzGwQQg26KKFe+AmQUdYMx98QjB1RGu3PgrhPqXvYyKm26Mv3NaRDPXcHTL7mXMeP LQ+b6mEkie8DmE1RDwwN87tSwkOnMISpGA2wGWTl71xJa+4JwebZW64GrKCHBTUSfG /AFT4pzc5zDN4OWYuWy8WdtYhqQvKmky64H1izz0= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x49GB34G036053 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 9 May 2019 11:11:03 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 9 May 2019 11:11:03 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 9 May 2019 11:11:03 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x49GB3HP044771; Thu, 9 May 2019 11:11:03 -0500 From: Dan Murphy To: , , CC: , , , Dan Murphy Subject: [PATCH v12 5/5] can: m_can: Fix checkpatch issues on existing code Date: Thu, 9 May 2019 11:11:09 -0500 Message-ID: <20190509161109.10499-5-dmurphy@ti.com> X-Mailer: git-send-email 2.21.0.5.gaeb582a983 In-Reply-To: <20190509161109.10499-1-dmurphy@ti.com> References: <20190509161109.10499-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 --- v12 - No Changes - https://lore.kernel.org/patchwork/patch/1052304/ 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.21.0.5.gaeb582a983 Acked-by: Faiz Abbas diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 923c53204d7d..ef4282a98fe1 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -733,22 +733,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);