Name of failed tests ====================
master ------
* checkpatch ./net/batman-adv/icmp_socket.c * checkpatch ./net/batman-adv/log.c * checkpatch ./net/batman-adv/log.h * checkpatch ./net/batman-adv/main.h * checkpatch ./net/batman-adv/network-coding.c * checkpatch ./net/batman-adv/packet.h * checkpatch ./net/batman-adv/sysfs.c * cppcheck * sparse linux-4.8 cfg: BLA=n DAT=n DEBUGFS=y DEBUG=n NC=y MCAST=y BATMAN_V=n
next ----
* checkpatch ./net/batman-adv/icmp_socket.c * checkpatch ./net/batman-adv/log.c * checkpatch ./net/batman-adv/log.h * checkpatch ./net/batman-adv/main.h * checkpatch ./net/batman-adv/network-coding.c * checkpatch ./net/batman-adv/packet.h * checkpatch ./net/batman-adv/sysfs.c * difference between net and batadv next * sparse linux-4.8 cfg: BLA=n DAT=n DEBUGFS=y DEBUG=y NC=n MCAST=y BATMAN_V=y * sparse linux-4.8 cfg: BLA=y DAT=n DEBUGFS=y DEBUG=y NC=y MCAST=y BATMAN_V=n
Output of different failed tests ================================
next: checkpatch ./net/batman-adv/icmp_socket.c -----------------------------------------------
WARNING: Symbolic permissions are not preferred. Consider using octal permissions 0600. #325: FILE: ./net/batman-adv/icmp_socket.c:325: + d = debugfs_create_file(BATADV_ICMP_SOCKET, S_IFREG | S_IWUSR | S_IRUSR,
total: 0 errors, 1 warnings, 0 checks, 407 lines checked
next: checkpatch ./net/batman-adv/log.c ---------------------------------------
WARNING: Symbolic permissions are not preferred. Consider using octal permissions 0400. #215: FILE: ./net/batman-adv/log.c:215: + d = debugfs_create_file("log", S_IFREG | S_IRUSR,
total: 0 errors, 1 warnings, 0 checks, 231 lines checked
next: checkpatch ./net/batman-adv/log.h ---------------------------------------
CHECK: Macro argument reuse 'bat_priv' - possible side-effects? #74: FILE: ./net/batman-adv/log.h:74: +#define _batadv_dbg(type, bat_priv, ratelimited, fmt, arg...) \ + do { \ + if (atomic_read(&bat_priv->log_level) & type && \ + (!ratelimited || net_ratelimit())) \ + batadv_debug_log(bat_priv, fmt, ## arg);\ + } \ + while (0)
CHECK: Macro argument 'bat_priv' may be better as '(bat_priv)' to avoid precedence issues #74: FILE: ./net/batman-adv/log.h:74: +#define _batadv_dbg(type, bat_priv, ratelimited, fmt, arg...) \ + do { \ + if (atomic_read(&bat_priv->log_level) & type && \ + (!ratelimited || net_ratelimit())) \ + batadv_debug_log(bat_priv, fmt, ## arg);\ + } \ + while (0)
CHECK: Macro argument 'ratelimited' may be better as '(ratelimited)' to avoid precedence issues #74: FILE: ./net/batman-adv/log.h:74: +#define _batadv_dbg(type, bat_priv, ratelimited, fmt, arg...) \ + do { \ + if (atomic_read(&bat_priv->log_level) & type && \ + (!ratelimited || net_ratelimit())) \ + batadv_debug_log(bat_priv, fmt, ## arg);\ + } \ + while (0)
CHECK: Macro argument reuse 'fmt' - possible side-effects? #96: FILE: ./net/batman-adv/log.h:96: +#define batadv_info(net_dev, fmt, arg...) \ + do { \ + struct net_device *_netdev = (net_dev); \ + struct batadv_priv *_batpriv = netdev_priv(_netdev); \ + batadv_dbg(BATADV_DBG_ALL, _batpriv, fmt, ## arg); \ + pr_info("%s: " fmt, _netdev->name, ## arg); \ + } while (0)
CHECK: Macro argument reuse 'fmt' - possible side-effects? #103: FILE: ./net/batman-adv/log.h:103: +#define batadv_err(net_dev, fmt, arg...) \ + do { \ + struct net_device *_netdev = (net_dev); \ + struct batadv_priv *_batpriv = netdev_priv(_netdev); \ + batadv_dbg(BATADV_DBG_ALL, _batpriv, fmt, ## arg); \ + pr_err("%s: " fmt, _netdev->name, ## arg); \ + } while (0)
total: 0 errors, 0 warnings, 5 checks, 111 lines checked
next: checkpatch ./net/batman-adv/main.h ----------------------------------------
CHECK: Macro argument reuse 'vid' - possible side-effects? #203: FILE: ./net/batman-adv/main.h:203: +#define BATADV_PRINT_VID(vid) ((vid & BATADV_VLAN_HAS_TAG) ? \ + (int)(vid & VLAN_VID_MASK) : -1)
CHECK: Macro argument 'vid' may be better as '(vid)' to avoid precedence issues #203: FILE: ./net/batman-adv/main.h:203: +#define BATADV_PRINT_VID(vid) ((vid & BATADV_VLAN_HAS_TAG) ? \ + (int)(vid & VLAN_VID_MASK) : -1)
total: 0 errors, 0 warnings, 2 checks, 316 lines checked
next: checkpatch ./net/batman-adv/network-coding.c --------------------------------------------------
WARNING: Symbolic permissions are not preferred. Consider using octal permissions 0644. #1964: FILE: ./net/batman-adv/network-coding.c:1964: + file = debugfs_create_u8("min_tq", S_IRUGO | S_IWUSR, nc_dir,
WARNING: Symbolic permissions are not preferred. Consider using octal permissions 0644. #1969: FILE: ./net/batman-adv/network-coding.c:1969: + file = debugfs_create_u32("max_fwd_delay", S_IRUGO | S_IWUSR, nc_dir,
WARNING: Symbolic permissions are not preferred. Consider using octal permissions 0644. #1974: FILE: ./net/batman-adv/network-coding.c:1974: + file = debugfs_create_u32("max_buffer_time", S_IRUGO | S_IWUSR, nc_dir,
total: 0 errors, 3 warnings, 0 checks, 1984 lines checked
next: checkpatch ./net/batman-adv/packet.h ------------------------------------------
CHECK: Macro argument 'n' may be better as '(n)' to avoid precedence issues #24: FILE: ./net/batman-adv/packet.h:24: +#define batadv_tp_is_error(n) ((u8)n > 127 ? 1 : 0)
total: 0 errors, 0 warnings, 1 checks, 631 lines checked
next: checkpatch ./net/batman-adv/sysfs.c -----------------------------------------
CHECK: Macro argument reuse '_name' - possible side-effects? #174: FILE: ./net/batman-adv/sysfs.c:174: +#define BATADV_ATTR_SIF_BOOL(_name, _mode, _post_func) \ + static BATADV_ATTR_SIF_STORE_BOOL(_name, _post_func) \ + static BATADV_ATTR_SIF_SHOW_BOOL(_name) \ + static BATADV_ATTR(_name, _mode, batadv_show_##_name, \ + batadv_store_##_name)
CHECK: Macro argument '_var' may be better as '(_var)' to avoid precedence issues #180: FILE: ./net/batman-adv/sysfs.c:180: +#define BATADV_ATTR_SIF_STORE_UINT(_name, _var, _min, _max, _post_func) \ +ssize_t batadv_store_##_name(struct kobject *kobj, \ + struct attribute *attr, char *buff, \ + size_t count) \ +{ \ + struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \ + struct batadv_priv *bat_priv = netdev_priv(net_dev); \ + \ + return __batadv_store_uint_attr(buff, count, _min, _max, \ + _post_func, attr, \ + &bat_priv->_var, net_dev); \ +}
CHECK: Macro argument '_var' may be better as '(_var)' to avoid precedence issues #193: FILE: ./net/batman-adv/sysfs.c:193: +#define BATADV_ATTR_SIF_SHOW_UINT(_name, _var) \ +ssize_t batadv_show_##_name(struct kobject *kobj, \ + struct attribute *attr, char *buff) \ +{ \ + struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); \ + \ + return sprintf(buff, "%i\n", atomic_read(&bat_priv->_var)); \ +} \ +
CHECK: Macro argument reuse '_name' - possible side-effects? #205: FILE: ./net/batman-adv/sysfs.c:205: +#define BATADV_ATTR_SIF_UINT(_name, _var, _mode, _min, _max, _post_func)\ + static BATADV_ATTR_SIF_STORE_UINT(_name, _var, _min, _max, _post_func)\ + static BATADV_ATTR_SIF_SHOW_UINT(_name, _var) \ + static BATADV_ATTR(_name, _mode, batadv_show_##_name, \ + batadv_store_##_name)
CHECK: Macro argument reuse '_var' - possible side-effects? #205: FILE: ./net/batman-adv/sysfs.c:205: +#define BATADV_ATTR_SIF_UINT(_name, _var, _mode, _min, _max, _post_func)\ + static BATADV_ATTR_SIF_STORE_UINT(_name, _var, _min, _max, _post_func)\ + static BATADV_ATTR_SIF_SHOW_UINT(_name, _var) \ + static BATADV_ATTR(_name, _mode, batadv_show_##_name, \ + batadv_store_##_name)
CHECK: Macro argument reuse '_name' - possible side-effects? #243: FILE: ./net/batman-adv/sysfs.c:243: +#define BATADV_ATTR_VLAN_BOOL(_name, _mode, _post_func) \ + static BATADV_ATTR_VLAN_STORE_BOOL(_name, _post_func) \ + static BATADV_ATTR_VLAN_SHOW_BOOL(_name) \ + static BATADV_ATTR_VLAN(_name, _mode, batadv_show_vlan_##_name, \ + batadv_store_vlan_##_name)
CHECK: Macro argument '_var' may be better as '(_var)' to avoid precedence issues #249: FILE: ./net/batman-adv/sysfs.c:249: +#define BATADV_ATTR_HIF_STORE_UINT(_name, _var, _min, _max, _post_func) \ +ssize_t batadv_store_##_name(struct kobject *kobj, \ + struct attribute *attr, char *buff, \ + size_t count) \ +{ \ + struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \ + struct batadv_hard_iface *hard_iface; \ + ssize_t length; \ + \ + hard_iface = batadv_hardif_get_by_netdev(net_dev); \ + if (!hard_iface) \ + return 0; \ + \ + length = __batadv_store_uint_attr(buff, count, _min, _max, \ + _post_func, attr, \ + &hard_iface->_var, net_dev); \ + \ + batadv_hardif_put(hard_iface); \ + return length; \ +}
CHECK: Macro argument '_var' may be better as '(_var)' to avoid precedence issues #270: FILE: ./net/batman-adv/sysfs.c:270: +#define BATADV_ATTR_HIF_SHOW_UINT(_name, _var) \ +ssize_t batadv_show_##_name(struct kobject *kobj, \ + struct attribute *attr, char *buff) \ +{ \ + struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \ + struct batadv_hard_iface *hard_iface; \ + ssize_t length; \ + \ + hard_iface = batadv_hardif_get_by_netdev(net_dev); \ + if (!hard_iface) \ + return 0; \ + \ + length = sprintf(buff, "%i\n", atomic_read(&hard_iface->_var)); \ + \ + batadv_hardif_put(hard_iface); \ + return length; \ +}
CHECK: Macro argument reuse '_name' - possible side-effects? #291: FILE: ./net/batman-adv/sysfs.c:291: +#define BATADV_ATTR_HIF_UINT(_name, _var, _mode, _min, _max, _post_func)\ + static BATADV_ATTR_HIF_STORE_UINT(_name, _var, _min, \ + _max, _post_func) \ + static BATADV_ATTR_HIF_SHOW_UINT(_name, _var) \ + static BATADV_ATTR(_name, _mode, batadv_show_##_name, \ + batadv_store_##_name)
CHECK: Macro argument reuse '_var' - possible side-effects? #291: FILE: ./net/batman-adv/sysfs.c:291: +#define BATADV_ATTR_HIF_UINT(_name, _var, _mode, _min, _max, _post_func)\ + static BATADV_ATTR_HIF_STORE_UINT(_name, _var, _min, \ + _max, _post_func) \ + static BATADV_ATTR_HIF_SHOW_UINT(_name, _var) \ + static BATADV_ATTR(_name, _mode, batadv_show_##_name, \ + batadv_store_##_name)
total: 0 errors, 0 warnings, 10 checks, 1224 lines checked
master: cppcheck ----------------
[net/batman-adv/bat_v.c:790] -> [net/batman-adv/bat_v.c:796]: (style) Variable 'curr_gw' is reassigned a value before the old one has been used. [net/batman-adv/bat_v_ogm.c:404] -> [net/batman-adv/bat_v_ogm.c:411]: (style) Variable 'orig_ifinfo' is reassigned a value before the old one has been used. [net/batman-adv/bat_v_ogm.c:489] -> [net/batman-adv/bat_v_ogm.c:498]: (style) Variable 'orig_neigh_node' is reassigned a value before the old one has been used. [net/batman-adv/fragmentation.c:255] -> [net/batman-adv/fragmentation.c:263]: (style) Variable 'skb_out' is reassigned a value before the old one has been used. [net/batman-adv/fragmentation.c:355] -> [net/batman-adv/fragmentation.c:362]: (style) Variable 'orig_node_dst' is reassigned a value before the old one has been used. [net/batman-adv/gateway_client.c:707] -> [net/batman-adv/gateway_client.c:718]: (style) Variable 'orig_dst_node' is reassigned a value before the old one has been used. [net/batman-adv/originator.c:367] -> [net/batman-adv/originator.c:372]: (style) Variable 'orig_ifinfo' is reassigned a value before the old one has been used. [net/batman-adv/originator.c:523] -> [net/batman-adv/originator.c:528]: (style) Variable 'hardif_neigh' is reassigned a value before the old one has been used. [net/batman-adv/originator.c:566] -> [net/batman-adv/originator.c:569]: (style) Variable 'hardif_neigh' is reassigned a value before the old one has been used. [net/batman-adv/originator.c:686] -> [net/batman-adv/originator.c:689]: (style) Variable 'neigh_node' is reassigned a value before the old one has been used. [net/batman-adv/send.c:565] -> [net/batman-adv/send.c:570]: (style) Variable 'primary_if' is reassigned a value before the old one has been used.
next: difference between net and batadv next --------------------------------------------
netnext/net/batman-adv/netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
next: sparse linux-4.8 cfg: BLA=n DAT=n DEBUGFS=y DEBUG=y NC=n MCAST=y BATMAN_V=y ---------------------------------------------------------------------------
./arch/x86/include/asm/uaccess.h:735:18: warning: incorrect type in argument 1 (different modifiers) ./arch/x86/include/asm/uaccess.h:735:18: expected void *<noident> ./arch/x86/include/asm/uaccess.h:735:18: got void const *from
Statistics ==========
master ------
Failed tests: 9 Started build tests: 115 Tested Linux versions: 27 Tested configs: 80
next ----
Failed tests: 10 Started build tests: 117 Tested Linux versions: 26 Tested configs: 79