Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5897019pxv; Thu, 29 Jul 2021 00:50:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOeWIIkW0ziaozb+PetLpinzcC7ZOk2Fnym7XDBePgEMQPRr/C73/SZODXFr/8TdpUGEje X-Received: by 2002:a6b:5d14:: with SMTP id r20mr3206101iob.140.1627545042441; Thu, 29 Jul 2021 00:50:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627545042; cv=none; d=google.com; s=arc-20160816; b=gdIido06Lg8oUPPA+ETHHez8Q31iCu9clp3z58bHkw44u+SmoS+BlE3C+2ZQ1eiEt0 hMF6K7CFkYRQ2tCZzY2aNgN1prNXLcbcX8g2NgKdxYTzmSyBLpL93ETW4Y2rmtOdLbYa VvdjbGux/KBEPj9JUEqVZtikR4zd9S2eVSkIzCNcNNKYTPw9+yEg03F/uncLuBHP7teH /UsDqCgCWsW/rFphN8Abpyqap4hcoXiIMnlo8Pq9LHEaK7sicDt9fT06x9BqY7tXahUV gEdKq1RrB9v3HZr3BKgtEeJPLp2AS7DzIP2rZhTcNuWVQp9HlUK1pdDPUiJiRZJhYoEN +VHA== 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:dkim-signature; bh=eYna94/iq9qX8HUpO54fYGtWdCUpTqGssNfyTTxr8DE=; b=CwtTce2rQXjxjsjQLvEvcYrnEKQQ6bDk2qxp3FpUZv0L2GY6JQ6LFXEubv0uRsLy0F wUxhJJrSnSGtozRqrlsQdsiKK2KuX4vUeT3EauoAaph3g7i4fnLl9RW1zRIzq0JSfQPz Q4i3g9v6xaCu5XOIhpvxu4/vCZ5dYfoKToWrnnOaTnIi4s4U5FnZbJ/PZtuhJVMyojJN 8nFu8g5hCJBKhnAgT9vvsdr+nAlgCmHERoJx+87ayg4dmOWlT+xge0Yj/ymRRaYzJYAj /GemU5BT7rhPHTtnr4W9U4P3L6B1j/8NdvZNITmsnR5F46QHS9B3Gn6FwEuqWa11AkOw o9Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=aVZzuZ+F; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b4si2809355jat.6.2021.07.29.00.50.31; Thu, 29 Jul 2021 00:50:42 -0700 (PDT) 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; dkim=pass header.i=@linux.dev header.s=key1 header.b=aVZzuZ+F; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234816AbhG2HtP (ORCPT + 99 others); Thu, 29 Jul 2021 03:49:15 -0400 Received: from out0.migadu.com ([94.23.1.103]:32110 "EHLO out0.migadu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234765AbhG2HtM (ORCPT ); Thu, 29 Jul 2021 03:49:12 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1627544947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=eYna94/iq9qX8HUpO54fYGtWdCUpTqGssNfyTTxr8DE=; b=aVZzuZ+FQ414amE0JQHI7kvZsjymTf1vDhBHiuYXBDPAD93ApZHDWBnt484tkjf8v3yWd/ DcrEOu1evS4aOj2fWo2Ka9SWZv1nGf0B6FQJMcDidppZ24j5ginTSQ5kuHALVvPKUFnsje t7/+gdzmM/0lEhs6C1EnUh7goarw8Cw= From: Yajun Deng To: davem@davemloft.net, kuba@kernel.org Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Yajun Deng Subject: [PATCH] net: netlink: Remove unused function Date: Thu, 29 Jul 2021 15:48:54 +0800 Message-Id: <20210729074854.8968-1-yajun.deng@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: yajun.deng@linux.dev Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org lockdep_genl_is_held() and its caller arm not used now, just remove them. Signed-off-by: Yajun Deng --- include/linux/genetlink.h | 23 ----------------------- net/netlink/genetlink.c | 8 -------- 2 files changed, 31 deletions(-) diff --git a/include/linux/genetlink.h b/include/linux/genetlink.h index bc738504ab4a..c285968e437a 100644 --- a/include/linux/genetlink.h +++ b/include/linux/genetlink.h @@ -8,34 +8,11 @@ /* All generic netlink requests are serialized by a global lock. */ extern void genl_lock(void); extern void genl_unlock(void); -#ifdef CONFIG_LOCKDEP -extern bool lockdep_genl_is_held(void); -#endif /* for synchronisation between af_netlink and genetlink */ extern atomic_t genl_sk_destructing_cnt; extern wait_queue_head_t genl_sk_destructing_waitq; -/** - * rcu_dereference_genl - rcu_dereference with debug checking - * @p: The pointer to read, prior to dereferencing - * - * Do an rcu_dereference(p), but check caller either holds rcu_read_lock() - * or genl mutex. Note : Please prefer genl_dereference() or rcu_dereference() - */ -#define rcu_dereference_genl(p) \ - rcu_dereference_check(p, lockdep_genl_is_held()) - -/** - * genl_dereference - fetch RCU pointer when updates are prevented by genl mutex - * @p: The pointer to read, prior to dereferencing - * - * Return the value of the specified RCU-protected pointer, but omit - * the READ_ONCE(), because caller holds genl mutex. - */ -#define genl_dereference(p) \ - rcu_dereference_protected(p, lockdep_genl_is_held()) - #define MODULE_ALIAS_GENL_FAMILY(family)\ MODULE_ALIAS_NET_PF_PROTO_NAME(PF_NETLINK, NETLINK_GENERIC, "-family-" family) diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index ae58da608a31..1afca2a6c2ac 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c @@ -40,14 +40,6 @@ void genl_unlock(void) } EXPORT_SYMBOL(genl_unlock); -#ifdef CONFIG_LOCKDEP -bool lockdep_genl_is_held(void) -{ - return lockdep_is_held(&genl_mutex); -} -EXPORT_SYMBOL(lockdep_genl_is_held); -#endif - static void genl_lock_all(void) { down_write(&cb_lock); -- 2.32.0