Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp896732pxb; Wed, 3 Feb 2021 23:09:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxwIXfREo++s80mvtH7KnjMmklJnI3aQv0jHFIeor4+G/k4rwKQR3hJHNLCTukqfIlaosn5 X-Received: by 2002:a17:906:b055:: with SMTP id bj21mr6871736ejb.355.1612422561455; Wed, 03 Feb 2021 23:09:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612422561; cv=none; d=google.com; s=arc-20160816; b=QLac+rRjH4J1Xzp5VXDqC+oPCj/0zx6cBp2O4NOC1SpCZoP643vCUW1MXXzMc0y1pw 0HBi9iE7RZ/7+2SIlHv6jNO3Sbd5nP6BVh44zWCw0p3eqMgc92KLu5gNf1bcoAsJ9+tr aVYmYYm6/9YGrhYmqgHfMk13zz6+5qBJmzoOiPIx6nfnb3Pid8ZPuYw57E7jeOo3JLST 2nw4xamMpoTX2EN//6uL5xJRnU08EeWCdJs8ZasXVqdlucrKCQaFl/U61XXo3hPRiQyd kVnHZqwzhRrqVtBNzo46LE8LVkY2Cd/nrLbwSMuGzoyeWIkOlePJmMQi8dviFYglumYi wgmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=SSqMPBx6Ffj/opeiWpYXCZIUBb7ZxR1J2CuCOpHYUxg=; b=KkpxZXfYN8CdNmHyRqnx9lb/5V9+cfbIK4GOBgKkFGg2SjVGBw3SZAHA/MnQW6OJF+ Yy5by4EwwWYMQBWvBm/Jh6iI4X+Ee/qnz4u9I//q3gjtTtr2QcIcK85QR6pnQ4HOI9/9 ghbe68q7fMPF9wdB8ksYWfEEI8xxRcmTCJL/Lt1xUgtoFChsXcHSKjW+4uSY3ATFVYW9 GGUPULbPnHF2GhTnkvJ3PxYR2w1JaxFrFS6Y7DUlyO8kbjyT5rKz/76jWs1QRziLWsrh WV4nsc+SMZ9CFASn8tP2hBkEijnzN7jfRK6M68zX8I5fpvnmYuzSX/r+3db315neMfgB 5IOw== 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 gn29si1126198ejc.62.2021.02.03.23.08.56; Wed, 03 Feb 2021 23:09:21 -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 S233253AbhBDHGx (ORCPT + 99 others); Thu, 4 Feb 2021 02:06:53 -0500 Received: from smtp21.cstnet.cn ([159.226.251.21]:35324 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232704AbhBDHGv (ORCPT ); Thu, 4 Feb 2021 02:06:51 -0500 Received: from localhost.localdomain (unknown [124.16.141.242]) by APP-01 (Coremail) with SMTP id qwCowABHTpbRnBtg_qJBAQ--.48912S2; Thu, 04 Feb 2021 15:05:53 +0800 (CST) From: Xu Wang To: roopa@nvidia.com, nikolay@nvidia.com, davem@davemloft.net, kuba@kernel.org, bridge@lists.linux-foundation.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: bridge: mcast: Use ERR_CAST instead of ERR_PTR(PTR_ERR()) Date: Thu, 4 Feb 2021 07:05:49 +0000 Message-Id: <20210204070549.83636-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: qwCowABHTpbRnBtg_qJBAQ--.48912S2 X-Coremail-Antispam: 1UD129KBjvdXoW7XFWDXw1r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BgAAsX Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)). net/bridge/br_multicast.c:1246:9-16: WARNING: ERR_CAST can be used with mp Generated by: scripts/coccinelle/api/err_cast.cocci Signed-off-by: Xu Wang --- net/bridge/br_multicast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 257ac4e25f6d..dfbb4dd01fa9 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c @@ -1243,7 +1243,7 @@ __br_multicast_add_group(struct net_bridge *br, mp = br_multicast_new_group(br, group); if (IS_ERR(mp)) - return ERR_PTR(PTR_ERR(mp)); + return ERR_CAST(mp); if (!port) { br_multicast_host_join(mp, true); -- 2.17.1