From patchwork Thu Oct 6 18:52:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Fastabend X-Patchwork-Id: 118152 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 7B728B6FA5 for ; Fri, 7 Oct 2011 06:01:51 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759046Ab1JFTBr (ORCPT ); Thu, 6 Oct 2011 15:01:47 -0400 Received: from mga09.intel.com ([134.134.136.24]:17763 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759028Ab1JFTBp (ORCPT ); Thu, 6 Oct 2011 15:01:45 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 06 Oct 2011 12:01:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.67,351,1309762800"; d="scan'208";a="60646962" Received: from unknown (HELO [127.0.0.1]) ([10.23.23.209]) by orsmga002.jf.intel.com with ESMTP; 06 Oct 2011 12:01:44 -0700 From: John Fastabend Subject: [net-next PATCH 3/3] dcb: Add stub routines for !CONFIG_DCB To: davem@davemloft.net Cc: john.r.fastabend@intel.com, netdev@vger.kernel.org, gospo@redhat.com Date: Thu, 06 Oct 2011 11:52:44 -0700 Message-ID: <20111006185243.2781.67932.stgit@jf-dev1-dcblab> In-Reply-To: <20111006185233.2781.80310.stgit@jf-dev1-dcblab> References: <20111006185233.2781.80310.stgit@jf-dev1-dcblab> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org To avoid ifdefs in the other code that supports DCB notifiers add stub routines. This method seems popular in other net code for example 8021Q. Signed-off-by: John Fastabend --- include/net/dcbevent.h | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/net/dcbevent.h b/include/net/dcbevent.h index bc1e7ef..443626e 100644 --- a/include/net/dcbevent.h +++ b/include/net/dcbevent.h @@ -24,8 +24,26 @@ enum dcbevent_notif_type { DCB_APP_EVENT = 1, }; +#ifdef CONFIG_DCB extern int register_dcbevent_notifier(struct notifier_block *nb); extern int unregister_dcbevent_notifier(struct notifier_block *nb); extern int call_dcbevent_notifiers(unsigned long val, void *v); +#else +static inline int +register_dcbevent_notifier(struct notifier_block *nb) +{ + return 0; +} + +static inline int unregister_dcbevent_notifier(struct notifier_block *nb) +{ + return 0; +} + +static inline int call_dcbevent_notifiers(unsigned long val, void *v) +{ + return 0; +} +#endif /* CONFIG_DCB */ #endif