On Sat, Sep 19, 2015 at 2:23 AM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote: > > Is there really any value in keeping "addr" and "where" separate? Now we do not care of buggy SOCs which could have issues with non word aligned address read. If there is any such SOC, then they can have their own accessor. So, I do not see any value of keeping "where". > dw_pcie_cfg_write() clearly doesn't care; it just adds them together. I > don't think dw_pcie_cfg_read() needs to care either: it could round the > address down to a 32-bit boundary and use the difference to compute the > mask and shift. > > So I'm proposing something like this: > > int dw_pcie_cfg_read(void __iomem *addr, int size, u32 *val) > int dw_pcie_cfg_write(void __iomem *addr, int size, u32 val) Agreed. ~Pratyush -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html