Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: megaraid: 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.

Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
Link: https://lore.kernel.org/r/20230815025419.3523236-4-zhangjialin11@huawei.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Jialin Zhang and committed by
Martin K. Petersen
bb1459cb a46421fd

+1 -1
+1 -1
drivers/scsi/megaraid/megaraid_mbox.c
··· 438 438 439 439 440 440 // set up PCI related soft state and other pre-known parameters 441 - adapter->unique_id = pdev->bus->number << 8 | pdev->devfn; 441 + adapter->unique_id = pci_dev_id(pdev); 442 442 adapter->irq = pdev->irq; 443 443 adapter->pdev = pdev; 444 444