From: Dan Murphy <dmurphy@ti.com> To: wg@grandegger.com, mkl@pengutronix.de, davem@davemloft.net Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Dan Murphy <dmurphy@ti.com> Subject: [PATCH v11 5/5] can: m_can: Fix checkpatch issues on existing code Date: Tue, 19 Mar 2019 12:26:51 -0500 [thread overview] Message-ID: <20190319172651.10012-5-dmurphy@ti.com> (raw) In-Reply-To: <20190319172651.10012-1-dmurphy@ti.com> 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 <dmurphy@ti.com> --- 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(-) 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); -- 2.20.1.390.gb5101f9297
WARNING: multiple messages have this Message-ID (diff)
From: Dan Murphy <dmurphy@ti.com> To: <wg@grandegger.com>, <mkl@pengutronix.de>, <davem@davemloft.net> Cc: <linux-can@vger.kernel.org>, <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>, Dan Murphy <dmurphy@ti.com> Subject: [PATCH v11 5/5] can: m_can: Fix checkpatch issues on existing code Date: Tue, 19 Mar 2019 12:26:51 -0500 [thread overview] Message-ID: <20190319172651.10012-5-dmurphy@ti.com> (raw) In-Reply-To: <20190319172651.10012-1-dmurphy@ti.com> 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 <dmurphy@ti.com> --- 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(-) 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); -- 2.20.1.390.gb5101f9297
next prev parent reply other threads:[~2019-03-19 17:26 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-03-19 17:26 [PATCH v11 1/5] can: m_can: Create a m_can platform framework Dan Murphy 2019-03-19 17:26 ` Dan Murphy 2019-03-19 17:26 ` [PATCH v11 2/5] can: m_can: Rename m_can_priv to m_can_classdev Dan Murphy 2019-03-19 17:26 ` Dan Murphy 2019-03-19 17:26 ` [PATCH v11 3/5] dt-bindings: can: tcan4x5x: Add DT bindings for TCAN4x5X driver Dan Murphy 2019-03-19 17:26 ` Dan Murphy 2019-03-19 17:26 ` [PATCH v11 4/5] can: tcan4x5x: Add tcan4x5x driver to the kernel Dan Murphy 2019-03-19 17:26 ` Dan Murphy 2019-03-19 17:26 ` Dan Murphy [this message] 2019-03-19 17:26 ` [PATCH v11 5/5] can: m_can: Fix checkpatch issues on existing code Dan Murphy 2019-04-02 12:03 ` [PATCH v11 1/5] can: m_can: Create a m_can platform framework Dan Murphy 2019-04-02 12:03 ` Dan Murphy 2019-04-02 12:17 ` Wolfgang Grandegger 2019-04-10 13:24 ` Dan Murphy 2019-04-10 13:24 ` Dan Murphy 2019-04-18 14:36 ` Dan Murphy 2019-04-18 14:36 ` Dan Murphy 2019-05-01 14:10 ` Dan Murphy 2019-05-01 14:10 ` Dan Murphy 2019-05-08 14:35 ` Marc Kleine-Budde 2019-05-08 19:54 ` Dan Murphy 2019-05-08 19:54 ` Dan Murphy 2019-05-09 6:38 ` Marc Kleine-Budde
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190319172651.10012-5-dmurphy@ti.com \ --to=dmurphy@ti.com \ --cc=davem@davemloft.net \ --cc=linux-can@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mkl@pengutronix.de \ --cc=netdev@vger.kernel.org \ --cc=wg@grandegger.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.