Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1720115

[PATCH 4/7] ipv4: make net_protocol const

Path csiph.com!news.mixmin.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From Bhumika Goyal <bhumirks@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 4/7] ipv4: make net_protocol const
Date Fri, 25 Aug 2017 16:30:02 +0200
Message-ID <uinMu-5ah-41@gated-at.bofh.it> (permalink)
References <uinMt-5ah-1@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=082xeCy+8Xn/1LiA3sTNYiPaFB70YPaDY6P5z5YhH+g=; b=MWLh5pkKslHUn+zu7PXGz8KBZa0tFV/dk1G9z3wLr44RALFSwHYfaZ2xaAdotd+deg MhwgS63ZMUCF5vwe7OUtd2fOU+zLitRWQdecFwR8AlibIfgxob9480YBETqQTwOb5Rxc gwzInNA+1EKIpz4sYNZ651Hf8vifFz06gwvJE1GQwjg1SYnAeAO9tsbFzmLfdU86o71S Ry3LPNbCZUV9+U6tFAWCyQbLWK34XfjO2n/LjtxBBeqLEHcHKyM7U2cjLEMbjqNa0kwF wUgIxI2EzMna11qqXZI7+Ny//aDhOalLONvn1dhKwT+b3p+ycObyqhE3KQGwrD4L7/Wn OZBQ==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=082xeCy+8Xn/1LiA3sTNYiPaFB70YPaDY6P5z5YhH+g=; b=KCon2lTT/p8yAHaUhymrX+5yQeiS2qpsGj4tBtOyOna25PFI5cQZX5RsaUystj6Smi OSY/16lxKir3xWcTUqYJ+/wy87ORKc/gzlTHxdUb785AzZJdmJ/lFRPtUNsS7P6oEK8W 4q2Hx1dcvH0c4a5308vkYUehN2pgjpjfj5CU3Wkmt2rcl5ZDnHUtEHqIerP4vj9sit5j c+mB95VRtsMxOor+PGOX11yA/G73z4NHgTuXrAJimUAY4yBOkGMtlun+vYZdS4VIvcto i6NMVPvF+PdUHsH+WEXxd3CldH0/1lo8fYjlT2LNaodlBGFy8LVSbyRTIMZgk017B0tW 2sWA==
X-Gm-Message-State AHYfb5jdayE58gC8uvZ+jxk65ZSb8513zAUSVr3cboQkrv6m/cByVLYI PiNr4/XrFJuPrA==
X-Received by 10.99.116.23 with SMTP id p23mr7989065pgc.262.1503670989442; Fri, 25 Aug 2017 07:23:09 -0700 (PDT)
X-Mailer git-send-email 1.9.1
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 32
Organization linux.* mail to news gateway
X-Original-Cc Bhumika Goyal <bhumirks@gmail.com>
X-Original-Date Fri, 25 Aug 2017 19:51:44 +0530
X-Original-Message-ID <1503670907-23221-5-git-send-email-bhumirks@gmail.com>
X-Original-References <1503670907-23221-1-git-send-email-bhumirks@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1720115

Show key headers only | View raw


Make these const as they are only passed to a const argument of the
function inet_add_protocol.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 net/ipv4/af_inet.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index d678820..19aee07 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1596,7 +1596,7 @@ u64 snmp_fold_field64(void __percpu *mib, int offt, size_t syncp_offset)
 };
 #endif
 
-static struct net_protocol tcp_protocol = {
+static const struct net_protocol tcp_protocol = {
 	.early_demux	=	tcp_v4_early_demux,
 	.early_demux_handler =  tcp_v4_early_demux,
 	.handler	=	tcp_v4_rcv,
@@ -1606,7 +1606,7 @@ u64 snmp_fold_field64(void __percpu *mib, int offt, size_t syncp_offset)
 	.icmp_strict_tag_validation = 1,
 };
 
-static struct net_protocol udp_protocol = {
+static const struct net_protocol udp_protocol = {
 	.early_demux =	udp_v4_early_demux,
 	.early_demux_handler =	udp_v4_early_demux,
 	.handler =	udp_rcv,
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/7] net: make some structures const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-25 16:30 +0200
  [PATCH 2/7] bridge: make ebt_table const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-25 16:30 +0200
    Re: [PATCH 2/7] bridge: make ebt_table const David Miller <davem@davemloft.net> - 2017-08-28 20:40 +0200
  [PATCH 7/7] SUNRPC: make kvec const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-25 16:30 +0200
    Re: [PATCH 7/7] SUNRPC: make kvec const Jeff Layton <jlayton@redhat.com> - 2017-08-25 16:50 +0200
  [PATCH 5/7] RDS: make rhashtable_params const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-25 16:30 +0200
    Re: [PATCH 5/7] RDS: make rhashtable_params const Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2017-08-25 17:40 +0200
    Re: [PATCH 5/7] RDS: make rhashtable_params const David Miller <davem@davemloft.net> - 2017-08-28 20:40 +0200
  [PATCH 6/7] netfilter: nat: make rhashtable_params const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-25 16:30 +0200
  [PATCH 1/7] Bluetooth: 6lowpan: make header_ops const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-25 16:30 +0200
  [PATCH 3/7] ieee802154: 6lowpan: make header_ops const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-25 16:30 +0200
    Re: [PATCH 3/7] ieee802154: 6lowpan: make header_ops const Stefan Schmidt <stefan@osg.samsung.com> - 2017-08-25 16:40 +0200
    Re: [PATCH 3/7] ieee802154: 6lowpan: make header_ops const Marcel Holtmann <marcel@holtmann.org> - 2017-08-25 18:20 +0200
  [PATCH 4/7] ipv4: make net_protocol const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-25 16:30 +0200
    Re: [PATCH 4/7] ipv4: make net_protocol const David Miller <davem@davemloft.net> - 2017-08-28 20:40 +0200

csiph-web