diff options
author | Parav Pandit <parav@nvidia.com> | 2021-05-18 08:50:04 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2021-08-11 11:14:32 -0700 |
commit | 4445abbd13cdc4246284a6c223a734860b4759f3 (patch) | |
tree | 9fadb436e37c4e5710858ab64e00c1b3524363ff /drivers | |
parent | 2d0b41a3767941b53160c940cdaf596a99f50fb6 (diff) | |
download | lwn-4445abbd13cdc4246284a6c223a734860b4759f3.tar.gz lwn-4445abbd13cdc4246284a6c223a734860b4759f3.zip |
net/mlx5: SF, use recent sysfs api
Use sysfs_emit() which is aware of PAGE_SIZE buffer.
Signed-off-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/sf/dev/dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/dev.c b/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/dev.c index fa0288afc0dd..871c2fbe18d3 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/dev.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/dev.c @@ -39,7 +39,7 @@ static ssize_t sfnum_show(struct device *dev, struct device_attribute *attr, cha struct auxiliary_device *adev = container_of(dev, struct auxiliary_device, dev); struct mlx5_sf_dev *sf_dev = container_of(adev, struct mlx5_sf_dev, adev); - return scnprintf(buf, PAGE_SIZE, "%u\n", sf_dev->sfnum); + return sysfs_emit(buf, "%u\n", sf_dev->sfnum); } static DEVICE_ATTR_RO(sfnum); |