summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin 'ldir' Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>2019-05-30 19:10:43 +0200
committerDavid S. Miller <davem@davemloft.net>2019-05-31 00:10:22 +0200
commit84a32edec48056131c91bebb706c2a0a5976a1a1 (patch)
treefca471c1344896a370357ac74259f83c263a8d26
parentMerge branch 'complex-c45-phys' (diff)
downloadlinux-84a32edec48056131c91bebb706c2a0a5976a1a1.tar.xz
linux-84a32edec48056131c91bebb706c2a0a5976a1a1.zip
net: sched: act_ctinfo: minor size optimisation
Since the new parameter block is initialised to 0 by kzmalloc we don't need to mask & clear unused operational mode bits, they are already unset. Drop the pointless code. Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/sched/act_ctinfo.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/net/sched/act_ctinfo.c b/net/sched/act_ctinfo.c
index 926109139a81..e78b60e47c0f 100644
--- a/net/sched/act_ctinfo.c
+++ b/net/sched/act_ctinfo.c
@@ -231,16 +231,12 @@ static int tcf_ctinfo_init(struct net *net, struct nlattr *nla,
cp_new->dscpmaskshift = dscpmaskshift;
cp_new->dscpstatemask = dscpstatemask;
cp_new->mode |= CTINFO_MODE_DSCP;
- } else {
- cp_new->mode &= ~CTINFO_MODE_DSCP;
}
if (tb[TCA_CTINFO_PARMS_CPMARK_MASK]) {
cp_new->cpmarkmask =
nla_get_u32(tb[TCA_CTINFO_PARMS_CPMARK_MASK]);
cp_new->mode |= CTINFO_MODE_CPMARK;
- } else {
- cp_new->mode &= ~CTINFO_MODE_CPMARK;
}
spin_lock_bh(&ci->tcf_lock);