Hi Nirmal, > +static void vmd_domain_reset(struct vmd_dev *vmd) > +{ > + u16 bus, max_buses = resource_size(&vmd->resources[0]); > + u8 dev, functions, fn, hdr_type; > + char __iomem *base; > + > + for (bus = 0; bus < max_buses; bus++) { > + for (dev = 0; dev < 32; dev++) { > + base = vmd->cfgbar + PCIE_ECAM_OFFSET(bus, > + PCI_DEVFN(dev, 0), 0); > + > + hdr_type = readb(base + PCI_HEADER_TYPE) & > + PCI_HEADER_TYPE_MASK; > + > + functions = !!(hdr_type & 0x80) ? 8 : 1; A small nitpick: there is no benefit in converting the result of the expression in the brackets (alebit, keep the brackets for readibility) to a boolean alike result. > + for (fn = 0; fn < functions; fn++) { > + base = vmd->cfgbar + PCIE_ECAM_OFFSET(bus, > + PCI_DEVFN(dev, fn), 0); > + Thank you for using the ECAM macros! Reviewed-by: Krzysztof Wilczyński <kw@xxxxxxxxx> Krzysztof