Hi Leandro, Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Leandro-Dorileo/net-sched-taprio-cbs-Fix-using-invalid-link-speed/20190329-043825 config: alpha-allyesconfig (attached as .config) compiler: alpha-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree GCC_VERSION=7.2.0 make.cross ARCH=alpha All warnings (new ones prefixed by >>): In file included from include/linux/printk.h:330:0, from include/linux/kernel.h:15, from include/asm-generic/bug.h:18, from arch/alpha/include/asm/bug.h:23, from include/linux/bug.h:5, from include/linux/mmdebug.h:5, from include/linux/gfp.h:5, from include/linux/slab.h:15, from net/sched/sch_taprio.c:10: net/sched/sch_taprio.c: In function 'taprio_set_picos_per_byte': >> net/sched/sch_taprio.c:600:18: warning: format '%lld' expects argument of >> type 'long long int', but argument 5 has type 'long int' [-Wformat=] netdev_dbg(dev, "taprio: set %s's picos_per_byte to: %lld, linkspeed: %d\n", ^ include/linux/dynamic_debug.h:118:15: note: in definition of macro '__dynamic_func_call' func(&id, ##__VA_ARGS__); \ ^~~~~~~~~~~ include/linux/dynamic_debug.h:154:2: note: in expansion of macro '_dynamic_func_call' _dynamic_func_call(fmt, __dynamic_netdev_dbg, \ ^~~~~~~~~~~~~~~~~~ >> include/linux/netdevice.h:4744:2: note: in expansion of macro >> 'dynamic_netdev_dbg' dynamic_netdev_dbg(__dev, format, ##args); \ ^~~~~~~~~~~~~~~~~~ >> net/sched/sch_taprio.c:600:2: note: in expansion of macro 'netdev_dbg' netdev_dbg(dev, "taprio: set %s's picos_per_byte to: %lld, linkspeed: %d\n", ^~~~~~~~~~ -- In file included from include/linux/printk.h:330:0, from include/linux/kernel.h:15, from include/asm-generic/bug.h:18, from arch/alpha/include/asm/bug.h:23, from include/linux/bug.h:5, from include/linux/mmdebug.h:5, from include/linux/gfp.h:5, from include/linux/slab.h:15, from net//sched/sch_taprio.c:10: net//sched/sch_taprio.c: In function 'taprio_set_picos_per_byte': net//sched/sch_taprio.c:600:18: warning: format '%lld' expects argument of type 'long long int', but argument 5 has type 'long int' [-Wformat=] netdev_dbg(dev, "taprio: set %s's picos_per_byte to: %lld, linkspeed: %d\n", ^ include/linux/dynamic_debug.h:118:15: note: in definition of macro '__dynamic_func_call' func(&id, ##__VA_ARGS__); \ ^~~~~~~~~~~ include/linux/dynamic_debug.h:154:2: note: in expansion of macro '_dynamic_func_call' _dynamic_func_call(fmt, __dynamic_netdev_dbg, \ ^~~~~~~~~~~~~~~~~~ >> include/linux/netdevice.h:4744:2: note: in expansion of macro >> 'dynamic_netdev_dbg' dynamic_netdev_dbg(__dev, format, ##args); \ ^~~~~~~~~~~~~~~~~~ net//sched/sch_taprio.c:600:2: note: in expansion of macro 'netdev_dbg' netdev_dbg(dev, "taprio: set %s's picos_per_byte to: %lld, linkspeed: %d\n", ^~~~~~~~~~ vim +600 net/sched/sch_taprio.c 587 588 static void taprio_set_picos_per_byte(struct net_device *dev, 589 struct taprio_sched *q) 590 { 591 struct ethtool_link_ksettings ecmd; 592 int picos_per_byte = -1; 593 594 if (!__ethtool_get_link_ksettings(dev, &ecmd) && 595 ecmd.base.speed != SPEED_UNKNOWN) 596 picos_per_byte = div64_s64(NSEC_PER_SEC * 1000LL * 8, 597 ecmd.base.speed * 1000 * 1000); 598 599 atomic64_set(&q->picos_per_byte, picos_per_byte); > 600 netdev_dbg(dev, "taprio: set %s's picos_per_byte to: %lld, > linkspeed: %d\n", 601 dev->name, atomic64_read(&q->picos_per_byte), 602 ecmd.base.speed); 603 } 604 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
.config.gz
Description: application/gzip