1. 17 Jun, 2016 13 commits
    • Arnd Bergmann's avatar
      net: xfrm: fix old-style declaration · 318d3cc0
      Arnd Bergmann authored
      Modern C standards expect the '__inline__' keyword to come before the return
      type in a declaration, and we get a couple of warnings for this with "make W=1"
      in the xfrm{4,6}_policy.c files:
      
      net/ipv6/xfrm6_policy.c:369:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration]
       static int inline xfrm6_net_sysctl_init(struct net *net)
      net/ipv6/xfrm6_policy.c:374:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration]
       static void inline xfrm6_net_sysctl_exit(struct net *net)
      net/ipv4/xfrm4_policy.c:339:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration]
       static int inline xfrm4_net_sysctl_init(struct net *net)
      net/ipv4/xfrm4_policy.c:344:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration]
       static void inline xfrm4_net_sysctl_exit(struct net *net)
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      318d3cc0
    • Arnd Bergmann's avatar
      net: gianfar: fix old-style declaration · 278af574
      Arnd Bergmann authored
      Modern C standards expect the '__inline__' keyword to come before the return
      type in a declaration, and we get a warning for this with "make W=1":
      
      drivers/net/ethernet/freescale/gianfar.c:2278:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration]
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      278af574
    • Arnd Bergmann's avatar
      isdn: eicon: fix old-style declarations · ac565065
      Arnd Bergmann authored
      Modern C standards expect the '__inline__' keyword to come before the return
      type in a declaration, and we get many warnings for this with "make W=1"
      because the eicon driver has this in a header file:
      
      eicon/divasmain.c:448:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
      eicon/divasmain.c:453:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
      eicon/divasmain.c:458:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
      eicon/divasmain.c:463:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
      eicon/divasmain.c:468:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
      eicon/divasmain.c:473:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
      eicon/platform.h:274:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
      eicon/platform.h:280:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
      
      A similar warning gets printed for the diva_os_register_io_port()
      declaration, because 'register' is interpreted as a keyword instead
      of a variable name:
      
      In file included from eicon/diva_didd.c:21:0:
      eicon/platform.h:206:1: error: 'register' is not at beginning of declaration [-Werror=old-style-declaration]
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ac565065
    • Arnd Bergmann's avatar
      hamradio: baycom: fix old-style declaration · 60a25d00
      Arnd Bergmann authored
      Modern C standards expect the '__inline__' keyword to come before the return
      type in a declaration, and we get a warning for this with "make W=1":
      
      drivers/net/hamradio/baycom_par.c:159:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
      
      For consistency with other drivers, I'm changing '__inline__' to 'inline'
      at the same time.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      60a25d00
    • Wei Tang's avatar
      net: the space is required after ',' · be4da0e3
      Wei Tang authored
      The space is missing after ',', and this will introduce much more
      noise when checking patch around.
      Signed-off-by: default avatarWei Tang <tangwei@cmss.chinamobile.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      be4da0e3
    • Wei Tang's avatar
      net: do not initialise statics to 0 · 84d15ae5
      Wei Tang authored
      This patch fixes the checkpatch.pl error to dev.c:
      
      ERROR: do not initialise statics to 0
      Signed-off-by: default avatarWei Tang <tangwei@cmss.chinamobile.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      84d15ae5
    • Arnd Bergmann's avatar
      net: tlan: don't set unused function argument · 40309d26
      Arnd Bergmann authored
      We get a warning for tlan_handle_tx_eoc when building with "make W=1"
      
      drivers/net/ethernet/ti/tlan.c: In function 'tlan_handle_tx_eoc':
      drivers/net/ethernet/ti/tlan.c:1647:59: error: parameter 'host_int' set but not used [-Werror=unused-but-set-parameter]
       static u32 tlan_handle_tx_eoc(struct net_device *dev, u16 host_int)
      
      This is harmless, but removing the unused assignment lets us avoid
      the warning with no downside.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      40309d26
    • Arnd Bergmann's avatar
      net: qlcnic: don't set unused function argument · 287debd6
      Arnd Bergmann authored
      We get a warning for qlcnic_83xx_get_mac_address when building with
      "make W=1":
      
      drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c: In function 'qlcnic_83xx_get_mac_address':
      drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:2156:8: error: parameter 'function' set but not used [-Werror=unused-but-set-parameter]
      
      Clearly this is harmless, but there is also no point for setting
      the variable, so we can simply remove the assignment.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarRajesh Borundia <rajesh.borundia@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      287debd6
    • Arnd Bergmann's avatar
      dsa: b53: fix big-endian register access · 55e7f6ab
      Arnd Bergmann authored
      The b53 dsa register access confusingly uses __raw register accessors
      when both the CPU and the device are big-endian, but it uses little-
      endian accessors when the same device is used from a little-endian
      CPU, which makes no sense.
      
      This uses normal accessors in device-endianess all the time, which
      will work in all four combinations of register and CPU endianess,
      and it will have the same barrier semantics in all cases.
      
      This also seems to take care of a (false positive) warning I'm getting:
      
      drivers/net/dsa/b53/b53_mmap.c: In function 'b53_mmap_read64':
      drivers/net/dsa/b53/b53_mmap.c:109:10: error: 'hi' may be used uninitialized in this function [-Werror=maybe-uninitialized]
        *val = ((u64)hi << 32) | lo;
      
      I originally planned to submit another patch for that warning
      and did this one as a preparation cleanup, but it does seem to be
      sufficient by itself.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      55e7f6ab
    • Simon Horman's avatar
      mpls: allow routes on ipgre devices · 0d227a86
      Simon Horman authored
      This appears to be necessary and sufficient to provide
      MPLS in GRE (RFC4023) support.
      
      This can be used by establishing an ipgre tunnel device
      and then routing MPLS over it.
      
      The following example will forward MPLS frames received with an outermost
      MPLS label 100 over tun1, a GRE tunnel. The forwarded packet will have the
      outermost MPLS LSE removed and two new LSEs added with labels 200
      (outermost) and 300 (next).
      
      ip link add name tun1 type gre remote 10.0.99.193 local 10.0.99.192 ttl 225
      ip link set up dev tun1
      ip addr add 10.0.98.192/24 dev tun1
      ip route sh
      
      echo 1 > /proc/sys/net/mpls/conf/eth0/input
      echo 101 > /proc/sys/net/mpls/platform_labels
      ip -f mpls route add 100 as 200/300 via inet 10.0.98.193
      ip -f mpls route sh
      
      Also remove unnecessary braces.
      Reviewed-by: default avatarDinan Gunawardena <dinan.gunawardena@netronome.com>
      Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
      Acked-by: default avatarRobert Shearman <rshearma@brocade.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0d227a86
    • hayeswang's avatar
      r8152: modify the check of the flag of PHY_RESET in set_speed function · fae56178
      hayeswang authored
      In set_speed(), BMCR_RESET would be set when the flag of PHY_RESET
      is set. Use BMCR_RESET to replace testing the flag of PHY_RESET.
      Signed-off-by: default avatarHayes Wang <hayeswang@realtek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fae56178
    • Philippe Reynes's avatar
      net: ethernet: ax88796: use phy_ethtool_{get|set}_link_ksettings · d21cfb37
      Philippe Reynes authored
      There are two generics functions phy_ethtool_{get|set}_link_ksettings,
      so we can use them instead of defining the same code in the driver.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d21cfb37
    • Philippe Reynes's avatar
      net: ethernet: ax88796: use phydev from struct net_device · de0eabf8
      Philippe Reynes authored
      The private structure contain a pointer to phydev, but the structure
      net_device already contain such pointer. So we can remove the pointer
      phydev in the private structure, and update the driver to use the
      one contained in struct net_device.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de0eabf8
  2. 16 Jun, 2016 27 commits