From patchwork Thu Apr 11 07:56:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steffen Klassert X-Patchwork-Id: 235601 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 645E52C00C2 for ; Thu, 11 Apr 2013 17:56:33 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761645Ab3DKH40 (ORCPT ); Thu, 11 Apr 2013 03:56:26 -0400 Received: from a.mx.secunet.com ([195.81.216.161]:56594 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753887Ab3DKH4Z (ORCPT ); Thu, 11 Apr 2013 03:56:25 -0400 Received: from localhost (alg1 [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id 8F42B1A008C; Thu, 11 Apr 2013 09:56:24 +0200 (CEST) X-Virus-Scanned: by secunet Received: from a.mx.secunet.com ([127.0.0.1]) by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 6wznllVRYcwC; Thu, 11 Apr 2013 09:56:23 +0200 (CEST) Received: from mail-srv1.secumail.de (unknown [10.53.40.200]) by a.mx.secunet.com (Postfix) with ESMTP id 440321A008F; Thu, 11 Apr 2013 09:56:22 +0200 (CEST) Received: from gauss.dd.secunet.de ([10.182.7.102]) by mail-srv1.secumail.de with Microsoft SMTPSVC(6.0.3790.4675); Thu, 11 Apr 2013 09:56:22 +0200 Received: by gauss.dd.secunet.de (Postfix, from userid 1000) id 25F2A5C23EC; Thu, 11 Apr 2013 09:56:22 +0200 (CEST) From: Steffen Klassert To: David Miller Cc: Herbert Xu , Steffen Klassert , netdev@vger.kernel.org Subject: [PATCH 2/2] xfrm_user: constify netlink dispatch table Date: Thu, 11 Apr 2013 09:56:09 +0200 Message-Id: <1365666969-22645-3-git-send-email-steffen.klassert@secunet.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1365666969-22645-1-git-send-email-steffen.klassert@secunet.com> References: <1365666969-22645-1-git-send-email-steffen.klassert@secunet.com> X-OriginalArrivalTime: 11 Apr 2013 07:56:22.0258 (UTC) FILETIME=[0ED57520:01CE368A] Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Mathias Krause There is no need to modify the netlink dispatch table at runtime. Signed-off-by: Mathias Krause Signed-off-by: Steffen Klassert --- net/xfrm/xfrm_user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 204cba1..aa77874 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -2315,7 +2315,7 @@ static const struct nla_policy xfrma_policy[XFRMA_MAX+1] = { [XFRMA_SA_EXTRA_FLAGS] = { .type = NLA_U32 }, }; -static struct xfrm_link { +static const struct xfrm_link { int (*doit)(struct sk_buff *, struct nlmsghdr *, struct nlattr **); int (*dump)(struct sk_buff *, struct netlink_callback *); int (*done)(struct netlink_callback *); @@ -2349,7 +2349,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) { struct net *net = sock_net(skb->sk); struct nlattr *attrs[XFRMA_MAX+1]; - struct xfrm_link *link; + const struct xfrm_link *link; int type, err; type = nlh->nlmsg_type;