1. 15 1月, 2021 1 次提交
  2. 12 1月, 2021 1 次提交
  3. 10 1月, 2021 34 次提交
  4. 09 1月, 2021 4 次提交
    • J
      ppp: clean up endianness conversions · 09b5b5fb
      Julian Wiedmann 提交于
      sparse complains about some harmless endianness issues:
      
      > drivers/net/ppp/pptp.c:281:21: warning: incorrect type in assignment (different base types)
      > drivers/net/ppp/pptp.c:281:21:    expected unsigned int [usertype] ack
      > drivers/net/ppp/pptp.c:281:21:    got restricted __be32
      > drivers/net/ppp/pptp.c:283:23: warning: cast to restricted __be32
      
      Here 'ack' is assigned a value in network-order, and then also the
      byte-swapped value in host-order. Clean this up by doing the byte-swap
      as part of the assignment.
      
      > drivers/net/ppp/pptp.c:358:26: warning: cast from restricted __be16
      > drivers/net/ppp/pptp.c:358:26: warning: incorrect type in argument 1 (different base types)
      > drivers/net/ppp/pptp.c:358:26:    expected unsigned short [usertype] call_id
      > drivers/net/ppp/pptp.c:358:26:    got restricted __be16 [usertype]
      
      Here we use the wrong flavour of byte-swap. Use ntohs(), which of course
      gives the same result.
      
      Cc: Dmitry Kozlov <xeb@mail.ru>
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Link: https://lore.kernel.org/r/20210107143956.25549-1-jwi@linux.ibm.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      09b5b5fb
    • J
      net: ip_tunnel: clean up endianness conversions · fda4fde2
      Julian Wiedmann 提交于
      sparse complains about some harmless endianness issues:
      
      > net/ipv4/ip_tunnel_core.c:225:43: warning: cast to restricted __be16
      > net/ipv4/ip_tunnel_core.c:225:43: warning: incorrect type in initializer (different base types)
      > net/ipv4/ip_tunnel_core.c:225:43:    expected restricted __be16 [usertype] mtu
      > net/ipv4/ip_tunnel_core.c:225:43:    got unsigned short [usertype]
      
      iptunnel_pmtud_build_icmp() uses the wrong flavour of byte-order conversion
      when storing the MTU into the ICMPv4 packet. Use htons(), just like
      iptunnel_pmtud_build_icmpv6() does.
      
      > net/ipv4/ip_tunnel_core.c:248:35: warning: cast from restricted __be16
      > net/ipv4/ip_tunnel_core.c:248:35: warning: incorrect type in argument 3 (different base types)
      > net/ipv4/ip_tunnel_core.c:248:35:    expected unsigned short type
      > net/ipv4/ip_tunnel_core.c:248:35:    got restricted __be16 [usertype]
      > net/ipv4/ip_tunnel_core.c:341:35: warning: cast from restricted __be16
      > net/ipv4/ip_tunnel_core.c:341:35: warning: incorrect type in argument 3 (different base types)
      > net/ipv4/ip_tunnel_core.c:341:35:    expected unsigned short type
      > net/ipv4/ip_tunnel_core.c:341:35:    got restricted __be16 [usertype]
      
      eth_header() wants the Ethertype in host-order, use the correct flavour of
      byte-order conversion.
      
      > net/ipv4/ip_tunnel_core.c:600:45: warning: restricted __be16 degrades to integer
      > net/ipv4/ip_tunnel_core.c:609:30: warning: incorrect type in assignment (different base types)
      > net/ipv4/ip_tunnel_core.c:609:30:    expected int type
      > net/ipv4/ip_tunnel_core.c:609:30:    got restricted __be16 [usertype]
      > net/ipv4/ip_tunnel_core.c:619:30: warning: incorrect type in assignment (different base types)
      > net/ipv4/ip_tunnel_core.c:619:30:    expected int type
      > net/ipv4/ip_tunnel_core.c:619:30:    got restricted __be16 [usertype]
      > net/ipv4/ip_tunnel_core.c:629:30: warning: incorrect type in assignment (different base types)
      > net/ipv4/ip_tunnel_core.c:629:30:    expected int type
      > net/ipv4/ip_tunnel_core.c:629:30:    got restricted __be16 [usertype]
      
      The TUNNEL_* types are big-endian, so adjust the type of the local
      variable in ip_tun_parse_opts().
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Link: https://lore.kernel.org/r/20210107144008.25777-1-jwi@linux.ibm.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      fda4fde2
    • R
      MAINTAINERS: add bgmac section entry · f67b4ff2
      Rafał Miłecki 提交于
      This driver exists for years but was missing its MAINTAINERS entry.
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Link: https://lore.kernel.org/r/20210107180051.1542-3-zajec5@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      f67b4ff2
    • R
      net: broadcom: share header defining UniMAC registers · 28e303da
      Rafał Miłecki 提交于
      UniMAC is integrated into multiple Broadcom's Ethernet controllers so
      use a shared header file for it and avoid some code duplication.
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Acked-by: NDoug Berger <opendmb@gmail.com>
      Link: https://lore.kernel.org/r/20210107180051.1542-2-zajec5@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      28e303da