From patchwork Wed Sep 16 18:45:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 260771 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F11CBC43461 for ; Wed, 16 Sep 2020 18:50:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 906C221D90 for ; Wed, 16 Sep 2020 18:50:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600282217; bh=PizuCKedVSnuiRnh+VWDe8s8rBgOspdAMA6AwoPh/Gc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=x2YIi2Om2VJFRCVDACiw8selzFptKcf0ziXz1xcjK8srtn8dhor3O1G1e0izMhZX+ gIzbAUsvBfAFFIArgO75Hb7fgI8fc89Mw7BbFooGmlGZx2/OqRc1NX8cpPvtJJaVhK o7sPDx9UnykcQ4ah/JPNvRQpyqIqjEnl7twhtm+o= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727953AbgIPStV (ORCPT ); Wed, 16 Sep 2020 14:49:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:44254 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728153AbgIPSqK (ORCPT ); Wed, 16 Sep 2020 14:46:10 -0400 Received: from kicinski-fedora-PC1C0HJN.thefacebook.com (unknown [163.114.132.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6F57B221EC; Wed, 16 Sep 2020 18:46:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600281968; bh=PizuCKedVSnuiRnh+VWDe8s8rBgOspdAMA6AwoPh/Gc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dIU3ykcWb2WBvNWiyT3UXZW4LWEhGDEOphqKmW2ht45g5bHd7arfDoUmqR83zdfya RSIPqoxJqquhj29t20MbqoKanCRyAH/AkBuuiFaiLGmdlQlKDyhhw8ysWuzvPh5nAM Tu8EbtUOhflNPEEgXnGPa9uGCsrC8fgHGfeb9ZsI= From: Jakub Kicinski To: davem@davemloft.net, paulmck@kernel.org, joel@joelfernandes.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, rcu@vger.kernel.org, josh@joshtriplett.org, peterz@infradead.org, christian.brauner@ubuntu.com, Jakub Kicinski , jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us Subject: [PATCH net-next 4/7] net: sched: remove broken definitions and un-hide for !LOCKDEP Date: Wed, 16 Sep 2020 11:45:25 -0700 Message-Id: <20200916184528.498184-5-kuba@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200916184528.498184-1-kuba@kernel.org> References: <20200916184528.498184-1-kuba@kernel.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org We're trying to make LOCKDEP-related function declarations visible to the compiler and depend on dead code elimination to remove them. Fix up the situation with lockdep_tcf_chain_is_locked() and lockdep_tcf_proto_is_locked(). Signed-off-by: Jakub Kicinski --- CC: jhs@mojatatu.com CC: xiyou.wangcong@gmail.com CC: jiri@resnulli.us --- include/net/sch_generic.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index d60e7c39d60c..1aaa9e3d2e9c 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -432,7 +432,6 @@ struct tcf_block { struct mutex proto_destroy_lock; /* Lock for proto_destroy hashtable. */ }; -#ifdef CONFIG_PROVE_LOCKING static inline bool lockdep_tcf_chain_is_locked(struct tcf_chain *chain) { return lockdep_is_held(&chain->filter_chain_lock); @@ -442,17 +441,6 @@ static inline bool lockdep_tcf_proto_is_locked(struct tcf_proto *tp) { return lockdep_is_held(&tp->lock); } -#else -static inline bool lockdep_tcf_chain_is_locked(struct tcf_block *chain) -{ - return true; -} - -static inline bool lockdep_tcf_proto_is_locked(struct tcf_proto *tp) -{ - return true; -} -#endif /* #ifdef CONFIG_PROVE_LOCKING */ #define tcf_chain_dereference(p, chain) \ rcu_dereference_protected(p, lockdep_tcf_chain_is_locked(chain))