Search Linux Wireless

[mac80211-next:netlink-validation 2/9] net/sched/act_api.c:888:43: error: initializer element is not constant

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git netlink-validation
head:   644e4f56485a315c4d08b743e67e4dcddb6fa4da
commit: 8acd53e0cbdd2f39c6c76df1f54cd0740a0acd84 [2/9] netlink: remove type-unsafe validation_data pointer
config: x86_64-defconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
        git checkout 8acd53e0cbdd2f39c6c76df1f54cd0740a0acd84
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   In file included from include/net/rtnetlink.h:6:0,
                    from include/net/sch_generic.h:20,
                    from include/linux/filter.h:25,
                    from include/net/sock.h:59,
                    from net/sched/act_api.c:19:
>> net/sched/act_api.c:888:43: error: initializer element is not constant
     [TCA_ACT_FLAGS]  = NLA_POLICY_BITFIELD32(tca_act_flags_allowed),
                                              ^
   include/net/netlink.h:345:48: note: in definition of macro 'NLA_POLICY_BITFIELD32'
     { .type = NLA_BITFIELD32, .bitfield32_valid = valid }
                                                   ^~~~~
   net/sched/act_api.c:888:43: note: (near initialization for 'tcf_action_policy[7].<anonymous>.bitfield32_valid')
     [TCA_ACT_FLAGS]  = NLA_POLICY_BITFIELD32(tca_act_flags_allowed),
                                              ^
   include/net/netlink.h:345:48: note: in definition of macro 'NLA_POLICY_BITFIELD32'
     { .type = NLA_BITFIELD32, .bitfield32_valid = valid }
                                                   ^~~~~
   net/sched/act_api.c:889:45: error: initializer element is not constant
     [TCA_ACT_HW_STATS] = NLA_POLICY_BITFIELD32(tca_act_hw_stats_allowed),
                                                ^
   include/net/netlink.h:345:48: note: in definition of macro 'NLA_POLICY_BITFIELD32'
     { .type = NLA_BITFIELD32, .bitfield32_valid = valid }
                                                   ^~~~~
   net/sched/act_api.c:889:45: note: (near initialization for 'tcf_action_policy[8].<anonymous>.bitfield32_valid')
     [TCA_ACT_HW_STATS] = NLA_POLICY_BITFIELD32(tca_act_hw_stats_allowed),
                                                ^
   include/net/netlink.h:345:48: note: in definition of macro 'NLA_POLICY_BITFIELD32'
     { .type = NLA_BITFIELD32, .bitfield32_valid = valid }
                                                   ^~~~~

vim +888 net/sched/act_api.c

   881	
   882	static const struct nla_policy tcf_action_policy[TCA_ACT_MAX + 1] = {
   883		[TCA_ACT_KIND]		= { .type = NLA_STRING },
   884		[TCA_ACT_INDEX]		= { .type = NLA_U32 },
   885		[TCA_ACT_COOKIE]	= { .type = NLA_BINARY,
   886					    .len = TC_COOKIE_MAX_SIZE },
   887		[TCA_ACT_OPTIONS]	= { .type = NLA_NESTED },
 > 888		[TCA_ACT_FLAGS]		= NLA_POLICY_BITFIELD32(tca_act_flags_allowed),
   889		[TCA_ACT_HW_STATS]	= NLA_POLICY_BITFIELD32(tca_act_hw_stats_allowed),
   890	};
   891	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux