+ oboff += OSCNPRINTF("%02x:%02x:%x (%u / %04x)\n",
+ PCI_BUS_NUM(amd_iommu_devid),
+ PCI_SLOT(amd_iommu_devid),
+ PCI_FUNC(amd_iommu_devid),
Perhaps at some point we will have an extension to %p to print PCI BDFs.
+ if (strnchr(obuf, OBUFLEN, ':'))
+ {
Style
+ } else if (obuf[0] == '0' && obuf[1] == 'x') {
+ n = sscanf(obuf, "%x", &amd_iommu_devid);
+ } else {
+ n = sscanf(obuf, "%d", &amd_iommu_devid);
+ }
kstrtoint() ?