net: sched: act_ctinfo: minor size optimisation
authorKevin 'ldir' Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Thu, 30 May 2019 17:10:43 +0000 (17:10 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 May 2019 22:10:22 +0000 (15:10 -0700)
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>
net/sched/act_ctinfo.c

index 926109139a81c7bac1278718783a3fd019d863a9..e78b60e47c0f50ddc057117711662dd6e559d718 100644 (file)
@@ -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);