diff --git a/drivers/net/netdev_upperhalf.c b/drivers/net/netdev_upperhalf.c index 31fb1ef072..2425d8a83a 100644 --- a/drivers/net/netdev_upperhalf.c +++ b/drivers/net/netdev_upperhalf.c @@ -102,9 +102,9 @@ struct netdev_upperhalf_s static bool quota_is_valid(FAR struct netdev_lowerhalf_s *lower) { int total = 0; - int type; + enum netpkt_type_e type; - for (type = 0; type < NETPKT_TYPENUM; type++) + for (type = NETPKT_TX; type < NETPKT_TYPENUM; type++) { total += netdev_lower_quota_load(lower, type); } diff --git a/drivers/spi/spi_transfer.c b/drivers/spi/spi_transfer.c index 4b93d3148c..a56b6de9ce 100644 --- a/drivers/spi/spi_transfer.c +++ b/drivers/spi/spi_transfer.c @@ -80,7 +80,7 @@ int spi_transfer(FAR struct spi_dev_s *spi, FAR struct spi_sequence_s *seq) } #endif - SPI_SETMODE(spi, seq->mode); + SPI_SETMODE(spi, (enum spi_mode_e)seq->mode); SPI_SETBITS(spi, seq->nbits); /* Select the SPI device in preparation for the transfer.