1. 17 6月, 2016 11 次提交
    • A
      net: gianfar: fix old-style declaration · 278af574
      Arnd Bergmann 提交于
      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: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      278af574
    • A
      isdn: eicon: fix old-style declarations · ac565065
      Arnd Bergmann 提交于
      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: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ac565065
    • A
      hamradio: baycom: fix old-style declaration · 60a25d00
      Arnd Bergmann 提交于
      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: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      60a25d00
    • A
      net: tlan: don't set unused function argument · 40309d26
      Arnd Bergmann 提交于
      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: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      40309d26
    • A
      net: qlcnic: don't set unused function argument · 287debd6
      Arnd Bergmann 提交于
      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: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NRajesh Borundia <rajesh.borundia@qlogic.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      287debd6
    • A
      dsa: b53: fix big-endian register access · 55e7f6ab
      Arnd Bergmann 提交于
      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: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      55e7f6ab
    • H
      r8152: modify the check of the flag of PHY_RESET in set_speed function · fae56178
      hayeswang 提交于
      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: NHayes Wang <hayeswang@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fae56178
    • P
      net: ethernet: ax88796: use phy_ethtool_{get|set}_link_ksettings · d21cfb37
      Philippe Reynes 提交于
      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: NPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d21cfb37
    • P
      net: ethernet: ax88796: use phydev from struct net_device · de0eabf8
      Philippe Reynes 提交于
      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: NPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de0eabf8
    • V
      net: stmmac: dwmac-rk: keep the PHY up for WoL · 229666c1
      Vincent Palatin 提交于
      When suspending the machine, do not shutdown the external PHY by cutting
      its regulator in the mac platform driver suspend code if Wake-on-Lan is enabled,
      else it cannot wake us up.
      In order to do this, split the suspend/resume callbacks from the
      init/exit callbacks, so we can condition the power-down on the lack of
      need to wake-up from the LAN but do it unconditionally when unloading the
      module.
      Signed-off-by: NVincent Palatin <vpalatin@chromium.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      229666c1
    • V
      net: stmmac: allow to split suspend/resume from init/exit callbacks · cecbc556
      Vincent Palatin 提交于
      Let the stmmac platform drivers provide dedicated suspend and resume
      callbacks rather than always re-using the init and exits callbacks.
      If the driver does not provide the suspend or resume callback, we fall
      back to the old behavior trying to use exit or init.
      
      This allows a specific platform to perform only a partial power-down on
      suspend if Wake-on-Lan is enabled but always perform the full shutdown
      sequence if the module is unloaded.
      Signed-off-by: NVincent Palatin <vpalatin@chromium.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cecbc556
  2. 16 6月, 2016 29 次提交