[PATCH] net: move from strlcpy with unused retval to strscpy

Marcin Wojtas mw at semihalf.com
Fri Aug 19 09:06:29 PDT 2022


czw., 18 sie 2022 o 23:01 Wolfram Sang
<wsa+renesas at sang-engineering.com> napisał(a):
>
> Follow the advice of the below link and prefer 'strscpy' in this
> subsystem. Conversion is 1:1 because the return value is not used.
> Generated by a coccinelle script.
>
> Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
> Signed-off-by: Wolfram Sang <wsa+renesas at sang-engineering.com>
> ---
>  drivers/net/Space.c                              |  2 +-
>  drivers/net/bonding/bond_main.c                  |  2 +-
>  drivers/net/can/sja1000/peak_pcmcia.c            |  2 +-
>  drivers/net/can/usb/peak_usb/pcan_usb_core.c     |  2 +-
>  drivers/net/dsa/b53/b53_common.c                 |  2 +-
>  drivers/net/dsa/bcm_sf2_cfp.c                    |  2 +-
>  drivers/net/dsa/hirschmann/hellcreek.c           |  2 +-
>  drivers/net/dsa/mv88e6xxx/chip.c                 |  2 +-
>  drivers/net/dummy.c                              |  2 +-
>  drivers/net/ethernet/3com/3c509.c                |  2 +-
>  drivers/net/ethernet/3com/3c515.c                |  2 +-
>  drivers/net/ethernet/3com/3c589_cs.c             |  2 +-
>  drivers/net/ethernet/3com/3c59x.c                |  6 +++---
>  drivers/net/ethernet/3com/typhoon.c              |  8 ++++----
>  drivers/net/ethernet/8390/ax88796.c              |  6 +++---
>  drivers/net/ethernet/8390/etherh.c               |  6 +++---
>  drivers/net/ethernet/adaptec/starfire.c          |  4 ++--
>  drivers/net/ethernet/aeroflex/greth.c            |  4 ++--
>  drivers/net/ethernet/agere/et131x.c              |  4 ++--
>  drivers/net/ethernet/alacritech/slicoss.c        |  4 ++--
>  drivers/net/ethernet/allwinner/sun4i-emac.c      |  4 ++--
>  drivers/net/ethernet/alteon/acenic.c             |  4 ++--
>  drivers/net/ethernet/amazon/ena/ena_ethtool.c    |  4 ++--
>  drivers/net/ethernet/amazon/ena/ena_netdev.c     |  2 +-
>  drivers/net/ethernet/amd/amd8111e.c              |  4 ++--
>  drivers/net/ethernet/amd/au1000_eth.c            |  2 +-
>  drivers/net/ethernet/amd/nmclan_cs.c             |  2 +-
>  drivers/net/ethernet/amd/pcnet32.c               |  4 ++--
>  drivers/net/ethernet/amd/sunlance.c              |  2 +-
>  drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c     |  4 ++--
>  .../net/ethernet/aquantia/atlantic/aq_ethtool.c  |  2 +-
>  drivers/net/ethernet/arc/emac_main.c             |  2 +-
>  drivers/net/ethernet/atheros/ag71xx.c            |  4 ++--
>  .../net/ethernet/atheros/atl1c/atl1c_ethtool.c   |  4 ++--
>  .../net/ethernet/atheros/atl1e/atl1e_ethtool.c   |  6 +++---
>  drivers/net/ethernet/atheros/atlx/atl1.c         |  4 ++--
>  drivers/net/ethernet/atheros/atlx/atl2.c         |  6 +++---
>  drivers/net/ethernet/broadcom/b44.c              |  6 +++---
>  drivers/net/ethernet/broadcom/bcm63xx_enet.c     |  4 ++--
>  drivers/net/ethernet/broadcom/bcmsysport.c       |  4 ++--
>  drivers/net/ethernet/broadcom/bgmac.c            |  6 +++---
>  drivers/net/ethernet/broadcom/bnx2.c             |  6 +++---
>  drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c  |  2 +-
>  .../net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c  |  6 +++---
>  drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c |  2 +-
>  .../net/ethernet/broadcom/bnx2x/bnx2x_sriov.h    |  2 +-
>  drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c |  2 +-
>  .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c    |  8 ++++----
>  drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c    |  2 +-
>  drivers/net/ethernet/broadcom/genet/bcmgenet.c   |  2 +-
>  drivers/net/ethernet/broadcom/tg3.c              |  6 +++---
>  drivers/net/ethernet/brocade/bna/bnad_ethtool.c  |  6 +++---
>  drivers/net/ethernet/cavium/octeon/octeon_mgmt.c |  2 +-
>  .../net/ethernet/cavium/thunder/nicvf_ethtool.c  |  4 ++--
>  drivers/net/ethernet/chelsio/cxgb/cxgb2.c        |  4 ++--
>  drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c  |  4 ++--
>  .../net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c   |  4 ++--
>  drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c  |  4 ++--
>  .../net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c  |  4 ++--
>  .../chelsio/inline_crypto/chtls/chtls_main.c     |  2 +-
>  drivers/net/ethernet/cirrus/ep93xx_eth.c         |  2 +-
>  drivers/net/ethernet/cisco/enic/enic_ethtool.c   |  6 +++---
>  drivers/net/ethernet/davicom/dm9000.c            |  4 ++--
>  drivers/net/ethernet/dec/tulip/de2104x.c         |  4 ++--
>  drivers/net/ethernet/dec/tulip/dmfe.c            |  4 ++--
>  drivers/net/ethernet/dec/tulip/tulip_core.c      |  4 ++--
>  drivers/net/ethernet/dec/tulip/uli526x.c         |  4 ++--
>  drivers/net/ethernet/dec/tulip/winbond-840.c     |  4 ++--
>  drivers/net/ethernet/dlink/dl2k.c                |  4 ++--
>  drivers/net/ethernet/dlink/sundance.c            |  4 ++--
>  drivers/net/ethernet/dnet.c                      |  4 ++--
>  drivers/net/ethernet/emulex/benet/be_cmds.c      | 12 ++++++------
>  drivers/net/ethernet/emulex/benet/be_ethtool.c   |  6 +++---
>  drivers/net/ethernet/faraday/ftgmac100.c         |  4 ++--
>  drivers/net/ethernet/faraday/ftmac100.c          |  4 ++--
>  drivers/net/ethernet/fealnx.c                    |  4 ++--
>  .../net/ethernet/freescale/dpaa/dpaa_ethtool.c   |  4 ++--
>  drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c |  2 +-
>  .../net/ethernet/freescale/enetc/enetc_ethtool.c |  4 ++--
>  drivers/net/ethernet/freescale/fec_main.c        |  8 ++++----
>  drivers/net/ethernet/freescale/fec_ptp.c         |  2 +-
>  .../ethernet/freescale/fs_enet/fs_enet-main.c    |  2 +-
>  drivers/net/ethernet/freescale/gianfar_ethtool.c |  2 +-
>  .../net/ethernet/freescale/ucc_geth_ethtool.c    |  4 ++--
>  drivers/net/ethernet/fujitsu/fmvj18x_cs.c        |  4 ++--
>  drivers/net/ethernet/hisilicon/hip04_eth.c       |  4 ++--
>  drivers/net/ethernet/ibm/ehea/ehea_ethtool.c     |  4 ++--
>  drivers/net/ethernet/ibm/emac/core.c             |  4 ++--
>  drivers/net/ethernet/ibm/ibmveth.c               |  4 ++--
>  drivers/net/ethernet/intel/e100.c                |  4 ++--
>  drivers/net/ethernet/intel/e1000/e1000_ethtool.c |  4 ++--
>  drivers/net/ethernet/intel/e1000e/ethtool.c      |  4 ++--
>  drivers/net/ethernet/intel/e1000e/netdev.c       |  6 +++---
>  drivers/net/ethernet/intel/i40e/i40e_ethtool.c   |  6 +++---
>  drivers/net/ethernet/intel/i40e/i40e_main.c      | 16 ++++++++--------
>  drivers/net/ethernet/intel/i40e/i40e_ptp.c       |  2 +-
>  drivers/net/ethernet/intel/iavf/iavf_ethtool.c   |  6 +++---
>  drivers/net/ethernet/intel/igb/igb_ethtool.c     |  6 +++---
>  drivers/net/ethernet/intel/igb/igb_main.c        |  2 +-
>  drivers/net/ethernet/intel/igbvf/ethtool.c       |  4 ++--
>  drivers/net/ethernet/intel/ixgb/ixgb_ethtool.c   |  4 ++--
>  drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c |  6 +++---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c    |  2 +-
>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c    |  4 ++--
>  drivers/net/ethernet/intel/ixgbevf/ethtool.c     |  4 ++--
>  drivers/net/ethernet/jme.c                       |  6 +++---
>  drivers/net/ethernet/korina.c                    |  6 +++---
>  drivers/net/ethernet/marvell/mv643xx_eth.c       |  8 ++++----
>  drivers/net/ethernet/marvell/mvneta.c            |  6 +++---
>  drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c  |  6 +++---

For: drivers/net/ethernet/marvell/mvpp2

Acked-by: Marcin Wojtas <mw at semihalf.com>

Thanks,
Marcin



More information about the Linux-mediatek mailing list