azalia_free_dmamem()

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

azalia_free_dmamem()

Michael W. Bombardieri-2
Hello,

This free function in azalia driver can be converted to void
because it has nothing useful to return. The old return value
was never used.
azalia's other free function azalia_freem() is already void.

- Michael


Index: azalia.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/azalia.c,v
retrieving revision 1.239
diff -u -p -u -r1.239 azalia.c
--- azalia.c 23 Dec 2017 01:44:24 -0000 1.239
+++ azalia.c 9 Jan 2018 06:59:13 -0000
@@ -211,7 +211,7 @@ int azalia_get_response(azalia_t *, uint
 void azalia_rirb_kick_unsol_events(void *);
 void azalia_rirb_intr(azalia_t *);
 int azalia_alloc_dmamem(azalia_t *, size_t, size_t, azalia_dma_t *);
-int azalia_free_dmamem(const azalia_t *, azalia_dma_t*);
+void azalia_free_dmamem(const azalia_t *, azalia_dma_t*);
 
 int azalia_codec_init(codec_t *);
 int azalia_codec_delete(codec_t *);
@@ -1331,17 +1331,16 @@ free:
  return err;
 }
 
-int
+void
 azalia_free_dmamem(const azalia_t *az, azalia_dma_t* d)
 {
  if (d->addr == NULL)
- return 0;
+ return;
  bus_dmamap_unload(az->dmat, d->map);
  bus_dmamap_destroy(az->dmat, d->map);
  bus_dmamem_unmap(az->dmat, d->addr, d->size);
  bus_dmamem_free(az->dmat, d->segments, 1);
  d->addr = NULL;
- return 0;
 }
 
 int