History

net: ena: Use pci_dev_id() to simplify the code

PCI core API pci_dev_id() can be used to get the BDF number for a pci device. We don't need to compose it manually. Use pci_dev_id() to simplify the code a little bit.

Jialin Zhang committed 3 years ago

Commit a5e5b2c1 parent b2f83231 file · +1 −1Browse files

Unified · Split

drivers/net/ethernet/amazon/ena/ena_netdev.c+1−1
@@ -3267,7 +3267,7 @@ static void ena_config_host_info(struct ena_com_dev *ena_dev, struct pci_dev *pd · 3266 unmodified lines
3267 3267
3268 host_info = ena_dev->host_attr.host_info;3268 host_info = ena_dev->host_attr.host_info;
3269 3269
3270 host_info->bdf = (pdev->bus->number << 8) | pdev->devfn;3270 host_info->bdf = pci_dev_id(pdev);
3271 host_info->os_type = ENA_ADMIN_OS_LINUX;3271 host_info->os_type = ENA_ADMIN_OS_LINUX;
3272 host_info->kernel_ver = LINUX_VERSION_CODE;3272 host_info->kernel_ver = LINUX_VERSION_CODE;
3273 strscpy(host_info->kernel_ver_str, utsname()->version,3273 strscpy(host_info->kernel_ver_str, utsname()->version,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t