Hi Alexander, I love your patch! Yet something to improve:
[auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Alexander-Aring/net-sched-sch-introduce-extack-support/20171217-015839 config: x86_64-randconfig-x003-201751 (attached as .config) compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): net/sched/sch_atm.c: In function 'atm_tc_change': net/sched/sch_atm.c:285:10: error: too few arguments to function 'tcf_block_get' error = tcf_block_get(&flow->block, &flow->filter_list, sch); ^~~~~~~~~~~~~ In file included from net/sched/sch_atm.c:18:0: include/net/pkt_cls.h:41:5: note: declared here int tcf_block_get(struct tcf_block **p_block, ^~~~~~~~~~~~~ >> net/sched/sch_atm.c:291:12: error: too few arguments to function >> 'qdisc_create_dflt' flow->q = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, classid); ^~~~~~~~~~~~~~~~~ In file included from include/linux/filter.h:22:0, from include/net/sock.h:64, from include/linux/atmdev.h:13, from net/sched/sch_atm.c:12: include/net/sch_generic.h:475:15: note: declared here struct Qdisc *qdisc_create_dflt(struct netdev_queue *dev_queue, ^~~~~~~~~~~~~~~~~ net/sched/sch_atm.c: In function 'atm_tc_init': net/sched/sch_atm.c:544:14: error: too few arguments to function 'qdisc_create_dflt' p->link.q = qdisc_create_dflt(sch->dev_queue, ^~~~~~~~~~~~~~~~~ In file included from include/linux/filter.h:22:0, from include/net/sock.h:64, from include/linux/atmdev.h:13, from net/sched/sch_atm.c:12: include/net/sch_generic.h:475:15: note: declared here struct Qdisc *qdisc_create_dflt(struct netdev_queue *dev_queue, ^~~~~~~~~~~~~~~~~ net/sched/sch_atm.c:550:8: error: too few arguments to function 'tcf_block_get' err = tcf_block_get(&p->link.block, &p->link.filter_list, sch); ^~~~~~~~~~~~~ In file included from net/sched/sch_atm.c:18:0: include/net/pkt_cls.h:41:5: note: declared here int tcf_block_get(struct tcf_block **p_block, ^~~~~~~~~~~~~ net/sched/sch_atm.c: At top level: net/sched/sch_atm.c:660:12: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .graft = atm_tc_graft, ^~~~~~~~~~~~ net/sched/sch_atm.c:660:12: note: (near initialization for 'atm_class_ops.graft') net/sched/sch_atm.c:666:15: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .tcf_block = atm_tc_tcf_block, ^~~~~~~~~~~~~~~~ net/sched/sch_atm.c:666:15: note: (near initialization for 'atm_class_ops.tcf_block') net/sched/sch_atm.c:680:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .init = atm_tc_init, ^~~~~~~~~~~ net/sched/sch_atm.c:680:11: note: (near initialization for 'atm_qdisc_ops.init') cc1: some warnings being treated as errors vim +/qdisc_create_dflt +291 net/sched/sch_atm.c 27a3421e4 Patrick McHardy 2008-01-23 192 ^1da177e4 Linus Torvalds 2005-04-16 193 static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent, 7eb3baddc Alexander Aring 2017-12-14 194 struct nlattr **tca, unsigned long *arg, 7eb3baddc Alexander Aring 2017-12-14 195 struct netlink_ext_ack *extack) ^1da177e4 Linus Torvalds 2005-04-16 196 { 786a90366 Stephen Hemminger 2008-01-21 197 struct atm_qdisc_data *p = qdisc_priv(sch); ^1da177e4 Linus Torvalds 2005-04-16 198 struct atm_flow_data *flow = (struct atm_flow_data *)*arg; ^1da177e4 Linus Torvalds 2005-04-16 199 struct atm_flow_data *excess = NULL; 1e90474c3 Patrick McHardy 2008-01-22 200 struct nlattr *opt = tca[TCA_OPTIONS]; 1e90474c3 Patrick McHardy 2008-01-22 201 struct nlattr *tb[TCA_ATM_MAX + 1]; ^1da177e4 Linus Torvalds 2005-04-16 202 struct socket *sock; ^1da177e4 Linus Torvalds 2005-04-16 203 int fd, error, hdr_len; ^1da177e4 Linus Torvalds 2005-04-16 204 void *hdr; ^1da177e4 Linus Torvalds 2005-04-16 205 786a90366 Stephen Hemminger 2008-01-21 206 pr_debug("atm_tc_change(sch %p,[qdisc %p],classid %x,parent %x," ^1da177e4 Linus Torvalds 2005-04-16 207 "flow %p,opt %p)\n", sch, p, classid, parent, flow, opt); ^1da177e4 Linus Torvalds 2005-04-16 208 /* ^1da177e4 Linus Torvalds 2005-04-16 209 * The concept of parents doesn't apply for this qdisc. ^1da177e4 Linus Torvalds 2005-04-16 210 */ ^1da177e4 Linus Torvalds 2005-04-16 211 if (parent && parent != TC_H_ROOT && parent != sch->handle) ^1da177e4 Linus Torvalds 2005-04-16 212 return -EINVAL; ^1da177e4 Linus Torvalds 2005-04-16 213 /* ^1da177e4 Linus Torvalds 2005-04-16 214 * ATM classes cannot be changed. In order to change properties of the ^1da177e4 Linus Torvalds 2005-04-16 215 * ATM connection, that socket needs to be modified directly (via the ^1da177e4 Linus Torvalds 2005-04-16 216 * native ATM API. In order to send a flow to a different VC, the old ^1da177e4 Linus Torvalds 2005-04-16 217 * class needs to be removed and a new one added. (This may be changed ^1da177e4 Linus Torvalds 2005-04-16 218 * later.) ^1da177e4 Linus Torvalds 2005-04-16 219 */ b0188d4db Patrick McHardy 2007-07-15 220 if (flow) b0188d4db Patrick McHardy 2007-07-15 221 return -EBUSY; cee63723b Patrick McHardy 2008-01-23 222 if (opt == NULL) ^1da177e4 Linus Torvalds 2005-04-16 223 return -EINVAL; 27a3421e4 Patrick McHardy 2008-01-23 224 fceb6435e Johannes Berg 2017-04-12 225 error = nla_parse_nested(tb, TCA_ATM_MAX, opt, atm_policy, NULL); cee63723b Patrick McHardy 2008-01-23 226 if (error < 0) cee63723b Patrick McHardy 2008-01-23 227 return error; cee63723b Patrick McHardy 2008-01-23 228 27a3421e4 Patrick McHardy 2008-01-23 229 if (!tb[TCA_ATM_FD]) ^1da177e4 Linus Torvalds 2005-04-16 230 return -EINVAL; 1587bac49 Patrick McHardy 2008-01-23 231 fd = nla_get_u32(tb[TCA_ATM_FD]); 786a90366 Stephen Hemminger 2008-01-21 232 pr_debug("atm_tc_change: fd %d\n", fd); 1e90474c3 Patrick McHardy 2008-01-22 233 if (tb[TCA_ATM_HDR]) { 1e90474c3 Patrick McHardy 2008-01-22 234 hdr_len = nla_len(tb[TCA_ATM_HDR]); 1e90474c3 Patrick McHardy 2008-01-22 235 hdr = nla_data(tb[TCA_ATM_HDR]); b0188d4db Patrick McHardy 2007-07-15 236 } else { ^1da177e4 Linus Torvalds 2005-04-16 237 hdr_len = RFC1483LLC_LEN; ^1da177e4 Linus Torvalds 2005-04-16 238 hdr = NULL; /* default LLC/SNAP for IP */ ^1da177e4 Linus Torvalds 2005-04-16 239 } 1e90474c3 Patrick McHardy 2008-01-22 240 if (!tb[TCA_ATM_EXCESS]) b0188d4db Patrick McHardy 2007-07-15 241 excess = NULL; ^1da177e4 Linus Torvalds 2005-04-16 242 else { b0188d4db Patrick McHardy 2007-07-15 243 excess = (struct atm_flow_data *) 143976ce9 WANG Cong 2017-08-24 244 atm_tc_find(sch, nla_get_u32(tb[TCA_ATM_EXCESS])); b0188d4db Patrick McHardy 2007-07-15 245 if (!excess) b0188d4db Patrick McHardy 2007-07-15 246 return -ENOENT; ^1da177e4 Linus Torvalds 2005-04-16 247 } f5e5cb755 Patrick McHardy 2008-01-23 248 pr_debug("atm_tc_change: type %d, payload %d, hdr_len %d\n", 1e90474c3 Patrick McHardy 2008-01-22 249 opt->nla_type, nla_len(opt), hdr_len); 786a90366 Stephen Hemminger 2008-01-21 250 sock = sockfd_lookup(fd, &error); 786a90366 Stephen Hemminger 2008-01-21 251 if (!sock) b0188d4db Patrick McHardy 2007-07-15 252 return error; /* f_count++ */ 516e0cc56 Al Viro 2008-07-26 253 pr_debug("atm_tc_change: f_count %ld\n", file_count(sock->file)); ^1da177e4 Linus Torvalds 2005-04-16 254 if (sock->ops->family != PF_ATMSVC && sock->ops->family != PF_ATMPVC) { ^1da177e4 Linus Torvalds 2005-04-16 255 error = -EPROTOTYPE; ^1da177e4 Linus Torvalds 2005-04-16 256 goto err_out; ^1da177e4 Linus Torvalds 2005-04-16 257 } ^1da177e4 Linus Torvalds 2005-04-16 258 /* @@@ should check if the socket is really operational or we'll crash ^1da177e4 Linus Torvalds 2005-04-16 259 on vcc->send */ ^1da177e4 Linus Torvalds 2005-04-16 260 if (classid) { ^1da177e4 Linus Torvalds 2005-04-16 261 if (TC_H_MAJ(classid ^ sch->handle)) { 786a90366 Stephen Hemminger 2008-01-21 262 pr_debug("atm_tc_change: classid mismatch\n"); ^1da177e4 Linus Torvalds 2005-04-16 263 error = -EINVAL; ^1da177e4 Linus Torvalds 2005-04-16 264 goto err_out; ^1da177e4 Linus Torvalds 2005-04-16 265 } b0188d4db Patrick McHardy 2007-07-15 266 } else { ^1da177e4 Linus Torvalds 2005-04-16 267 int i; ^1da177e4 Linus Torvalds 2005-04-16 268 unsigned long cl; ^1da177e4 Linus Torvalds 2005-04-16 269 ^1da177e4 Linus Torvalds 2005-04-16 270 for (i = 1; i < 0x8000; i++) { ^1da177e4 Linus Torvalds 2005-04-16 271 classid = TC_H_MAKE(sch->handle, 0x8000 | i); 143976ce9 WANG Cong 2017-08-24 272 cl = atm_tc_find(sch, classid); 786a90366 Stephen Hemminger 2008-01-21 273 if (!cl) b0188d4db Patrick McHardy 2007-07-15 274 break; ^1da177e4 Linus Torvalds 2005-04-16 275 } ^1da177e4 Linus Torvalds 2005-04-16 276 } 786a90366 Stephen Hemminger 2008-01-21 277 pr_debug("atm_tc_change: new id %x\n", classid); 782f79568 vignesh babu 2007-07-16 278 flow = kzalloc(sizeof(struct atm_flow_data) + hdr_len, GFP_KERNEL); 786a90366 Stephen Hemminger 2008-01-21 279 pr_debug("atm_tc_change: flow %p\n", flow); ^1da177e4 Linus Torvalds 2005-04-16 280 if (!flow) { ^1da177e4 Linus Torvalds 2005-04-16 281 error = -ENOBUFS; ^1da177e4 Linus Torvalds 2005-04-16 282 goto err_out; ^1da177e4 Linus Torvalds 2005-04-16 283 } 6529eaba3 Jiri Pirko 2017-05-17 284 69d78ef25 Jiri Pirko 2017-10-13 @285 error = tcf_block_get(&flow->block, &flow->filter_list, sch); 6529eaba3 Jiri Pirko 2017-05-17 286 if (error) { 6529eaba3 Jiri Pirko 2017-05-17 287 kfree(flow); 6529eaba3 Jiri Pirko 2017-05-17 288 goto err_out; 6529eaba3 Jiri Pirko 2017-05-17 289 } 6529eaba3 Jiri Pirko 2017-05-17 290 3511c9132 Changli Gao 2010-10-16 @291 flow->q = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, classid); 786a90366 Stephen Hemminger 2008-01-21 292 if (!flow->q) ^1da177e4 Linus Torvalds 2005-04-16 293 flow->q = &noop_qdisc; 786a90366 Stephen Hemminger 2008-01-21 294 pr_debug("atm_tc_change: qdisc %p\n", flow->q); ^1da177e4 Linus Torvalds 2005-04-16 295 flow->sock = sock; ^1da177e4 Linus Torvalds 2005-04-16 296 flow->vcc = ATM_SD(sock); /* speedup */ ^1da177e4 Linus Torvalds 2005-04-16 297 flow->vcc->user_back = flow; 786a90366 Stephen Hemminger 2008-01-21 298 pr_debug("atm_tc_change: vcc %p\n", flow->vcc); ^1da177e4 Linus Torvalds 2005-04-16 299 flow->old_pop = flow->vcc->pop; ^1da177e4 Linus Torvalds 2005-04-16 300 flow->parent = p; ^1da177e4 Linus Torvalds 2005-04-16 301 flow->vcc->pop = sch_atm_pop; f7ebdff75 Jiri Pirko 2017-08-04 302 flow->common.classid = classid; ^1da177e4 Linus Torvalds 2005-04-16 303 flow->ref = 1; ^1da177e4 Linus Torvalds 2005-04-16 304 flow->excess = excess; 6accec76f David S. Miller 2010-07-18 305 list_add(&flow->list, &p->link.list); ^1da177e4 Linus Torvalds 2005-04-16 306 flow->hdr_len = hdr_len; ^1da177e4 Linus Torvalds 2005-04-16 307 if (hdr) ^1da177e4 Linus Torvalds 2005-04-16 308 memcpy(flow->hdr, hdr, hdr_len); ^1da177e4 Linus Torvalds 2005-04-16 309 else ^1da177e4 Linus Torvalds 2005-04-16 310 memcpy(flow->hdr, llc_oui_ip, sizeof(llc_oui_ip)); ^1da177e4 Linus Torvalds 2005-04-16 311 *arg = (unsigned long)flow; ^1da177e4 Linus Torvalds 2005-04-16 312 return 0; ^1da177e4 Linus Torvalds 2005-04-16 313 err_out: ^1da177e4 Linus Torvalds 2005-04-16 314 sockfd_put(sock); ^1da177e4 Linus Torvalds 2005-04-16 315 return error; ^1da177e4 Linus Torvalds 2005-04-16 316 } ^1da177e4 Linus Torvalds 2005-04-16 317 :::::: The code at line 291 was first introduced by commit :::::: 3511c9132f8b1e1b5634e41a3331c44b0c13be70 net_sched: remove the unused parameter of qdisc_create_dflt() :::::: TO: Changli Gao <xiao...@gmail.com> :::::: CC: David S. Miller <da...@davemloft.net> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
.config.gz
Description: application/gzip