drivers/pci: change all devfn type to unsigned int

Now all the type of devfn in pci framework are unsigned int

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This commit is contained in:
Bowen Wang 2024-03-02 18:18:17 +08:00 committed by Mateusz Szafoni
parent fe1286b44a
commit dbcef4f297
2 changed files with 13 additions and 9 deletions

View File

@ -951,7 +951,7 @@ static void pci_scan_bus(FAR struct pci_bus_s *bus)
{
FAR struct pci_device_s *dev;
FAR struct pci_bus_s *child_bus;
uint32_t devfn;
unsigned int devfn;
uint32_t l;
uint32_t class;
uint8_t hdr_type;

View File

@ -47,11 +47,13 @@
* Private Function Prototypes
****************************************************************************/
static int pci_ecam_read_config(FAR struct pci_bus_s *bus, uint32_t devfn,
int where, int size, FAR uint32_t *val);
static int pci_ecam_read_config(FAR struct pci_bus_s *bus,
unsigned int devfn, int where, int size,
FAR uint32_t *val);
static int pci_ecam_write_config(FAR struct pci_bus_s *bus, uint32_t devfn,
int where, int size, uint32_t val);
static int pci_ecam_write_config(FAR struct pci_bus_s *bus,
unsigned int devfn, int where, int size,
uint32_t val);
/****************************************************************************
* Private Types
@ -168,8 +170,9 @@ static bool pci_ecam_addr_valid(FAR const struct pci_bus_s *bus,
*
****************************************************************************/
static int pci_ecam_read_config(FAR struct pci_bus_s *bus, uint32_t devfn,
int where, int size, FAR uint32_t *val)
static int pci_ecam_read_config(FAR struct pci_bus_s *bus,
unsigned int devfn, int where, int size,
FAR uint32_t *val)
{
FAR void *addr;
@ -225,8 +228,9 @@ static int pci_ecam_read_config(FAR struct pci_bus_s *bus, uint32_t devfn,
*
****************************************************************************/
static int pci_ecam_write_config(FAR struct pci_bus_s *bus, uint32_t devfn,
int where, int size, uint32_t val)
static int pci_ecam_write_config(FAR struct pci_bus_s *bus,
unsigned int devfn, int where, int size,
uint32_t val)
{
FAR void *addr;