summaryrefslogtreecommitdiff
path: root/drivers/phy/eswin/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorRaghavendra Rao Ananta <rananta@google.com>2026-05-05 21:28:33 +0000
committerAlex Williamson <alex@shazbot.org>2026-05-20 11:54:10 -0600
commitc5db77a035e1291e2c9b488073c28b441e5e44f3 (patch)
tree5b1087fbf5a8a1a6a4d6bc4c72977034cd023f80 /drivers/phy/eswin/git@git.tavy.me:linux.git
parent91ee1738a9d358d3e0120a783cc052c275dea5e5 (diff)
vfio: selftests: Introduce a sysfs lib
Introduce a sysfs library to handle the common reads/writes to the PCI sysfs files, for example, getting the total number of VFs supported by the device via /sys/bus/pci/devices/$BDF/sriov_totalvfs. The library will be used in the upcoming test patch to configure the VFs for a given PF device. Since readlink() is quite commonly used in the lib, introduce and use readlink_safe() to take care of potential buffer overrun errors and to safely terminate the buffer with '\0'. Opportunistically, move vfio_pci_get_group_from_dev() to this library as it falls under the same bucket. Rename it to sysfs_iommu_group_get() to align with other function names. Signed-off-by: Raghavendra Rao Ananta <rananta@google.com> Reviewed-by: Vipin Sharma <vipinsh@google.com> Reviewed-by: David Matlack <dmatlack@google.com> Tested-by: David Matlack <dmatlack@google.com> Link: https://lore.kernel.org/r/20260505212838.1698034-4-rananta@google.com Signed-off-by: Alex Williamson <alex@shazbot.org>
Diffstat (limited to 'drivers/phy/eswin/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions