From patchwork Sun Sep 1 20:51:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Sowden X-Patchwork-Id: 1156371 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=azazel.net Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=azazel.net header.i=@azazel.net header.b="OnDYYKYo"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46M5J16hNMz9s00 for ; Mon, 2 Sep 2019 07:02:09 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729112AbfIAVCJ (ORCPT ); Sun, 1 Sep 2019 17:02:09 -0400 Received: from kadath.azazel.net ([81.187.231.250]:53672 "EHLO kadath.azazel.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729106AbfIAVCJ (ORCPT ); Sun, 1 Sep 2019 17:02:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=azazel.net; s=20190108; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Pm9MZTEpDGxE5vADyK9rgG4UEEBLW9mSX/Spnmv1vTc=; b=OnDYYKYoNkKFR0O2fM1g3aIKvF +ACODsGc68tz6GnYeFFcK8iYDdLayk03oy9olIQ6Cp0TQ2o2yAPlJOevWZF3cP6/nCVIa+yqSfwsT ZEKbKg4Wnted++jpALgbNa2cQGmOFYXQc5J+Y74wgATYSPDPeK0Z+VmKkbYtCrhWvGSrwfx92y21C uj6mqAIS4YuHH6kyGjOrezJlgpgaUnTfXa+IrDkWNaFeh14sspzd7u1yOZ2o2FQ4qv257swZmWYbu gz4fM3FpOGr1rjxaY4VLbvaT3bF5tS0KOUz1WB6P+R78dA5lbCum1tXvMKt7grKHDzX7ZyEWhgOoF HcU80wSQ==; Received: from [2001:8b0:fb7d:d6d7:2e4d:54ff:fe4b:a9ae] (helo=ulthar.dreamlands) by kadath.azazel.net with esmtp (Exim 4.92) (envelope-from ) id 1i4Wor-0002Uf-De; Sun, 01 Sep 2019 21:51:29 +0100 From: Jeremy Sowden To: Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal Cc: Netfilter Devel Subject: [PATCH nf-next 21/29] netfilter: wrap inline timeout function in CONFIG_NETFILTER_TIMEOUT check. Date: Sun, 1 Sep 2019 21:51:17 +0100 Message-Id: <20190901205126.6935-22-jeremy@azazel.net> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20190901205126.6935-1-jeremy@azazel.net> References: <20190901205126.6935-1-jeremy@azazel.net> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:8b0:fb7d:d6d7:2e4d:54ff:fe4b:a9ae X-SA-Exim-Mail-From: jeremy@azazel.net X-SA-Exim-Scanned: No (on kadath.azazel.net); SAEximRunCond expanded to false Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org nf_ct_timeout_data is only called if CONFIG_NETFILTER_TIMEOUT is enabled. Wrap its contents in a CONFIG_NETFILTER_TIMEOUT check like the other inline functions in nf_conntrack_timeout.h. Signed-off-by: Jeremy Sowden --- include/net/netfilter/nf_conntrack_timeout.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/net/netfilter/nf_conntrack_timeout.h b/include/net/netfilter/nf_conntrack_timeout.h index 00a8fbb2d735..6dd72396f534 100644 --- a/include/net/netfilter/nf_conntrack_timeout.h +++ b/include/net/netfilter/nf_conntrack_timeout.h @@ -32,6 +32,7 @@ struct nf_conn_timeout { static inline unsigned int * nf_ct_timeout_data(const struct nf_conn_timeout *t) { +#ifdef CONFIG_NF_CONNTRACK_TIMEOUT struct nf_ct_timeout *timeout; timeout = rcu_dereference(t->timeout); @@ -39,6 +40,9 @@ nf_ct_timeout_data(const struct nf_conn_timeout *t) return NULL; return (unsigned int *)timeout->data; +#else + return NULL; +#endif } static inline