1. 07 2月, 2021 1 次提交
  2. 09 1月, 2021 2 次提交
  3. 14 11月, 2020 1 次提交
  4. 26 9月, 2020 1 次提交
    • J
      drivers/net/ethernet: clean up unused assignments · 7c8c0291
      Jesse Brandeburg 提交于
      As part of the W=1 compliation series, these lines all created
      warnings about unused variables that were assigned a value. Most
      of them are from register reads, but some are just picking up
      a return value from a function and never doing anything with it.
      
      Fixed warnings:
      .../ethernet/brocade/bna/bnad.c:3280:6: warning: variable ‘rx_count’ set but not used [-Wunused-but-set-variable]
      .../ethernet/brocade/bna/bnad.c:3280:6: warning: variable ‘rx_count’ set but not used [-Wunused-but-set-variable]
      .../ethernet/cortina/gemini.c:512:6: warning: variable ‘val’ set but not used [-Wunused-but-set-variable]
      .../ethernet/cortina/gemini.c:2110:21: warning: variable ‘config0’ set but not used [-Wunused-but-set-variable]
      .../ethernet/cavium/liquidio/octeon_device.c:1327:6: warning: variable ‘val32’ set but not used [-Wunused-but-set-variable]
      .../ethernet/cavium/liquidio/octeon_device.c:1358:6: warning: variable ‘val32’ set but not used [-Wunused-but-set-variable]
      .../ethernet/dec/tulip/media.c:322:8: warning: variable ‘setup’ set but not used [-Wunused-but-set-variable]
      .../ethernet/dec/tulip/de4x5.c:4928:13: warning: variable ‘r3’ set but not used [-Wunused-but-set-variable]
      .../ethernet/micrel/ksz884x.c:1652:7: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable]
      .../ethernet/micrel/ksz884x.c:1652:7: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable]
      .../ethernet/micrel/ksz884x.c:1652:7: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable]
      .../ethernet/micrel/ksz884x.c:1652:7: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable]
      .../ethernet/micrel/ksz884x.c:4981:6: warning: variable ‘rx_status’ set but not used [-Wunused-but-set-variable]
      .../ethernet/micrel/ksz884x.c:6510:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
      .../ethernet/micrel/ksz884x.c:6087: warning: cannot understand function prototype: 'struct hw_regs '
      .../ethernet/microchip/lan743x_main.c:161:6: warning: variable ‘int_en’ set but not used [-Wunused-but-set-variable]
      .../ethernet/microchip/lan743x_main.c:1702:6: warning: variable ‘int_sts’ set but not used [-Wunused-but-set-variable]
      .../ethernet/microchip/lan743x_main.c:3041:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
      .../ethernet/natsemi/ns83820.c:603:6: warning: variable ‘tbisr’ set but not used [-Wunused-but-set-variable]
      .../ethernet/natsemi/ns83820.c:1207:11: warning: variable ‘tanar’ set but not used [-Wunused-but-set-variable]
      .../ethernet/marvell/mvneta.c:754:6: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable]
      .../ethernet/neterion/vxge/vxge-traffic.c:33:6: warning: variable ‘val64’ set but not used [-Wunused-but-set-variable]
      .../ethernet/neterion/vxge/vxge-traffic.c:160:6: warning: variable ‘val64’ set but not used [-Wunused-but-set-variable]
      .../ethernet/neterion/vxge/vxge-traffic.c:490:6: warning: variable ‘val32’ set but not used [-Wunused-but-set-variable]
      .../ethernet/neterion/vxge/vxge-traffic.c:2378:6: warning: variable ‘val64’ set but not used [-Wunused-but-set-variable]
      .../ethernet/packetengines/yellowfin.c:1063:18: warning: variable ‘yf_size’ set but not used [-Wunused-but-set-variable]
      .../ethernet/realtek/8139cp.c:1242:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
      .../ethernet/mellanox/mlx4/en_tx.c:858:6: warning: variable ‘ring_cons’ set but not used [-Wunused-but-set-variable]
      .../ethernet/sis/sis900.c:792:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
      .../ethernet/sfc/falcon/farch.c:878:11: warning: variable ‘rx_ev_pkt_type’ set but not used [-Wunused-but-set-variable]
      .../ethernet/sfc/falcon/farch.c:877:23: warning: variable ‘rx_ev_mcast_pkt’ set but not used [-Wunused-but-set-variable]
      .../ethernet/sfc/falcon/farch.c:877:7: warning: variable ‘rx_ev_hdr_type’ set but not used [-Wunused-but-set-variable]
      .../ethernet/sfc/falcon/farch.c:876:7: warning: variable ‘rx_ev_other_err’ set but not used [-Wunused-but-set-variable]
      .../ethernet/sfc/falcon/farch.c:1646:21: warning: variable ‘buftbl_min’ set but not used [-Wunused-but-set-variable]
      .../ethernet/sfc/falcon/farch.c:2535:32: warning: variable ‘spec’ set but not used [-Wunused-but-set-variable]
      .../ethernet/via/via-velocity.c:880:6: warning: variable ‘curr_status’ set but not used [-Wunused-but-set-variable]
      .../ethernet/ti/tlan.c:656:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
      .../ethernet/ti/davinci_emac.c:1230:6: warning: variable ‘num_tx_pkts’ set but not used [-Wunused-but-set-variable]
      .../ethernet/synopsys/dwc-xlgmac-common.c:516:8: warning: variable ‘str’ set but not used [-Wunused-but-set-variable]
      .../ethernet/ti/cpsw_new.c:1662:22: warning: variable ‘priv’ set but not used [-Wunused-but-set-variable]
      
      The register reads should be OK, because the current
      implementation of readl and friends will always execute even
      without an lvalue.
      
      When it makes sense, just remove the lvalue assignment and the
      local. Other times, just remove the offending code, and
      occasionally, just mark the variable as maybe unused since it
      could be used in an ifdef or debug scenario.
      
      Only compile tested with W=1.
      Signed-off-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
      Acked-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7c8c0291
  5. 12 9月, 2020 2 次提交
  6. 28 8月, 2020 1 次提交
    • M
      net: ethernet: ti: cpsw_new: fix error handling in cpsw_ndo_vlan_rx_kill_vid() · af8ea111
      Murali Karicheri 提交于
      This patch fixes a bunch of issues in cpsw_ndo_vlan_rx_kill_vid()
      
       - pm_runtime_get_sync() returns non zero value. This results in
         non zero value return to caller which will be interpreted as error.
         So overwrite ret with zero.
       - If VID matches with port VLAN VID, then set error code.
       - Currently when VLAN interface is deleted, all of the VLAN mc addresses
         are removed from ALE table, however the return values from ale function
         calls are not checked. These functions can return error code -ENOENT.
         But that shouldn't happen in a normal case. So add error print to
         catch the situations so that these can be investigated and addressed.
         return zero in these cases as these are not real error case, but only
         serve to catch ALE table update related issues and help address the
         same in the driver.
      
      Fixes: ed3525ed ("net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac")
      Signed-off-by: NMurali Karicheri <m-karicheri2@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      af8ea111
  7. 25 8月, 2020 1 次提交
  8. 15 5月, 2020 1 次提交
  9. 06 5月, 2020 1 次提交
  10. 24 4月, 2020 1 次提交
  11. 18 3月, 2020 1 次提交
  12. 21 11月, 2019 5 次提交
  13. 05 11月, 2019 1 次提交
    • A
      net: of_get_phy_mode: Change API to solve int/unit warnings · 0c65b2b9
      Andrew Lunn 提交于
      Before this change of_get_phy_mode() returned an enum,
      phy_interface_t. On error, -ENODEV etc, is returned. If the result of
      the function is stored in a variable of type phy_interface_t, and the
      compiler has decided to represent this as an unsigned int, comparision
      with -ENODEV etc, is a signed vs unsigned comparision.
      
      Fix this problem by changing the API. Make the function return an
      error, or 0 on success, and pass a pointer, of type phy_interface_t,
      where the phy mode should be stored.
      
      v2:
      Return with *interface set to PHY_INTERFACE_MODE_NA on error.
      Add error checks to all users of of_get_phy_mode()
      Fixup a few reverse christmas tree errors
      Fixup a few slightly malformed reverse christmas trees
      
      v3:
      Fix 0-day reported errors.
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c65b2b9
  14. 22 8月, 2019 2 次提交
  15. 17 7月, 2019 1 次提交
  16. 09 7月, 2019 1 次提交
    • I
      net: ethernet: ti: cpsw: add XDP support · 9ed4050c
      Ivan Khoronzhuk 提交于
      Add XDP support based on rx page_pool allocator, one frame per page.
      Page pool allocator is used with assumption that only one rx_handler
      is running simultaneously. DMA map/unmap is reused from page pool
      despite there is no need to map whole page.
      
      Due to specific of cpsw, the same TX/RX handler can be used by 2
      network devices, so special fields in buffer are added to identify
      an interface the frame is destined to. Thus XDP works for both
      interfaces, that allows to test xdp redirect between two interfaces
      easily. Also, each rx queue have own page pools, but common for both
      netdevs.
      
      XDP prog is common for all channels till appropriate changes are added
      in XDP infrastructure. Also, once page_pool recycling becomes part of
      skb netstack some simplifications can be added, like removing
      page_pool_release_page() before skb receive.
      
      In order to keep rx_dev while redirect, that can be somehow used in
      future, do flush in rx_handler, that allows to keep rx dev the same
      while redirect. It allows to conform with tracing rx_dev pointed
      by Jesper.
      
      Also, there is probability, that XDP generic code can be extended to
      support multi ndev drivers like this one, using same rx queue for
      several ndevs, based on switchdev for instance or else. In this case,
      driver can be modified like exposed here:
      https://lkml.org/lkml/2019/7/3/243Acked-by: NJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: NIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9ed4050c
  17. 29 6月, 2019 1 次提交
  18. 24 6月, 2019 1 次提交
  19. 17 6月, 2019 1 次提交
    • I
      net: ethernet: ti: davinci_cpdma: use idled submit · 871e8465
      Ivan Khoronzhuk 提交于
      While data pass suspend, reuse of rx descriptors can be disabled using
      channel state & lock from cpdma layer. For this, submit to a channel
      has to be disabled using state != "not active" under lock, what is done
      with this patch. The same submit is used to fill rx channel while
      ndo_open, when channel is idled, so add idled submit routine that
      allows to prepare descs for the channel. All this simplifies code and
      helps to avoid dormant mode usage and send packets only to active
      channels, avoiding potential race in later on changes. Also add missed
      sync barrier analogically like in other places after stopping tx
      queues.
      Signed-off-by: NIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      871e8465
  20. 15 6月, 2019 1 次提交
  21. 30 5月, 2019 1 次提交
  22. 11 5月, 2019 1 次提交
    • P
      net: ethernet: fix similar warning reported by kbuild test robot · 2d2924af
      Petr Štetiar 提交于
      This patch fixes following (similar) warning reported by kbuild test robot:
      
       In function ‘memcpy’,
        inlined from ‘smsc75xx_init_mac_address’ at drivers/net/usb/smsc75xx.c:778:3,
        inlined from ‘smsc75xx_bind’ at drivers/net/usb/smsc75xx.c:1501:2:
        ./include/linux/string.h:355:9: warning: argument 2 null where non-null expected [-Wnonnull]
        return __builtin_memcpy(p, q, size);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        drivers/net/usb/smsc75xx.c: In function ‘smsc75xx_bind’:
        ./include/linux/string.h:355:9: note: in a call to built-in function ‘__builtin_memcpy’
      
      I've replaced the offending memcpy with ether_addr_copy, because I'm
      100% sure, that of_get_mac_address can't return NULL as it returns valid
      pointer or ERR_PTR encoded value, nothing else.
      
      I'm hesitant to just change IS_ERR into IS_ERR_OR_NULL check, as this
      would make the warning disappear also, but it would be confusing to
      check for impossible return value just to make a compiler happy.
      
      I'm now changing all occurencies of memcpy to ether_addr_copy after the
      of_get_mac_address call, as it's very likely, that we're going to get
      similar reports from kbuild test robot in the future.
      
      Fixes: a51645f7 ("net: ethernet: support of_get_mac_address new ERR_PTR error")
      Reported-by: Nkbuild test robot <lkp@intel.com>
      Signed-off-by: NPetr Štetiar <ynezz@true.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2d2924af
  23. 08 5月, 2019 1 次提交
  24. 02 5月, 2019 1 次提交
  25. 28 4月, 2019 9 次提交