Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4637144pxu; Thu, 10 Dec 2020 01:24:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIv3GHQ9DRRYgogxbY5I4TFJefxe9uXzV2rHXW1PENXx51S29tBrNtIao0e8SmPCPbPQap X-Received: by 2002:a17:906:b101:: with SMTP id u1mr5595894ejy.457.1607592263867; Thu, 10 Dec 2020 01:24:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607592263; cv=none; d=google.com; s=arc-20160816; b=acLDRQ0/514e9CNm0lSClaIGOXI2SaXQTtAX3MdfyjzOULm8099b6pP56C2DlrjwOs mQPawMPDrX6bB3A1ONj2BCEq4sBEsSpIbLZAOCSmyWsQ5dYRHlwGhGDimnsFByylEVPL bvss8x6SgPQBxq8Yats8N94254BLLXoKy9i+nBvwk1GBKE115jJi2AaNY00qn1DqR9sY LNi8fAW9k4BHUraapmhCpA+6CfcRo9rYqIJNThHeaSYxM6PlBnQVYTwUlEtg/JHgPC0w 6xnbmtZfTArEVJXvSblz43AuQaYm6Gtad/06dBCNTCSa4zPaSpZleZGN/gaky6BmKFdB EOlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Ja10T2x/0L1RweRhKbmv8say/gibnospck46ntyMCiY=; b=FYepDdiJyttALzQ+ktYmUJdhgYTjpfhBQLUGq1Brx5iOMal2D8kZx5vrL4+jtj/I5z jxc8bH8WzNNAeHMy39EHDYsQlQGIK0fFhGv1HfpKwQr2R1Q6q+r5c8TF0wrL3Ds4dlbS MAre5BbSzfA74XRhNsYvylDqRPK9G+df6NHL/7EJpZoUL99bKEY72XbXQcrIUjd3MfZJ jVyL6/CrNAygRU+63kL8NzhBAcmg3W1uGg5NJmurgUGHqM9OQ0KiIV5IH1y1nBlIagyi xV0toW37+mMxThe/iU12aikvDcgmlxSvUgIJSLjbFi+PnZydalCRvLM8uJ+iUZopV38l Y3eg== ARC-Authentication-Results: i=1; mx.google.com; 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 c35si2327757edf.522.2020.12.10.01.24.00; Thu, 10 Dec 2020 01:24:23 -0800 (PST) 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; 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 S1729847AbgLJJVP (ORCPT + 99 others); Thu, 10 Dec 2020 04:21:15 -0500 Received: from s2.neomailbox.net ([5.148.176.60]:28530 "EHLO s2.neomailbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732218AbgLJJU4 (ORCPT ); Thu, 10 Dec 2020 04:20:56 -0500 X-Greylist: delayed 1522 seconds by postgrey-1.27 at vger.kernel.org; Thu, 10 Dec 2020 04:20:51 EST From: Antonio Quartulli To: Wolfgang Grandegger , Marc Kleine-Budde , Jakub Kicinski , linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Antonio Quartulli Subject: [PATCH] can: avoid double unlikely() notation when using IS_ERR() Date: Thu, 10 Dec 2020 09:53:21 +0100 Message-Id: <20201210085321.18693-1-a@unstable.cc> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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