From patchwork Wed Jul 16 18:25:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 370845 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 EAA291400AF for ; Thu, 17 Jul 2014 04:26:01 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934870AbaGPSZ6 (ORCPT ); Wed, 16 Jul 2014 14:25:58 -0400 Received: from mail-pd0-f176.google.com ([209.85.192.176]:63916 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934773AbaGPSZ4 (ORCPT ); Wed, 16 Jul 2014 14:25:56 -0400 Received: by mail-pd0-f176.google.com with SMTP id y10so1640512pdj.7 for ; Wed, 16 Jul 2014 11:25:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-type:content-transfer-encoding; bh=U7PNgNWxsZGkQJ0evhlrnhOUYoZouIr1GQlWwZyjJIA=; b=HbRpGm1SbefaO3+zdmKOtiGTm0jXz12Lxq50tM2MKTj8yZtUDORD3aIONXCKMOHAn7 BHDjIrxcz1oloxRNtb0DzPMLJ9aIb/lMv3fSC4WDrdqC9Ud02st9uDt7z+2cUnGk6Lcx dWx9avnx5GnDsrHwuKM5m4geWL4c2zGlUJh9S3O6Tnid01CRgVjmE9yYgjkXND2Bvui4 9sdc0v4A8kZVxCpV8rKupU7K5v9EFUUYQw6ESoeFwX1x8UpqKhbQiSzB+5wFbLxR4e6M Dtmbl9WoeCVhQALnyKVC9fnPsdtJfhdPzvPe1AUpYlLrzSJsnH4D6Hc8kiW4BckEf71l Hfzg== X-Gm-Message-State: ALoCoQmQ04RLZb6Wb4VvzUg9Xvo4vjkfTM+r6KvwbArGjJRiH4rwbFlgekd4pOSif3pwKhg38u2A X-Received: by 10.70.94.42 with SMTP id cz10mr23043476pdb.107.1405535156102; Wed, 16 Jul 2014 11:25:56 -0700 (PDT) Received: from samsung-9 (static-50-53-66-61.bvtn.or.frontiernet.net. [50.53.66.61]) by mx.google.com with ESMTPSA id nd10sm69142pbc.51.2014.07.16.11.25.55 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 16 Jul 2014 11:25:55 -0700 (PDT) Date: Wed, 16 Jul 2014 11:25:52 -0700 From: Stephen Hemminger To: Pravin Shelar , David Miller Cc: dev@openvswitch.org, netdev@vger.kernel.org Subject: [PATCH net-next] openvswitch: make generic netlink group const Message-ID: <20140716112552.55852dbf@samsung-9> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.10; x86_64-pc-linux-gnu) MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Generic netlink tables can be const. Signed-off-by: Stephen Hemminger --- 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 --- a/net/openvswitch/datapath.c 2014-07-09 03:06:11.400291765 -0700 +++ b/net/openvswitch/datapath.c 2014-07-09 03:09:35.688297236 -0700 @@ -66,16 +66,16 @@ static struct genl_family dp_packet_genl static struct genl_family dp_flow_genl_family; static struct genl_family dp_datapath_genl_family; -static struct genl_multicast_group ovs_dp_flow_multicast_group = { - .name = OVS_FLOW_MCGROUP +static const struct genl_multicast_group ovs_dp_flow_multicast_group = { + .name = OVS_FLOW_MCGROUP, }; -static struct genl_multicast_group ovs_dp_datapath_multicast_group = { - .name = OVS_DATAPATH_MCGROUP +static const struct genl_multicast_group ovs_dp_datapath_multicast_group = { + .name = OVS_DATAPATH_MCGROUP, }; -struct genl_multicast_group ovs_dp_vport_multicast_group = { - .name = OVS_VPORT_MCGROUP +static const struct genl_multicast_group ovs_dp_vport_multicast_group = { + .name = OVS_VPORT_MCGROUP, }; /* Check if need to build a reply message. @@ -1190,7 +1190,7 @@ static const struct nla_policy flow_poli [OVS_FLOW_ATTR_CLEAR] = { .type = NLA_FLAG }, }; -static struct genl_ops dp_flow_genl_ops[] = { +static const struct genl_ops dp_flow_genl_ops[] = { { .cmd = OVS_FLOW_CMD_NEW, .flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */ .policy = flow_policy, @@ -1578,7 +1578,7 @@ static const struct nla_policy datapath_ [OVS_DP_ATTR_USER_FEATURES] = { .type = NLA_U32 }, }; -static struct genl_ops dp_datapath_genl_ops[] = { +static const struct genl_ops dp_datapath_genl_ops[] = { { .cmd = OVS_DP_CMD_NEW, .flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */ .policy = datapath_policy, @@ -1945,7 +1945,7 @@ static const struct nla_policy vport_pol [OVS_VPORT_ATTR_OPTIONS] = { .type = NLA_NESTED }, }; -static struct genl_ops dp_vport_genl_ops[] = { +static const struct genl_ops dp_vport_genl_ops[] = { { .cmd = OVS_VPORT_CMD_NEW, .flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */ .policy = vport_policy,