All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-common:android-3.18 13268/18267] net/sched/act_pedit.c:62 tcf_pedit_init() warn: inconsistent indenting
@ 2021-03-30 23:26 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-03-30 23:26 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 7559 bytes --]

tree:   https://android.googlesource.com/kernel/common android-3.18
head:   57ba73c8fe28cde42095ee316302ca6f34b90dc4
commit: bfd256c8b6b276a15332732925c1689df249d1ef [13268/18267] net/sched: act_pedit: fix WARN() in the traffic path
config: x86_64-randconfig-m001-20210330 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

smatch warnings:
net/sched/act_pedit.c:62 tcf_pedit_init() warn: inconsistent indenting

vim +62 net/sched/act_pedit.c

53b2bf3f8a652c net/sched/act_pedit.c Patrick McHardy  2008-01-23   31  
c1b52739e45f59 net/sched/act_pedit.c Benjamin LaHaise 2013-01-14   32  static int tcf_pedit_init(struct net *net, struct nlattr *nla,
c1b52739e45f59 net/sched/act_pedit.c Benjamin LaHaise 2013-01-14   33  			  struct nlattr *est, struct tc_action *a,
c1b52739e45f59 net/sched/act_pedit.c Benjamin LaHaise 2013-01-14   34  			  int ovr, int bind)
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   35  {
7ba699c604ab81 net/sched/act_pedit.c Patrick McHardy  2008-01-22   36  	struct nlattr *tb[TCA_PEDIT_MAX + 1];
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   37  	struct tc_pedit *parm;
cee63723b358e5 net/sched/act_pedit.c Patrick McHardy  2008-01-23   38  	int ret = 0, err;
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   39  	struct tcf_pedit *p;
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   40  	struct tc_pedit_key *keys = NULL;
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   41  	int ksize;
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   42  
cee63723b358e5 net/sched/act_pedit.c Patrick McHardy  2008-01-23   43  	if (nla == NULL)
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   44  		return -EINVAL;
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   45  
53b2bf3f8a652c net/sched/act_pedit.c Patrick McHardy  2008-01-23   46  	err = nla_parse_nested(tb, TCA_PEDIT_MAX, nla, pedit_policy);
cee63723b358e5 net/sched/act_pedit.c Patrick McHardy  2008-01-23   47  	if (err < 0)
cee63723b358e5 net/sched/act_pedit.c Patrick McHardy  2008-01-23   48  		return err;
cee63723b358e5 net/sched/act_pedit.c Patrick McHardy  2008-01-23   49  
53b2bf3f8a652c net/sched/act_pedit.c Patrick McHardy  2008-01-23   50  	if (tb[TCA_PEDIT_PARMS] == NULL)
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   51  		return -EINVAL;
7ba699c604ab81 net/sched/act_pedit.c Patrick McHardy  2008-01-22   52  	parm = nla_data(tb[TCA_PEDIT_PARMS]);
bfd256c8b6b276 net/sched/act_pedit.c Davide Caratti   2019-11-19   53  	if (!parm->nkeys)
bfd256c8b6b276 net/sched/act_pedit.c Davide Caratti   2019-11-19   54  		return -EINVAL;
bfd256c8b6b276 net/sched/act_pedit.c Davide Caratti   2019-11-19   55  
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   56  	ksize = parm->nkeys * sizeof(struct tc_pedit_key);
7ba699c604ab81 net/sched/act_pedit.c Patrick McHardy  2008-01-22   57  	if (nla_len(tb[TCA_PEDIT_PARMS]) < sizeof(*parm) + ksize)
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   58  		return -EINVAL;
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   59  
86062033feb8a1 net/sched/act_pedit.c WANG Cong        2014-02-11   60  	if (!tcf_hash_check(parm->index, a, bind)) {
86062033feb8a1 net/sched/act_pedit.c WANG Cong        2014-02-11   61  			ret = tcf_hash_create(parm->index, est, a, sizeof(*p), bind);
86062033feb8a1 net/sched/act_pedit.c WANG Cong        2014-02-11  @62  		if (ret)
86062033feb8a1 net/sched/act_pedit.c WANG Cong        2014-02-11   63  			return ret;
86062033feb8a1 net/sched/act_pedit.c WANG Cong        2014-02-11   64  		p = to_pedit(a);
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   65  		keys = kmalloc(ksize, GFP_KERNEL);
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   66  		if (keys == NULL) {
86062033feb8a1 net/sched/act_pedit.c WANG Cong        2014-02-11   67  			tcf_hash_cleanup(a, est);
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   68  			return -ENOMEM;
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   69  		}
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   70  		ret = ACT_P_CREATED;
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   71  	} else {
86062033feb8a1 net/sched/act_pedit.c WANG Cong        2014-02-11   72  		p = to_pedit(a);
86062033feb8a1 net/sched/act_pedit.c WANG Cong        2014-02-11   73  		tcf_hash_release(a, bind);
1a29321ed045e3 net/sched/act_pedit.c Jamal Hadi Salim 2013-12-23   74  		if (bind)
1a29321ed045e3 net/sched/act_pedit.c Jamal Hadi Salim 2013-12-23   75  			return 0;
1a29321ed045e3 net/sched/act_pedit.c Jamal Hadi Salim 2013-12-23   76  		if (!ovr)
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   77  			return -EEXIST;
1a29321ed045e3 net/sched/act_pedit.c Jamal Hadi Salim 2013-12-23   78  
e9ce1cd3cf6cf3 net/sched/act_pedit.c David S. Miller  2006-08-21   79  		if (p->tcfp_nkeys && p->tcfp_nkeys != parm->nkeys) {
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   80  			keys = kmalloc(ksize, GFP_KERNEL);
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   81  			if (keys == NULL)
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   82  				return -ENOMEM;
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   83  		}
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   84  	}
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   85  
e9ce1cd3cf6cf3 net/sched/act_pedit.c David S. Miller  2006-08-21   86  	spin_lock_bh(&p->tcf_lock);
e9ce1cd3cf6cf3 net/sched/act_pedit.c David S. Miller  2006-08-21   87  	p->tcfp_flags = parm->flags;
e9ce1cd3cf6cf3 net/sched/act_pedit.c David S. Miller  2006-08-21   88  	p->tcf_action = parm->action;
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   89  	if (keys) {
e9ce1cd3cf6cf3 net/sched/act_pedit.c David S. Miller  2006-08-21   90  		kfree(p->tcfp_keys);
e9ce1cd3cf6cf3 net/sched/act_pedit.c David S. Miller  2006-08-21   91  		p->tcfp_keys = keys;
e9ce1cd3cf6cf3 net/sched/act_pedit.c David S. Miller  2006-08-21   92  		p->tcfp_nkeys = parm->nkeys;
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   93  	}
e9ce1cd3cf6cf3 net/sched/act_pedit.c David S. Miller  2006-08-21   94  	memcpy(p->tcfp_keys, parm->keys, ksize);
e9ce1cd3cf6cf3 net/sched/act_pedit.c David S. Miller  2006-08-21   95  	spin_unlock_bh(&p->tcf_lock);
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   96  	if (ret == ACT_P_CREATED)
86062033feb8a1 net/sched/act_pedit.c WANG Cong        2014-02-11   97  		tcf_hash_insert(a);
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   98  	return ret;
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16   99  }
^1da177e4c3f41 net/sched/pedit.c     Linus Torvalds   2005-04-16  100  

:::::: The code at line 62 was first introduced by commit
:::::: 86062033feb8a1692f7a3d570c652f1b4a4b4b52 net_sched: act: hide struct tcf_common from API

:::::: TO: WANG Cong <xiyou.wangcong@gmail.com>
:::::: CC: David S. Miller <davem@davemloft.net>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 24335 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-30 23:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30 23:26 [android-common:android-3.18 13268/18267] net/sched/act_pedit.c:62 tcf_pedit_init() warn: inconsistent indenting kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.