1. 07 Jun, 2021 11 commits
  2. 04 Jun, 2021 26 commits
  3. 03 Jun, 2021 3 commits
    • Colin Ian King's avatar
      netdevsim: Fix unsigned being compared to less than zero · ebbf5fcb
      Colin Ian King authored
      The comparison of len < 0 is always false because len is a size_t. Fix
      this by making len a ssize_t instead.
      
      Addresses-Coverity: ("Unsigned compared against 0")
      Fixes: d3953819 ("netdevsim: Add max_vfs to bus_dev")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ebbf5fcb
    • Andreas Roeseler's avatar
      icmp: fix lib conflict with trinity · e32ea44c
      Andreas Roeseler authored
      Including <linux/in.h> and <netinet/in.h> in the dependencies breaks
      compilation of trinity due to multiple definitions. <linux/in.h> is only
      used in <linux/icmp.h> to provide the definition of the struct in_addr,
      but this can be substituted out by using the datatype __be32.
      Signed-off-by: default avatarAndreas Roeseler <andreas.a.roeseler@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e32ea44c
    • Nathan Chancellor's avatar
      net: ethernet: rmnet: Restructure if checks to avoid uninitialized warning · 118de610
      Nathan Chancellor authored
      Clang warns that proto in rmnet_map_v5_checksum_uplink_packet() might be
      used uninitialized:
      
      drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:283:14: warning:
      variable 'proto' is used uninitialized whenever 'if' condition is false
      [-Wsometimes-uninitialized]
                      } else if (skb->protocol == htons(ETH_P_IPV6)) {
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:295:36: note:
      uninitialized use occurs here
                      check = rmnet_map_get_csum_field(proto, trans);
                                                       ^~~~~
      drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:283:10: note:
      remove the 'if' if its condition is always true
                      } else if (skb->protocol == htons(ETH_P_IPV6)) {
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:270:11: note:
      initialize the variable 'proto' to silence this warning
                      u8 proto;
                              ^
                               = '\0'
      1 warning generated.
      
      This is technically a false positive because there is an if statement
      above this one that checks skb->protocol for not being either
      ETH_P_IP{,V6}. However, it is more obvious to sink that into the if
      statement as an else branch, which makes the code clearer and fixes the
      warning.
      
      At the same time, move the "IS_ENABLED(CONFIG_IPV6)" into the else if
      condition so that the else branch of the preprocessor conditional can
      be shared, since there is no build failure with CONFIG_IPV6 disabled.
      
      Fixes: b6e5d27e ("net: ethernet: rmnet: Add support for MAPv5 egress packets")
      Link: https://github.com/ClangBuiltLinux/linux/issues/1390Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      118de610