[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 5/5] pci: switch PCI capabilities related functions to use pci_sbdf_t
>>> On 10.05.19 at 18:10, <roger.pau@xxxxxxxxxx> wrote: > --- a/xen/drivers/pci/pci.c > +++ b/xen/drivers/pci/pci.c > @@ -8,18 +8,12 @@ > #include <xen/pci.h> > #include <xen/pci_regs.h> > > -int pci_find_cap_offset(u16 seg, u8 bus, u8 dev, u8 func, u8 cap) > +int pci_find_cap_offset(pci_sbdf_t sbdf, unsigned int cap) The secondary type change here and ... > @@ -45,15 +39,10 @@ int pci_find_cap_offset(u16 seg, u8 bus, u8 dev, u8 func, > u8 cap) > return 0; > } > > -int pci_find_next_cap(u16 seg, u8 bus, unsigned int devfn, u8 pos, int cap) > +int pci_find_next_cap(pci_sbdf_t sbdf, unsigned int pos, unsigned int cap) ... the two ones here aren't obviously safe, so should at least be mentioned in the description. The latter function has no caller at all, so is fine simply by that face, for the former this could in principle result in change in behavior due to the compiler no longer truncating possible out-of-range arguments. All callers look to be fine though. (I don't view this as a potential issue for the "ext" counterparts, as there it's only a change from plain int to unsigned int.) Some of the comments given on earlier patches apply here as well. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |