mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
drivers: Don't use strlcpy()
For Linux v6.8, the function strlcpy() has been removed. The function
strscpy() was added in Linux v4.3 and has been preferred over strlcpy().
See upstream Linux commit 30035e45753b ("string: provide strscpy()") for
more details. The Linux checkpatch.pl script warns against using
strlcpy().
The function strscpy() takes the same arguments as strlcpy(), but
returns a type of ssize_t instead of size_t. Update the drivers to use
strscpy() instead of strlcpy().
Bug 4448428
Change-Id: Id6f196f0e81decf1545f9aa4f74f5c63a7f72a48
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059457
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
85692c2c64
commit
ecf383265b
@@ -268,8 +268,8 @@ static void lan743x_ethtool_get_drvinfo(struct net_device *netdev,
|
||||
{
|
||||
struct lan743x_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
strlcpy(info->driver, DRIVER_NAME, sizeof(info->driver));
|
||||
strlcpy(info->bus_info,
|
||||
strscpy(info->driver, DRIVER_NAME, sizeof(info->driver));
|
||||
strscpy(info->bus_info,
|
||||
pci_name(adapter->pdev), sizeof(info->bus_info));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user