netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, linux-can@vger.kernel.org,
	kernel@pengutronix.de, Antonio Quartulli <a@unstable.cc>,
	Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [net-next 2/7] can: rx-offload: can_rx_offload_offload_one(): avoid double unlikely() notation when using IS_ERR()
Date: Thu, 10 Dec 2020 10:55:02 +0100	[thread overview]
Message-ID: <20201210095507.1551220-3-mkl@pengutronix.de> (raw)
In-Reply-To: <20201210095507.1551220-1-mkl@pengutronix.de>

From: Antonio Quartulli <a@unstable.cc>

The definition of IS_ERR() already applies the unlikely() notation when
checking the error status of the passed pointer. For this reason there is no
need to have the same notation outside of IS_ERR() itself.

Clean up code by removing redundant notation.

Signed-off-by: Antonio Quartulli <a@unstable.cc>
Link: https://lore.kernel.org/r/20201210085321.18693-1-a@unstable.cc
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/rx-offload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/rx-offload.c b/drivers/net/can/rx-offload.c
index 450c5cfcb3fc..3c1912c0430b 100644
--- a/drivers/net/can/rx-offload.c
+++ b/drivers/net/can/rx-offload.c
@@ -157,7 +157,7 @@ can_rx_offload_offload_one(struct can_rx_offload *offload, unsigned int n)
 	/* There was a problem reading the mailbox, propagate
 	 * error value.
 	 */
-	if (unlikely(IS_ERR(skb))) {
+	if (IS_ERR(skb)) {
 		offload->dev->stats.rx_dropped++;
 		offload->dev->stats.rx_fifo_errors++;
 
-- 
2.29.2



  parent reply	other threads:[~2020-12-10  9:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10  9:55 pull-request: can-next 2020-12-10 Marc Kleine-Budde
2020-12-10  9:55 ` [net-next 1/7] can: isotp: add SF_BROADCAST support for functional addressing Marc Kleine-Budde
2020-12-10  9:55 ` Marc Kleine-Budde [this message]
2020-12-10  9:55 ` [net-next 3/7] can: m_can: m_can_config_endisable(): remove double clearing of clock stop request bit Marc Kleine-Budde
2020-12-10  9:55 ` [net-next 4/7] can: m_can: move runtime PM enable/disable to m_can_platform Marc Kleine-Budde
2020-12-10  9:55 ` [net-next 5/7] can: m_can: add PCI glue driver for Intel Elkhart Lake Marc Kleine-Budde
2020-12-10  9:55 ` [net-next 6/7] can: flexcan: convert the driver to DT-only Marc Kleine-Budde
2020-12-10  9:55 ` [net-next 7/7] can: mcp251xfd: Add support for internal loopback mode Marc Kleine-Budde
2020-12-10 20:50 ` pull-request: can-next 2020-12-10 David Miller
2020-12-11  8:49   ` 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=20201210095507.1551220-3-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=a@unstable.cc \
    --cc=davem@davemloft.net \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).