From patchwork Tue May 29 19:30:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Horman X-Patchwork-Id: 161787 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id ABF2BB6FC5 for ; Wed, 30 May 2012 05:31:12 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755370Ab2E2TbK (ORCPT ); Tue, 29 May 2012 15:31:10 -0400 Received: from charlotte.tuxdriver.com ([70.61.120.58]:36045 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755320Ab2E2TbH (ORCPT ); Tue, 29 May 2012 15:31:07 -0400 Received: from hmsreliant.think-freely.org ([2001:470:8:a08:7aac:c0ff:fec2:933b] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1SZS83-0005QL-83; Tue, 29 May 2012 15:31:05 -0400 From: Neil Horman To: netdev@vger.kernel.org Cc: Neil Horman , Eric Dumazet , David Miller Subject: [PATCH 1/3] net: add MODULE_ALIAS_NET_PF_PROTO_NAME Date: Tue, 29 May 2012 15:30:40 -0400 Message-Id: <1338319842-18395-2-git-send-email-nhorman@tuxdriver.com> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1338319842-18395-1-git-send-email-nhorman@tuxdriver.com> References: <1338319842-18395-1-git-send-email-nhorman@tuxdriver.com> X-Spam-Score: -2.9 (--) X-Spam-Status: No Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The MODULE_ALAIS_NET_PF macro set is missing a variant that allows for the appending of an arbitrary string to the net-pf--proto- base. while MODULE_ALIAS_NET_PF_PROTO_NAME_TYPE allows an appending of a numerical type, we need to be able to append a generic string to support generic netlink families that have neither a fix numberical protocol or type number Signed-off-by: Neil Horman CC: Eric Dumazet CC: David Miller --- include/linux/net.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/linux/net.h b/include/linux/net.h index 2d7510f..e9ac2df 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -313,5 +313,8 @@ extern int kernel_sock_shutdown(struct socket *sock, MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto) \ "-type-" __stringify(type)) +#define MODULE_ALIAS_NET_PF_PROTO_NAME(pf, proto, name) \ + MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto) \ + name) #endif /* __KERNEL__ */ #endif /* _LINUX_NET_H */