Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jul 2018 15:19:59 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r336912 - head/sys/dev/sound/pci/hda
Message-ID:  <201807301519.w6UFJxSK005375@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Mon Jul 30 15:19:59 2018
New Revision: 336912
URL: https://svnweb.freebsd.org/changeset/base/336912

Log:
  snd_hda: Print error codes in decimal, rather than hex
  
  It's easy to confuse the error code as naked it looks decimal (EINVAL is
  reported as error 16, instead of error 22, so first reading looks like EBUSY).

Modified:
  head/sys/dev/sound/pci/hda/hdac.c

Modified: head/sys/dev/sound/pci/hda/hdac.c
==============================================================================
--- head/sys/dev/sound/pci/hda/hdac.c	Mon Jul 30 15:15:33 2018	(r336911)
+++ head/sys/dev/sound/pci/hda/hdac.c	Mon Jul 30 15:19:59 2018	(r336912)
@@ -569,7 +569,7 @@ hdac_dma_alloc(struct hdac_softc *sc, struct hdac_dma 
 	    NULL,				/* lockfuncarg */
 	    &dma->dma_tag);			/* dmat */
 	if (result != 0) {
-		device_printf(sc->dev, "%s: bus_dma_tag_create failed (%x)\n",
+		device_printf(sc->dev, "%s: bus_dma_tag_create failed (%d)\n",
 		    __func__, result);
 		goto hdac_dma_alloc_fail;
 	}
@@ -582,7 +582,7 @@ hdac_dma_alloc(struct hdac_softc *sc, struct hdac_dma 
 	    ((sc->flags & HDAC_F_DMA_NOCACHE) ? BUS_DMA_NOCACHE : 0),
 	    &dma->dma_map);
 	if (result != 0) {
-		device_printf(sc->dev, "%s: bus_dmamem_alloc failed (%x)\n",
+		device_printf(sc->dev, "%s: bus_dmamem_alloc failed (%d)\n",
 		    __func__, result);
 		goto hdac_dma_alloc_fail;
 	}
@@ -597,7 +597,7 @@ hdac_dma_alloc(struct hdac_softc *sc, struct hdac_dma 
 	if (result != 0 || dma->dma_paddr == 0) {
 		if (result == 0)
 			result = ENOMEM;
-		device_printf(sc->dev, "%s: bus_dmamem_load failed (%x)\n",
+		device_printf(sc->dev, "%s: bus_dmamem_load failed (%d)\n",
 		    __func__, result);
 		goto hdac_dma_alloc_fail;
 	}
@@ -718,7 +718,7 @@ hdac_irq_alloc(struct hdac_softc *sc)
 	    NULL, hdac_intr_handler, sc, &irq->irq_handle);
 	if (result != 0) {
 		device_printf(sc->dev,
-		    "%s: Unable to setup interrupt handler (%x)\n",
+		    "%s: Unable to setup interrupt handler (%d)\n",
 		    __func__, result);
 		goto hdac_irq_alloc_fail;
 	}
@@ -1285,7 +1285,7 @@ hdac_attach(device_t dev)
 	    NULL,				/* lockfuncarg */
 	    &sc->chan_dmat);			/* dmat */
 	if (result != 0) {
-		device_printf(dev, "%s: bus_dma_tag_create failed (%x)\n",
+		device_printf(dev, "%s: bus_dma_tag_create failed (%d)\n",
 		     __func__, result);
 		goto hdac_attach_fail;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807301519.w6UFJxSK005375>