Commit 84a32ede authored by Kevin 'ldir' Darbyshire-Bryant's avatar Kevin 'ldir' Darbyshire-Bryant Committed by David S. Miller

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: default avatarKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 655887fe
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment