linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/40] dspbridge: trivial error code cleanup
@ 2010-06-03  5:47 Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 02/40] DSPBRIDGE: change DSP_SENUMCOMPLETE for ENODATA Omar Ramirez Luna
                   ` (38 more replies)
  0 siblings, 39 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

These set of patches gets rid of the custom error codes still present.

Although there are a lot of patches most of them are just replacements
which were broken into single patches to avoid big patch files.

One of the patches creates a help file with the matching linux
error codes just in case the error is not descriptive enough, and
it also lists a common scenario where the error might be seen.

Finally, the last patch replaces a custom typedef (dsp_status)
with an int type as now those errors can have a negative value.

Omar Ramirez Luna (40):
  DSPBRIDGE: Remove success codes
  DSPBRIDGE: change DSP_SENUMCOMPLETE for ENODATA
  DSPBRIDGE: err code replace CHNL_E_WAITTIMEOUT with ETIMEDOUT
  DSPBRIDGE: err code replace CHNL_E_NOEOS with EPERM
  DSPBRIDGE: err code replace CHNL_E_BUFSIZE with EINVAL
  DSPBRIDGE: err code replace CHNL_E_NOIORPS with EIO
  DSPBRIDGE: err code replace CHNL_E_ISR with EIO
  DSPBRIDGE: err code replace CHNL_E_MGREXISTS with EEXIST
  DSPBRIDGE: err code replace CHNL_E_NOMEMMAP with EFAULT
  DSPBRIDGE: err code replace CHNL_E_INVALIDMEMBASE with EINVAL
  DSPBRIDGE: err code replace CHNL_E_INVALIDWORDSIZE with EINVAL
  DSPBRIDGE: err code replace CHNL_E_EOS with EPIPE
  DSPBRIDGE: err code replace CHNL_E_NOIOC with EREMOTEIO
  DSPBRIDGE: err code replace CHNL_E_BADCHANID with ECHRNG
  DSPBRIDGE: err code replace CHNL_E_OUTOFSTREAMS with ENOSR
  DSPBRIDGE: err code replace CHNL_E_MAXCHANNELS with ECHRNG
  DSPBRIDGE: err code replace COD_E_ZLCREATEFAILED with ESPIPE
  DSPBRIDGE: err code replace COD_E_SYMBOLNOTFOUND with ESPIPE
  DSPBRIDGE: err code replace COD_E_NOSYMBOLSLOADED with ESPIPE
  DSPBRIDGE: err code replace DSP_EDPMSUSPEND with EPERM
  DSPBRIDGE: err code replace DSP_EDYNLOAD with EILSEQ
  DSPBRIDGE: err code replace DSP_EBADSEGID with EBADR
  DSPBRIDGE: err code replace DSP_EOVERLAYMEMORY with ENXIO
  DSPBRIDGE: err code replace DSP_ENOSECT with ENXIO
  DSPBRIDGE: err code replace DSP_ETRANSLATE with ESRCH
  DSPBRIDGE: err code replace DSP_ENOTFOUND with ENOENT
  DSPBRIDGE: err code replace DSP_EDCDNOAUTOREGISTER with EACCES
  DSPBRIDGE: err code replace DSP_EDCDLOADBASE with EACCES
  DSPBRIDGE: err code replace DSP_EDCDGETSECT with EACCES
  DSPBRIDGE: err code replace DSP_EDCDPARSESECT with EACCES
  DSPBRIDGE: err code replace DSP_EDCDREADSECT with EACCES
  DSPBRIDGE: err code replace DSP_ESYMBOL with ESPIPE
  DSPBRIDGE: err code replace DSP_EWRONGSTATE with EBADR
  DSPBRIDGE: err code replace DSP_EPENDING with EPIPE
  DSPBRIDGE: err code replace DSP_ECHANGEDURINGENUM with EIDRM
  DSPBRIDGE: remove custom errbase definitions
  DSPBRIDGE: cleanup for duplicated error codes
  DSPBRIDGE: removed unused error codes from comments
  DSPBRIDGE: error code guide
  DSPBRIDGE: remove dsp_status typedef

 Documentation/tidspbridge/error-codes              |  157 ++++++++++++++
 arch/arm/plat-omap/include/dspbridge/_chnl_sm.h    |    2 +-
 arch/arm/plat-omap/include/dspbridge/cfg.h         |   57 +++---
 arch/arm/plat-omap/include/dspbridge/chnl.h        |   31 ++--
 arch/arm/plat-omap/include/dspbridge/clk.h         |    8 +-
 arch/arm/plat-omap/include/dspbridge/cmm.h         |   44 ++--
 arch/arm/plat-omap/include/dspbridge/cod.h         |   61 +++---
 arch/arm/plat-omap/include/dspbridge/dbdcd.h       |   73 +++----
 arch/arm/plat-omap/include/dspbridge/dbdcddef.h    |    2 +-
 arch/arm/plat-omap/include/dspbridge/dbdefs.h      |    5 +-
 arch/arm/plat-omap/include/dspbridge/dbldefs.h     |    2 +-
 arch/arm/plat-omap/include/dspbridge/dbll.h        |   14 +-
 arch/arm/plat-omap/include/dspbridge/dblldefs.h    |   47 ++---
 arch/arm/plat-omap/include/dspbridge/dev.h         |  156 ++++++--------
 arch/arm/plat-omap/include/dspbridge/disp.h        |   25 +--
 arch/arm/plat-omap/include/dspbridge/dmm.h         |   18 +-
 arch/arm/plat-omap/include/dspbridge/drv.h         |   38 ++--
 .../arm/plat-omap/include/dspbridge/dspapi-ioctl.h |    2 +-
 arch/arm/plat-omap/include/dspbridge/dspapi.h      |    8 +-
 arch/arm/plat-omap/include/dspbridge/dspchnl.h     |   24 +-
 arch/arm/plat-omap/include/dspbridge/dspdefs.h     |  226 ++++++++++----------
 arch/arm/plat-omap/include/dspbridge/dspdeh.h      |    8 +-
 arch/arm/plat-omap/include/dspbridge/dspio.h       |   10 +-
 arch/arm/plat-omap/include/dspbridge/dspmsg.h      |   10 +-
 arch/arm/plat-omap/include/dspbridge/errbase.h     |  177 ---------------
 arch/arm/plat-omap/include/dspbridge/io.h          |   19 +-
 arch/arm/plat-omap/include/dspbridge/io_sm.h       |    6 +-
 arch/arm/plat-omap/include/dspbridge/mgr.h         |   34 ++--
 arch/arm/plat-omap/include/dspbridge/msg.h         |    2 +-
 arch/arm/plat-omap/include/dspbridge/nldr.h        |   14 +-
 arch/arm/plat-omap/include/dspbridge/nldrdefs.h    |   31 ++--
 arch/arm/plat-omap/include/dspbridge/node.h        |  148 ++++++-------
 arch/arm/plat-omap/include/dspbridge/nodepriv.h    |    8 +-
 arch/arm/plat-omap/include/dspbridge/ntfy.h        |   13 +-
 arch/arm/plat-omap/include/dspbridge/proc.h        |  117 +++++------
 arch/arm/plat-omap/include/dspbridge/pwr.h         |   25 +--
 .../plat-omap/include/dspbridge/resourcecleanup.h  |   30 ++--
 arch/arm/plat-omap/include/dspbridge/rmm.h         |   10 +-
 arch/arm/plat-omap/include/dspbridge/strm.h        |   71 +++---
 arch/arm/plat-omap/include/dspbridge/sync.h        |   11 +-
 drivers/dsp/bridge/core/_tiomap.h                  |    4 +-
 drivers/dsp/bridge/core/_tiomap_pwr.h              |   14 +-
 drivers/dsp/bridge/core/chnl_sm.c                  |   83 ++++----
 drivers/dsp/bridge/core/dsp-clock.c                |    9 +-
 drivers/dsp/bridge/core/io_sm.c                    |   75 ++++----
 drivers/dsp/bridge/core/mmu_fault.c                |    1 -
 drivers/dsp/bridge/core/msg_sm.c                   |   31 ++--
 drivers/dsp/bridge/core/tiomap3430.c               |  123 ++++++------
 drivers/dsp/bridge/core/tiomap3430_pwr.c           |   45 ++--
 drivers/dsp/bridge/core/tiomap_io.c                |   21 +-
 drivers/dsp/bridge/core/tiomap_io.h                |    6 +-
 drivers/dsp/bridge/core/ue_deh.c                   |   21 +-
 drivers/dsp/bridge/core/wdt.c                      |    1 -
 drivers/dsp/bridge/pmgr/chnl.c                     |   17 +-
 drivers/dsp/bridge/pmgr/cmm.c                      |   47 ++--
 drivers/dsp/bridge/pmgr/cod.c                      |   61 +++---
 drivers/dsp/bridge/pmgr/dbll.c                     |   47 ++--
 drivers/dsp/bridge/pmgr/dev.c                      |  113 +++++-----
 drivers/dsp/bridge/pmgr/dmm.c                      |   43 ++--
 drivers/dsp/bridge/pmgr/dspapi.c                   |  101 +++++-----
 drivers/dsp/bridge/pmgr/io.c                       |   13 +-
 drivers/dsp/bridge/pmgr/msg.c                      |    5 +-
 drivers/dsp/bridge/rmgr/dbdcd.c                    |   97 +++++----
 drivers/dsp/bridge/rmgr/disp.c                     |   35 ++--
 drivers/dsp/bridge/rmgr/drv.c                      |   97 ++++-----
 drivers/dsp/bridge/rmgr/drv_interface.c            |   13 +-
 drivers/dsp/bridge/rmgr/dspdrv.c                   |    3 +-
 drivers/dsp/bridge/rmgr/mgr.c                      |   43 ++--
 drivers/dsp/bridge/rmgr/nldr.c                     |   91 ++++----
 drivers/dsp/bridge/rmgr/node.c                     |  157 +++++++-------
 drivers/dsp/bridge/rmgr/proc.c                     |  131 ++++++------
 drivers/dsp/bridge/rmgr/pwr.c                      |   16 +-
 drivers/dsp/bridge/rmgr/rmm.c                      |   11 +-
 drivers/dsp/bridge/rmgr/strm.c                     |   84 ++++----
 drivers/dsp/bridge/services/cfg.c                  |   41 ++--
 drivers/dsp/bridge/services/sync.c                 |   10 +-
 76 files changed, 1666 insertions(+), 1788 deletions(-)
 create mode 100644 Documentation/tidspbridge/error-codes
 delete mode 100644 arch/arm/plat-omap/include/dspbridge/errbase.h


^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH 02/40] DSPBRIDGE: change DSP_SENUMCOMPLETE for ENODATA
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 03/40] DSPBRIDGE: err code replace CHNL_E_WAITTIMEOUT with ETIMEDOUT Omar Ramirez Luna
                   ` (37 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

This is not an error code, however the way it is coded
it doesn't expects a success (zero) either, return a positive
number on this case given that this is not an error code.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/dbdcd.h |    2 +-
 drivers/dsp/bridge/rmgr/dbdcd.c              |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dbdcd.h b/arch/arm/plat-omap/include/dspbridge/dbdcd.h
index 3bf3b4d..f7e4e79 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdcd.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdcd.h
@@ -123,7 +123,7 @@ extern dsp_status dcd_destroy_manager(IN struct dcd_manager *hdcd_mgr);
  *  Returns:
  *      0:            Success.
  *      -EPERM:          Unable to enumerate through the DCD database.
- *      DSP_SENUMCOMPLETE:  Enumeration completed. This is not an error code.
+ *      ENODATA:  Enumeration completed. This is not an error code.
  *  Requires:
  *      DCD initialized.
  *      uuid_obj is a valid pointer.
diff --git a/drivers/dsp/bridge/rmgr/dbdcd.c b/drivers/dsp/bridge/rmgr/dbdcd.c
index e0417a2..1731334 100644
--- a/drivers/dsp/bridge/rmgr/dbdcd.c
+++ b/drivers/dsp/bridge/rmgr/dbdcd.c
@@ -286,7 +286,11 @@ dsp_status dcd_enumerate_object(IN s32 cIndex, IN enum dsp_dcdobjtype obj_type,
 			/* At the end of enumeration. Reset enum_refs. */
 			enum_refs = 0;
 
-			status = DSP_SENUMCOMPLETE;
+			/*
+			 * TODO: Revisit, this is not an errror case but code
+			 * expects non-zero value.
+			 */
+			status = ENODATA;
 		} else {
 			status = -EPERM;
 		}
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 03/40] DSPBRIDGE: err code replace CHNL_E_WAITTIMEOUT with ETIMEDOUT
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 02/40] DSPBRIDGE: change DSP_SENUMCOMPLETE for ENODATA Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 04/40] DSPBRIDGE: err code replace CHNL_E_NOEOS with EPERM Omar Ramirez Luna
                   ` (36 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace CHNL_E_WAITTIMEOUT with ETIMEDOUT

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/dspdefs.h |    2 +-
 drivers/dsp/bridge/core/chnl_sm.c              |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dspdefs.h b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
index 8ee21fd..7157029 100644
--- a/arch/arm/plat-omap/include/dspbridge/dspdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
@@ -610,7 +610,7 @@ typedef dsp_status(*fxn_chnl_getmgrinfo) (struct chnl_mgr
  *  Returns:
  *      0:            Success;
  *      -EFAULT:        Invalid chnl_obj.
- *      CHNL_E_WAITTIMEOUT: Timeout occured before channel could be idled.
+ *      -ETIMEDOUT: Timeout occured before channel could be idled.
  *  Requires:
  *  Ensures:
  */
diff --git a/drivers/dsp/bridge/core/chnl_sm.c b/drivers/dsp/bridge/core/chnl_sm.c
index 81106df..a4946c2 100644
--- a/drivers/dsp/bridge/core/chnl_sm.c
+++ b/drivers/dsp/bridge/core/chnl_sm.c
@@ -517,7 +517,7 @@ dsp_status bridge_chnl_flush_io(struct chnl_object *chnl_obj, u32 dwTimeOut)
 					continue;
 
 				if (chnl_ioc_obj.status & CHNL_IOCSTATTIMEOUT)
-					status = CHNL_E_WAITTIMEOUT;
+					status = -ETIMEDOUT;
 
 			}
 		} else {
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 04/40] DSPBRIDGE: err code replace CHNL_E_NOEOS with EPERM
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 02/40] DSPBRIDGE: change DSP_SENUMCOMPLETE for ENODATA Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 03/40] DSPBRIDGE: err code replace CHNL_E_WAITTIMEOUT with ETIMEDOUT Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 05/40] DSPBRIDGE: err code replace CHNL_E_BUFSIZE with EINVAL Omar Ramirez Luna
                   ` (35 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace CHNL_E_NOEOS with EPERM

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/dspdefs.h |    2 +-
 drivers/dsp/bridge/core/chnl_sm.c              |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dspdefs.h b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
index 7157029..6dcea60 100644
--- a/arch/arm/plat-omap/include/dspbridge/dspdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
@@ -452,7 +452,7 @@ typedef dsp_status(*fxn_chnl_close) (struct chnl_object *chnl_obj);
  *      0:        Success;
  *      -EFAULT:    Invalid chnl_obj.
  *      -EFAULT:   pHostBuf is invalid.
- *      CHNL_E_NOEOS:   User cannot mark EOS on an input channel.
+ *      -EPERM:   User cannot mark EOS on an input channel.
  *      -ECANCELED: I/O has been cancelled on this channel.  No further
  *                      I/O is allowed.
  *      CHNL_E_EOS:     End of stream was already marked on a previous
diff --git a/drivers/dsp/bridge/core/chnl_sm.c b/drivers/dsp/bridge/core/chnl_sm.c
index a4946c2..99a4a42 100644
--- a/drivers/dsp/bridge/core/chnl_sm.c
+++ b/drivers/dsp/bridge/core/chnl_sm.c
@@ -113,7 +113,7 @@ dsp_status bridge_chnl_add_io_req(struct chnl_object *chnl_obj, void *pHostBuf,
 	} else if (!pchnl) {
 		status = -EFAULT;
 	} else if (is_eos && CHNL_IS_INPUT(pchnl->chnl_mode)) {
-		status = CHNL_E_NOEOS;
+		status = -EPERM;
 	} else {
 		/*
 		 * Check the channel state: only queue chirp if channel state
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 05/40] DSPBRIDGE: err code replace CHNL_E_BUFSIZE with EINVAL
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (2 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 04/40] DSPBRIDGE: err code replace CHNL_E_NOEOS with EPERM Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 06/40] DSPBRIDGE: err code replace CHNL_E_NOIORPS with EIO Omar Ramirez Luna
                   ` (34 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace CHNL_E_BUFSIZE with EINVAL

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/dspdefs.h |    2 +-
 drivers/dsp/bridge/core/chnl_sm.c              |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dspdefs.h b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
index 6dcea60..3d53881 100644
--- a/arch/arm/plat-omap/include/dspbridge/dspdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
@@ -457,7 +457,7 @@ typedef dsp_status(*fxn_chnl_close) (struct chnl_object *chnl_obj);
  *                      I/O is allowed.
  *      CHNL_E_EOS:     End of stream was already marked on a previous
  *                      IORequest on this channel.  No further I/O is expected.
- *      CHNL_E_BUFSIZE: Buffer submitted to this output channel is larger than
+ *      -EINVAL: Buffer submitted to this output channel is larger than
  *                      the size of the physical shared memory output window.
  *  Requires:
  *  Ensures:
diff --git a/drivers/dsp/bridge/core/chnl_sm.c b/drivers/dsp/bridge/core/chnl_sm.c
index 99a4a42..3cebf94 100644
--- a/drivers/dsp/bridge/core/chnl_sm.c
+++ b/drivers/dsp/bridge/core/chnl_sm.c
@@ -176,7 +176,7 @@ func_cont:
 			/* Check buffer size on output channels for fit. */
 			if (byte_size >
 			    io_buf_size(pchnl->chnl_mgr_obj->hio_mgr))
-				status = CHNL_E_BUFSIZE;
+				status = -EINVAL;
 
 		}
 	}
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 06/40] DSPBRIDGE: err code replace CHNL_E_NOIORPS with EIO
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (3 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 05/40] DSPBRIDGE: err code replace CHNL_E_BUFSIZE with EINVAL Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 07/40] DSPBRIDGE: err code replace CHNL_E_ISR " Omar Ramirez Luna
                   ` (33 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace CHNL_E_NOIORPS with EIO

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/dspdefs.h |    2 +-
 drivers/dsp/bridge/core/chnl_sm.c              |    2 +-
 drivers/dsp/bridge/rmgr/strm.c                 |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dspdefs.h b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
index 3d53881..ff352ce 100644
--- a/arch/arm/plat-omap/include/dspbridge/dspdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
@@ -395,7 +395,7 @@ typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr,
  *      CHNL_E_OUTOFSTREAMS:    No free channels available.
  *      CHNL_E_BADCHANID:       Channel ID is out of range.
  *      -EALREADY:        Channel is in use.
- *      CHNL_E_NOIORPS:         No free IO request packets available for
+ *      -EIO:         No free IO request packets available for
  *                              queuing.
  *  Requires:
  *      phChnl != NULL.
diff --git a/drivers/dsp/bridge/core/chnl_sm.c b/drivers/dsp/bridge/core/chnl_sm.c
index 3cebf94..449b897 100644
--- a/drivers/dsp/bridge/core/chnl_sm.c
+++ b/drivers/dsp/bridge/core/chnl_sm.c
@@ -185,7 +185,7 @@ func_cont:
 		chnl_packet_obj =
 		    (struct chnl_irp *)lst_get_head(pchnl->free_packets_list);
 		if (chnl_packet_obj == NULL)
-			status = CHNL_E_NOIORPS;
+			status = -EIO;
 
 	}
 	if (DSP_SUCCEEDED(status)) {
diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c
index 7e2481f..accfb7b 100644
--- a/drivers/dsp/bridge/rmgr/strm.c
+++ b/drivers/dsp/bridge/rmgr/strm.c
@@ -448,7 +448,7 @@ dsp_status strm_issue(struct strm_object *hStrm, IN u8 *pbuf, u32 ul_bytes,
 			    (hStrm->chnl_obj, pbuf, ul_bytes, ul_buf_size,
 			     (u32) tmp_buf, dw_arg);
 		}
-		if (status == CHNL_E_NOIORPS)
+		if (status == -EIO)
 			status = -ENOSR;
 	}
 
@@ -587,7 +587,7 @@ func_cont:
 				DBC_ASSERT(status == CHNL_E_OUTOFSTREAMS ||
 					   status == CHNL_E_BADCHANID ||
 					   status == -EALREADY ||
-					   status == CHNL_E_NOIORPS);
+					   status == -EIO);
 				status = -EPERM;
 			}
 		}
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 07/40] DSPBRIDGE: err code replace CHNL_E_ISR with EIO
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (4 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 06/40] DSPBRIDGE: err code replace CHNL_E_NOIORPS with EIO Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 08/40] DSPBRIDGE: err code replace CHNL_E_MGREXISTS with EEXIST Omar Ramirez Luna
                   ` (32 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace CHNL_E_ISR with EIO

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/chnl.h    |    2 +-
 arch/arm/plat-omap/include/dspbridge/dspdefs.h |    2 +-
 arch/arm/plat-omap/include/dspbridge/io.h      |    2 +-
 drivers/dsp/bridge/core/io_sm.c                |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/chnl.h b/arch/arm/plat-omap/include/dspbridge/chnl.h
index 8761fcf..b97cced 100644
--- a/arch/arm/plat-omap/include/dspbridge/chnl.h
+++ b/arch/arm/plat-omap/include/dspbridge/chnl.h
@@ -63,7 +63,7 @@ extern dsp_status chnl_close(struct chnl_object *chnl_obj);
  *      -EFAULT:            hdev_obj is invalid.
  *      -EINVAL:        max_channels is 0.
  *      -ENOMEM:            Insufficient memory for requested resources.
- *      CHNL_E_ISR:             Unable to plug channel ISR for configured IRQ.
+ *      -EIO:             Unable to plug channel ISR for configured IRQ.
  *      CHNL_E_MAXCHANNELS:     This manager cannot handle this many channels.
  *      CHNL_E_INVALIDIRQ:      Invalid IRQ number. Must be 0 <= birq <= 15.
  *      CHNL_E_INVALIDWORDSIZE: Invalid DSP word size.  Must be > 0.
diff --git a/arch/arm/plat-omap/include/dspbridge/dspdefs.h b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
index ff352ce..f56fdca 100644
--- a/arch/arm/plat-omap/include/dspbridge/dspdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
@@ -309,7 +309,7 @@ typedef dsp_status(*fxn_brd_write) (struct bridge_dev_context *hDevContext,
  *  Returns:
  *      0:            Success;
  *      -ENOMEM:        Insufficient memory for requested resources.
- *      CHNL_E_ISR:         Unable to plug ISR for given IRQ.
+ *      -EIO:         Unable to plug ISR for given IRQ.
  *      CHNL_E_NOMEMMAP:    Couldn't map physical address to a virtual one.
  *  Requires:
  *      phChnlMgr != NULL.
diff --git a/arch/arm/plat-omap/include/dspbridge/io.h b/arch/arm/plat-omap/include/dspbridge/io.h
index 197628f..f880b80 100644
--- a/arch/arm/plat-omap/include/dspbridge/io.h
+++ b/arch/arm/plat-omap/include/dspbridge/io.h
@@ -40,7 +40,7 @@
  *  Returns:
  *      0:                Success;
  *      -ENOMEM:            Insufficient memory for requested resources.
- *      CHNL_E_ISR:             Unable to plug channel ISR for configured IRQ.
+ *      -EIO:             Unable to plug channel ISR for configured IRQ.
  *      CHNL_E_INVALIDIRQ:      Invalid IRQ number. Must be 0 <= birq <= 15.
  *      CHNL_E_INVALIDWORDSIZE: Invalid DSP word size.  Must be > 0.
  *      CHNL_E_INVALIDMEMBASE:  Invalid base address for DSP communications.
diff --git a/drivers/dsp/bridge/core/io_sm.c b/drivers/dsp/bridge/core/io_sm.c
index 7246c22..5902d8a 100644
--- a/drivers/dsp/bridge/core/io_sm.c
+++ b/drivers/dsp/bridge/core/io_sm.c
@@ -236,7 +236,7 @@ dsp_status bridge_io_create(OUT struct io_mgr **phIOMgr,
 		if (dsp_wdt_init())
 			status = -EPERM;
 	} else {
-		status = CHNL_E_ISR;
+		status = -EIO;
 	}
 func_end:
 	if (DSP_FAILED(status)) {
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 08/40] DSPBRIDGE: err code replace CHNL_E_MGREXISTS with EEXIST
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (5 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 07/40] DSPBRIDGE: err code replace CHNL_E_ISR " Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 09/40] DSPBRIDGE: err code replace CHNL_E_NOMEMMAP with EFAULT Omar Ramirez Luna
                   ` (31 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace CHNL_E_MGREXISTS with EEXIST

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/chnl.h |    2 +-
 drivers/dsp/bridge/pmgr/chnl.c              |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/chnl.h b/arch/arm/plat-omap/include/dspbridge/chnl.h
index b97cced..04856c2 100644
--- a/arch/arm/plat-omap/include/dspbridge/chnl.h
+++ b/arch/arm/plat-omap/include/dspbridge/chnl.h
@@ -68,7 +68,7 @@ extern dsp_status chnl_close(struct chnl_object *chnl_obj);
  *      CHNL_E_INVALIDIRQ:      Invalid IRQ number. Must be 0 <= birq <= 15.
  *      CHNL_E_INVALIDWORDSIZE: Invalid DSP word size.  Must be > 0.
  *      CHNL_E_INVALIDMEMBASE:  Invalid base address for DSP communications.
- *      CHNL_E_MGREXISTS:       Channel manager already exists for this device.
+ *      -EEXIST:       Channel manager already exists for this device.
  *  Requires:
  *      chnl_init(void) called.
  *      phChnlMgr != NULL.
diff --git a/drivers/dsp/bridge/pmgr/chnl.c b/drivers/dsp/bridge/pmgr/chnl.c
index 1c9cc5e..5bf1c66 100644
--- a/drivers/dsp/bridge/pmgr/chnl.c
+++ b/drivers/dsp/bridge/pmgr/chnl.c
@@ -81,7 +81,7 @@ dsp_status chnl_create(OUT struct chnl_mgr **phChnlMgr,
 	if (DSP_SUCCEEDED(status)) {
 		status = dev_get_chnl_mgr(hdev_obj, &hchnl_mgr);
 		if (DSP_SUCCEEDED(status) && hchnl_mgr != NULL)
-			status = CHNL_E_MGREXISTS;
+			status = -EEXIST;
 
 	}
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 09/40] DSPBRIDGE: err code replace CHNL_E_NOMEMMAP with EFAULT
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (6 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 08/40] DSPBRIDGE: err code replace CHNL_E_MGREXISTS with EEXIST Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 10/40] DSPBRIDGE: err code replace CHNL_E_INVALIDMEMBASE with EINVAL Omar Ramirez Luna
                   ` (30 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace CHNL_E_NOMEMMAP with EFAULT

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/dspdefs.h |    2 +-
 drivers/dsp/bridge/core/io_sm.c                |   22 +++++++++++-----------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dspdefs.h b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
index f56fdca..6a2bba5 100644
--- a/arch/arm/plat-omap/include/dspbridge/dspdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
@@ -310,7 +310,7 @@ typedef dsp_status(*fxn_brd_write) (struct bridge_dev_context *hDevContext,
  *      0:            Success;
  *      -ENOMEM:        Insufficient memory for requested resources.
  *      -EIO:         Unable to plug ISR for given IRQ.
- *      CHNL_E_NOMEMMAP:    Couldn't map physical address to a virtual one.
+ *      -EFAULT:    Couldn't map physical address to a virtual one.
  *  Requires:
  *      phChnlMgr != NULL.
  *      pMgrAttrs != NULL
diff --git a/drivers/dsp/bridge/core/io_sm.c b/drivers/dsp/bridge/core/io_sm.c
index 5902d8a..79baa2c 100644
--- a/drivers/dsp/bridge/core/io_sm.c
+++ b/drivers/dsp/bridge/core/io_sm.c
@@ -353,13 +353,13 @@ dsp_status bridge_io_on_loaded(struct io_mgr *hio_mgr)
 	status = cod_get_sym_value(cod_man, CHNL_SHARED_BUFFER_BASE_SYM,
 				   &ul_shm_base);
 	if (DSP_FAILED(status)) {
-		status = CHNL_E_NOMEMMAP;
+		status = -EFAULT;
 		goto func_end;
 	}
 	status = cod_get_sym_value(cod_man, CHNL_SHARED_BUFFER_LIMIT_SYM,
 				   &ul_shm_limit);
 	if (DSP_FAILED(status)) {
-		status = CHNL_E_NOMEMMAP;
+		status = -EFAULT;
 		goto func_end;
 	}
 	if (ul_shm_limit <= ul_shm_base) {
@@ -398,10 +398,10 @@ dsp_status bridge_io_on_loaded(struct io_mgr *hio_mgr)
 				ul_mem_length = ul_shm_length + ul_msg_length;
 			}
 		} else {
-			status = CHNL_E_NOMEMMAP;
+			status = -EFAULT;
 		}
 	} else {
-		status = CHNL_E_NOMEMMAP;
+		status = -EFAULT;
 	}
 	if (DSP_SUCCEEDED(status)) {
 #ifndef DSP_TRACEBUF_DISABLED
@@ -412,18 +412,18 @@ dsp_status bridge_io_on_loaded(struct io_mgr *hio_mgr)
 					   &shm0_end);
 #endif
 		if (DSP_FAILED(status))
-			status = CHNL_E_NOMEMMAP;
+			status = -EFAULT;
 	}
 	if (DSP_SUCCEEDED(status)) {
 		status =
 		    cod_get_sym_value(cod_man, DYNEXTBASE, &ul_dyn_ext_base);
 		if (DSP_FAILED(status))
-			status = CHNL_E_NOMEMMAP;
+			status = -EFAULT;
 	}
 	if (DSP_SUCCEEDED(status)) {
 		status = cod_get_sym_value(cod_man, EXTEND, &ul_ext_end);
 		if (DSP_FAILED(status))
-			status = CHNL_E_NOMEMMAP;
+			status = -EFAULT;
 	}
 	if (DSP_SUCCEEDED(status)) {
 		/* Get memory reserved in host resources */
@@ -680,7 +680,7 @@ dsp_status bridge_io_on_loaded(struct io_mgr *hio_mgr)
 	 * num_procs = 1.
 	 */
 	if (!hio_mgr->ext_proc_info.ty_tlb[0].ul_gpp_phys || num_procs != 1) {
-		status = CHNL_E_NOMEMMAP;
+		status = -EFAULT;
 		goto func_end;
 	} else {
 		if (ae_proc[0].ul_dsp_va > ul_shm_base) {
@@ -751,7 +751,7 @@ dsp_status bridge_io_on_loaded(struct io_mgr *hio_mgr)
 	status = cod_get_sym_value(cod_man, SYS_PUTCBEG,
 				   &hio_mgr->ul_trace_buffer_begin);
 	if (DSP_FAILED(status)) {
-		status = CHNL_E_NOMEMMAP;
+		status = -EFAULT;
 		goto func_end;
 	}
 
@@ -762,7 +762,7 @@ dsp_status bridge_io_on_loaded(struct io_mgr *hio_mgr)
 	status = cod_get_sym_value(cod_man, SYS_PUTCEND,
 				   &hio_mgr->ul_trace_buffer_end);
 	if (DSP_FAILED(status)) {
-		status = CHNL_E_NOMEMMAP;
+		status = -EFAULT;
 		goto func_end;
 	}
 	hio_mgr->ul_trace_buffer_end =
@@ -772,7 +772,7 @@ dsp_status bridge_io_on_loaded(struct io_mgr *hio_mgr)
 	status = cod_get_sym_value(cod_man, BRIDGE_SYS_PUTC_CURRENT,
 				   &hio_mgr->ul_trace_buffer_current);
 	if (DSP_FAILED(status)) {
-		status = CHNL_E_NOMEMMAP;
+		status = -EFAULT;
 		goto func_end;
 	}
 	hio_mgr->ul_trace_buffer_current =
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 10/40] DSPBRIDGE: err code replace CHNL_E_INVALIDMEMBASE with EINVAL
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (7 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 09/40] DSPBRIDGE: err code replace CHNL_E_NOMEMMAP with EFAULT Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 11/40] DSPBRIDGE: err code replace CHNL_E_INVALIDWORDSIZE " Omar Ramirez Luna
                   ` (29 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace CHNL_E_INVALIDMEMBASE with EINVAL

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/chnl.h |    2 +-
 arch/arm/plat-omap/include/dspbridge/io.h   |    2 +-
 drivers/dsp/bridge/core/io_sm.c             |    4 ++--
 drivers/dsp/bridge/pmgr/io.c                |    2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/chnl.h b/arch/arm/plat-omap/include/dspbridge/chnl.h
index 04856c2..98336a0 100644
--- a/arch/arm/plat-omap/include/dspbridge/chnl.h
+++ b/arch/arm/plat-omap/include/dspbridge/chnl.h
@@ -67,7 +67,7 @@ extern dsp_status chnl_close(struct chnl_object *chnl_obj);
  *      CHNL_E_MAXCHANNELS:     This manager cannot handle this many channels.
  *      CHNL_E_INVALIDIRQ:      Invalid IRQ number. Must be 0 <= birq <= 15.
  *      CHNL_E_INVALIDWORDSIZE: Invalid DSP word size.  Must be > 0.
- *      CHNL_E_INVALIDMEMBASE:  Invalid base address for DSP communications.
+ *      -EINVAL:  Invalid base address for DSP communications.
  *      -EEXIST:       Channel manager already exists for this device.
  *  Requires:
  *      chnl_init(void) called.
diff --git a/arch/arm/plat-omap/include/dspbridge/io.h b/arch/arm/plat-omap/include/dspbridge/io.h
index f880b80..e491a50 100644
--- a/arch/arm/plat-omap/include/dspbridge/io.h
+++ b/arch/arm/plat-omap/include/dspbridge/io.h
@@ -43,7 +43,7 @@
  *      -EIO:             Unable to plug channel ISR for configured IRQ.
  *      CHNL_E_INVALIDIRQ:      Invalid IRQ number. Must be 0 <= birq <= 15.
  *      CHNL_E_INVALIDWORDSIZE: Invalid DSP word size.  Must be > 0.
- *      CHNL_E_INVALIDMEMBASE:  Invalid base address for DSP communications.
+ *      -EINVAL:  Invalid base address for DSP communications.
  *  Requires:
  *      io_init(void) called.
  *      phIOMgr != NULL.
diff --git a/drivers/dsp/bridge/core/io_sm.c b/drivers/dsp/bridge/core/io_sm.c
index 79baa2c..72245d8 100644
--- a/drivers/dsp/bridge/core/io_sm.c
+++ b/drivers/dsp/bridge/core/io_sm.c
@@ -363,7 +363,7 @@ dsp_status bridge_io_on_loaded(struct io_mgr *hio_mgr)
 		goto func_end;
 	}
 	if (ul_shm_limit <= ul_shm_base) {
-		status = CHNL_E_INVALIDMEMBASE;
+		status = -EINVAL;
 		goto func_end;
 	}
 	/* Get total length in bytes */
@@ -382,7 +382,7 @@ dsp_status bridge_io_on_loaded(struct io_mgr *hio_mgr)
 					   &ul_msg_limit);
 		if (DSP_SUCCEEDED(status)) {
 			if (ul_msg_limit <= ul_msg_base) {
-				status = CHNL_E_INVALIDMEMBASE;
+				status = -EINVAL;
 			} else {
 				/*
 				 * Length (bytes) of messaging part of shared
diff --git a/drivers/dsp/bridge/pmgr/io.c b/drivers/dsp/bridge/pmgr/io.c
index c0897c6..e544dee 100644
--- a/drivers/dsp/bridge/pmgr/io.c
+++ b/drivers/dsp/bridge/pmgr/io.c
@@ -63,7 +63,7 @@ dsp_status io_create(OUT struct io_mgr **phIOMgr, struct dev_object *hdev_obj,
 
 	/* A memory base of 0 implies no memory base: */
 	if ((pMgrAttrs->shm_base != 0) && (pMgrAttrs->usm_length == 0))
-		status = CHNL_E_INVALIDMEMBASE;
+		status = -EINVAL;
 
 	if (pMgrAttrs->word_size == 0)
 		status = CHNL_E_INVALIDWORDSIZE;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 11/40] DSPBRIDGE: err code replace CHNL_E_INVALIDWORDSIZE with EINVAL
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (8 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 10/40] DSPBRIDGE: err code replace CHNL_E_INVALIDMEMBASE with EINVAL Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 12/40] DSPBRIDGE: err code replace CHNL_E_EOS with EPIPE Omar Ramirez Luna
                   ` (28 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace CHNL_E_INVALIDWORDSIZE with EINVAL

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/chnl.h |    2 +-
 arch/arm/plat-omap/include/dspbridge/io.h   |    2 +-
 drivers/dsp/bridge/pmgr/chnl.c              |    2 +-
 drivers/dsp/bridge/pmgr/io.c                |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/chnl.h b/arch/arm/plat-omap/include/dspbridge/chnl.h
index 98336a0..7c06869 100644
--- a/arch/arm/plat-omap/include/dspbridge/chnl.h
+++ b/arch/arm/plat-omap/include/dspbridge/chnl.h
@@ -66,7 +66,7 @@ extern dsp_status chnl_close(struct chnl_object *chnl_obj);
  *      -EIO:             Unable to plug channel ISR for configured IRQ.
  *      CHNL_E_MAXCHANNELS:     This manager cannot handle this many channels.
  *      CHNL_E_INVALIDIRQ:      Invalid IRQ number. Must be 0 <= birq <= 15.
- *      CHNL_E_INVALIDWORDSIZE: Invalid DSP word size.  Must be > 0.
+ *      -EINVAL: Invalid DSP word size.  Must be > 0.
  *      -EINVAL:  Invalid base address for DSP communications.
  *      -EEXIST:       Channel manager already exists for this device.
  *  Requires:
diff --git a/arch/arm/plat-omap/include/dspbridge/io.h b/arch/arm/plat-omap/include/dspbridge/io.h
index e491a50..752786f 100644
--- a/arch/arm/plat-omap/include/dspbridge/io.h
+++ b/arch/arm/plat-omap/include/dspbridge/io.h
@@ -42,7 +42,7 @@
  *      -ENOMEM:            Insufficient memory for requested resources.
  *      -EIO:             Unable to plug channel ISR for configured IRQ.
  *      CHNL_E_INVALIDIRQ:      Invalid IRQ number. Must be 0 <= birq <= 15.
- *      CHNL_E_INVALIDWORDSIZE: Invalid DSP word size.  Must be > 0.
+ *      -EINVAL: Invalid DSP word size.  Must be > 0.
  *      -EINVAL:  Invalid base address for DSP communications.
  *  Requires:
  *      io_init(void) called.
diff --git a/drivers/dsp/bridge/pmgr/chnl.c b/drivers/dsp/bridge/pmgr/chnl.c
index 5bf1c66..50d49eb 100644
--- a/drivers/dsp/bridge/pmgr/chnl.c
+++ b/drivers/dsp/bridge/pmgr/chnl.c
@@ -76,7 +76,7 @@ dsp_status chnl_create(OUT struct chnl_mgr **phChnlMgr,
 		status = CHNL_E_MAXCHANNELS;
 
 	if (pMgrAttrs->word_size == 0)
-		status = CHNL_E_INVALIDWORDSIZE;
+		status = -EINVAL;
 
 	if (DSP_SUCCEEDED(status)) {
 		status = dev_get_chnl_mgr(hdev_obj, &hchnl_mgr);
diff --git a/drivers/dsp/bridge/pmgr/io.c b/drivers/dsp/bridge/pmgr/io.c
index e544dee..de46cde 100644
--- a/drivers/dsp/bridge/pmgr/io.c
+++ b/drivers/dsp/bridge/pmgr/io.c
@@ -66,7 +66,7 @@ dsp_status io_create(OUT struct io_mgr **phIOMgr, struct dev_object *hdev_obj,
 		status = -EINVAL;
 
 	if (pMgrAttrs->word_size == 0)
-		status = CHNL_E_INVALIDWORDSIZE;
+		status = -EINVAL;
 
 	if (DSP_SUCCEEDED(status)) {
 		dev_get_intf_fxns(hdev_obj, &intf_fxns);
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 12/40] DSPBRIDGE: err code replace CHNL_E_EOS with EPIPE
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (9 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 11/40] DSPBRIDGE: err code replace CHNL_E_INVALIDWORDSIZE " Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 13/40] DSPBRIDGE: err code replace CHNL_E_NOIOC with EREMOTEIO Omar Ramirez Luna
                   ` (27 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace CHNL_E_EOS with EPIPE

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/dspdefs.h |    4 ++--
 drivers/dsp/bridge/core/chnl_sm.c              |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dspdefs.h b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
index 6a2bba5..58fcbcc 100644
--- a/arch/arm/plat-omap/include/dspbridge/dspdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
@@ -455,7 +455,7 @@ typedef dsp_status(*fxn_chnl_close) (struct chnl_object *chnl_obj);
  *      -EPERM:   User cannot mark EOS on an input channel.
  *      -ECANCELED: I/O has been cancelled on this channel.  No further
  *                      I/O is allowed.
- *      CHNL_E_EOS:     End of stream was already marked on a previous
+ *      -EPIPE:     End of stream was already marked on a previous
  *                      IORequest on this channel.  No further I/O is expected.
  *      -EINVAL: Buffer submitted to this output channel is larger than
  *                      the size of the physical shared memory output window.
@@ -466,7 +466,7 @@ typedef dsp_status(*fxn_chnl_close) (struct chnl_object *chnl_obj);
  *          ready.  In any case, notifications of I/O completion are
  *          asynchronous.
  *          If byte_size is 0 for an output channel, subsequent CHNL_AddIOReq's
- *          on this channel will fail with error code CHNL_E_EOS.  The
+ *          on this channel will fail with error code -EPIPE.  The
  *          corresponding IOC for this I/O request will have its status flag
  *          set to CHNL_IOCSTATEOS.
  */
diff --git a/drivers/dsp/bridge/core/chnl_sm.c b/drivers/dsp/bridge/core/chnl_sm.c
index 449b897..d162698 100644
--- a/drivers/dsp/bridge/core/chnl_sm.c
+++ b/drivers/dsp/bridge/core/chnl_sm.c
@@ -125,7 +125,7 @@ dsp_status bridge_chnl_add_io_req(struct chnl_object *chnl_obj, void *pHostBuf,
 				status = -ECANCELED;
 			else if ((dw_state & CHNL_STATEEOS) &&
 				 CHNL_IS_OUTPUT(pchnl->chnl_mode))
-				status = CHNL_E_EOS;
+				status = -EPIPE;
 			else
 				/* No other possible states left */
 				DBC_ASSERT(0);
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 13/40] DSPBRIDGE: err code replace CHNL_E_NOIOC with EREMOTEIO
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (10 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 12/40] DSPBRIDGE: err code replace CHNL_E_EOS with EPIPE Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 14/40] DSPBRIDGE: err code replace CHNL_E_BADCHANID with ECHRNG Omar Ramirez Luna
                   ` (26 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace CHNL_E_NOIOC with EREMOTEIO

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/dspdefs.h |    2 +-
 drivers/dsp/bridge/core/chnl_sm.c              |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dspdefs.h b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
index 58fcbcc..b268c5e 100644
--- a/arch/arm/plat-omap/include/dspbridge/dspdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
@@ -493,7 +493,7 @@ typedef dsp_status(*fxn_chnl_addioreq) (struct chnl_object
  *      0:        Success.
  *      -EFAULT:    Invalid chnl_obj.
  *      -EFAULT:   pIOC is invalid.
- *      CHNL_E_NOIOC:   CHNL_IOCNOWAIT was specified as the dwTimeOut parameter
+ *      -EREMOTEIO:   CHNL_IOCNOWAIT was specified as the dwTimeOut parameter
  *                      yet no I/O completions were queued.
  *  Requires:
  *      dwTimeOut == CHNL_IOCNOWAIT.
diff --git a/drivers/dsp/bridge/core/chnl_sm.c b/drivers/dsp/bridge/core/chnl_sm.c
index d162698..806f0c9 100644
--- a/drivers/dsp/bridge/core/chnl_sm.c
+++ b/drivers/dsp/bridge/core/chnl_sm.c
@@ -589,7 +589,7 @@ dsp_status bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 dwTimeOut,
 		status = -EFAULT;
 	} else if (dwTimeOut == CHNL_IOCNOWAIT) {
 		if (LST_IS_EMPTY(pchnl->pio_completions))
-			status = CHNL_E_NOIOC;
+			status = -EREMOTEIO;
 
 	}
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 14/40] DSPBRIDGE: err code replace CHNL_E_BADCHANID with ECHRNG
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (11 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 13/40] DSPBRIDGE: err code replace CHNL_E_NOIOC with EREMOTEIO Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 15/40] DSPBRIDGE: err code replace CHNL_E_OUTOFSTREAMS with ENOSR Omar Ramirez Luna
                   ` (25 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace CHNL_E_BADCHANID with ECHRNG

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/dspdefs.h |    4 ++--
 drivers/dsp/bridge/core/chnl_sm.c              |    4 ++--
 drivers/dsp/bridge/rmgr/strm.c                 |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dspdefs.h b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
index b268c5e..c4b0922 100644
--- a/arch/arm/plat-omap/include/dspbridge/dspdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
@@ -393,7 +393,7 @@ typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr,
  *      -ENOMEM:            Insufficient memory for requested resources.
  *      -EINVAL:        Invalid number of IOReqs.
  *      CHNL_E_OUTOFSTREAMS:    No free channels available.
- *      CHNL_E_BADCHANID:       Channel ID is out of range.
+ *      -ECHRNG:       Channel ID is out of range.
  *      -EALREADY:        Channel is in use.
  *      -EIO:         No free IO request packets available for
  *                              queuing.
@@ -577,7 +577,7 @@ typedef dsp_status(*fxn_chnl_getinfo) (struct chnl_object *chnl_obj,
  *      0:            Success;
  *      -EFAULT:        Invalid hchnl_mgr.
  *      -EFAULT:       pMgrInfo == NULL.
- *      CHNL_E_BADCHANID:   Invalid channel ID.
+ *      -ECHRNG:   Invalid channel ID.
  *  Requires:
  *  Ensures:
  *      0:            pMgrInfo points to a filled in chnl_mgrinfo
diff --git a/drivers/dsp/bridge/core/chnl_sm.c b/drivers/dsp/bridge/core/chnl_sm.c
index 806f0c9..db03db6 100644
--- a/drivers/dsp/bridge/core/chnl_sm.c
+++ b/drivers/dsp/bridge/core/chnl_sm.c
@@ -736,7 +736,7 @@ dsp_status bridge_chnl_get_mgr_info(struct chnl_mgr *hchnl_mgr, u32 uChnlID,
 				status = -EFAULT;
 			}
 		} else {
-			status = CHNL_E_BADCHANID;
+			status = -ECHRNG;
 		}
 	} else {
 		status = -EFAULT;
@@ -801,7 +801,7 @@ dsp_status bridge_chnl_open(OUT struct chnl_object **phChnl,
 		} else {
 			if (uChnlId != CHNL_PICKFREE) {
 				if (uChnlId >= chnl_mgr_obj->max_channels)
-					status = CHNL_E_BADCHANID;
+					status = -ECHRNG;
 				else if (chnl_mgr_obj->ap_channel[uChnlId] !=
 					 NULL)
 					status = -EALREADY;
diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c
index accfb7b..c31a5c1 100644
--- a/drivers/dsp/bridge/rmgr/strm.c
+++ b/drivers/dsp/bridge/rmgr/strm.c
@@ -585,7 +585,7 @@ func_cont:
 				 * assert here), and then return -EPERM.
 				 */
 				DBC_ASSERT(status == CHNL_E_OUTOFSTREAMS ||
-					   status == CHNL_E_BADCHANID ||
+					   status == -ECHRNG ||
 					   status == -EALREADY ||
 					   status == -EIO);
 				status = -EPERM;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 15/40] DSPBRIDGE: err code replace CHNL_E_OUTOFSTREAMS with ENOSR
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (12 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 14/40] DSPBRIDGE: err code replace CHNL_E_BADCHANID with ECHRNG Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 16/40] DSPBRIDGE: err code replace CHNL_E_MAXCHANNELS with ECHRNG Omar Ramirez Luna
                   ` (24 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace CHNL_E_OUTOFSTREAMS with ENOSR

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/dspdefs.h |    2 +-
 drivers/dsp/bridge/core/chnl_sm.c              |    2 +-
 drivers/dsp/bridge/rmgr/strm.c                 |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dspdefs.h b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
index c4b0922..c3c2e4d 100644
--- a/arch/arm/plat-omap/include/dspbridge/dspdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
@@ -392,7 +392,7 @@ typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr,
  *      -EFAULT:            hchnl_mgr is invalid.
  *      -ENOMEM:            Insufficient memory for requested resources.
  *      -EINVAL:        Invalid number of IOReqs.
- *      CHNL_E_OUTOFSTREAMS:    No free channels available.
+ *      -ENOSR:    No free channels available.
  *      -ECHRNG:       Channel ID is out of range.
  *      -EALREADY:        Channel is in use.
  *      -EIO:         No free IO request packets available for
diff --git a/drivers/dsp/bridge/core/chnl_sm.c b/drivers/dsp/bridge/core/chnl_sm.c
index db03db6..67132c2 100644
--- a/drivers/dsp/bridge/core/chnl_sm.c
+++ b/drivers/dsp/bridge/core/chnl_sm.c
@@ -1003,7 +1003,7 @@ static struct chnl_irp *make_new_chirp(void)
 static dsp_status search_free_channel(struct chnl_mgr *chnl_mgr_obj,
 				      OUT u32 *pdwChnl)
 {
-	dsp_status status = CHNL_E_OUTOFSTREAMS;
+	dsp_status status = -ENOSR;
 	u32 i;
 
 	DBC_REQUIRE(chnl_mgr_obj);
diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c
index c31a5c1..d560503 100644
--- a/drivers/dsp/bridge/rmgr/strm.c
+++ b/drivers/dsp/bridge/rmgr/strm.c
@@ -584,7 +584,7 @@ func_cont:
 				 * strm_mgr_obj->hchnl_mgr better be valid or we
 				 * assert here), and then return -EPERM.
 				 */
-				DBC_ASSERT(status == CHNL_E_OUTOFSTREAMS ||
+				DBC_ASSERT(status == -ENOSR ||
 					   status == -ECHRNG ||
 					   status == -EALREADY ||
 					   status == -EIO);
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 16/40] DSPBRIDGE: err code replace CHNL_E_MAXCHANNELS with ECHRNG
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (13 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 15/40] DSPBRIDGE: err code replace CHNL_E_OUTOFSTREAMS with ENOSR Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 17/40] DSPBRIDGE: err code replace COD_E_ZLCREATEFAILED with ESPIPE Omar Ramirez Luna
                   ` (23 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace CHNL_E_MAXCHANNELS with ECHRNG

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/chnl.h |    2 +-
 drivers/dsp/bridge/pmgr/chnl.c              |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/chnl.h b/arch/arm/plat-omap/include/dspbridge/chnl.h
index 7c06869..ff3ed51 100644
--- a/arch/arm/plat-omap/include/dspbridge/chnl.h
+++ b/arch/arm/plat-omap/include/dspbridge/chnl.h
@@ -64,7 +64,7 @@ extern dsp_status chnl_close(struct chnl_object *chnl_obj);
  *      -EINVAL:        max_channels is 0.
  *      -ENOMEM:            Insufficient memory for requested resources.
  *      -EIO:             Unable to plug channel ISR for configured IRQ.
- *      CHNL_E_MAXCHANNELS:     This manager cannot handle this many channels.
+ *      -ECHRNG:     This manager cannot handle this many channels.
  *      CHNL_E_INVALIDIRQ:      Invalid IRQ number. Must be 0 <= birq <= 15.
  *      -EINVAL: Invalid DSP word size.  Must be > 0.
  *      -EINVAL:  Invalid base address for DSP communications.
diff --git a/drivers/dsp/bridge/pmgr/chnl.c b/drivers/dsp/bridge/pmgr/chnl.c
index 50d49eb..22087f2 100644
--- a/drivers/dsp/bridge/pmgr/chnl.c
+++ b/drivers/dsp/bridge/pmgr/chnl.c
@@ -73,7 +73,7 @@ dsp_status chnl_create(OUT struct chnl_mgr **phChnlMgr,
 	else if (pMgrAttrs->max_channels == 0)
 		status = -EINVAL;
 	else
-		status = CHNL_E_MAXCHANNELS;
+		status = -ECHRNG;
 
 	if (pMgrAttrs->word_size == 0)
 		status = -EINVAL;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 17/40] DSPBRIDGE: err code replace COD_E_ZLCREATEFAILED with ESPIPE
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (14 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 16/40] DSPBRIDGE: err code replace CHNL_E_MAXCHANNELS with ECHRNG Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 18/40] DSPBRIDGE: err code replace COD_E_SYMBOLNOTFOUND " Omar Ramirez Luna
                   ` (22 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace COD_E_ZLCREATEFAILED with ESPIPE

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/cod.h |    2 +-
 arch/arm/plat-omap/include/dspbridge/dev.h |    4 ++--
 drivers/dsp/bridge/pmgr/cod.c              |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/cod.h b/arch/arm/plat-omap/include/dspbridge/cod.h
index 3ee2eb9..56df6d8 100644
--- a/arch/arm/plat-omap/include/dspbridge/cod.h
+++ b/arch/arm/plat-omap/include/dspbridge/cod.h
@@ -84,7 +84,7 @@ extern void cod_close(struct cod_libraryobj *lib);
  *  Returns:
  *      0:                Success.
  *      COD_E_NOZLFUNCTIONS:    Could not initialize ZL functions.
- *      COD_E_ZLCREATEFAILED:   ZL_Create failed.
+ *      -ESPIPE:   ZL_Create failed.
  *      -ENOSYS:           attrs was not NULL.  We don't yet support
  *                              non default values of attrs.
  *  Requires:
diff --git a/arch/arm/plat-omap/include/dspbridge/dev.h b/arch/arm/plat-omap/include/dspbridge/dev.h
index 75e795e..8652f52 100644
--- a/arch/arm/plat-omap/include/dspbridge/dev.h
+++ b/arch/arm/plat-omap/include/dspbridge/dev.h
@@ -84,7 +84,7 @@ extern u32 dev_brd_write_fxn(void *pArb,
  *      LDR_E_NOMEMORY:         PELDR is out of resources.
  *      -EPERM:              Unable to find WMD entry point function.
  *      COD_E_NOZLFUNCTIONS:    One or more ZL functions exports not found.
- *      COD_E_ZLCREATEFAILED:   Unable to load ZL DLL.
+ *      -ESPIPE:   Unable to load ZL DLL.
  *  Requires:
  *      DEV Initialized.
  *      phDevObject != NULL.
@@ -126,7 +126,7 @@ extern dsp_status dev_create_device(OUT struct dev_object
  *      LDR_E_NOMEMORY:         PELDR is out of resources.
  *      -EPERM:              Unable to find WMD entry point function.
  *      COD_E_NOZLFUNCTIONS:    One or more ZL functions exports not found.
- *      COD_E_ZLCREATEFAILED:   Unable to load ZL DLL.
+ *      -ESPIPE:   Unable to load ZL DLL.
  *  Requires:
  *      DEV Initialized.
  *      phDevObject != NULL.
diff --git a/drivers/dsp/bridge/pmgr/cod.c b/drivers/dsp/bridge/pmgr/cod.c
index 552a03f..65acd6f 100644
--- a/drivers/dsp/bridge/pmgr/cod.c
+++ b/drivers/dsp/bridge/pmgr/cod.c
@@ -268,7 +268,7 @@ dsp_status cod_create(OUT struct cod_manager **phMgr, char *pstrDummyFile,
 
 	if (DSP_FAILED(status)) {
 		cod_delete(mgr_new);
-		return COD_E_ZLCREATEFAILED;
+		return -ESPIPE;
 	}
 
 	/* return the new manager */
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 18/40] DSPBRIDGE: err code replace COD_E_SYMBOLNOTFOUND with ESPIPE
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (15 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 17/40] DSPBRIDGE: err code replace COD_E_ZLCREATEFAILED with ESPIPE Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 19/40] DSPBRIDGE: err code replace COD_E_NOSYMBOLSLOADED " Omar Ramirez Luna
                   ` (21 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace COD_E_SYMBOLNOTFOUND with ESPIPE

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/cod.h |    4 ++--
 arch/arm/plat-omap/include/dspbridge/dev.h |    2 +-
 drivers/dsp/bridge/pmgr/cod.c              |    2 +-
 drivers/dsp/bridge/rmgr/node.c             |    2 +-
 drivers/dsp/bridge/rmgr/proc.c             |    2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/cod.h b/arch/arm/plat-omap/include/dspbridge/cod.h
index 56df6d8..76b6ae9 100644
--- a/arch/arm/plat-omap/include/dspbridge/cod.h
+++ b/arch/arm/plat-omap/include/dspbridge/cod.h
@@ -213,7 +213,7 @@ extern dsp_status cod_get_loader(struct cod_manager *cod_mgr_obj,
  *  Returns:
  *      0:                Success
  *      COD_E_NOSYMBOLSLOADED:  Symbols have not been loaded onto the board.
- *      COD_E_SYMBOLNOTFOUND:   The symbol could not be found.
+ *      -ESPIPE:   The symbol could not be found.
  *  Requires:
  *      COD module initialized.
  *      valid cod_mgr_obj.
@@ -243,7 +243,7 @@ extern dsp_status cod_get_section(struct cod_libraryobj *lib,
  *  Returns:
  *      0:                Success.
  *      COD_E_NOSYMBOLSLOADED:  Symbols have not been loaded onto the board.
- *      COD_E_SYMBOLNOTFOUND:   The symbol could not be found.
+ *      -ESPIPE:   The symbol could not be found.
  *  Requires:
  *      COD module initialized.
  *      Valid cod_mgr_obj.
diff --git a/arch/arm/plat-omap/include/dspbridge/dev.h b/arch/arm/plat-omap/include/dspbridge/dev.h
index 8652f52..e75a141 100644
--- a/arch/arm/plat-omap/include/dspbridge/dev.h
+++ b/arch/arm/plat-omap/include/dspbridge/dev.h
@@ -493,7 +493,7 @@ extern dsp_status dev_get_node_manager(struct dev_object
  *      0:        Success.
  *      -EFAULT:    Invalid hdev_obj.
  *      COD_E_NOSYMBOLSLOADED:  Symbols have not been loaded onto the board.
- *      COD_E_SYMBOLNOTFOUND:   The symbol could not be found.
+ *      -ESPIPE:   The symbol could not be found.
  *  Requires:
  *      pstrSym != NULL.
  *      pul_value != NULL.
diff --git a/drivers/dsp/bridge/pmgr/cod.c b/drivers/dsp/bridge/pmgr/cod.c
index 65acd6f..5a18853 100644
--- a/drivers/dsp/bridge/pmgr/cod.c
+++ b/drivers/dsp/bridge/pmgr/cod.c
@@ -450,7 +450,7 @@ dsp_status cod_get_sym_value(struct cod_manager *hmgr, char *pstrSym,
 		    get_addr_fxn(hmgr->base_lib, pstrSym, &dbll_sym)) {
 			if (!hmgr->fxns.
 			    get_c_addr_fxn(hmgr->base_lib, pstrSym, &dbll_sym))
-				return COD_E_SYMBOLNOTFOUND;
+				return -ESPIPE;
 		}
 	} else {
 		return COD_E_NOSYMBOLSLOADED;
diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c
index e087238..159ea2b 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -3098,7 +3098,7 @@ static dsp_status get_rms_fxns(struct node_mgr *hnode_mgr)
 		status = dev_get_symbol(dev_obj, psz_fxns[i],
 					&(hnode_mgr->ul_fxn_addrs[i]));
 		if (DSP_FAILED(status)) {
-			if (status == COD_E_SYMBOLNOTFOUND) {
+			if (status == -ESPIPE) {
 				/*
 				 *  May be loaded dynamically (in the future),
 				 *  but return an error for now.
diff --git a/drivers/dsp/bridge/rmgr/proc.c b/drivers/dsp/bridge/rmgr/proc.c
index f3a9b2b..1f46f66 100644
--- a/drivers/dsp/bridge/rmgr/proc.c
+++ b/drivers/dsp/bridge/rmgr/proc.c
@@ -970,7 +970,7 @@ dsp_status proc_load(void *hprocessor, IN CONST s32 argc_index,
 				dev_dbg(bridge, "%s: Failure to Load the EXE\n",
 					__func__);
 			}
-			if (status == COD_E_SYMBOLNOTFOUND) {
+			if (status == -ESPIPE) {
 				pr_err("%s: Couldn't parse the file\n",
 				       __func__);
 			}
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 19/40] DSPBRIDGE: err code replace COD_E_NOSYMBOLSLOADED with ESPIPE
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (16 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 18/40] DSPBRIDGE: err code replace COD_E_SYMBOLNOTFOUND " Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 20/40] DSPBRIDGE: err code replace DSP_EDPMSUSPEND with EPERM Omar Ramirez Luna
                   ` (20 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace COD_E_NOSYMBOLSLOADED with ESPIPE

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/cod.h |    6 +++---
 arch/arm/plat-omap/include/dspbridge/dev.h |    2 +-
 drivers/dsp/bridge/pmgr/cod.c              |    6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/cod.h b/arch/arm/plat-omap/include/dspbridge/cod.h
index 76b6ae9..8a4919e 100644
--- a/arch/arm/plat-omap/include/dspbridge/cod.h
+++ b/arch/arm/plat-omap/include/dspbridge/cod.h
@@ -212,7 +212,7 @@ extern dsp_status cod_get_loader(struct cod_manager *cod_mgr_obj,
  *      puLen:      Location to store length.
  *  Returns:
  *      0:                Success
- *      COD_E_NOSYMBOLSLOADED:  Symbols have not been loaded onto the board.
+ *      -ESPIPE:  Symbols have not been loaded onto the board.
  *      -ESPIPE:   The symbol could not be found.
  *  Requires:
  *      COD module initialized.
@@ -242,7 +242,7 @@ extern dsp_status cod_get_section(struct cod_libraryobj *lib,
  *      value:      value of the symbol
  *  Returns:
  *      0:                Success.
- *      COD_E_NOSYMBOLSLOADED:  Symbols have not been loaded onto the board.
+ *      -ESPIPE:  Symbols have not been loaded onto the board.
  *      -ESPIPE:   The symbol could not be found.
  *  Requires:
  *      COD module initialized.
@@ -355,7 +355,7 @@ extern dsp_status cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
  *      pstrContent - buffer to store content of the section.
  *  Returns:
  *      0: on success, error code on failure
- *      COD_E_NOSYMBOLSLOADED:  Symbols have not been loaded onto the board.
+ *      -ESPIPE:  Symbols have not been loaded onto the board.
  *      COD_E_READFAILED: Failed to read content of code section.
  *  Requires:
  *      COD module initialized.
diff --git a/arch/arm/plat-omap/include/dspbridge/dev.h b/arch/arm/plat-omap/include/dspbridge/dev.h
index e75a141..cf48c07 100644
--- a/arch/arm/plat-omap/include/dspbridge/dev.h
+++ b/arch/arm/plat-omap/include/dspbridge/dev.h
@@ -492,7 +492,7 @@ extern dsp_status dev_get_node_manager(struct dev_object
  *  Returns:
  *      0:        Success.
  *      -EFAULT:    Invalid hdev_obj.
- *      COD_E_NOSYMBOLSLOADED:  Symbols have not been loaded onto the board.
+ *      -ESPIPE:  Symbols have not been loaded onto the board.
  *      -ESPIPE:   The symbol could not be found.
  *  Requires:
  *      pstrSym != NULL.
diff --git a/drivers/dsp/bridge/pmgr/cod.c b/drivers/dsp/bridge/pmgr/cod.c
index 5a18853..342c1b3 100644
--- a/drivers/dsp/bridge/pmgr/cod.c
+++ b/drivers/dsp/bridge/pmgr/cod.c
@@ -417,7 +417,7 @@ dsp_status cod_get_section(struct cod_libraryobj *lib, IN char *pstrSect,
 		status = cod_mgr_obj->fxns.get_sect_fxn(lib->dbll_lib, pstrSect,
 							puAddr, puLen);
 	} else {
-		status = COD_E_NOSYMBOLSLOADED;
+		status = -ESPIPE;
 	}
 
 	DBC_ENSURE(DSP_SUCCEEDED(status) || ((*puAddr == 0) && (*puLen == 0)));
@@ -453,7 +453,7 @@ dsp_status cod_get_sym_value(struct cod_manager *hmgr, char *pstrSym,
 				return -ESPIPE;
 		}
 	} else {
-		return COD_E_NOSYMBOLSLOADED;
+		return -ESPIPE;
 	}
 
 	*pul_value = dbll_sym->value;
@@ -642,7 +642,7 @@ dsp_status cod_read_section(struct cod_libraryobj *lib, IN char *pstrSect,
 		    lib->cod_mgr->fxns.read_sect_fxn(lib->dbll_lib, pstrSect,
 						     pstrContent, cContentSize);
 	else
-		status = COD_E_NOSYMBOLSLOADED;
+		status = -ESPIPE;
 
 	return status;
 }
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 20/40] DSPBRIDGE: err code replace DSP_EDPMSUSPEND with EPERM
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (17 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 19/40] DSPBRIDGE: err code replace COD_E_NOSYMBOLSLOADED " Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 21/40] DSPBRIDGE: err code replace DSP_EDYNLOAD with EILSEQ Omar Ramirez Luna
                   ` (19 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace DSP_EDPMSUSPEND with EPERM

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 drivers/dsp/bridge/rmgr/drv_interface.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/dsp/bridge/rmgr/drv_interface.c b/drivers/dsp/bridge/rmgr/drv_interface.c
index e7eff24..08ad56d 100644
--- a/drivers/dsp/bridge/rmgr/drv_interface.c
+++ b/drivers/dsp/bridge/rmgr/drv_interface.c
@@ -112,7 +112,7 @@ static int omap34_xxbridge_suspend_lockout(struct omap34_xx_bridge_suspend_data
 {
 	if ((s)->suspended) {
 		if ((f)->f_flags & O_NONBLOCK)
-			return DSP_EDPMSUSPEND;
+			return -EPERM;
 		wait_event_interruptible((s)->suspend_wq, (s)->suspended == 0);
 	}
 	return 0;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 21/40] DSPBRIDGE: err code replace DSP_EDYNLOAD with EILSEQ
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (18 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 20/40] DSPBRIDGE: err code replace DSP_EDPMSUSPEND with EPERM Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 22/40] DSPBRIDGE: err code replace DSP_EBADSEGID with EBADR Omar Ramirez Luna
                   ` (18 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace DSP_EDYNLOAD with EILSEQ

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/dblldefs.h |    2 +-
 arch/arm/plat-omap/include/dspbridge/nldrdefs.h |    2 +-
 drivers/dsp/bridge/pmgr/dbll.c                  |    8 ++++----
 drivers/dsp/bridge/rmgr/nldr.c                  |    4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dblldefs.h b/arch/arm/plat-omap/include/dspbridge/dblldefs.h
index 0e7e3c4..18a862f 100644
--- a/arch/arm/plat-omap/include/dspbridge/dblldefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dblldefs.h
@@ -339,7 +339,7 @@ typedef bool(*dbll_init_fxn) (void);
  *      0:        Success.
  *      -EBADF:     File read failed.
  *      DSP_EFWRITE:    Write to target failed.
- *      DSP_EDYNLOAD:   Failure in dynamic loader library.
+ *      -EILSEQ:   Failure in dynamic loader library.
  *  Requires:
  *      DBL initialized.
  *      Valid lib.
diff --git a/arch/arm/plat-omap/include/dspbridge/nldrdefs.h b/arch/arm/plat-omap/include/dspbridge/nldrdefs.h
index 008e12c..b93671b 100644
--- a/arch/arm/plat-omap/include/dspbridge/nldrdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/nldrdefs.h
@@ -249,7 +249,7 @@ typedef bool(*nldr_initfxn) (void);
  *      -ENOMEM:            Insufficient memory on GPP.
  *      DSP_EOVERLAYMEMORY:     Can't overlay phase because overlay memory
  *                              is already in use.
- *      DSP_EDYNLOAD:           Failure in dynamic loader library.
+ *      -EILSEQ:           Failure in dynamic loader library.
  *      DSP_EFWRITE:            Failed to write phase's code or date to target.
  *  Requires:
  *      nldr_init(void) called.
diff --git a/drivers/dsp/bridge/pmgr/dbll.c b/drivers/dsp/bridge/pmgr/dbll.c
index 7e126a7..6a01f56 100644
--- a/drivers/dsp/bridge/pmgr/dbll.c
+++ b/drivers/dsp/bridge/pmgr/dbll.c
@@ -544,12 +544,12 @@ dsp_status dbll_load(struct dbll_library_obj *lib, dbll_flags flags,
 						  &zl_lib->dload_mod_obj);
 
 			if (err != 0) {
-				status = DSP_EDYNLOAD;
+				status = -EILSEQ;
 			} else if (redefined_symbol) {
 				zl_lib->load_ref++;
 				dbll_unload(zl_lib, (struct dbll_attrs *)attrs);
 				redefined_symbol = false;
-				status = DSP_EDYNLOAD;
+				status = -EILSEQ;
 			} else {
 				*pEntry = zl_lib->entry;
 			}
@@ -684,7 +684,7 @@ dsp_status dbll_open(struct dbll_tar_obj *target, char *file, dbll_flags flags,
 					  &zl_lib->init.dl_init, 0,
 					  &zl_lib->dload_mod_obj);
 		if (err != 0) {
-			status = DSP_EDYNLOAD;
+			status = -EILSEQ;
 		} else {
 			/* Now that we have the symbol table, we can unload */
 			err = dynamic_unload_module(zl_lib->dload_mod_obj,
@@ -692,7 +692,7 @@ dsp_status dbll_open(struct dbll_tar_obj *target, char *file, dbll_flags flags,
 						    &zl_lib->allocate.dl_alloc,
 						    &zl_lib->init.dl_init);
 			if (err != 0)
-				status = DSP_EDYNLOAD;
+				status = -EILSEQ;
 
 			zl_lib->dload_mod_obj = NULL;
 		}
diff --git a/drivers/dsp/bridge/rmgr/nldr.c b/drivers/dsp/bridge/rmgr/nldr.c
index 8257a83..b6044e0 100644
--- a/drivers/dsp/bridge/rmgr/nldr.c
+++ b/drivers/dsp/bridge/rmgr/nldr.c
@@ -1314,7 +1314,7 @@ static dsp_status load_lib(struct nldr_nodeobject *nldr_node_obj,
 			if (root->lib == lib_path[i]) {
 				/* This condition could be checked by a
 				 * tool at build time. */
-				status = DSP_EDYNLOAD;
+				status = -EILSEQ;
 			}
 		}
 	}
@@ -1376,7 +1376,7 @@ static dsp_status load_lib(struct nldr_nodeobject *nldr_node_obj,
 			if (!rootPersistent && persistent_dep_libs[i] &&
 			    *nldr_node_obj->pf_phase_split) {
 				if ((nldr_node_obj->pers_libs) > MAXLIBS) {
-					status = DSP_EDYNLOAD;
+					status = -EILSEQ;
 					break;
 				}
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 22/40] DSPBRIDGE: err code replace DSP_EBADSEGID with EBADR
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (19 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 21/40] DSPBRIDGE: err code replace DSP_EDYNLOAD with EILSEQ Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 23/40] DSPBRIDGE: err code replace DSP_EOVERLAYMEMORY with ENXIO Omar Ramirez Luna
                   ` (17 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace DSP_EBADSEGID with EBADR

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 drivers/dsp/bridge/rmgr/node.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c
index 159ea2b..1c7742a 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -731,7 +731,7 @@ DBAPI node_alloc_msg_buf(struct node_object *hnode, u32 usize,
 	if (DSP_SUCCEEDED(status) && (!va_flag)) {
 		if (pattr->segment_id != 1) {
 			/* Node supports single SM segment only. */
-			status = DSP_EBADSEGID;
+			status = -EBADR;
 		}
 		/*  Arbitrary SM buffer alignment not supported for host side
 		 *  allocs, but guaranteed for the following alignment
@@ -1695,7 +1695,7 @@ dsp_status node_free_msg_buf(struct node_object *hnode, IN u8 * pbuffer,
 			}
 			/* Node supports single SM segment only */
 			if (pattr->segment_id != 1)
-				status = DSP_EBADSEGID;
+				status = -EBADR;
 
 			/* pbuffer is clients Va. */
 			status = cmm_xlator_free_buf(pnode->xlator, pbuffer);
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 23/40] DSPBRIDGE: err code replace DSP_EOVERLAYMEMORY with ENXIO
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (20 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 22/40] DSPBRIDGE: err code replace DSP_EBADSEGID with EBADR Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 24/40] DSPBRIDGE: err code replace DSP_ENOSECT " Omar Ramirez Luna
                   ` (16 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace DSP_EOVERLAYMEMORY with ENXIO

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/nldrdefs.h |    2 +-
 arch/arm/plat-omap/include/dspbridge/rmm.h      |    2 +-
 drivers/dsp/bridge/rmgr/rmm.c                   |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/nldrdefs.h b/arch/arm/plat-omap/include/dspbridge/nldrdefs.h
index b93671b..e5108b4 100644
--- a/arch/arm/plat-omap/include/dspbridge/nldrdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/nldrdefs.h
@@ -247,7 +247,7 @@ typedef bool(*nldr_initfxn) (void);
  *  Returns:
  *      0:                Success.
  *      -ENOMEM:            Insufficient memory on GPP.
- *      DSP_EOVERLAYMEMORY:     Can't overlay phase because overlay memory
+ *      -ENXIO:     Can't overlay phase because overlay memory
  *                              is already in use.
  *      -EILSEQ:           Failure in dynamic loader library.
  *      DSP_EFWRITE:            Failed to write phase's code or date to target.
diff --git a/arch/arm/plat-omap/include/dspbridge/rmm.h b/arch/arm/plat-omap/include/dspbridge/rmm.h
index 42da289..8958a50 100644
--- a/arch/arm/plat-omap/include/dspbridge/rmm.h
+++ b/arch/arm/plat-omap/include/dspbridge/rmm.h
@@ -63,7 +63,7 @@ struct rmm_target_obj;
  *  Returns:
  *      0:                Success.
  *      -ENOMEM:            Memory allocation on GPP failed.
- *      DSP_EOVERLAYMEMORY:     Cannot "allocate" overlay memory because it's
+ *      -ENXIO:     Cannot "allocate" overlay memory because it's
  *                              already in use.
  *  Requires:
  *      RMM initialized.
diff --git a/drivers/dsp/bridge/rmgr/rmm.c b/drivers/dsp/bridge/rmgr/rmm.c
index 64d8c56..efefb65 100644
--- a/drivers/dsp/bridge/rmgr/rmm.c
+++ b/drivers/dsp/bridge/rmgr/rmm.c
@@ -130,7 +130,7 @@ dsp_status rmm_alloc(struct rmm_target_obj *target, u32 segid, u32 size,
 							   (prev_sect->addr +
 							    prev_sect->size >
 							    addr))) {
-				status = DSP_EOVERLAYMEMORY;
+				status = -ENXIO;
 			}
 			break;
 		}
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 24/40] DSPBRIDGE: err code replace DSP_ENOSECT with ENXIO
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (21 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 23/40] DSPBRIDGE: err code replace DSP_EOVERLAYMEMORY with ENXIO Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 25/40] DSPBRIDGE: err code replace DSP_ETRANSLATE with ESRCH Omar Ramirez Luna
                   ` (15 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace DSP_ENOSECT with ENXIO

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/dblldefs.h |    8 ++++----
 drivers/dsp/bridge/pmgr/dbll.c                  |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dblldefs.h b/arch/arm/plat-omap/include/dspbridge/dblldefs.h
index 18a862f..e780e87 100644
--- a/arch/arm/plat-omap/include/dspbridge/dblldefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dblldefs.h
@@ -299,7 +299,7 @@ typedef bool(*dbll_get_c_addr_fxn) (struct dbll_library_obj *lib, char *name,
  *      psize           - Location to store section size on output.
  *  Returns:
  *      0:        Success.
- *      DSP_ENOSECT:    Section not found.
+ *      -ENXIO:    Section not found.
  *  Requires:
  *      DBL initialized.
  *      Valid lib.
@@ -359,7 +359,7 @@ typedef dsp_status(*dbll_load_fxn) (struct dbll_library_obj *lib,
  *      attrs           - Contains write function and handle to pass to it.
  *  Returns:
  *      0:        Success.
- *      DSP_ENOSECT:    Section not found.
+ *      -ENXIO:    Section not found.
  *      DSP_EFWRITE:    Write function failed.
  *      -ENOSYS:   Function not implemented.
  *  Requires:
@@ -412,7 +412,7 @@ typedef dsp_status(*dbll_open_fxn) (struct dbll_tar_obj *target, char *file,
  *      size            - Buffer size
  *  Returns:
  *      0:        Success.
- *      DSP_ENOSECT:    Named section does not exists.
+ *      -ENXIO:    Named section does not exists.
  *  Requires:
  *      DBL initialized.
  *      Valid lib.
@@ -465,7 +465,7 @@ typedef void (*dbll_unload_fxn) (struct dbll_library_obj *library,
  *      attrs           - Contains free() function and handle to pass to it.
  *  Returns:
  *      0:        Success.
- *      DSP_ENOSECT:    Named section not found.
+ *      -ENXIO:    Named section not found.
  *      -ENOSYS
  *  Requires:
  *      DBL initialized.
diff --git a/drivers/dsp/bridge/pmgr/dbll.c b/drivers/dsp/bridge/pmgr/dbll.c
index 6a01f56..8e76bf6 100644
--- a/drivers/dsp/bridge/pmgr/dbll.c
+++ b/drivers/dsp/bridge/pmgr/dbll.c
@@ -419,7 +419,7 @@ dsp_status dbll_get_sect(struct dbll_library_obj *lib, char *name, u32 *paddr,
 			/* Align size */
 			*psize = DOFF_ALIGN(*psize);
 		} else {
-			status = DSP_ENOSECT;
+			status = -ENXIO;
 		}
 	}
 	if (opened_doff) {
@@ -764,7 +764,7 @@ dsp_status dbll_read_sect(struct dbll_library_obj *lib, char *name,
 
 	byte_size = 1;
 	if (!dload_get_section_info(zl_lib->desc, name, &sect)) {
-		status = DSP_ENOSECT;
+		status = -ENXIO;
 		goto func_cont;
 	}
 	/*
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 25/40] DSPBRIDGE: err code replace DSP_ETRANSLATE with ESRCH
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (22 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 24/40] DSPBRIDGE: err code replace DSP_ENOSECT " Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 26/40] DSPBRIDGE: err code replace DSP_ENOTFOUND with ENOENT Omar Ramirez Luna
                   ` (14 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace DSP_ETRANSLATE with ESRCH

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 drivers/dsp/bridge/rmgr/node.c |    6 +++---
 drivers/dsp/bridge/rmgr/strm.c |    8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c
index 1c7742a..20bfe18 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -1861,10 +1861,10 @@ dsp_status node_get_message(struct node_object *hnode,
 			pmsg->dw_arg1 = (u32) tmp_buf;
 			pmsg->dw_arg2 *= hnode->hnode_mgr->udsp_word_size;
 		} else {
-			status = DSP_ETRANSLATE;
+			status = -ESRCH;
 		}
 	} else {
-		status = DSP_ETRANSLATE;
+		status = -ESRCH;
 	}
 func_end:
 	dev_dbg(bridge, "%s: hnode: %p pmsg: %p utimeout: 0x%x\n", __func__,
@@ -2170,7 +2170,7 @@ dsp_status node_put_message(struct node_object *hnode,
 				status = -EPERM;	/* bad DSPWordSize */
 			}
 		} else {	/* failed to translate buffer address */
-			status = DSP_ETRANSLATE;
+			status = -ESRCH;
 		}
 	}
 	if (DSP_SUCCEEDED(status)) {
diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c
index d560503..094b134 100644
--- a/drivers/dsp/bridge/rmgr/strm.c
+++ b/drivers/dsp/bridge/rmgr/strm.c
@@ -440,7 +440,7 @@ dsp_status strm_issue(struct strm_object *hStrm, IN u8 *pbuf, u32 ul_bytes,
 						       (void *)pbuf,
 						       CMM_VA2DSPPA);
 			if (tmp_buf == NULL)
-				status = DSP_ETRANSLATE;
+				status = -ESRCH;
 
 		}
 		if (DSP_SUCCEEDED(status)) {
@@ -676,7 +676,7 @@ dsp_status strm_reclaim(struct strm_object *hStrm, OUT u8 ** buf_ptr,
 							       CMM_PA2VA);
 			}
 			if (tmp_buf == NULL)
-				status = DSP_ETRANSLATE;
+				status = -ESRCH;
 
 			chnl_ioc_obj.pbuf = tmp_buf;
 		}
@@ -685,7 +685,7 @@ dsp_status strm_reclaim(struct strm_object *hStrm, OUT u8 ** buf_ptr,
 func_end:
 	/* ensure we return a documented return code */
 	DBC_ENSURE(DSP_SUCCEEDED(status) || status == -EFAULT ||
-		   status == -ETIME || status == DSP_ETRANSLATE ||
+		   status == -ETIME || status == -ESRCH ||
 		   status == -EPERM);
 
 	dev_dbg(bridge, "%s: hStrm: %p buf_ptr: %p pulBytes: %p pdw_arg: %p "
@@ -730,7 +730,7 @@ dsp_status strm_register_notify(struct strm_object *hStrm, u32 event_mask,
 	}
 	/* ensure we return a documented return code */
 	DBC_ENSURE(DSP_SUCCEEDED(status) || status == -EFAULT ||
-		   status == -ETIME || status == DSP_ETRANSLATE ||
+		   status == -ETIME || status == -ESRCH ||
 		   status == -ENOSYS || status == -EPERM);
 	return status;
 }
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 26/40] DSPBRIDGE: err code replace DSP_ENOTFOUND with ENOENT
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (23 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 25/40] DSPBRIDGE: err code replace DSP_ETRANSLATE with ESRCH Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 27/40] DSPBRIDGE: err code replace DSP_EDCDNOAUTOREGISTER with EACCES Omar Ramirez Luna
                   ` (13 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace DSP_ENOTFOUND with ENOENT

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/proc.h |    6 +++---
 drivers/dsp/bridge/pmgr/dmm.c               |    6 +++---
 drivers/dsp/bridge/rmgr/drv.c               |    8 ++++----
 drivers/dsp/bridge/rmgr/nldr.c              |    2 +-
 drivers/dsp/bridge/rmgr/node.c              |    4 ++--
 drivers/dsp/bridge/rmgr/strm.c              |    6 +++---
 6 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/proc.h b/arch/arm/plat-omap/include/dspbridge/proc.h
index 11595d6..9311f72 100644
--- a/arch/arm/plat-omap/include/dspbridge/proc.h
+++ b/arch/arm/plat-omap/include/dspbridge/proc.h
@@ -515,7 +515,7 @@ extern dsp_status proc_invalidate_memory(void *hprocessor,
  *      -EFAULT     :   Invalid processor handle.
  *      -EPERM       :   General failure.
  *      -ENOMEM     :   MPU side memory allocation error.
- *      DSP_ENOTFOUND   :   Cannot find a reserved region starting with this
+ *      -ENOENT   :   Cannot find a reserved region starting with this
  *		      :   address.
  *  Requires:
  *      pmpu_addr is not NULL
@@ -566,7 +566,7 @@ extern dsp_status proc_reserve_memory(void *hprocessor,
  *      0	 :   Success.
  *      -EFAULT     :   Invalid processor handle.
  *      -EPERM       :   General failure.
- *      DSP_ENOTFOUND   :   Cannot find a mapped region starting with this
+ *      -ENOENT   :   Cannot find a mapped region starting with this
  *		      :   address.
  *  Requires:
  *      map_addr is not NULL
@@ -588,7 +588,7 @@ extern dsp_status proc_un_map(void *hprocessor, void *map_addr,
  *      0	 :   Success.
  *      -EFAULT     :   Invalid processor handle.
  *      -EPERM       :   General failure.
- *      DSP_ENOTFOUND   :   Cannot find a reserved region starting with this
+ *      -ENOENT   :   Cannot find a reserved region starting with this
  *		      :   address.
  *  Requires:
  *      prsv_addr is not NULL
diff --git a/drivers/dsp/bridge/pmgr/dmm.c b/drivers/dsp/bridge/pmgr/dmm.c
index 5e8b770..bf2c0e1 100644
--- a/drivers/dsp/bridge/pmgr/dmm.c
+++ b/drivers/dsp/bridge/pmgr/dmm.c
@@ -261,7 +261,7 @@ dsp_status dmm_map_memory(struct dmm_object *dmm_mgr, u32 addr, u32 size)
 		chunk->mapped = true;
 		chunk->mapped_size = (size / PG_SIZE4K);
 	} else
-		status = DSP_ENOTFOUND;
+		status = -ENOENT;
 	spin_unlock(&dmm_obj->dmm_lock);
 
 	dev_dbg(bridge, "%s dmm_mgr %p, addr %x, size %x\n\tstatus %x, "
@@ -336,7 +336,7 @@ dsp_status dmm_un_map_memory(struct dmm_object *dmm_mgr, u32 addr, u32 *psize)
 	spin_lock(&dmm_obj->dmm_lock);
 	chunk = get_mapped_region(addr);
 	if (chunk == NULL)
-		status = DSP_ENOTFOUND;
+		status = -ENOENT;
 
 	if (DSP_SUCCEEDED(status)) {
 		/* Unmap the region */
@@ -370,7 +370,7 @@ dsp_status dmm_un_reserve_memory(struct dmm_object *dmm_mgr, u32 rsv_addr)
 	/* Find the chunk containing the reserved address */
 	chunk = get_mapped_region(rsv_addr);
 	if (chunk == NULL)
-		status = DSP_ENOTFOUND;
+		status = -ENOENT;
 
 	if (DSP_SUCCEEDED(status)) {
 		/* Free all the mapped pages for this reserved region */
diff --git a/drivers/dsp/bridge/rmgr/drv.c b/drivers/dsp/bridge/rmgr/drv.c
index 4869e2c..a92b0d7 100644
--- a/drivers/dsp/bridge/rmgr/drv.c
+++ b/drivers/dsp/bridge/rmgr/drv.c
@@ -131,7 +131,7 @@ dsp_status drv_remove_node_res_element(void *hNodeRes, void *hPCtxt)
 		while (temp_node && temp_node->next != node_res_obj)
 			temp_node = temp_node->next;
 		if (!temp_node)
-			status = DSP_ENOTFOUND;
+			status = -ENOENT;
 		else
 			temp_node->next = node_res_obj->next;
 	}
@@ -267,7 +267,7 @@ dsp_status drv_get_node_res_element(void *hnode, void *hNodeRes,
 	if (temp_node != NULL)
 		*node_res = temp_node;
 	else
-		status = DSP_ENOTFOUND;
+		status = -ENOENT;
 
 	return status;
 }
@@ -328,7 +328,7 @@ dsp_status drv_proc_remove_strm_res_element(void *hstrm_res, void *hPCtxt)
 		while (temp_strm_res && temp_strm_res->next != pstrm_res)
 			temp_strm_res = temp_strm_res->next;
 		if (temp_strm_res == NULL)
-			status = DSP_ENOTFOUND;
+			status = -ENOENT;
 		else
 			temp_strm_res->next = pstrm_res->next;
 	}
@@ -405,7 +405,7 @@ dsp_status drv_get_strm_res_element(void *hStrm, void *hstrm_res,
 	if (temp_strm != NULL)
 		*strm_res = temp_strm;
 	else
-		status = DSP_ENOTFOUND;
+		status = -ENOENT;
 
 	return status;
 }
diff --git a/drivers/dsp/bridge/rmgr/nldr.c b/drivers/dsp/bridge/rmgr/nldr.c
index b6044e0..d2cd465 100644
--- a/drivers/dsp/bridge/rmgr/nldr.c
+++ b/drivers/dsp/bridge/rmgr/nldr.c
@@ -1492,7 +1492,7 @@ static dsp_status load_ovly(struct nldr_nodeobject *nldr_node_obj,
 	DBC_ASSERT(i < nldr_obj->ovly_nodes);
 
 	if (!po_node) {
-		status = DSP_ENOTFOUND;
+		status = -ENOENT;
 		goto func_end;
 	}
 
diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c
index 20bfe18..bb021dd 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -1573,7 +1573,7 @@ func_cont1:
 	/*  Free host-side resources allocated by node_create()
 	 *  delete_node() fails if SM buffers not freed by client! */
 	if (drv_get_node_res_element(hnode, &node_res, pr_ctxt) !=
-	    DSP_ENOTFOUND)
+	    -ENOENT)
 		drv_proc_node_update_status(node_res, false);
 	delete_node(hnode, pr_ctxt);
 
@@ -3200,7 +3200,7 @@ dsp_status node_find_addr(struct node_mgr *node_mgr, u32 sym_addr,
 		u32 offset_range, void *sym_addr_output, char *sym_name)
 {
 	struct node_object *node_obj;
-	dsp_status status = DSP_ENOTFOUND;
+	dsp_status status = -ENOENT;
 	u32 n;
 
 	pr_debug("%s(0x%x, 0x%x, 0x%x, 0x%x,  %s)\n", __func__,
diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c
index 094b134..061175e 100644
--- a/drivers/dsp/bridge/rmgr/strm.c
+++ b/drivers/dsp/bridge/rmgr/strm.c
@@ -139,7 +139,7 @@ dsp_status strm_allocate_buffer(struct strm_object *hStrm, u32 usize,
 		goto func_end;
 
 	if (drv_get_strm_res_element(hStrm, &hstrm_res, pr_ctxt) !=
-	    DSP_ENOTFOUND)
+	    -ENOENT)
 		drv_proc_update_strm_res(num_bufs, hstrm_res);
 
 func_end:
@@ -183,7 +183,7 @@ dsp_status strm_close(struct strm_object *hStrm,
 		goto func_end;
 
 	if (drv_get_strm_res_element(hStrm, &hstrm_res, pr_ctxt) !=
-	    DSP_ENOTFOUND)
+	    -ENOENT)
 		drv_proc_remove_strm_res_element(hstrm_res, pr_ctxt);
 func_end:
 	DBC_ENSURE(status == 0 || status == -EFAULT ||
@@ -297,7 +297,7 @@ dsp_status strm_free_buffer(struct strm_object *hStrm, u8 ** ap_buffer,
 		}
 	}
 	if (drv_get_strm_res_element(hStrm, hstrm_res, pr_ctxt) !=
-	    DSP_ENOTFOUND)
+	    -ENOENT)
 		drv_proc_update_strm_res(num_bufs - i, hstrm_res);
 
 	return status;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 27/40] DSPBRIDGE: err code replace DSP_EDCDNOAUTOREGISTER with EACCES
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (24 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 26/40] DSPBRIDGE: err code replace DSP_ENOTFOUND with ENOENT Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 28/40] DSPBRIDGE: err code replace DSP_EDCDLOADBASE " Omar Ramirez Luna
                   ` (12 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace DSP_EDCDNOAUTOREGISTER with EACCES

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/dbdcd.h |    6 +++---
 drivers/dsp/bridge/rmgr/dbdcd.c              |    2 +-
 drivers/dsp/bridge/rmgr/proc.c               |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dbdcd.h b/arch/arm/plat-omap/include/dspbridge/dbdcd.h
index f7e4e79..17fb57a 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdcd.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdcd.h
@@ -34,7 +34,7 @@
  *                              objects to be registered.
  *  Returns:
  *      0:                Success.
- *      DSP_EDCDNOAUTOREGISTER: Unable to find auto-registration section.
+ *      -EACCES: Unable to find auto-registration section.
  *      DSP_EDCDREADSECT:       Unable to read object code section.
  *      DSP_EDCDLOADBASE:       Unable to load code base.
  *      -EFAULT:            Invalid DCD_HMANAGER handle..
@@ -60,7 +60,7 @@ extern dsp_status dcd_auto_register(IN struct dcd_manager *hdcd_mgr,
  *                              DCD objects to be unregistered.
  *  Returns:
  *      0:                Success.
- *      DSP_EDCDNOAUTOREGISTER: Unable to find auto-registration section.
+ *      -EACCES: Unable to find auto-registration section.
  *      DSP_EDCDREADSECT:       Unable to read object code section.
  *      DSP_EDCDLOADBASE:       Unable to load code base.
  *      -EFAULT:            Invalid DCD_HMANAGER handle..
@@ -289,7 +289,7 @@ extern dsp_status dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,
  *      handle:                 Handle to pass to callback.
  *  Returns:
  *      0:                Success.
- *      DSP_EDCDNOAUTOREGISTER: Unable to find .dcd_register section.
+ *      -EACCES: Unable to find .dcd_register section.
  *      DSP_EDCDREADSECT:       Unable to read object code section.
  *      DSP_EDCDLOADBASE:       Unable to load code base.
  *      -EFAULT:            Invalid DCD_HMANAGER handle..
diff --git a/drivers/dsp/bridge/rmgr/dbdcd.c b/drivers/dsp/bridge/rmgr/dbdcd.c
index 1731334..dcca612 100644
--- a/drivers/dsp/bridge/rmgr/dbdcd.c
+++ b/drivers/dsp/bridge/rmgr/dbdcd.c
@@ -567,7 +567,7 @@ dsp_status dcd_get_objects(IN struct dcd_manager *hdcd_mgr,
 	/* Get DCD_RESIGER_SECTION section information. */
 	status = cod_get_section(lib, DCD_REGISTER_SECTION, &ul_addr, &ul_len);
 	if (DSP_FAILED(status) || !(ul_len > 0)) {
-		status = DSP_EDCDNOAUTOREGISTER;
+		status = -EACCES;
 		goto func_cont;
 	}
 
diff --git a/drivers/dsp/bridge/rmgr/proc.c b/drivers/dsp/bridge/rmgr/proc.c
index 1f46f66..1afdff0 100644
--- a/drivers/dsp/bridge/rmgr/proc.c
+++ b/drivers/dsp/bridge/rmgr/proc.c
@@ -907,13 +907,13 @@ dsp_status proc_load(void *hprocessor, IN CONST s32 argc_index,
 		if (DSP_SUCCEEDED(status)) {
 			/*  Auto register nodes in specified COFF
 			 *  file.  If registration did not fail,
-			 *  (status = 0 or DSP_EDCDNOAUTOREGISTER)
+			 *  (status = 0 or -EACCES)
 			 *  save the name of the COFF file for
 			 *  de-registration in the future. */
 			status =
 			    dcd_auto_register(hdcd_handle,
 					      (char *)user_args[0]);
-			if (status == DSP_EDCDNOAUTOREGISTER)
+			if (status == -EACCES)
 				status = 0;
 
 			if (DSP_FAILED(status)) {
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 28/40] DSPBRIDGE: err code replace DSP_EDCDLOADBASE with EACCES
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (25 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 27/40] DSPBRIDGE: err code replace DSP_EDCDNOAUTOREGISTER with EACCES Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 29/40] DSPBRIDGE: err code replace DSP_EDCDGETSECT " Omar Ramirez Luna
                   ` (11 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace DSP_EDCDLOADBASE with EACCES

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/dbdcd.h |    8 ++++----
 drivers/dsp/bridge/rmgr/dbdcd.c              |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dbdcd.h b/arch/arm/plat-omap/include/dspbridge/dbdcd.h
index 17fb57a..b8daea9 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdcd.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdcd.h
@@ -36,7 +36,7 @@
  *      0:                Success.
  *      -EACCES: Unable to find auto-registration section.
  *      DSP_EDCDREADSECT:       Unable to read object code section.
- *      DSP_EDCDLOADBASE:       Unable to load code base.
+ *      -EACCES:       Unable to load code base.
  *      -EFAULT:            Invalid DCD_HMANAGER handle..
  *  Requires:
  *      DCD initialized.
@@ -62,7 +62,7 @@ extern dsp_status dcd_auto_register(IN struct dcd_manager *hdcd_mgr,
  *      0:                Success.
  *      -EACCES: Unable to find auto-registration section.
  *      DSP_EDCDREADSECT:       Unable to read object code section.
- *      DSP_EDCDLOADBASE:       Unable to load code base.
+ *      -EACCES:       Unable to load code base.
  *      -EFAULT:            Invalid DCD_HMANAGER handle..
  *  Requires:
  *      DCD initialized.
@@ -258,7 +258,7 @@ extern dsp_status dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
  *      DSP_EDCDPARSESECT:  Unable to parse content of object code section.
  *      DSP_EDCDREADSECT:   Unable to read object code section.
  *      DSP_EDCDGETSECT:    Unable to access object code section.
- *      DSP_EDCDLOADBASE:   Unable to load code base.
+ *      -EACCES:   Unable to load code base.
  *      -EPERM:          General failure.
  *      -EFAULT:        Invalid DCD_HMANAGER handle.
  *  Requires:
@@ -291,7 +291,7 @@ extern dsp_status dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,
  *      0:                Success.
  *      -EACCES: Unable to find .dcd_register section.
  *      DSP_EDCDREADSECT:       Unable to read object code section.
- *      DSP_EDCDLOADBASE:       Unable to load code base.
+ *      -EACCES:       Unable to load code base.
  *      -EFAULT:            Invalid DCD_HMANAGER handle..
  *  Requires:
  *      DCD initialized.
diff --git a/drivers/dsp/bridge/rmgr/dbdcd.c b/drivers/dsp/bridge/rmgr/dbdcd.c
index dcca612..a2cda6b 100644
--- a/drivers/dsp/bridge/rmgr/dbdcd.c
+++ b/drivers/dsp/bridge/rmgr/dbdcd.c
@@ -467,7 +467,7 @@ dsp_status dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,
 	status = cod_open(dcd_mgr_obj->cod_mgr, dcd_key->path,
 							COD_NOLOAD, &lib);
 	if (DSP_FAILED(status)) {
-		status = DSP_EDCDLOADBASE;
+		status = -EACCES;
 		goto func_end;
 	}
 
@@ -560,7 +560,7 @@ dsp_status dcd_get_objects(IN struct dcd_manager *hdcd_mgr,
 	/* Open DSP coff file, don't load symbols. */
 	status = cod_open(dcd_mgr_obj->cod_mgr, pszCoffPath, COD_NOLOAD, &lib);
 	if (DSP_FAILED(status)) {
-		status = DSP_EDCDLOADBASE;
+		status = -EACCES;
 		goto func_cont;
 	}
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 29/40] DSPBRIDGE: err code replace DSP_EDCDGETSECT with EACCES
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (26 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 28/40] DSPBRIDGE: err code replace DSP_EDCDLOADBASE " Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 30/40] DSPBRIDGE: err code replace DSP_EDCDPARSESECT " Omar Ramirez Luna
                   ` (10 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace DSP_EDCDGETSECT with EACCES

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/dbdcd.h |    2 +-
 drivers/dsp/bridge/rmgr/dbdcd.c              |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dbdcd.h b/arch/arm/plat-omap/include/dspbridge/dbdcd.h
index b8daea9..e615c8a 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdcd.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdcd.h
@@ -257,7 +257,7 @@ extern dsp_status dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
  *      0: Success.
  *      DSP_EDCDPARSESECT:  Unable to parse content of object code section.
  *      DSP_EDCDREADSECT:   Unable to read object code section.
- *      DSP_EDCDGETSECT:    Unable to access object code section.
+ *      -EACCES:    Unable to access object code section.
  *      -EACCES:   Unable to load code base.
  *      -EPERM:          General failure.
  *      -EFAULT:        Invalid DCD_HMANAGER handle.
diff --git a/drivers/dsp/bridge/rmgr/dbdcd.c b/drivers/dsp/bridge/rmgr/dbdcd.c
index a2cda6b..a3d79ba 100644
--- a/drivers/dsp/bridge/rmgr/dbdcd.c
+++ b/drivers/dsp/bridge/rmgr/dbdcd.c
@@ -483,7 +483,7 @@ dsp_status dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,
 	/* Get section information. */
 	status = cod_get_section(lib, sz_sect_name, &ul_addr, &ul_len);
 	if (DSP_FAILED(status)) {
-		status = DSP_EDCDGETSECT;
+		status = -EACCES;
 		goto func_end;
 	}
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 30/40] DSPBRIDGE: err code replace DSP_EDCDPARSESECT with EACCES
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (27 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 29/40] DSPBRIDGE: err code replace DSP_EDCDGETSECT " Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 31/40] DSPBRIDGE: err code replace DSP_EDCDREADSECT " Omar Ramirez Luna
                   ` (9 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace DSP_EDCDPARSESECT with EACCES

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/dbdcd.h |    2 +-
 drivers/dsp/bridge/rmgr/dbdcd.c              |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dbdcd.h b/arch/arm/plat-omap/include/dspbridge/dbdcd.h
index e615c8a..2a43d6e 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdcd.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdcd.h
@@ -255,7 +255,7 @@ extern dsp_status dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
  *                          union of various possible DCD object types.
  *  Returns:
  *      0: Success.
- *      DSP_EDCDPARSESECT:  Unable to parse content of object code section.
+ *      -EACCES:  Unable to parse content of object code section.
  *      DSP_EDCDREADSECT:   Unable to read object code section.
  *      -EACCES:    Unable to access object code section.
  *      -EACCES:   Unable to load code base.
diff --git a/drivers/dsp/bridge/rmgr/dbdcd.c b/drivers/dsp/bridge/rmgr/dbdcd.c
index a3d79ba..5592033 100644
--- a/drivers/dsp/bridge/rmgr/dbdcd.c
+++ b/drivers/dsp/bridge/rmgr/dbdcd.c
@@ -516,7 +516,7 @@ dsp_status dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,
 		status =
 		    get_attrs_from_buf(psz_coff_buf, ul_len, obj_type, pObjDef);
 		if (DSP_FAILED(status))
-			status = DSP_EDCDPARSESECT;
+			status = -EACCES;
 	} else {
 		status = DSP_EDCDREADSECT;
 	}
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 31/40] DSPBRIDGE: err code replace DSP_EDCDREADSECT with EACCES
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (28 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 30/40] DSPBRIDGE: err code replace DSP_EDCDPARSESECT " Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 32/40] DSPBRIDGE: err code replace DSP_ESYMBOL with ESPIPE Omar Ramirez Luna
                   ` (8 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace DSP_EDCDREADSECT with EACCES

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/dbdcd.h |   12 ++++++------
 drivers/dsp/bridge/rmgr/dbdcd.c              |    4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dbdcd.h b/arch/arm/plat-omap/include/dspbridge/dbdcd.h
index 2a43d6e..a879d6b 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdcd.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdcd.h
@@ -35,7 +35,7 @@
  *  Returns:
  *      0:                Success.
  *      -EACCES: Unable to find auto-registration section.
- *      DSP_EDCDREADSECT:       Unable to read object code section.
+ *      -EACCES:       Unable to read object code section.
  *      -EACCES:       Unable to load code base.
  *      -EFAULT:            Invalid DCD_HMANAGER handle..
  *  Requires:
@@ -61,7 +61,7 @@ extern dsp_status dcd_auto_register(IN struct dcd_manager *hdcd_mgr,
  *  Returns:
  *      0:                Success.
  *      -EACCES: Unable to find auto-registration section.
- *      DSP_EDCDREADSECT:       Unable to read object code section.
+ *      -EACCES:       Unable to read object code section.
  *      -EACCES:       Unable to load code base.
  *      -EFAULT:            Invalid DCD_HMANAGER handle..
  *  Requires:
@@ -164,7 +164,7 @@ extern void dcd_exit(void);
  *  Returns:
  *      0: Success.
  *      -ENOMEM: Memory allocation failure.
- *      DSP_EDCDREADSECT: Failure to read section containing library info.
+ *      -EACCES: Failure to read section containing library info.
  *      -EPERM: General failure.
  *  Requires:
  *      DCD initialized.
@@ -194,7 +194,7 @@ extern dsp_status dcd_get_dep_libs(IN struct dcd_manager *hdcd_mgr,
  *  Returns:
  *      0: Success.
  *      -ENOMEM: Memory allocation failure.
- *      DSP_EDCDREADSECT: Failure to read section containing library info.
+ *      -EACCES: Failure to read section containing library info.
  *      -EPERM: General failure.
  *  Requires:
  *      DCD initialized.
@@ -256,7 +256,7 @@ extern dsp_status dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
  *  Returns:
  *      0: Success.
  *      -EACCES:  Unable to parse content of object code section.
- *      DSP_EDCDREADSECT:   Unable to read object code section.
+ *      -EACCES:   Unable to read object code section.
  *      -EACCES:    Unable to access object code section.
  *      -EACCES:   Unable to load code base.
  *      -EPERM:          General failure.
@@ -290,7 +290,7 @@ extern dsp_status dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,
  *  Returns:
  *      0:                Success.
  *      -EACCES: Unable to find .dcd_register section.
- *      DSP_EDCDREADSECT:       Unable to read object code section.
+ *      -EACCES:       Unable to read object code section.
  *      -EACCES:       Unable to load code base.
  *      -EFAULT:            Invalid DCD_HMANAGER handle..
  *  Requires:
diff --git a/drivers/dsp/bridge/rmgr/dbdcd.c b/drivers/dsp/bridge/rmgr/dbdcd.c
index 5592033..c9dba67 100644
--- a/drivers/dsp/bridge/rmgr/dbdcd.c
+++ b/drivers/dsp/bridge/rmgr/dbdcd.c
@@ -518,7 +518,7 @@ dsp_status dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,
 		if (DSP_FAILED(status))
 			status = -EACCES;
 	} else {
-		status = DSP_EDCDREADSECT;
+		status = -EACCES;
 	}
 
 	/* Free the previously allocated dynamic buffer. */
@@ -625,7 +625,7 @@ dsp_status dcd_get_objects(IN struct dcd_manager *hdcd_mgr,
 			}
 		}
 	} else {
-		status = DSP_EDCDREADSECT;
+		status = -EACCES;
 	}
 
 	/* Free the previously allocated dynamic buffer. */
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 32/40] DSPBRIDGE: err code replace DSP_ESYMBOL with ESPIPE
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (29 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 31/40] DSPBRIDGE: err code replace DSP_EDCDREADSECT " Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 33/40] DSPBRIDGE: err code replace DSP_EWRONGSTATE with EBADR Omar Ramirez Luna
                   ` (7 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace DSP_ESYMBOL with ESPIPE

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/nldrdefs.h |    2 +-
 arch/arm/plat-omap/include/dspbridge/node.h     |    8 ++++----
 drivers/dsp/bridge/rmgr/nldr.c                  |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/nldrdefs.h b/arch/arm/plat-omap/include/dspbridge/nldrdefs.h
index e5108b4..9ab99d3 100644
--- a/arch/arm/plat-omap/include/dspbridge/nldrdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/nldrdefs.h
@@ -214,7 +214,7 @@ typedef void (*nldr_freefxn) (struct nldr_nodeobject *nldr_node_obj);
  *      pulAddr:        Location to store function address.
  *  Returns:
  *      0:        Success.
- *      DSP_ESYMBOL:    Address of function not found.
+ *      -ESPIPE:    Address of function not found.
  *  Requires:
  *      nldr_init(void) called.
  *      Valid nldr_node_obj.
diff --git a/arch/arm/plat-omap/include/dspbridge/node.h b/arch/arm/plat-omap/include/dspbridge/node.h
index bcfc65c..2f76c04 100644
--- a/arch/arm/plat-omap/include/dspbridge/node.h
+++ b/arch/arm/plat-omap/include/dspbridge/node.h
@@ -41,7 +41,7 @@
  *      0:            Success.
  *      -ENOMEM:        Insufficient memory on GPP.
  *      -ENOKEY:          Node UUID has not been registered.
- *      DSP_ESYMBOL:        iAlg functions not found for a DAIS node.
+ *      -ESPIPE:        iAlg functions not found for a DAIS node.
  *      -EDOM:         attr_in != NULL and attr_in->prio out of
  *                          range.
  *      -EPERM:          A failure occured, unable to allocate node.
@@ -199,7 +199,7 @@ extern dsp_status node_connect(struct node_object *hNode1,
  *  Returns:
  *      0:            Success.
  *      -EFAULT:        Invalid hnode.
- *      DSP_ESYMBOL:        Create function not found in the COFF file.
+ *      -ESPIPE:        Create function not found in the COFF file.
  *      DSP_EWRONGSTATE:    Node is not in the NODE_ALLOCATED state.
  *      -ENOMEM:        Memory allocation failure on the DSP.
  *      DSP_ETASK:          Unable to create node's task or process on the DSP.
@@ -255,7 +255,7 @@ extern dsp_status node_create_mgr(OUT struct node_mgr **phNodeMgr,
  *      DSP_EDELETE:        A deletion failure occurred.
  *      DSP_EUSER1-16:      Node specific failure occurred on the DSP.
  *      -EPERM:          A failure occurred in deleting the node.
- *      DSP_ESYMBOL:        Delete function not found in the COFF file.
+ *      -ESPIPE:        Delete function not found in the COFF file.
  *  Requires:
  *      node_init(void) called.
  *  Ensures:
@@ -522,7 +522,7 @@ extern dsp_status node_register_notify(struct node_object *hnode,
  *      -ETIME:       A timeout occurred before the DSP responded.
  *      DSP_EWRONGSTSATE:   Node is not in NODE_PAUSED or NODE_CREATED state.
  *      -EPERM:          Unable to start or resume execution.
- *      DSP_ESYMBOL:        Execute function not found in the COFF file.
+ *      -ESPIPE:        Execute function not found in the COFF file.
  *  Requires:
  *      node_init(void) called.
  *  Ensures:
diff --git a/drivers/dsp/bridge/rmgr/nldr.c b/drivers/dsp/bridge/rmgr/nldr.c
index d2cd465..f5b7239 100644
--- a/drivers/dsp/bridge/rmgr/nldr.c
+++ b/drivers/dsp/bridge/rmgr/nldr.c
@@ -764,7 +764,7 @@ dsp_status nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
 	if (status1)
 		*pulAddr = dbll_sym->value;
 	else
-		status = DSP_ESYMBOL;
+		status = -ESPIPE;
 
 	return status;
 }
@@ -1992,7 +1992,7 @@ dsp_status nldr_find_addr(struct nldr_nodeobject *nldr_node, u32 sym_addr,
 	if (!status1) {
 		pr_debug("%s: Address 0x%x not found in range %d.\n",
 					__func__, sym_addr, offset_range);
-		status = DSP_ESYMBOL;
+		status = -ESPIPE;
 	}
 
 	return status;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 33/40] DSPBRIDGE: err code replace DSP_EWRONGSTATE with EBADR
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (30 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 32/40] DSPBRIDGE: err code replace DSP_ESYMBOL with ESPIPE Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 34/40] DSPBRIDGE: err code replace DSP_EPENDING with EPIPE Omar Ramirez Luna
                   ` (6 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace DSP_EWRONGSTATE with EBADR

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/node.h |   12 ++++++------
 arch/arm/plat-omap/include/dspbridge/proc.h |    6 +++---
 drivers/dsp/bridge/core/msg_sm.c            |    2 +-
 drivers/dsp/bridge/rmgr/node.c              |   18 +++++++++---------
 drivers/dsp/bridge/rmgr/proc.c              |    4 ++--
 5 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/node.h b/arch/arm/plat-omap/include/dspbridge/node.h
index 2f76c04..ed83faf 100644
--- a/arch/arm/plat-omap/include/dspbridge/node.h
+++ b/arch/arm/plat-omap/include/dspbridge/node.h
@@ -45,7 +45,7 @@
  *      -EDOM:         attr_in != NULL and attr_in->prio out of
  *                          range.
  *      -EPERM:          A failure occured, unable to allocate node.
- *      DSP_EWRONGSTATE:    Proccessor is not in the running state.
+ *      -EBADR:    Proccessor is not in the running state.
  *  Requires:
  *      node_init(void) called.
  *      hprocessor != NULL.
@@ -101,7 +101,7 @@ extern dsp_status node_alloc_msg_buf(struct node_object *hnode,
  *      -EFAULT:        Invalid hnode.
  *      -EDOM:         prio is out of range.
  *      -EPERM:      The specified node is not a task node.
- *      DSP_EWRONGSTATE:    Node is not in the NODE_ALLOCATED, NODE_PAUSED,
+ *      -EBADR:    Node is not in the NODE_ALLOCATED, NODE_PAUSED,
  *                          or NODE_RUNNING state.
  *      -ETIME:       A timeout occurred before the DSP responded.
  *      DSP_ERESTART:       A critical error has occurred and the DSP is
@@ -170,7 +170,7 @@ extern dsp_status node_close_orphans(struct node_mgr *hnode_mgr,
  *      -EINVAL:             A stream index parameter is invalid.
  *      -EISCONN:  A connection already exists for one of the
  *                              indices uStream1 or uStream2.
- *      DSP_EWRONGSTATE:        Either hNode1 or hNode2 is not in the
+ *      -EBADR:        Either hNode1 or hNode2 is not in the
  *                              NODE_ALLOCATED state.
  *      -ECONNREFUSED: No more connections available.
  *      -EPERM:              Attempt to make an illegal connection (eg,
@@ -200,7 +200,7 @@ extern dsp_status node_connect(struct node_object *hNode1,
  *      0:            Success.
  *      -EFAULT:        Invalid hnode.
  *      -ESPIPE:        Create function not found in the COFF file.
- *      DSP_EWRONGSTATE:    Node is not in the NODE_ALLOCATED state.
+ *      -EBADR:    Node is not in the NODE_ALLOCATED state.
  *      -ENOMEM:        Memory allocation failure on the DSP.
  *      DSP_ETASK:          Unable to create node's task or process on the DSP.
  *      DSP_ESTREAM:        Stream creation failure on the DSP.
@@ -469,7 +469,7 @@ extern dsp_status node_pause(struct node_object *hnode);
  *      -EFAULT:        Invalid hnode.
  *      -EPERM:      Messages can't be sent to this type of node.
  *      -ETIME:       Timeout occurred before message could be set.
- *      DSP_EWRONGSTATE:    Node is in invalid state for sending messages.
+ *      -EBADR:    Node is in invalid state for sending messages.
  *      -EPERM:          Unable to send message.
  *  Requires:
  *      node_init(void) called.
@@ -544,7 +544,7 @@ extern dsp_status node_run(struct node_object *hnode);
  *      -EFAULT:        Invalid hnode.
  *      -ETIME:       A timeout occurred before the DSP responded.
  *      -EPERM:      Type of node specified cannot be terminated.
- *      DSP_EWRONGSTATE:    Operation not valid for the current node state.
+ *      -EBADR:    Operation not valid for the current node state.
  *      -EPERM:          Unable to terminate the node.
  *  Requires:
  *      node_init(void) called.
diff --git a/arch/arm/plat-omap/include/dspbridge/proc.h b/arch/arm/plat-omap/include/dspbridge/proc.h
index 9311f72..561842e 100644
--- a/arch/arm/plat-omap/include/dspbridge/proc.h
+++ b/arch/arm/plat-omap/include/dspbridge/proc.h
@@ -172,7 +172,7 @@ extern dsp_status proc_enum_nodes(void *hprocessor,
  *  Returns:
  *      0     :       Success.
  *      -EFAULT :       Invalid processor handle.
- *      DSP_EWRONGSTATE:    The processor is not in the PROC_RUNNING state.
+ *      -EBADR:    The processor is not in the PROC_RUNNING state.
  *      -ETIME:       A timeout occured before the DSP responded to the
  *			  querry.
  *      DSP_ERESTART:       A Critical error has occured and the DSP is being
@@ -423,7 +423,7 @@ extern dsp_status proc_notify_all_clients(void *hProc, u32 uEvents);
  *  Returns:
  *      0     :       Success.
  *      -EFAULT :       Invalid processor handle.
- *      DSP_EWRONGSTATE:    Processor is not in PROC_LOADED state.
+ *      -EBADR:    Processor is not in PROC_LOADED state.
  *      -EPERM   :       Unable to start the processor.
  *  Requires:
  *      PROC Initialized.
@@ -445,7 +445,7 @@ extern dsp_status proc_start(void *hprocessor);
  *  Returns:
  *      0     :       Success.
  *      -EFAULT :       Invalid processor handle.
- *      DSP_EWRONGSTATE:    Processor is not in PROC_LOADED state.
+ *      -EBADR:    Processor is not in PROC_LOADED state.
  *      -EPERM   :       Unable to start the processor.
  *  Requires:
  *      PROC Initialized.
diff --git a/drivers/dsp/bridge/core/msg_sm.c b/drivers/dsp/bridge/core/msg_sm.c
index 152e110..7ac56b1 100644
--- a/drivers/dsp/bridge/core/msg_sm.c
+++ b/drivers/dsp/bridge/core/msg_sm.c
@@ -511,7 +511,7 @@ dsp_status bridge_msg_register_notify(struct msg_queue *msg_queue_obj,
 	}
 
 	if (notify_type != DSP_SIGNALEVENT) {
-		status = DSP_EWRONGSTATE;
+		status = -EBADR;
 		goto func_end;
 	}
 
diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c
index bb021dd..4d27445 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -801,7 +801,7 @@ dsp_status node_change_priority(struct node_object *hnode, s32 prio)
 		NODE_SET_PRIORITY(hnode, prio);
 	} else {
 		if (state != NODE_RUNNING) {
-			status = DSP_EWRONGSTATE;
+			status = -EBADR;
 			goto func_cont;
 		}
 		status = proc_get_processor_id(pnode->hprocessor, &proc_id);
@@ -917,10 +917,10 @@ dsp_status node_connect(struct node_object *hNode1, u32 uStream1,
 
 	/* Nodes must be in the allocated state */
 	if (node1_type != NODE_GPP && node_get_state(hNode1) != NODE_ALLOCATED)
-		status = DSP_EWRONGSTATE;
+		status = -EBADR;
 
 	if (node2_type != NODE_GPP && node_get_state(hNode2) != NODE_ALLOCATED)
-		status = DSP_EWRONGSTATE;
+		status = -EBADR;
 
 	if (DSP_SUCCEEDED(status)) {
 		/*  Check that stream indices for task and dais socket nodes
@@ -1183,7 +1183,7 @@ dsp_status node_create(struct node_object *hnode)
 
 	/* Check node state */
 	if (node_get_state(hnode) != NODE_ALLOCATED)
-		status = DSP_EWRONGSTATE;
+		status = -EBADR;
 
 	if (DSP_SUCCEEDED(status))
 		status = proc_get_processor_id(pnode->hprocessor, &proc_id);
@@ -1275,7 +1275,7 @@ func_cont2:
 		hnode_mgr->num_created++;
 		goto func_cont;
 	}
-	if (status != DSP_EWRONGSTATE) {
+	if (status != -EBADR) {
 		/* Put back in NODE_ALLOCATED state if error occurred */
 		NODE_SET_STATE(hnode, NODE_ALLOCATED);
 	}
@@ -2045,7 +2045,7 @@ dsp_status node_pause(struct node_object *hnode)
 		state = node_get_state(hnode);
 		/* Check node state */
 		if (state != NODE_RUNNING)
-			status = DSP_EWRONGSTATE;
+			status = -EBADR;
 
 		if (DSP_FAILED(status))
 			goto func_cont;
@@ -2139,7 +2139,7 @@ dsp_status node_put_message(struct node_object *hnode,
 		mutex_lock(&hnode_mgr->node_mgr_lock);
 		state = node_get_state(hnode);
 		if (state == NODE_TERMINATING || state == NODE_DONE)
-			status = DSP_EWRONGSTATE;
+			status = -EBADR;
 
 		/* end of sync_enter_cs */
 		mutex_unlock(&hnode_mgr->node_mgr_lock);
@@ -2290,7 +2290,7 @@ dsp_status node_run(struct node_object *hnode)
 
 	state = node_get_state(hnode);
 	if (state != NODE_CREATED && state != NODE_PAUSED)
-		status = DSP_EWRONGSTATE;
+		status = -EBADR;
 
 	if (DSP_SUCCEEDED(status))
 		status = proc_get_processor_id(pnode->hprocessor, &proc_id);
@@ -2400,7 +2400,7 @@ dsp_status node_terminate(struct node_object *hnode, OUT dsp_status *pstatus)
 		mutex_lock(&hnode_mgr->node_mgr_lock);
 		state = node_get_state(hnode);
 		if (state != NODE_RUNNING) {
-			status = DSP_EWRONGSTATE;
+			status = -EBADR;
 			/* Set the exit status if node terminated on
 			 * its own. */
 			if (state == NODE_DONE)
diff --git a/drivers/dsp/bridge/rmgr/proc.c b/drivers/dsp/bridge/rmgr/proc.c
index 1afdff0..78f06ad 100644
--- a/drivers/dsp/bridge/rmgr/proc.c
+++ b/drivers/dsp/bridge/rmgr/proc.c
@@ -1288,7 +1288,7 @@ dsp_status proc_start(void *hprocessor)
 	}
 	/* Call the bridge_brd_start */
 	if (p_proc_object->proc_state != PROC_LOADED) {
-		status = DSP_EWRONGSTATE;
+		status = -EBADR;
 		goto func_end;
 	}
 	status = dev_get_cod_mgr(p_proc_object->hdev_obj, &cod_mgr);
@@ -1375,7 +1375,7 @@ dsp_status proc_stop(void *hprocessor)
 		if ((status == -EINVAL) || (nodes_allocated > 0)) {
 			pr_err("%s: Can't stop device, active nodes = %d \n",
 			       __func__, nodes_allocated);
-			return DSP_EWRONGSTATE;
+			return -EBADR;
 		}
 	}
 	/* Call the bridge_brd_stop */
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 34/40] DSPBRIDGE: err code replace DSP_EPENDING with EPIPE
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (31 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 33/40] DSPBRIDGE: err code replace DSP_EWRONGSTATE with EBADR Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 35/40] DSPBRIDGE: err code replace DSP_ECHANGEDURINGENUM with EIDRM Omar Ramirez Luna
                   ` (5 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace DSP_EPENDING with EPIPE

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/strm.h |    2 +-
 drivers/dsp/bridge/rmgr/strm.c              |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/strm.h b/arch/arm/plat-omap/include/dspbridge/strm.h
index 97d657d..c4b1d91 100644
--- a/arch/arm/plat-omap/include/dspbridge/strm.h
+++ b/arch/arm/plat-omap/include/dspbridge/strm.h
@@ -59,7 +59,7 @@ extern dsp_status strm_allocate_buffer(struct strm_object *hStrm,
  *  Returns:
  *      0:        Success.
  *      -EFAULT:    Invalid hStrm.
- *      DSP_EPENDING:   Some data buffers issued to the stream have not
+ *      -EPIPE:   Some data buffers issued to the stream have not
  *                      been reclaimed.
  *      -EPERM:      Failure to close stream.
  *  Requires:
diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c
index 061175e..58ec979 100644
--- a/drivers/dsp/bridge/rmgr/strm.c
+++ b/drivers/dsp/bridge/rmgr/strm.c
@@ -166,7 +166,7 @@ dsp_status strm_close(struct strm_object *hStrm,
 		status = -EFAULT;
 	} else {
 		/* Have all buffers been reclaimed? If not, return
-		 * DSP_EPENDING */
+		 * -EPIPE */
 		intf_fxns = hStrm->strm_mgr_obj->intf_fxns;
 		status =
 		    (*intf_fxns->pfn_chnl_get_info) (hStrm->chnl_obj,
@@ -174,7 +174,7 @@ dsp_status strm_close(struct strm_object *hStrm,
 		DBC_ASSERT(DSP_SUCCEEDED(status));
 
 		if (chnl_info_obj.cio_cs > 0 || chnl_info_obj.cio_reqs > 0)
-			status = DSP_EPENDING;
+			status = -EPIPE;
 		else
 			status = delete_strm(hStrm);
 	}
@@ -187,7 +187,7 @@ dsp_status strm_close(struct strm_object *hStrm,
 		drv_proc_remove_strm_res_element(hstrm_res, pr_ctxt);
 func_end:
 	DBC_ENSURE(status == 0 || status == -EFAULT ||
-		   status == DSP_EPENDING || status == -EPERM);
+		   status == -EPIPE || status == -EPERM);
 
 	dev_dbg(bridge, "%s: hStrm: %p, status 0x%x\n", __func__,
 		hStrm, status);
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 35/40] DSPBRIDGE: err code replace DSP_ECHANGEDURINGENUM with EIDRM
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (32 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 34/40] DSPBRIDGE: err code replace DSP_EPENDING with EPIPE Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 36/40] DSPBRIDGE: remove custom errbase definitions Omar Ramirez Luna
                   ` (4 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Replace DSP_ECHANGEDURINGENUM with EIDRM

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/mgr.h |    2 +-
 drivers/dsp/bridge/rmgr/dbdcd.c            |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/mgr.h b/arch/arm/plat-omap/include/dspbridge/mgr.h
index 378afe4..942797d 100644
--- a/arch/arm/plat-omap/include/dspbridge/mgr.h
+++ b/arch/arm/plat-omap/include/dspbridge/mgr.h
@@ -104,7 +104,7 @@ extern dsp_status mgr_destroy(struct mgr_object *hmgr_obj);
  *      0:            Success.
  *      -EINVAL:    Parameter node_id is > than the number of nodes.
  *                          configutred in the system
- *      DSP_ECHANGEDURINGENUM:  During Enumeration there has been a change in
+ *      -EIDRM:  During Enumeration there has been a change in
  *                              the number of nodes configured or in the
  *                              the properties of the enumerated nodes.
  *      -EPERM:          Failed to querry the Node Data Base
diff --git a/drivers/dsp/bridge/rmgr/dbdcd.c b/drivers/dsp/bridge/rmgr/dbdcd.c
index c9dba67..d5b0bce 100644
--- a/drivers/dsp/bridge/rmgr/dbdcd.c
+++ b/drivers/dsp/bridge/rmgr/dbdcd.c
@@ -217,7 +217,7 @@ dsp_status dcd_enumerate_object(IN s32 cIndex, IN enum dsp_dcdobjtype obj_type,
 		 * than zero, then the current enum_refs must have been
 		 * incremented to greater than zero.
 		 */
-		status = DSP_ECHANGEDURINGENUM;
+		status = -EIDRM;
 	} else {
 		/*
 		 * Pre-determine final key length. It's length of DCD_REGKEY +
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 36/40] DSPBRIDGE: remove custom errbase definitions
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (33 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 35/40] DSPBRIDGE: err code replace DSP_ECHANGEDURINGENUM with EIDRM Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 37/40] DSPBRIDGE: cleanup for duplicated error codes Omar Ramirez Luna
                   ` (3 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

This are not used anymore, removing header file with
custom error codes.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |  177 ------------------------
 arch/arm/plat-omap/include/dspbridge/ntfy.h    |    1 -
 arch/arm/plat-omap/include/dspbridge/pwr.h     |    1 -
 arch/arm/plat-omap/include/dspbridge/sync.h    |    1 -
 drivers/dsp/bridge/core/chnl_sm.c              |    1 -
 drivers/dsp/bridge/core/dsp-clock.c            |    1 -
 drivers/dsp/bridge/core/io_sm.c                |    1 -
 drivers/dsp/bridge/core/mmu_fault.c            |    1 -
 drivers/dsp/bridge/core/msg_sm.c               |    1 -
 drivers/dsp/bridge/core/tiomap3430.c           |    1 -
 drivers/dsp/bridge/core/tiomap3430_pwr.c       |    1 -
 drivers/dsp/bridge/core/tiomap_io.c            |    1 -
 drivers/dsp/bridge/core/ue_deh.c               |    1 -
 drivers/dsp/bridge/core/wdt.c                  |    1 -
 drivers/dsp/bridge/pmgr/chnl.c                 |    1 -
 drivers/dsp/bridge/pmgr/cmm.c                  |    1 -
 drivers/dsp/bridge/pmgr/cod.c                  |    1 -
 drivers/dsp/bridge/pmgr/dbll.c                 |    1 -
 drivers/dsp/bridge/pmgr/dev.c                  |    1 -
 drivers/dsp/bridge/pmgr/dmm.c                  |    1 -
 drivers/dsp/bridge/pmgr/dspapi.c               |    1 -
 drivers/dsp/bridge/pmgr/io.c                   |    1 -
 drivers/dsp/bridge/pmgr/msg.c                  |    1 -
 drivers/dsp/bridge/rmgr/dbdcd.c                |    1 -
 drivers/dsp/bridge/rmgr/disp.c                 |    1 -
 drivers/dsp/bridge/rmgr/drv.c                  |    1 -
 drivers/dsp/bridge/rmgr/drv_interface.c        |    1 -
 drivers/dsp/bridge/rmgr/dspdrv.c               |    1 -
 drivers/dsp/bridge/rmgr/mgr.c                  |    1 -
 drivers/dsp/bridge/rmgr/nldr.c                 |    1 -
 drivers/dsp/bridge/rmgr/node.c                 |    1 -
 drivers/dsp/bridge/rmgr/proc.c                 |    1 -
 drivers/dsp/bridge/rmgr/rmm.c                  |    1 -
 drivers/dsp/bridge/rmgr/strm.c                 |    1 -
 drivers/dsp/bridge/services/cfg.c              |    1 -
 35 files changed, 0 insertions(+), 211 deletions(-)
 delete mode 100644 arch/arm/plat-omap/include/dspbridge/errbase.h

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h b/arch/arm/plat-omap/include/dspbridge/errbase.h
deleted file mode 100644
index eeff930..0000000
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * errbase.h
- *
- * DSP-BIOS Bridge driver support functions for TI OMAP processors.
- *
- * Central repository for DSP/BIOS Bridge error and status code.
- *
- * Error codes are of the form:
- *     [<MODULE>]_E<ERRORCODE>
- *
- * Success codes are of the form:
- *     [<MODULE>]_S<SUCCESSCODE>
- *
- * Copyright (C) 2008 Texas Instruments, Inc.
- *
- * This package is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef ERRBASE_
-#define ERRBASE_
-
-/* Base of generic errors and component errors */
-#define DSP_SBASE               (dsp_status)0x00008000
-#define DSP_EBASE               (dsp_status)0x80008000
-
-#define DSP_COMP_EBASE          (dsp_status)0x80040200
-#define DSP_COMP_ELAST          (dsp_status)0x80047fff
-
-/* SUCCESS Codes */
-
-/* Generic success code */
-#define 0                     (DSP_SBASE + 0)
-
-/* GPP is already attached to this DSP processor */
-#define 0        (DSP_SBASE + 1)
-
-/* This is the last object available for enumeration. */
-#define DSP_SENUMCOMPLETE           (DSP_SBASE + 2)
-
-/* The DSP is already asleep. */
-#define 0          (DSP_SBASE + 3)
-
-/* A library contains no dependent library references */
-#define 0        (DSP_SBASE + 7)
-
-/* A persistent library is already loaded by the dynamic loader */
-#define 0          (DSP_SBASE + 8)
-
-/* FAILURE Codes */
-
-/* During enumeration a change in the number or properties of the objects
- * has occurred. */
-#define DSP_ECHANGEDURINGENUM       (DSP_EBASE + 3)
-
-/* I/O is currently pending. */
-#define DSP_EPENDING                (DSP_EBASE + 0x11)
-
-/* The state of the specified object is incorrect for the requested
- * operation. */
-#define DSP_EWRONGSTATE             (DSP_EBASE + 0x1b)
-
-/* Symbol not found in the COFF file.  DSPNode_Create will return this if
- * the iAlg function table for an xDAIS socket is not found in the COFF file.
- * In this case, force the symbol to be linked into the COFF file.
- * DSPNode_Create, DSPNode_Execute, and DSPNode_Delete will return this if
- * the create, execute, or delete phase function, respectively, could not be
- * found in the COFF file. */
-#define DSP_ESYMBOL                 (DSP_EBASE + 0x1c)
-
-/* Unable to read content of DCD data section ; this is typically caused by
- * improperly configured nodes. */
-#define DSP_EDCDREADSECT            (DSP_EBASE + 0x1e)
-
-/* Unable to decode DCD data section content ; this is typically caused by
- * changes to DSP/BIOS Bridge data structures. */
-#define DSP_EDCDPARSESECT           (DSP_EBASE + 0x1f)
-
-/* Unable to get pointer to DCD data section ; this is typically caused by
- * improperly configured UUIDs. */
-#define DSP_EDCDGETSECT             (DSP_EBASE + 0x20)
-
-/* Unable to load file containing DCD data section ; this is typically
- * caused by a missing COFF file. */
-#define DSP_EDCDLOADBASE            (DSP_EBASE + 0x21)
-
-/* The specified COFF file does not contain a valid node registration
- * section. */
-#define DSP_EDCDNOAUTOREGISTER      (DSP_EBASE + 0x22)
-
-/* A specified entity was not found. */
-#define DSP_ENOTFOUND               (DSP_EBASE + 0x2d)
-
-/* A shared memory buffer contained in a message or stream could not be
- * mapped to the GPP client process's virtual space. */
-#define DSP_ETRANSLATE              (DSP_EBASE + 0x2f)
-
-/* Unable to find a named section in DSP executable */
-#define DSP_ENOSECT                 (DSP_EBASE + 0x32)
-
-/* A non-existent memory segment identifier was specified */
-#define DSP_EOVERLAYMEMORY          (DSP_EBASE + 0x37)
-
-/* Invalid segment ID */
-#define DSP_EBADSEGID               (DSP_EBASE + 0x38)
-
-/* Error occurred in a dynamic loader library function */
-#define DSP_EDYNLOAD                (DSP_EBASE + 0x3d)
-
-/* Device in 'sleep/suspend' mode due to DPM */
-#define DSP_EDPMSUSPEND             (DSP_EBASE + 0x3e)
-
-/* FAILURE Codes : COD */
-#define COD_EBASE                   (DSP_COMP_EBASE + 0x400)
-
-/* No symbol table is loaded for this board. */
-#define COD_E_NOSYMBOLSLOADED       (COD_EBASE + 0x00)
-
-/* Symbol not found in for this board. */
-#define COD_E_SYMBOLNOTFOUND        (COD_EBASE + 0x01)
-
-/* Unable to initialize the ZL COFF parsing module. */
-#define COD_E_ZLCREATEFAILED        (COD_EBASE + 0x03)
-
-/* FAILURE Codes : CHNL */
-#define CHNL_EBASE                  (DSP_COMP_EBASE + 0x500)
-
-/* Attempt to created channel manager with too many channels. */
-#define CHNL_E_MAXCHANNELS          (CHNL_EBASE + 0x00)
-
-/* No free channels are available. */
-#define CHNL_E_OUTOFSTREAMS         (CHNL_EBASE + 0x02)
-
-/* Channel ID is out of range. */
-#define CHNL_E_BADCHANID            (CHNL_EBASE + 0x03)
-
-/* dwTimeOut parameter was CHNL_IOCNOWAIT, yet no I/O completions were
- * queued. */
-#define CHNL_E_NOIOC                (CHNL_EBASE + 0x06)
-
-/* End of stream was already requested on this output channel. */
-#define CHNL_E_EOS                  (CHNL_EBASE + 0x09)
-
-/* DSP word size of zero configured for this device. */
-#define CHNL_E_INVALIDWORDSIZE      (CHNL_EBASE + 0x0D)
-
-/* A zero length memory base was specified for a shared memory class driver. */
-#define CHNL_E_INVALIDMEMBASE       (CHNL_EBASE + 0x0E)
-
-/* Memory map is not configured, or unable to map physical to linear
- * address. */
-#define CHNL_E_NOMEMMAP             (CHNL_EBASE + 0x0F)
-
-/* Attempted to create a channel manager  when one already exists. */
-#define CHNL_E_MGREXISTS            (CHNL_EBASE + 0x10)
-
-/* Unable to plug channel ISR for configured IRQ. */
-#define CHNL_E_ISR                  (CHNL_EBASE + 0x11)
-
-/* No free I/O request packets are available. */
-#define CHNL_E_NOIORPS              (CHNL_EBASE + 0x12)
-
-/* Buffer size is larger than the size of physical channel. */
-#define CHNL_E_BUFSIZE              (CHNL_EBASE + 0x13)
-
-/* User cannot mark end of stream on an input channel. */
-#define CHNL_E_NOEOS                (CHNL_EBASE + 0x14)
-
-/* Wait for flush operation on an output channel timed out. */
-#define CHNL_E_WAITTIMEOUT          (CHNL_EBASE + 0x15)
-
-#endif /* ERRBASE_ */
diff --git a/arch/arm/plat-omap/include/dspbridge/ntfy.h b/arch/arm/plat-omap/include/dspbridge/ntfy.h
index 3c3aba7..f8d108e 100644
--- a/arch/arm/plat-omap/include/dspbridge/ntfy.h
+++ b/arch/arm/plat-omap/include/dspbridge/ntfy.h
@@ -21,7 +21,6 @@
 
 #include <dspbridge/host_os.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 #include <dspbridge/sync.h>
 
 /**
diff --git a/arch/arm/plat-omap/include/dspbridge/pwr.h b/arch/arm/plat-omap/include/dspbridge/pwr.h
index 598a11c..a7f958a 100644
--- a/arch/arm/plat-omap/include/dspbridge/pwr.h
+++ b/arch/arm/plat-omap/include/dspbridge/pwr.h
@@ -18,7 +18,6 @@
 #define PWR_
 
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 #include <dspbridge/pwr_sh.h>
 
 /*
diff --git a/arch/arm/plat-omap/include/dspbridge/sync.h b/arch/arm/plat-omap/include/dspbridge/sync.h
index 5e2c94e..5789c84 100644
--- a/arch/arm/plat-omap/include/dspbridge/sync.h
+++ b/arch/arm/plat-omap/include/dspbridge/sync.h
@@ -19,7 +19,6 @@
 #ifndef _SYNC_H
 #define _SYNC_H
 
-#include <dspbridge/errbase.h>
 #include <dspbridge/dbdefs.h>
 
 
diff --git a/drivers/dsp/bridge/core/chnl_sm.c b/drivers/dsp/bridge/core/chnl_sm.c
index 67132c2..6a8bbf9 100644
--- a/drivers/dsp/bridge/core/chnl_sm.c
+++ b/drivers/dsp/bridge/core/chnl_sm.c
@@ -48,7 +48,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/core/dsp-clock.c b/drivers/dsp/bridge/core/dsp-clock.c
index 7cc9874..9f6d7b0 100644
--- a/drivers/dsp/bridge/core/dsp-clock.c
+++ b/drivers/dsp/bridge/core/dsp-clock.c
@@ -24,7 +24,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 #include <dspbridge/cfg.h>
 #include <dspbridge/drv.h>
 #include <dspbridge/dev.h>
diff --git a/drivers/dsp/bridge/core/io_sm.c b/drivers/dsp/bridge/core/io_sm.c
index 72245d8..65295e7 100644
--- a/drivers/dsp/bridge/core/io_sm.c
+++ b/drivers/dsp/bridge/core/io_sm.c
@@ -31,7 +31,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /* Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/core/mmu_fault.c b/drivers/dsp/bridge/core/mmu_fault.c
index 883f45d..7185372 100644
--- a/drivers/dsp/bridge/core/mmu_fault.c
+++ b/drivers/dsp/bridge/core/mmu_fault.c
@@ -19,7 +19,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/host_os.h>
diff --git a/drivers/dsp/bridge/core/msg_sm.c b/drivers/dsp/bridge/core/msg_sm.c
index 7ac56b1..4277f2e 100644
--- a/drivers/dsp/bridge/core/msg_sm.c
+++ b/drivers/dsp/bridge/core/msg_sm.c
@@ -19,7 +19,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/core/tiomap3430.c b/drivers/dsp/bridge/core/tiomap3430.c
index 146b7c1..b1e870a 100644
--- a/drivers/dsp/bridge/core/tiomap3430.c
+++ b/drivers/dsp/bridge/core/tiomap3430.c
@@ -25,7 +25,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/core/tiomap3430_pwr.c b/drivers/dsp/bridge/core/tiomap3430_pwr.c
index ba07c51..bc576c9 100644
--- a/drivers/dsp/bridge/core/tiomap3430_pwr.c
+++ b/drivers/dsp/bridge/core/tiomap3430_pwr.c
@@ -18,7 +18,6 @@
 
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 #include <dspbridge/cfg.h>
 #include <dspbridge/drv.h>
 #include <dspbridge/io_sm.h>
diff --git a/drivers/dsp/bridge/core/tiomap_io.c b/drivers/dsp/bridge/core/tiomap_io.c
index 5d8e46a..f48c35a 100644
--- a/drivers/dsp/bridge/core/tiomap_io.c
+++ b/drivers/dsp/bridge/core/tiomap_io.c
@@ -18,7 +18,6 @@
 
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/core/ue_deh.c b/drivers/dsp/bridge/core/ue_deh.c
index 24188bf..e33548b 100644
--- a/drivers/dsp/bridge/core/ue_deh.c
+++ b/drivers/dsp/bridge/core/ue_deh.c
@@ -23,7 +23,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/core/wdt.c b/drivers/dsp/bridge/core/wdt.c
index 4637afb..847b880 100644
--- a/drivers/dsp/bridge/core/wdt.c
+++ b/drivers/dsp/bridge/core/wdt.c
@@ -18,7 +18,6 @@
 
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 #include <dspbridge/dspdeh.h>
 #include <dspbridge/dev.h>
 #include <dspbridge/_chnl_sm.h>
diff --git a/drivers/dsp/bridge/pmgr/chnl.c b/drivers/dsp/bridge/pmgr/chnl.c
index 22087f2..c8de886 100644
--- a/drivers/dsp/bridge/pmgr/chnl.c
+++ b/drivers/dsp/bridge/pmgr/chnl.c
@@ -23,7 +23,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/pmgr/cmm.c b/drivers/dsp/bridge/pmgr/cmm.c
index 9acd675..2fda933 100644
--- a/drivers/dsp/bridge/pmgr/cmm.c
+++ b/drivers/dsp/bridge/pmgr/cmm.c
@@ -36,7 +36,6 @@
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- OS Adaptation Layer */
 #include <dspbridge/cfg.h>
diff --git a/drivers/dsp/bridge/pmgr/cod.c b/drivers/dsp/bridge/pmgr/cod.c
index 342c1b3..ef3e3b4 100644
--- a/drivers/dsp/bridge/pmgr/cod.c
+++ b/drivers/dsp/bridge/pmgr/cod.c
@@ -28,7 +28,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/pmgr/dbll.c b/drivers/dsp/bridge/pmgr/dbll.c
index 8e76bf6..dff0f05 100644
--- a/drivers/dsp/bridge/pmgr/dbll.c
+++ b/drivers/dsp/bridge/pmgr/dbll.c
@@ -20,7 +20,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/pmgr/dev.c b/drivers/dsp/bridge/pmgr/dev.c
index fd1677c..503ff4d 100644
--- a/drivers/dsp/bridge/pmgr/dev.c
+++ b/drivers/dsp/bridge/pmgr/dev.c
@@ -22,7 +22,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/pmgr/dmm.c b/drivers/dsp/bridge/pmgr/dmm.c
index bf2c0e1..6fa7a6a 100644
--- a/drivers/dsp/bridge/pmgr/dmm.c
+++ b/drivers/dsp/bridge/pmgr/dmm.c
@@ -30,7 +30,6 @@
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- OS Adaptation Layer */
 #include <dspbridge/sync.h>
diff --git a/drivers/dsp/bridge/pmgr/dspapi.c b/drivers/dsp/bridge/pmgr/dspapi.c
index 9bf2bae..01f456a 100644
--- a/drivers/dsp/bridge/pmgr/dspapi.c
+++ b/drivers/dsp/bridge/pmgr/dspapi.c
@@ -23,7 +23,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/pmgr/io.c b/drivers/dsp/bridge/pmgr/io.c
index de46cde..0f4c1df 100644
--- a/drivers/dsp/bridge/pmgr/io.c
+++ b/drivers/dsp/bridge/pmgr/io.c
@@ -22,7 +22,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/pmgr/msg.c b/drivers/dsp/bridge/pmgr/msg.c
index 7e74e22..0d83df1 100644
--- a/drivers/dsp/bridge/pmgr/msg.c
+++ b/drivers/dsp/bridge/pmgr/msg.c
@@ -22,7 +22,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/rmgr/dbdcd.c b/drivers/dsp/bridge/rmgr/dbdcd.c
index d5b0bce..e0fbdb0 100644
--- a/drivers/dsp/bridge/rmgr/dbdcd.c
+++ b/drivers/dsp/bridge/rmgr/dbdcd.c
@@ -29,7 +29,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
 
diff --git a/drivers/dsp/bridge/rmgr/disp.c b/drivers/dsp/bridge/rmgr/disp.c
index b099125..035830b 100644
--- a/drivers/dsp/bridge/rmgr/disp.c
+++ b/drivers/dsp/bridge/rmgr/disp.c
@@ -23,7 +23,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/rmgr/drv.c b/drivers/dsp/bridge/rmgr/drv.c
index a92b0d7..cced18a 100644
--- a/drivers/dsp/bridge/rmgr/drv.c
+++ b/drivers/dsp/bridge/rmgr/drv.c
@@ -22,7 +22,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/rmgr/drv_interface.c b/drivers/dsp/bridge/rmgr/drv_interface.c
index 08ad56d..bbcb6a8 100644
--- a/drivers/dsp/bridge/rmgr/drv_interface.c
+++ b/drivers/dsp/bridge/rmgr/drv_interface.c
@@ -34,7 +34,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/rmgr/dspdrv.c b/drivers/dsp/bridge/rmgr/dspdrv.c
index 0e22ca1..8b64067 100644
--- a/drivers/dsp/bridge/rmgr/dspdrv.c
+++ b/drivers/dsp/bridge/rmgr/dspdrv.c
@@ -22,7 +22,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/rmgr/mgr.c b/drivers/dsp/bridge/rmgr/mgr.c
index 7738245..1ec08dc 100644
--- a/drivers/dsp/bridge/rmgr/mgr.c
+++ b/drivers/dsp/bridge/rmgr/mgr.c
@@ -21,7 +21,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/rmgr/nldr.c b/drivers/dsp/bridge/rmgr/nldr.c
index f5b7239..9b855fa 100644
--- a/drivers/dsp/bridge/rmgr/nldr.c
+++ b/drivers/dsp/bridge/rmgr/nldr.c
@@ -20,7 +20,6 @@
 
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 #include <dspbridge/dbc.h>
 
diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c
index 4d27445..ad9b62c 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -22,7 +22,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/rmgr/proc.c b/drivers/dsp/bridge/rmgr/proc.c
index 78f06ad..f3d5a94 100644
--- a/drivers/dsp/bridge/rmgr/proc.c
+++ b/drivers/dsp/bridge/rmgr/proc.c
@@ -22,7 +22,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/rmgr/rmm.c b/drivers/dsp/bridge/rmgr/rmm.c
index efefb65..f95fe1d 100644
--- a/drivers/dsp/bridge/rmgr/rmm.c
+++ b/drivers/dsp/bridge/rmgr/rmm.c
@@ -40,7 +40,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c
index 58ec979..6c90687 100644
--- a/drivers/dsp/bridge/rmgr/strm.c
+++ b/drivers/dsp/bridge/rmgr/strm.c
@@ -22,7 +22,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
diff --git a/drivers/dsp/bridge/services/cfg.c b/drivers/dsp/bridge/services/cfg.c
index cef7110..69c8dc2 100644
--- a/drivers/dsp/bridge/services/cfg.c
+++ b/drivers/dsp/bridge/services/cfg.c
@@ -19,7 +19,6 @@
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/std.h>
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/errbase.h>
 
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 37/40] DSPBRIDGE: cleanup for duplicated error codes
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (34 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 36/40] DSPBRIDGE: remove custom errbase definitions Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 38/40] DSPBRIDGE: removed unused error codes from comments Omar Ramirez Luna
                   ` (2 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Some comments and pieces of code make reference to the same
error code, this was removed to just have one instance where
the code won't get too nested or complicated.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/cfg.h      |    9 ++-----
 arch/arm/plat-omap/include/dspbridge/chnl.h     |    6 ++--
 arch/arm/plat-omap/include/dspbridge/cod.h      |    8 +++---
 arch/arm/plat-omap/include/dspbridge/dbdcd.h    |   19 +++++------------
 arch/arm/plat-omap/include/dspbridge/dblldefs.h |    5 +--
 arch/arm/plat-omap/include/dspbridge/dev.h      |    4 +-
 arch/arm/plat-omap/include/dspbridge/dspdefs.h  |   12 +++-------
 arch/arm/plat-omap/include/dspbridge/io.h       |    4 +-
 arch/arm/plat-omap/include/dspbridge/node.h     |   25 +++++++++++------------
 arch/arm/plat-omap/include/dspbridge/strm.h     |    6 ++--
 drivers/dsp/bridge/core/chnl_sm.c               |    8 +-----
 drivers/dsp/bridge/rmgr/strm.c                  |    3 +-
 12 files changed, 44 insertions(+), 65 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/cfg.h b/arch/arm/plat-omap/include/dspbridge/cfg.h
index 2226723..4d5bd69 100644
--- a/arch/arm/plat-omap/include/dspbridge/cfg.h
+++ b/arch/arm/plat-omap/include/dspbridge/cfg.h
@@ -82,8 +82,7 @@ extern dsp_status cfg_get_cd_version(OUT u32 *pdwVersion);
  *      pdwValue:       Ptr to location to store the value.
  *  Returns:
  *      0:                Success.
- *      -EFAULT:  dev_node_obj is invalid.
- *      -EFAULT:   phDevObject is invalid.
+ *      -EFAULT: dev_node_obj is invalid or phDevObject is invalid.
  *      -ENODATA: The resource is not available.
  *  Requires:
  *      CFG initialized.
@@ -104,8 +103,7 @@ extern dsp_status cfg_get_dev_object(IN struct cfg_devnode *dev_node_obj,
  *      pstrExecFile:   Ptr to character buf to hold ExecFile.
  *  Returns:
  *      0:                Success.
- *      -EFAULT:  dev_node_obj is invalid.
- *      -EFAULT:   pstrExecFile is invalid.
+ *      -EFAULT:  dev_node_obj is invalid or pstrExecFile is invalid.
  *      -ENODATA: The resource is not available.
  *  Requires:
  *      CFG initialized.
@@ -160,8 +158,7 @@ extern void cfg_get_perf_value(OUT bool *pfEnablePerf);
  *      pstrZLFileName: Ptr to character buf to hold ZLFileName.
  *  Returns:
  *      0:                Success.
- *      -EFAULT:   pstrZLFileName is invalid.
- *      -EFAULT:  dev_node_obj is invalid.
+ *      -EFAULT: pstrZLFileName is invalid or dev_node_obj is invalid.
  *      -ENODATA: couldn't find the ZLFileName.
  *  Requires:
  *      CFG initialized.
diff --git a/arch/arm/plat-omap/include/dspbridge/chnl.h b/arch/arm/plat-omap/include/dspbridge/chnl.h
index ff3ed51..ac9acd9 100644
--- a/arch/arm/plat-omap/include/dspbridge/chnl.h
+++ b/arch/arm/plat-omap/include/dspbridge/chnl.h
@@ -61,13 +61,13 @@ extern dsp_status chnl_close(struct chnl_object *chnl_obj);
  *  Returns:
  *      0:                Success;
  *      -EFAULT:            hdev_obj is invalid.
- *      -EINVAL:        max_channels is 0.
+ *      -EINVAL: max_channels is 0.
+ *               Invalid DSP word size (must be > 0).
+ *               Invalid base address for DSP communications.
  *      -ENOMEM:            Insufficient memory for requested resources.
  *      -EIO:             Unable to plug channel ISR for configured IRQ.
  *      -ECHRNG:     This manager cannot handle this many channels.
  *      CHNL_E_INVALIDIRQ:      Invalid IRQ number. Must be 0 <= birq <= 15.
- *      -EINVAL: Invalid DSP word size.  Must be > 0.
- *      -EINVAL:  Invalid base address for DSP communications.
  *      -EEXIST:       Channel manager already exists for this device.
  *  Requires:
  *      chnl_init(void) called.
diff --git a/arch/arm/plat-omap/include/dspbridge/cod.h b/arch/arm/plat-omap/include/dspbridge/cod.h
index 8a4919e..e27f942 100644
--- a/arch/arm/plat-omap/include/dspbridge/cod.h
+++ b/arch/arm/plat-omap/include/dspbridge/cod.h
@@ -212,8 +212,8 @@ extern dsp_status cod_get_loader(struct cod_manager *cod_mgr_obj,
  *      puLen:      Location to store length.
  *  Returns:
  *      0:                Success
- *      -ESPIPE:  Symbols have not been loaded onto the board.
- *      -ESPIPE:   The symbol could not be found.
+ *      -ESPIPE:  Symbols could not be found or have not been loaded onto
+ *                the board.
  *  Requires:
  *      COD module initialized.
  *      valid cod_mgr_obj.
@@ -242,8 +242,8 @@ extern dsp_status cod_get_section(struct cod_libraryobj *lib,
  *      value:      value of the symbol
  *  Returns:
  *      0:                Success.
- *      -ESPIPE:  Symbols have not been loaded onto the board.
- *      -ESPIPE:   The symbol could not be found.
+ *      -ESPIPE:  Symbols could not be found or have not been loaded onto
+ *                the board.
  *  Requires:
  *      COD module initialized.
  *      Valid cod_mgr_obj.
diff --git a/arch/arm/plat-omap/include/dspbridge/dbdcd.h b/arch/arm/plat-omap/include/dspbridge/dbdcd.h
index a879d6b..b0feecb 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdcd.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdcd.h
@@ -34,9 +34,7 @@
  *                              objects to be registered.
  *  Returns:
  *      0:                Success.
- *      -EACCES: Unable to find auto-registration section.
- *      -EACCES:       Unable to read object code section.
- *      -EACCES:       Unable to load code base.
+ *      -EACCES: Unable to find auto-registration/read/load section.
  *      -EFAULT:            Invalid DCD_HMANAGER handle..
  *  Requires:
  *      DCD initialized.
@@ -60,9 +58,7 @@ extern dsp_status dcd_auto_register(IN struct dcd_manager *hdcd_mgr,
  *                              DCD objects to be unregistered.
  *  Returns:
  *      0:                Success.
- *      -EACCES: Unable to find auto-registration section.
- *      -EACCES:       Unable to read object code section.
- *      -EACCES:       Unable to load code base.
+ *      -EACCES: Unable to find auto-registration/read/load section.
  *      -EFAULT:            Invalid DCD_HMANAGER handle..
  *  Requires:
  *      DCD initialized.
@@ -255,10 +251,8 @@ extern dsp_status dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
  *                          union of various possible DCD object types.
  *  Returns:
  *      0: Success.
- *      -EACCES:  Unable to parse content of object code section.
- *      -EACCES:   Unable to read object code section.
- *      -EACCES:    Unable to access object code section.
- *      -EACCES:   Unable to load code base.
+ *      -EACCES: Unable to access/read/parse/load content of object code
+ *               section.
  *      -EPERM:          General failure.
  *      -EFAULT:        Invalid DCD_HMANAGER handle.
  *  Requires:
@@ -289,9 +283,8 @@ extern dsp_status dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,
  *      handle:                 Handle to pass to callback.
  *  Returns:
  *      0:                Success.
- *      -EACCES: Unable to find .dcd_register section.
- *      -EACCES:       Unable to read object code section.
- *      -EACCES:       Unable to load code base.
+ *      -EACCES: Unable to access/read/parse/load content of object code
+ *               section.
  *      -EFAULT:            Invalid DCD_HMANAGER handle..
  *  Requires:
  *      DCD initialized.
diff --git a/arch/arm/plat-omap/include/dspbridge/dblldefs.h b/arch/arm/plat-omap/include/dspbridge/dblldefs.h
index e780e87..7b79207 100644
--- a/arch/arm/plat-omap/include/dspbridge/dblldefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dblldefs.h
@@ -385,9 +385,8 @@ typedef dsp_status(*dbll_load_sect_fxn) (struct dbll_library_obj *lib,
  *  Returns:
  *      0:            Success.
  *      -ENOMEM:        Memory allocation failure.
- *      -EBADF:         File open failure.
- *      -EBADF:         File read failure.
- *      -EBADF:   Unable to determine target type.
+ *      -EBADF:         File open/read failure.
+ *                      Unable to determine target type.
  *  Requires:
  *      DBL initialized.
  *      Valid target.
diff --git a/arch/arm/plat-omap/include/dspbridge/dev.h b/arch/arm/plat-omap/include/dspbridge/dev.h
index cf48c07..eb9ea39 100644
--- a/arch/arm/plat-omap/include/dspbridge/dev.h
+++ b/arch/arm/plat-omap/include/dspbridge/dev.h
@@ -492,8 +492,8 @@ extern dsp_status dev_get_node_manager(struct dev_object
  *  Returns:
  *      0:        Success.
  *      -EFAULT:    Invalid hdev_obj.
- *      -ESPIPE:  Symbols have not been loaded onto the board.
- *      -ESPIPE:   The symbol could not be found.
+ *      -ESPIPE: Symbols couldn not be found or have not been loaded onto
+ *               the board.
  *  Requires:
  *      pstrSym != NULL.
  *      pul_value != NULL.
diff --git a/arch/arm/plat-omap/include/dspbridge/dspdefs.h b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
index c3c2e4d..2a52983 100644
--- a/arch/arm/plat-omap/include/dspbridge/dspdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
@@ -450,8 +450,7 @@ typedef dsp_status(*fxn_chnl_close) (struct chnl_object *chnl_obj);
  *      dw_arg:          A user argument that travels with the buffer.
  *  Returns:
  *      0:        Success;
- *      -EFAULT:    Invalid chnl_obj.
- *      -EFAULT:   pHostBuf is invalid.
+ *      -EFAULT: Invalid chnl_obj or pHostBuf.
  *      -EPERM:   User cannot mark EOS on an input channel.
  *      -ECANCELED: I/O has been cancelled on this channel.  No further
  *                      I/O is allowed.
@@ -491,8 +490,7 @@ typedef dsp_status(*fxn_chnl_addioreq) (struct chnl_object
  *      pIOC->status:   See chnldefs.h.
  *  Returns:
  *      0:        Success.
- *      -EFAULT:    Invalid chnl_obj.
- *      -EFAULT:   pIOC is invalid.
+ *      -EFAULT: Invalid chnl_obj or pIOC.
  *      -EREMOTEIO:   CHNL_IOCNOWAIT was specified as the dwTimeOut parameter
  *                      yet no I/O completions were queued.
  *  Requires:
@@ -555,8 +553,7 @@ typedef dsp_status(*fxn_chnl_flushio) (struct chnl_object *chnl_obj,
  *      pInfo:          Location to store channel info.
  *  Returns:
  *      0:        Success;
- *      -EFAULT:    Invalid chnl_obj.
- *      -EFAULT:   pInfo == NULL.
+ *      -EFAULT: Invalid chnl_obj or pInfo.
  *  Requires:
  *  Ensures:
  *      0:        pInfo points to a filled in chnl_info struct,
@@ -575,8 +572,7 @@ typedef dsp_status(*fxn_chnl_getinfo) (struct chnl_object *chnl_obj,
  *      pMgrInfo:           Location to store channel manager info.
  *  Returns:
  *      0:            Success;
- *      -EFAULT:        Invalid hchnl_mgr.
- *      -EFAULT:       pMgrInfo == NULL.
+ *      -EFAULT: Invalid hchnl_mgr or pMgrInfo.
  *      -ECHRNG:   Invalid channel ID.
  *  Requires:
  *  Ensures:
diff --git a/arch/arm/plat-omap/include/dspbridge/io.h b/arch/arm/plat-omap/include/dspbridge/io.h
index 752786f..7ff2451 100644
--- a/arch/arm/plat-omap/include/dspbridge/io.h
+++ b/arch/arm/plat-omap/include/dspbridge/io.h
@@ -42,8 +42,8 @@
  *      -ENOMEM:            Insufficient memory for requested resources.
  *      -EIO:             Unable to plug channel ISR for configured IRQ.
  *      CHNL_E_INVALIDIRQ:      Invalid IRQ number. Must be 0 <= birq <= 15.
- *      -EINVAL: Invalid DSP word size.  Must be > 0.
- *      -EINVAL:  Invalid base address for DSP communications.
+ *      -EINVAL: Invalid DSP word size (must be > 0).
+ *               Invalid base address for DSP communications.
  *  Requires:
  *      io_init(void) called.
  *      phIOMgr != NULL.
diff --git a/arch/arm/plat-omap/include/dspbridge/node.h b/arch/arm/plat-omap/include/dspbridge/node.h
index ed83faf..ff2c673 100644
--- a/arch/arm/plat-omap/include/dspbridge/node.h
+++ b/arch/arm/plat-omap/include/dspbridge/node.h
@@ -100,13 +100,13 @@ extern dsp_status node_alloc_msg_buf(struct node_object *hnode,
  *      0:            Success.
  *      -EFAULT:        Invalid hnode.
  *      -EDOM:         prio is out of range.
- *      -EPERM:      The specified node is not a task node.
+ *      -EPERM: The specified node is not a task node.
+ *              Unable to change node's runtime priority level.
  *      -EBADR:    Node is not in the NODE_ALLOCATED, NODE_PAUSED,
  *                          or NODE_RUNNING state.
  *      -ETIME:       A timeout occurred before the DSP responded.
  *      DSP_ERESTART:       A critical error has occurred and the DSP is
  *                          being restarted.
- *      -EPERM:          Unable to change node's runtime priority level.
  *  Requires:
  *      node_init(void) called.
  *  Ensures:
@@ -382,9 +382,9 @@ extern dsp_status node_get_attr(struct node_object *hnode,
  *  Returns:
  *      0:        Success.
  *      -EFAULT:    Invalid hnode.
- *      -EPERM:  Cannot retrieve messages from this type of node.
+ *      -EPERM: Cannot retrieve messages from this type of node.
+ *              Error occurred while trying to retrieve a message.
  *      -ETIME:   Timeout occurred and no message is available.
- *      -EPERM:      Error occurred while trying to retrieve a message.
  *  Requires:
  *      node_init(void) called.
  *      message != NULL.
@@ -443,10 +443,10 @@ void node_on_exit(struct node_object *hnode, s32 nStatus);
  *  Returns:
  *      0:            Success.
  *      -EFAULT:        Invalid hnode.
- *      -EPERM:      Node is not a task or socket node.
+ *      -EPERM: Node is not a task or socket node.
+ *              Failed to pause node.
  *      -ETIME:       A timeout occurred before the DSP responded.
  *      DSP_EWRONGSTSATE:   Node is not in NODE_RUNNING state.
- *      -EPERM:          Failed to pause node.
  *  Requires:
  *      node_init(void) called.
  *  Ensures:
@@ -467,10 +467,10 @@ extern dsp_status node_pause(struct node_object *hnode);
  *  Returns:
  *      0:            Success.
  *      -EFAULT:        Invalid hnode.
- *      -EPERM:      Messages can't be sent to this type of node.
+ *      -EPERM: Messages can't be sent to this type of node.
+ *              Unable to send message.
  *      -ETIME:       Timeout occurred before message could be set.
  *      -EBADR:    Node is in invalid state for sending messages.
- *      -EPERM:          Unable to send message.
  *  Requires:
  *      node_init(void) called.
  *      pmsg != NULL.
@@ -517,11 +517,10 @@ extern dsp_status node_register_notify(struct node_object *hnode,
  *  Returns:
  *      0:            Success.
  *      -EFAULT:        Invalid hnode.
- *      -EPERM:      hnode doesn't represent a message, task or dais
- *                          socket node.
+ *      -EPERM: hnode doesn't represent a message, task or dais socket node.
+ *              Unable to start or resume execution.
  *      -ETIME:       A timeout occurred before the DSP responded.
  *      DSP_EWRONGSTSATE:   Node is not in NODE_PAUSED or NODE_CREATED state.
- *      -EPERM:          Unable to start or resume execution.
  *      -ESPIPE:        Execute function not found in the COFF file.
  *  Requires:
  *      node_init(void) called.
@@ -543,9 +542,9 @@ extern dsp_status node_run(struct node_object *hnode);
  *      0:            Success.
  *      -EFAULT:        Invalid hnode.
  *      -ETIME:       A timeout occurred before the DSP responded.
- *      -EPERM:      Type of node specified cannot be terminated.
+ *      -EPERM: Type of node specified cannot be terminated.
+ *              Unable to terminate the node.
  *      -EBADR:    Operation not valid for the current node state.
- *      -EPERM:          Unable to terminate the node.
  *  Requires:
  *      node_init(void) called.
  *      pstatus != NULL.
diff --git a/arch/arm/plat-omap/include/dspbridge/strm.h b/arch/arm/plat-omap/include/dspbridge/strm.h
index c4b1d91..5a8a922 100644
--- a/arch/arm/plat-omap/include/dspbridge/strm.h
+++ b/arch/arm/plat-omap/include/dspbridge/strm.h
@@ -259,10 +259,10 @@ extern dsp_status strm_issue(struct strm_object *hStrm, IN u8 * pbuf,
  *  Returns:
  *      0:        Success.
  *      -EFAULT:    Invalid hnode.
- *      -EPERM: Invalid dir.
+ *      -EPERM: Invalid direction.
+ *              hnode is not a task or DAIS socket node.
+ *              Unable to open stream.
  *      -EINVAL:     Invalid index.
- *      -EPERM:  hnode is not a task or DAIS socket node.
- *      -EPERM:      Unable to open stream.
  *  Requires:
  *      strm_init(void) called.
  *      phStrm != NULL.
diff --git a/drivers/dsp/bridge/core/chnl_sm.c b/drivers/dsp/bridge/core/chnl_sm.c
index 6a8bbf9..704f11a 100644
--- a/drivers/dsp/bridge/core/chnl_sm.c
+++ b/drivers/dsp/bridge/core/chnl_sm.c
@@ -107,9 +107,7 @@ dsp_status bridge_chnl_add_io_req(struct chnl_object *chnl_obj, void *pHostBuf,
 	is_eos = (byte_size == 0);
 
 	/* Validate args */
-	if (!pHostBuf) {
-		status = -EFAULT;
-	} else if (!pchnl) {
+	if (!pHostBuf || !pchnl) {
 		status = -EFAULT;
 	} else if (is_eos && CHNL_IS_INPUT(pchnl->chnl_mode)) {
 		status = -EPERM;
@@ -582,9 +580,7 @@ dsp_status bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 dwTimeOut,
 	struct dev_object *dev_obj;
 
 	/* Check args: */
-	if (pIOC == NULL) {
-		status = -EFAULT;
-	} else if (!pchnl) {
+	if (!pIOC || !pchnl) {
 		status = -EFAULT;
 	} else if (dwTimeOut == CHNL_IOCNOWAIT) {
 		if (LST_IS_EMPTY(pchnl->pio_completions))
diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c
index 6c90687..7f9ffea 100644
--- a/drivers/dsp/bridge/rmgr/strm.c
+++ b/drivers/dsp/bridge/rmgr/strm.c
@@ -602,8 +602,7 @@ func_cont:
 	DBC_ENSURE((DSP_SUCCEEDED(status) && *phStrm) ||
 		   (*phStrm == NULL && (status == -EFAULT ||
 					status == -EPERM
-					|| status == -EINVAL
-					|| status == -EPERM)));
+					|| status == -EINVAL)));
 
 	dev_dbg(bridge, "%s: hnode: %p dir: 0x%x index: 0x%x pattr: %p "
 		"phStrm: %p status: 0x%x\n", __func__,
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 38/40] DSPBRIDGE: removed unused error codes from comments
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (35 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 37/40] DSPBRIDGE: cleanup for duplicated error codes Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-03  5:47 ` [PATCH 39/40] DSPBRIDGE: error code guide Omar Ramirez Luna
  2010-06-11 23:00 ` [PATCH 00/40] dspbridge: trivial error code cleanup Ramirez Luna, Omar
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Only removed error codes which now does not exist,
previously those were not used in the code.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/chnl.h     |    1 -
 arch/arm/plat-omap/include/dspbridge/cod.h      |    3 ---
 arch/arm/plat-omap/include/dspbridge/dblldefs.h |    2 --
 arch/arm/plat-omap/include/dspbridge/dev.h      |   14 --------------
 arch/arm/plat-omap/include/dspbridge/disp.h     |    3 ---
 arch/arm/plat-omap/include/dspbridge/dspdefs.h  |    4 ----
 arch/arm/plat-omap/include/dspbridge/io.h       |    1 -
 arch/arm/plat-omap/include/dspbridge/nldrdefs.h |    1 -
 arch/arm/plat-omap/include/dspbridge/node.h     |    9 +--------
 arch/arm/plat-omap/include/dspbridge/proc.h     |   11 -----------
 arch/arm/plat-omap/include/dspbridge/strm.h     |    1 -
 11 files changed, 1 insertions(+), 49 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/chnl.h b/arch/arm/plat-omap/include/dspbridge/chnl.h
index ac9acd9..a166d1b 100644
--- a/arch/arm/plat-omap/include/dspbridge/chnl.h
+++ b/arch/arm/plat-omap/include/dspbridge/chnl.h
@@ -67,7 +67,6 @@ extern dsp_status chnl_close(struct chnl_object *chnl_obj);
  *      -ENOMEM:            Insufficient memory for requested resources.
  *      -EIO:             Unable to plug channel ISR for configured IRQ.
  *      -ECHRNG:     This manager cannot handle this many channels.
- *      CHNL_E_INVALIDIRQ:      Invalid IRQ number. Must be 0 <= birq <= 15.
  *      -EEXIST:       Channel manager already exists for this device.
  *  Requires:
  *      chnl_init(void) called.
diff --git a/arch/arm/plat-omap/include/dspbridge/cod.h b/arch/arm/plat-omap/include/dspbridge/cod.h
index e27f942..16e95c3 100644
--- a/arch/arm/plat-omap/include/dspbridge/cod.h
+++ b/arch/arm/plat-omap/include/dspbridge/cod.h
@@ -83,7 +83,6 @@ extern void cod_close(struct cod_libraryobj *lib);
  *                      will cause default attrs to be used.
  *  Returns:
  *      0:                Success.
- *      COD_E_NOZLFUNCTIONS:    Could not initialize ZL functions.
  *      -ESPIPE:   ZL_Create failed.
  *      -ENOSYS:           attrs was not NULL.  We don't yet support
  *                              non default values of attrs.
@@ -285,7 +284,6 @@ extern bool cod_init(void);
  *  Returns:
  *      0:                   Success.
  *      -EBADF:       Failed to open target code.
- *      COD_E_LOADFAILED:       Failed to load code onto target.
  *  Requires:
  *      COD module initialized.
  *      hmgr is valid.
@@ -356,7 +354,6 @@ extern dsp_status cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
  *  Returns:
  *      0: on success, error code on failure
  *      -ESPIPE:  Symbols have not been loaded onto the board.
- *      COD_E_READFAILED: Failed to read content of code section.
  *  Requires:
  *      COD module initialized.
  *      valid cod_mgr_obj.
diff --git a/arch/arm/plat-omap/include/dspbridge/dblldefs.h b/arch/arm/plat-omap/include/dspbridge/dblldefs.h
index 7b79207..e1a0364 100644
--- a/arch/arm/plat-omap/include/dspbridge/dblldefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dblldefs.h
@@ -338,7 +338,6 @@ typedef bool(*dbll_init_fxn) (void);
  *  Returns:
  *      0:        Success.
  *      -EBADF:     File read failed.
- *      DSP_EFWRITE:    Write to target failed.
  *      -EILSEQ:   Failure in dynamic loader library.
  *  Requires:
  *      DBL initialized.
@@ -360,7 +359,6 @@ typedef dsp_status(*dbll_load_fxn) (struct dbll_library_obj *lib,
  *  Returns:
  *      0:        Success.
  *      -ENXIO:    Section not found.
- *      DSP_EFWRITE:    Write function failed.
  *      -ENOSYS:   Function not implemented.
  *  Requires:
  *      Valid lib.
diff --git a/arch/arm/plat-omap/include/dspbridge/dev.h b/arch/arm/plat-omap/include/dspbridge/dev.h
index eb9ea39..b4350de 100644
--- a/arch/arm/plat-omap/include/dspbridge/dev.h
+++ b/arch/arm/plat-omap/include/dspbridge/dev.h
@@ -76,14 +76,7 @@ extern u32 dev_brd_write_fxn(void *pArb,
  *  Returns:
  *      0:            Module is loaded, device object has been created
  *      -ENOMEM:        Insufficient memory to create needed resources.
- *      DEV_E_NEWWMD:       The WMD was compiled for a newer version of WCD.
- *      DEV_E_NULLWMDINTF:  WMD passed back a NULL fxn Interface Struct Ptr
- *      DEV_E_NOCODMODULE:  No ZL file name was specified in the registry
- *                          for this dev_node_obj.
- *      LDR_E_FILEUNABLETOOPEN: Unable to open the specified WMD.
- *      LDR_E_NOMEMORY:         PELDR is out of resources.
  *      -EPERM:              Unable to find WMD entry point function.
- *      COD_E_NOZLFUNCTIONS:    One or more ZL functions exports not found.
  *      -ESPIPE:   Unable to load ZL DLL.
  *  Requires:
  *      DEV Initialized.
@@ -118,14 +111,7 @@ extern dsp_status dev_create_device(OUT struct dev_object
  *  Returns:
  *      0:            Module is loaded, device object has been created
  *      -ENOMEM:        Insufficient memory to create needed resources.
- *      DEV_E_NEWWMD:       The WMD was compiled for a newer version of WCD.
- *      DEV_E_NULLWMDINTF:  WMD passed back a NULL fxn Interface Struct Ptr
- *      DEV_E_NOCODMODULE:  No ZL file name was specified in the registry
- *                          for this dev_node_obj.
- *      LDR_E_FILEUNABLETOOPEN: Unable to open the specified WMD.
- *      LDR_E_NOMEMORY:         PELDR is out of resources.
  *      -EPERM:              Unable to find WMD entry point function.
- *      COD_E_NOZLFUNCTIONS:    One or more ZL functions exports not found.
  *      -ESPIPE:   Unable to load ZL DLL.
  *  Requires:
  *      DEV Initialized.
diff --git a/arch/arm/plat-omap/include/dspbridge/disp.h b/arch/arm/plat-omap/include/dspbridge/disp.h
index 22f3b63..c34e08c 100644
--- a/arch/arm/plat-omap/include/dspbridge/disp.h
+++ b/arch/arm/plat-omap/include/dspbridge/disp.h
@@ -132,10 +132,7 @@ extern dsp_status disp_node_change_priority(struct disp_object
  *                      output.
  *  Returns:
  *      0:        Success.
- *      DSP_ETASK:      Unable to create the node's task or process on the DSP.
- *      DSP_ESTREAM:    Stream creation failure on the DSP.
  *      -ETIME:   A timeout occurred before the DSP responded.
- *      DSP_EUSER:      A user-defined failure occurred.
  *      -EPERM:      A failure occurred, unable to create node.
  *  Requires:
  *      disp_init(void) called.
diff --git a/arch/arm/plat-omap/include/dspbridge/dspdefs.h b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
index 2a52983..7436539 100644
--- a/arch/arm/plat-omap/include/dspbridge/dspdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dspdefs.h
@@ -58,7 +58,6 @@ struct bridge_dev_context;
  *      hDevContext:    Handle to mini-driver defined device context.
  *  Returns:
  *      0:        Success.
- *      WMD_E_HARDWARE: A test of hardware assumptions/integrity failed.
  *      -ETIMEDOUT:  Timeout occured waiting for a response from hardware.
  *      -EPERM:      Other, unspecified error.
  *  Requires:
@@ -656,9 +655,6 @@ typedef dsp_status(*fxn_chnl_registernotify)
  *  Returns:
  *      0:            Success.
  *      -ENOMEM:        Unable to allocate memory for device context.
- *      WMD_E_BADCONFIG:    One or more of the host or DSP configuration
- *                          parameters did not satisfy hardware assumptions
- *                          made by this WMD.
  *  Requires:
  *      phDevContext != NULL;
  *      hdev_obj != NULL;
diff --git a/arch/arm/plat-omap/include/dspbridge/io.h b/arch/arm/plat-omap/include/dspbridge/io.h
index 7ff2451..6c248ce 100644
--- a/arch/arm/plat-omap/include/dspbridge/io.h
+++ b/arch/arm/plat-omap/include/dspbridge/io.h
@@ -41,7 +41,6 @@
  *      0:                Success;
  *      -ENOMEM:            Insufficient memory for requested resources.
  *      -EIO:             Unable to plug channel ISR for configured IRQ.
- *      CHNL_E_INVALIDIRQ:      Invalid IRQ number. Must be 0 <= birq <= 15.
  *      -EINVAL: Invalid DSP word size (must be > 0).
  *               Invalid base address for DSP communications.
  *  Requires:
diff --git a/arch/arm/plat-omap/include/dspbridge/nldrdefs.h b/arch/arm/plat-omap/include/dspbridge/nldrdefs.h
index 9ab99d3..440d831 100644
--- a/arch/arm/plat-omap/include/dspbridge/nldrdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/nldrdefs.h
@@ -250,7 +250,6 @@ typedef bool(*nldr_initfxn) (void);
  *      -ENXIO:     Can't overlay phase because overlay memory
  *                              is already in use.
  *      -EILSEQ:           Failure in dynamic loader library.
- *      DSP_EFWRITE:            Failed to write phase's code or date to target.
  *  Requires:
  *      nldr_init(void) called.
  *      Valid nldr_node_obj.
diff --git a/arch/arm/plat-omap/include/dspbridge/node.h b/arch/arm/plat-omap/include/dspbridge/node.h
index ff2c673..d5764b7 100644
--- a/arch/arm/plat-omap/include/dspbridge/node.h
+++ b/arch/arm/plat-omap/include/dspbridge/node.h
@@ -105,8 +105,6 @@ extern dsp_status node_alloc_msg_buf(struct node_object *hnode,
  *      -EBADR:    Node is not in the NODE_ALLOCATED, NODE_PAUSED,
  *                          or NODE_RUNNING state.
  *      -ETIME:       A timeout occurred before the DSP responded.
- *      DSP_ERESTART:       A critical error has occurred and the DSP is
- *                          being restarted.
  *  Requires:
  *      node_init(void) called.
  *  Ensures:
@@ -202,10 +200,7 @@ extern dsp_status node_connect(struct node_object *hNode1,
  *      -ESPIPE:        Create function not found in the COFF file.
  *      -EBADR:    Node is not in the NODE_ALLOCATED state.
  *      -ENOMEM:        Memory allocation failure on the DSP.
- *      DSP_ETASK:          Unable to create node's task or process on the DSP.
- *      DSP_ESTREAM:        Stream creation failure on the DSP.
  *      -ETIME:       A timeout occurred before the DSP responded.
- *      DSP_EUSER1-16:      A user-defined failure occurred on the DSP.
  *      -EPERM:          A failure occurred, unable to create node.
  *  Requires:
  *      node_init(void) called.
@@ -252,8 +247,6 @@ extern dsp_status node_create_mgr(OUT struct node_mgr **phNodeMgr,
  *      0:            Success.
  *      -EFAULT:        Invalid hnode.
  *      -ETIME:       A timeout occurred before the DSP responded.
- *      DSP_EDELETE:        A deletion failure occurred.
- *      DSP_EUSER1-16:      Node specific failure occurred on the DSP.
  *      -EPERM:          A failure occurred in deleting the node.
  *      -ESPIPE:        Delete function not found in the COFF file.
  *  Requires:
@@ -537,7 +530,7 @@ extern dsp_status node_run(struct node_object *hnode);
  *      hnode:              Node object representing a node currently
  *                          running on the DSP.
  *      pstatus:            Location to store execute-phase function return
- *                          value (DSP_EUSER1-16).
+ *                          value.
  *  Returns:
  *      0:            Success.
  *      -EFAULT:        Invalid hnode.
diff --git a/arch/arm/plat-omap/include/dspbridge/proc.h b/arch/arm/plat-omap/include/dspbridge/proc.h
index 561842e..5da3ac2 100644
--- a/arch/arm/plat-omap/include/dspbridge/proc.h
+++ b/arch/arm/plat-omap/include/dspbridge/proc.h
@@ -91,10 +91,6 @@ extern dsp_status proc_auto_start(struct cfg_devnode *dev_node_obj,
  *      -EFAULT :       Invalid processor handle.
  *      -ETIME:       A Timeout Occured before the Control information
  *			  could be sent.
- *      DSP_EACCESSDENIED:  Client does not have the access rights required
- *			  to call this function.
- *      DSP_ERESTART:       A Critical error has occured and the DSP is being
- *			  restarted.
  *      -EPERM   :       General Failure.
  *  Requires:
  *      PROC Initialized.
@@ -175,8 +171,6 @@ extern dsp_status proc_enum_nodes(void *hprocessor,
  *      -EBADR:    The processor is not in the PROC_RUNNING state.
  *      -ETIME:       A timeout occured before the DSP responded to the
  *			  querry.
- *      DSP_ERESTART:       A Critical error has occured and the DSP is being
- *			  restarted.
  *      -EPERM   :       Unable to get Resource Information
  *  Requires:
  *      resource_info is not NULL.
@@ -322,11 +316,6 @@ extern dsp_status proc_get_trace(void *hprocessor, u8 * pbuf, u32 max_size);
  *      0:       Success.
  *      -ENOENT:       The DSP Execuetable was not found.
  *      -EFAULT:       Invalid processor handle.
- *      DSP_ECORRUTFILE:    Unable to Parse the DSP Execuetable
- *      DSP_EATTACHED:      Abort because a GPP Client is attached to the
- *			  specified Processor
- *      DSP_EACCESSDENIED:  Client does not have the required access rights
- *			  to reset and load the Processor
  *      -EPERM   :       Unable to Load the Processor
  *  Requires:
  *      user_args is not NULL
diff --git a/arch/arm/plat-omap/include/dspbridge/strm.h b/arch/arm/plat-omap/include/dspbridge/strm.h
index 5a8a922..13de4b7 100644
--- a/arch/arm/plat-omap/include/dspbridge/strm.h
+++ b/arch/arm/plat-omap/include/dspbridge/strm.h
@@ -201,7 +201,6 @@ extern dsp_status strm_get_info(struct strm_object *hStrm,
  *      0:        Success.
  *      -EFAULT:    Invalid hStrm.
  *      -ETIME:   A timeout occurred before the stream could be idled.
- *      DSP_ERESTART:   A critical error occurred, DSP is being restarted.
  *      -EPERM:      Unable to idle stream.
  *  Requires:
  *      strm_init(void) called.
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 39/40] DSPBRIDGE: error code guide
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (36 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 38/40] DSPBRIDGE: removed unused error codes from comments Omar Ramirez Luna
@ 2010-06-03  5:47 ` Omar Ramirez Luna
  2010-06-11 23:00 ` [PATCH 00/40] dspbridge: trivial error code cleanup Ramirez Luna, Omar
  38 siblings, 0 replies; 40+ messages in thread
From: Omar Ramirez Luna @ 2010-06-03  5:47 UTC (permalink / raw)
  To: linux-omap
  Cc: Omar Ramirez Luna, Shivananda Hebbar, Hiroshi DOYU,
	Fernando Guzman Lugo, Ivan Gomez Castellanos, Ernesto Ramos,
	Armando Uribe De Leon, Ameya Palande, Felipe Contreras

Document which specifies the uses of kernel error codes within
bridge driver, in some case it also contains a common use case
were the error might be seen.

It was generated from a previously deleted errbase.h file.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 Documentation/tidspbridge/error-codes |  157 +++++++++++++++++++++++++++++++++
 1 files changed, 157 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/tidspbridge/error-codes

diff --git a/Documentation/tidspbridge/error-codes b/Documentation/tidspbridge/error-codes
new file mode 100644
index 0000000..12826e2
--- /dev/null
+++ b/Documentation/tidspbridge/error-codes
@@ -0,0 +1,157 @@
+			DSP/Bridge Error Code Guide
+
+
+Success code is always taken as 0, except for one case where a success status
+different than 0 can be possible, this is when enumerating a series of dsp
+objects, if the enumeration doesn't have any more objects it is considered as a
+successful case. In this case a positive ENODATA is returned (TODO: Change to
+avoid this case).
+
+Error codes are returned as a negative 1, if an specific code is expected, it
+can be propagated to user space by reading errno symbol defined in errno.h, for
+specific details on the implementation a copy of the standard used should be
+read first.
+
+The error codes used by this driver are:
+
+[EPERM]
+    General driver failure.
+
+    According to the use case the following might apply:
+    - Device is in 'sleep/suspend' mode due to DPM.
+    - User cannot mark end of stream on an input channel.
+    - Requested operation is invalid for the node type.
+    - Invalid alignment for the node messaging buffer.
+    - The specified direction is invalid for the stream.
+    - Invalid stream mode.
+
+[ENOENT]
+    The specified object or file was not found.
+
+[ESRCH]
+    A shared memory buffer contained in a message or stream could not be mapped
+    to the GPP client process's virtual space.
+
+[EIO]
+    Driver interface I/O error.
+
+    or:
+    - Unable to plug channel ISR for configured IRQ.
+    - No free I/O request packets are available.
+
+[ENXIO]
+    Unable to find a named section in DSP executable or a non-existent memory
+    segment identifier was specified.
+
+[EBADF]
+    General error for file handling:
+
+    - Unable to open file.
+    - Unable to read file.
+    - An error occurred while parsing the DSP executable file.
+
+[ENOMEM]
+    A memory allocation failure occurred.
+
+[EACCES]
+    - Unable to read content of DCD data section; this is typically caused by
+    improperly configured nodes.
+    - Unable to decode DCD data section content; this is typically caused by
+    changes to DSP/BIOS Bridge data structures.
+    - Unable to get pointer to DCD data section; this is typically caused by
+    improperly configured UUIDs.
+    - Unable to load file containing DCD data section; this is typically
+    caused by a missing COFF file.
+    - The specified COFF file does not contain a valid node registration
+    section.
+
+[EFAULT]
+    Invalid pointer or handler.
+
+[EEXIST]
+    Attempted to create a channel manager  when one already exists.
+
+[EINVAL]
+    Invalid argument.
+
+[ESPIPE]
+    Symbol not found in the COFF file.  DSPNode_Create will return this if
+    the iAlg function table for an xDAIS socket is not found in the COFF file.
+    In this case, force the symbol to be linked into the COFF file.
+    DSPNode_Create, DSPNode_Execute, and DSPNode_Delete will return this if
+    the create, execute, or delete phase function, respectively, could not be
+    found in the COFF file.
+
+    - No symbol table is loaded/found for this board.
+    - Unable to initialize the ZL COFF parsing module.
+
+[EPIPE]
+    I/O is currently pending.
+
+    - End of stream was already requested on this output channel.
+
+[EDOM]
+    A parameter is specified outside its valid range.
+
+[ENOSYS]
+    The indicated operation is not supported.
+
+[EIDRM]
+    During enumeration a change in the number or properties of the objects
+    has occurred.
+
+[ECHRNG]
+    Attempt to created channel manager with too many channels or channel ID out
+    of range.
+
+[EBADR]
+    The state of the specified object is incorrect for the requested operation.
+
+    - Invalid segment ID.
+
+[ENODATA]
+    Unable to retrieve resource information from the registry.
+
+    - No more registry values.
+
+[ETIME]
+    A timeout occurred before the requested operation could complete.
+
+[ENOSR]
+    A stream has been issued the maximum number of buffers allowed in the
+    stream at once; buffers must be reclaimed from the stream before any more
+    can be issued.
+
+    - No free channels are available.
+
+[EILSEQ]
+    Error occurred in a dynamic loader library function.
+
+[EISCONN]
+    The Specified Connection already exists.
+
+[ENOTCONN]
+    Nodes not connected.
+
+[ETIMEDOUT]
+    Timeout occurred waiting for a response from the hardware.
+
+    - Wait for flush operation on an output channel timed out.
+
+[ECONNREFUSED]
+    No more connections can be made for this node.
+
+[EALREADY]
+    Channel is already in use.
+
+[EREMOTEIO]
+    dwTimeOut parameter was CHNL_IOCNOWAIT, yet no I/O completions were
+    queued.
+
+[ECANCELED]
+    I/O has been cancelled on this channel.
+
+[ENOKEY]
+    Invalid subkey parameter.
+
+    - UUID not found in registry.
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* RE: [PATCH 00/40] dspbridge: trivial error code cleanup
  2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
                   ` (37 preceding siblings ...)
  2010-06-03  5:47 ` [PATCH 39/40] DSPBRIDGE: error code guide Omar Ramirez Luna
@ 2010-06-11 23:00 ` Ramirez Luna, Omar
  38 siblings, 0 replies; 40+ messages in thread
From: Ramirez Luna, Omar @ 2010-06-11 23:00 UTC (permalink / raw)
  To: Ramirez Luna, Omar, linux-omap
  Cc: Hebbar, Shivananda, Hiroshi DOYU, Guzman Lugo, Fernando,
	Gomez Castellanos, Ivan, Ramos Falcon, Ernesto,
	Uribe de Leon, Armando, Ameya Palande, Felipe Contreras

>From: Ramirez Luna, Omar
>
>These set of patches gets rid of the custom error codes still present.
>
>Although there are a lot of patches most of them are just replacements
>which were broken into single patches to avoid big patch files.
>
>One of the patches creates a help file with the matching linux
>error codes just in case the error is not descriptive enough, and
>it also lists a common scenario where the error might be seen.
>
>Finally, the last patch replaces a custom typedef (dsp_status)
>with an int type as now those errors can have a negative value.
>
>Omar Ramirez Luna (40):
>  DSPBRIDGE: Remove success codes
>  DSPBRIDGE: change DSP_SENUMCOMPLETE for ENODATA
>  DSPBRIDGE: err code replace CHNL_E_WAITTIMEOUT with ETIMEDOUT
>  DSPBRIDGE: err code replace CHNL_E_NOEOS with EPERM
>  DSPBRIDGE: err code replace CHNL_E_BUFSIZE with EINVAL
>  DSPBRIDGE: err code replace CHNL_E_NOIORPS with EIO
>  DSPBRIDGE: err code replace CHNL_E_ISR with EIO
>  DSPBRIDGE: err code replace CHNL_E_MGREXISTS with EEXIST
>  DSPBRIDGE: err code replace CHNL_E_NOMEMMAP with EFAULT
>  DSPBRIDGE: err code replace CHNL_E_INVALIDMEMBASE with EINVAL
>  DSPBRIDGE: err code replace CHNL_E_INVALIDWORDSIZE with EINVAL
>  DSPBRIDGE: err code replace CHNL_E_EOS with EPIPE
>  DSPBRIDGE: err code replace CHNL_E_NOIOC with EREMOTEIO
>  DSPBRIDGE: err code replace CHNL_E_BADCHANID with ECHRNG
>  DSPBRIDGE: err code replace CHNL_E_OUTOFSTREAMS with ENOSR
>  DSPBRIDGE: err code replace CHNL_E_MAXCHANNELS with ECHRNG
>  DSPBRIDGE: err code replace COD_E_ZLCREATEFAILED with ESPIPE
>  DSPBRIDGE: err code replace COD_E_SYMBOLNOTFOUND with ESPIPE
>  DSPBRIDGE: err code replace COD_E_NOSYMBOLSLOADED with ESPIPE
>  DSPBRIDGE: err code replace DSP_EDPMSUSPEND with EPERM
>  DSPBRIDGE: err code replace DSP_EDYNLOAD with EILSEQ
>  DSPBRIDGE: err code replace DSP_EBADSEGID with EBADR
>  DSPBRIDGE: err code replace DSP_EOVERLAYMEMORY with ENXIO
>  DSPBRIDGE: err code replace DSP_ENOSECT with ENXIO
>  DSPBRIDGE: err code replace DSP_ETRANSLATE with ESRCH
>  DSPBRIDGE: err code replace DSP_ENOTFOUND with ENOENT
>  DSPBRIDGE: err code replace DSP_EDCDNOAUTOREGISTER with EACCES
>  DSPBRIDGE: err code replace DSP_EDCDLOADBASE with EACCES
>  DSPBRIDGE: err code replace DSP_EDCDGETSECT with EACCES
>  DSPBRIDGE: err code replace DSP_EDCDPARSESECT with EACCES
>  DSPBRIDGE: err code replace DSP_EDCDREADSECT with EACCES
>  DSPBRIDGE: err code replace DSP_ESYMBOL with ESPIPE
>  DSPBRIDGE: err code replace DSP_EWRONGSTATE with EBADR
>  DSPBRIDGE: err code replace DSP_EPENDING with EPIPE
>  DSPBRIDGE: err code replace DSP_ECHANGEDURINGENUM with EIDRM
>  DSPBRIDGE: remove custom errbase definitions
>  DSPBRIDGE: cleanup for duplicated error codes
>  DSPBRIDGE: removed unused error codes from comments
>  DSPBRIDGE: error code guide
>  DSPBRIDGE: remove dsp_status typedef
>
> Documentation/tidspbridge/error-codes              |  157 ++++++++++++++
> arch/arm/plat-omap/include/dspbridge/_chnl_sm.h    |    2 +-
> arch/arm/plat-omap/include/dspbridge/cfg.h         |   57 +++---
> arch/arm/plat-omap/include/dspbridge/chnl.h        |   31 ++--
> arch/arm/plat-omap/include/dspbridge/clk.h         |    8 +-
> arch/arm/plat-omap/include/dspbridge/cmm.h         |   44 ++--
> arch/arm/plat-omap/include/dspbridge/cod.h         |   61 +++---
> arch/arm/plat-omap/include/dspbridge/dbdcd.h       |   73 +++----
> arch/arm/plat-omap/include/dspbridge/dbdcddef.h    |    2 +-
> arch/arm/plat-omap/include/dspbridge/dbdefs.h      |    5 +-
> arch/arm/plat-omap/include/dspbridge/dbldefs.h     |    2 +-
> arch/arm/plat-omap/include/dspbridge/dbll.h        |   14 +-
> arch/arm/plat-omap/include/dspbridge/dblldefs.h    |   47 ++---
> arch/arm/plat-omap/include/dspbridge/dev.h         |  156 ++++++--------
> arch/arm/plat-omap/include/dspbridge/disp.h        |   25 +--
> arch/arm/plat-omap/include/dspbridge/dmm.h         |   18 +-
> arch/arm/plat-omap/include/dspbridge/drv.h         |   38 ++--
> .../arm/plat-omap/include/dspbridge/dspapi-ioctl.h |    2 +-
> arch/arm/plat-omap/include/dspbridge/dspapi.h      |    8 +-
> arch/arm/plat-omap/include/dspbridge/dspchnl.h     |   24 +-
> arch/arm/plat-omap/include/dspbridge/dspdefs.h     |  226 ++++++++++----------
> arch/arm/plat-omap/include/dspbridge/dspdeh.h      |    8 +-
> arch/arm/plat-omap/include/dspbridge/dspio.h       |   10 +-
> arch/arm/plat-omap/include/dspbridge/dspmsg.h      |   10 +-
> arch/arm/plat-omap/include/dspbridge/errbase.h     |  177 ---------------
> arch/arm/plat-omap/include/dspbridge/io.h          |   19 +-
> arch/arm/plat-omap/include/dspbridge/io_sm.h       |    6 +-
> arch/arm/plat-omap/include/dspbridge/mgr.h         |   34 ++--
> arch/arm/plat-omap/include/dspbridge/msg.h         |    2 +-
> arch/arm/plat-omap/include/dspbridge/nldr.h        |   14 +-
> arch/arm/plat-omap/include/dspbridge/nldrdefs.h    |   31 ++--
> arch/arm/plat-omap/include/dspbridge/node.h        |  148 ++++++-------
> arch/arm/plat-omap/include/dspbridge/nodepriv.h    |    8 +-
> arch/arm/plat-omap/include/dspbridge/ntfy.h        |   13 +-
> arch/arm/plat-omap/include/dspbridge/proc.h        |  117 +++++------
> arch/arm/plat-omap/include/dspbridge/pwr.h         |   25 +--
> .../plat-omap/include/dspbridge/resourcecleanup.h  |   30 ++--
> arch/arm/plat-omap/include/dspbridge/rmm.h         |   10 +-
> arch/arm/plat-omap/include/dspbridge/strm.h        |   71 +++---
> arch/arm/plat-omap/include/dspbridge/sync.h        |   11 +-
> drivers/dsp/bridge/core/_tiomap.h                  |    4 +-
> drivers/dsp/bridge/core/_tiomap_pwr.h              |   14 +-
> drivers/dsp/bridge/core/chnl_sm.c                  |   83 ++++----
> drivers/dsp/bridge/core/dsp-clock.c                |    9 +-
> drivers/dsp/bridge/core/io_sm.c                    |   75 ++++----
> drivers/dsp/bridge/core/mmu_fault.c                |    1 -
> drivers/dsp/bridge/core/msg_sm.c                   |   31 ++--
> drivers/dsp/bridge/core/tiomap3430.c               |  123 ++++++------
> drivers/dsp/bridge/core/tiomap3430_pwr.c           |   45 ++--
> drivers/dsp/bridge/core/tiomap_io.c                |   21 +-
> drivers/dsp/bridge/core/tiomap_io.h                |    6 +-
> drivers/dsp/bridge/core/ue_deh.c                   |   21 +-
> drivers/dsp/bridge/core/wdt.c                      |    1 -
> drivers/dsp/bridge/pmgr/chnl.c                     |   17 +-
> drivers/dsp/bridge/pmgr/cmm.c                      |   47 ++--
> drivers/dsp/bridge/pmgr/cod.c                      |   61 +++---
> drivers/dsp/bridge/pmgr/dbll.c                     |   47 ++--
> drivers/dsp/bridge/pmgr/dev.c                      |  113 +++++-----
> drivers/dsp/bridge/pmgr/dmm.c                      |   43 ++--
> drivers/dsp/bridge/pmgr/dspapi.c                   |  101 +++++-----
> drivers/dsp/bridge/pmgr/io.c                       |   13 +-
> drivers/dsp/bridge/pmgr/msg.c                      |    5 +-
> drivers/dsp/bridge/rmgr/dbdcd.c                    |   97 +++++----
> drivers/dsp/bridge/rmgr/disp.c                     |   35 ++--
> drivers/dsp/bridge/rmgr/drv.c                      |   97 ++++-----
> drivers/dsp/bridge/rmgr/drv_interface.c            |   13 +-
> drivers/dsp/bridge/rmgr/dspdrv.c                   |    3 +-
> drivers/dsp/bridge/rmgr/mgr.c                      |   43 ++--
> drivers/dsp/bridge/rmgr/nldr.c                     |   91 ++++----
> drivers/dsp/bridge/rmgr/node.c                     |  157 +++++++-------
> drivers/dsp/bridge/rmgr/proc.c                     |  131 ++++++------
> drivers/dsp/bridge/rmgr/pwr.c                      |   16 +-
> drivers/dsp/bridge/rmgr/rmm.c                      |   11 +-
> drivers/dsp/bridge/rmgr/strm.c                     |   84 ++++----
> drivers/dsp/bridge/services/cfg.c                  |   41 ++--
> drivers/dsp/bridge/services/sync.c                 |   10 +-
> 76 files changed, 1666 insertions(+), 1788 deletions(-)
> create mode 100644 Documentation/tidspbridge/error-codes
> delete mode 100644 arch/arm/plat-omap/include/dspbridge/errbase.h

Pushed to dspbridge

- omar

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2010-06-11 23:00 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-03  5:47 [PATCH 00/40] dspbridge: trivial error code cleanup Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 02/40] DSPBRIDGE: change DSP_SENUMCOMPLETE for ENODATA Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 03/40] DSPBRIDGE: err code replace CHNL_E_WAITTIMEOUT with ETIMEDOUT Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 04/40] DSPBRIDGE: err code replace CHNL_E_NOEOS with EPERM Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 05/40] DSPBRIDGE: err code replace CHNL_E_BUFSIZE with EINVAL Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 06/40] DSPBRIDGE: err code replace CHNL_E_NOIORPS with EIO Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 07/40] DSPBRIDGE: err code replace CHNL_E_ISR " Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 08/40] DSPBRIDGE: err code replace CHNL_E_MGREXISTS with EEXIST Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 09/40] DSPBRIDGE: err code replace CHNL_E_NOMEMMAP with EFAULT Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 10/40] DSPBRIDGE: err code replace CHNL_E_INVALIDMEMBASE with EINVAL Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 11/40] DSPBRIDGE: err code replace CHNL_E_INVALIDWORDSIZE " Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 12/40] DSPBRIDGE: err code replace CHNL_E_EOS with EPIPE Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 13/40] DSPBRIDGE: err code replace CHNL_E_NOIOC with EREMOTEIO Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 14/40] DSPBRIDGE: err code replace CHNL_E_BADCHANID with ECHRNG Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 15/40] DSPBRIDGE: err code replace CHNL_E_OUTOFSTREAMS with ENOSR Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 16/40] DSPBRIDGE: err code replace CHNL_E_MAXCHANNELS with ECHRNG Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 17/40] DSPBRIDGE: err code replace COD_E_ZLCREATEFAILED with ESPIPE Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 18/40] DSPBRIDGE: err code replace COD_E_SYMBOLNOTFOUND " Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 19/40] DSPBRIDGE: err code replace COD_E_NOSYMBOLSLOADED " Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 20/40] DSPBRIDGE: err code replace DSP_EDPMSUSPEND with EPERM Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 21/40] DSPBRIDGE: err code replace DSP_EDYNLOAD with EILSEQ Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 22/40] DSPBRIDGE: err code replace DSP_EBADSEGID with EBADR Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 23/40] DSPBRIDGE: err code replace DSP_EOVERLAYMEMORY with ENXIO Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 24/40] DSPBRIDGE: err code replace DSP_ENOSECT " Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 25/40] DSPBRIDGE: err code replace DSP_ETRANSLATE with ESRCH Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 26/40] DSPBRIDGE: err code replace DSP_ENOTFOUND with ENOENT Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 27/40] DSPBRIDGE: err code replace DSP_EDCDNOAUTOREGISTER with EACCES Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 28/40] DSPBRIDGE: err code replace DSP_EDCDLOADBASE " Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 29/40] DSPBRIDGE: err code replace DSP_EDCDGETSECT " Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 30/40] DSPBRIDGE: err code replace DSP_EDCDPARSESECT " Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 31/40] DSPBRIDGE: err code replace DSP_EDCDREADSECT " Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 32/40] DSPBRIDGE: err code replace DSP_ESYMBOL with ESPIPE Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 33/40] DSPBRIDGE: err code replace DSP_EWRONGSTATE with EBADR Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 34/40] DSPBRIDGE: err code replace DSP_EPENDING with EPIPE Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 35/40] DSPBRIDGE: err code replace DSP_ECHANGEDURINGENUM with EIDRM Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 36/40] DSPBRIDGE: remove custom errbase definitions Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 37/40] DSPBRIDGE: cleanup for duplicated error codes Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 38/40] DSPBRIDGE: removed unused error codes from comments Omar Ramirez Luna
2010-06-03  5:47 ` [PATCH 39/40] DSPBRIDGE: error code guide Omar Ramirez Luna
2010-06-11 23:00 ` [PATCH 00/40] dspbridge: trivial error code cleanup Ramirez Luna, Omar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).