[malloc] Rename malloc_dma() to malloc_phys()

The malloc_dma() function allocates memory with specified physical
alignment, and is typically (though not exclusively) used to allocate
memory for DMA.

Rename to malloc_phys() to more closely match the functionality, and
to create name space for functions that specifically allocate and map
DMA-capable buffers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2020-11-05 19:13:52 +00:00
parent 36dde9b0bf
commit be1c87b722
48 changed files with 350 additions and 350 deletions
+3 -3
View File
@@ -877,7 +877,7 @@ ath5k_desc_alloc(struct ath5k_softc *sc)
/* allocate descriptors */
sc->desc_len = sizeof(struct ath5k_desc) * (ATH_TXBUF + ATH_RXBUF + 1);
sc->desc = malloc_dma(sc->desc_len, ATH5K_DESC_ALIGN);
sc->desc = malloc_phys(sc->desc_len, ATH5K_DESC_ALIGN);
if (sc->desc == NULL) {
DBG("ath5k: can't allocate descriptors\n");
ret = -ENOMEM;
@@ -915,7 +915,7 @@ ath5k_desc_alloc(struct ath5k_softc *sc)
return 0;
err_free:
free_dma(sc->desc, sc->desc_len);
free_phys(sc->desc, sc->desc_len);
err:
sc->desc = NULL;
return ret;
@@ -932,7 +932,7 @@ ath5k_desc_free(struct ath5k_softc *sc)
ath5k_rxbuf_free(sc, bf);
/* Free memory associated with all descriptors */
free_dma(sc->desc, sc->desc_len);
free_phys(sc->desc, sc->desc_len);
free(sc->bufptr);
sc->bufptr = NULL;