Skip to content

Commit

Permalink
NOLINT for the C-based drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
ruck314 committed Oct 16, 2024
1 parent d570892 commit bd06511
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions data_dev/driver/src/data_dev_top.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,11 @@ int DataDev_Probe(struct pci_dev *pcidev, const struct pci_device_id *dev_id) {
if (cfgDevName != 0) {
// Utilize the PCI device bus number for unique device naming
// Helpful when multiple PCIe cards are installed in the same server
ret = snprintf(dev->devName, sizeof(dev->devName), "%s_%02x", MOD_NAME, pcidev->bus->number);
ret = snprintf(dev->devName, sizeof(dev->devName), "%s_%02x", MOD_NAME, pcidev->bus->number);//NOLINT
} else {
// Default to sequential naming based on the device's index
// Ensures uniqueness in a single card scenario
ret = snprintf(dev->devName, sizeof(dev->devName), "%s_%i", MOD_NAME, dev->index);
ret = snprintf(dev->devName, sizeof(dev->devName), "%s_%i", MOD_NAME, dev->index);//NOLINT
}
if (ret < 0 || ret >= sizeof(dev->devName)) {
pr_err("%s: Probe: Error in snprintf() while formatting device name\n", MOD_NAME);
Expand Down
4 changes: 2 additions & 2 deletions data_gpu/driver/src/data_gpu_top.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ int DataGpu_Probe(struct pci_dev *pcidev, const struct pci_device_id *dev_id) {
if (cfgDevName != 0) {
// Utilize the PCI device bus number for unique device naming
// Helpful when multiple PCIe cards are installed in the same server
ret = snprintf(dev->devName, sizeof(dev->devName), "%s_%02x", MOD_NAME, pcidev->bus->number);
ret = snprintf(dev->devName, sizeof(dev->devName), "%s_%02x", MOD_NAME, pcidev->bus->number);//NOLINT
} else {
// Default to sequential naming based on the device's index
// Ensures uniqueness in a single card scenario
ret = snprintf(dev->devName, sizeof(dev->devName), "%s_%i", MOD_NAME, dev->index);
ret = snprintf(dev->devName, sizeof(dev->devName), "%s_%i", MOD_NAME, dev->index);//NOLINT
}
if (ret < 0 || ret >= sizeof(dev->devName)) {
pr_err("%s: Probe: Error in snprintf() while formatting device name\n", MOD_NAME);
Expand Down

0 comments on commit bd06511

Please sign in to comment.