Skip to content

dspbridge: trivial error code cleanup

Omar Ramirez Luna linux-omap 1 version Applied

Status from this message: Pushed to dspbridge

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest38 of 40 patches 1 replyApplied

38 of 40 patches are in this archive. The cover letter announces 40.

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
2/40DSPBRIDGE: change DSP_SENUMCOMPLETE for ENODATAarch/arm/plat-omap/include/dspbridge/dbdcd.h drivers/dsp/bridge/rmgr/dbdcd.c+6 -20 replies
3/40DSPBRIDGE: err code replace CHNL_E_WAITTIMEOUT with ETIMEDOUTarch/arm/plat-omap/include/dspbridge/dspdefs.h drivers/dsp/bridge/core/chnl_sm.c+2 -20 replies
4/40DSPBRIDGE: err code replace CHNL_E_NOEOS with EPERMarch/arm/plat-omap/include/dspbridge/dspdefs.h drivers/dsp/bridge/core/chnl_sm.c+2 -20 replies
5/40DSPBRIDGE: err code replace CHNL_E_BUFSIZE with EINVALarch/arm/plat-omap/include/dspbridge/dspdefs.h drivers/dsp/bridge/core/chnl_sm.c+2 -20 replies
6/40DSPBRIDGE: err code replace CHNL_E_NOIORPS with EIOarch/arm/plat-omap/include/dspbridge/dspdefs.h drivers/dsp/bridge/core/chnl_sm.c drivers/dsp/bridge/rmgr/strm.c+4 -40 replies
7/40DSPBRIDGE: err code replace CHNL_E_ISR with EIOarch/arm/plat-omap/include/dspbridge/chnl.h arch/arm/plat-omap/include/dspbridge/dspdefs.h arch/arm/plat-omap/include/dspbridge/io.h +1 more+4 -40 replies
8/40DSPBRIDGE: err code replace CHNL_E_MGREXISTS with EEXISTarch/arm/plat-omap/include/dspbridge/chnl.h drivers/dsp/bridge/pmgr/chnl.c+2 -20 replies
9/40DSPBRIDGE: err code replace CHNL_E_NOMEMMAP with EFAULTarch/arm/plat-omap/include/dspbridge/dspdefs.h drivers/dsp/bridge/core/io_sm.c+12 -120 replies
10/40DSPBRIDGE: err code replace CHNL_E_INVALIDMEMBASE with EINVALarch/arm/plat-omap/include/dspbridge/chnl.h arch/arm/plat-omap/include/dspbridge/io.h drivers/dsp/bridge/core/io_sm.c +1 more+5 -50 replies
11/40DSPBRIDGE: err code replace CHNL_E_INVALIDWORDSIZE with EINVALarch/arm/plat-omap/include/dspbridge/chnl.h arch/arm/plat-omap/include/dspbridge/io.h drivers/dsp/bridge/pmgr/chnl.c +1 more+4 -40 replies
12/40DSPBRIDGE: err code replace CHNL_E_EOS with EPIPEarch/arm/plat-omap/include/dspbridge/dspdefs.h drivers/dsp/bridge/core/chnl_sm.c+3 -30 replies
13/40DSPBRIDGE: err code replace CHNL_E_NOIOC with EREMOTEIOarch/arm/plat-omap/include/dspbridge/dspdefs.h drivers/dsp/bridge/core/chnl_sm.c+2 -20 replies
14/40DSPBRIDGE: err code replace CHNL_E_BADCHANID with ECHRNGarch/arm/plat-omap/include/dspbridge/dspdefs.h drivers/dsp/bridge/core/chnl_sm.c drivers/dsp/bridge/rmgr/strm.c+5 -50 replies
15/40DSPBRIDGE: err code replace CHNL_E_OUTOFSTREAMS with ENOSRarch/arm/plat-omap/include/dspbridge/dspdefs.h drivers/dsp/bridge/core/chnl_sm.c drivers/dsp/bridge/rmgr/strm.c+3 -30 replies
16/40DSPBRIDGE: err code replace CHNL_E_MAXCHANNELS with ECHRNGarch/arm/plat-omap/include/dspbridge/chnl.h drivers/dsp/bridge/pmgr/chnl.c+2 -20 replies
17/40DSPBRIDGE: err code replace COD_E_ZLCREATEFAILED with ESPIPEarch/arm/plat-omap/include/dspbridge/cod.h arch/arm/plat-omap/include/dspbridge/dev.h drivers/dsp/bridge/pmgr/cod.c+4 -40 replies
18/40DSPBRIDGE: err code replace COD_E_SYMBOLNOTFOUND with ESPIPEarch/arm/plat-omap/include/dspbridge/cod.h arch/arm/plat-omap/include/dspbridge/dev.h drivers/dsp/bridge/pmgr/cod.c +2 more+6 -60 replies
19/40DSPBRIDGE: err code replace COD_E_NOSYMBOLSLOADED with ESPIPEarch/arm/plat-omap/include/dspbridge/cod.h arch/arm/plat-omap/include/dspbridge/dev.h drivers/dsp/bridge/pmgr/cod.c+7 -70 replies
20/40DSPBRIDGE: err code replace DSP_EDPMSUSPEND with EPERMdrivers/dsp/bridge/rmgr/drv_interface.c+1 -10 replies
21/40DSPBRIDGE: err code replace DSP_EDYNLOAD with EILSEQarch/arm/plat-omap/include/dspbridge/dblldefs.h arch/arm/plat-omap/include/dspbridge/nldrdefs.h drivers/dsp/bridge/pmgr/dbll.c +1 more+8 -80 replies
22/40DSPBRIDGE: err code replace DSP_EBADSEGID with EBADRdrivers/dsp/bridge/rmgr/node.c+2 -20 replies
23/40DSPBRIDGE: err code replace DSP_EOVERLAYMEMORY with ENXIOarch/arm/plat-omap/include/dspbridge/nldrdefs.h arch/arm/plat-omap/include/dspbridge/rmm.h drivers/dsp/bridge/rmgr/rmm.c+3 -30 replies
24/40DSPBRIDGE: err code replace DSP_ENOSECT with ENXIOarch/arm/plat-omap/include/dspbridge/dblldefs.h drivers/dsp/bridge/pmgr/dbll.c+6 -60 replies
25/40DSPBRIDGE: err code replace DSP_ETRANSLATE with ESRCHdrivers/dsp/bridge/rmgr/node.c drivers/dsp/bridge/rmgr/strm.c+7 -70 replies
26/40DSPBRIDGE: err code replace DSP_ENOTFOUND with ENOENTarch/arm/plat-omap/include/dspbridge/proc.h drivers/dsp/bridge/pmgr/dmm.c drivers/dsp/bridge/rmgr/drv.c +3 more+16 -160 replies
27/40DSPBRIDGE: err code replace DSP_EDCDNOAUTOREGISTER with EACCESarch/arm/plat-omap/include/dspbridge/dbdcd.h drivers/dsp/bridge/rmgr/dbdcd.c drivers/dsp/bridge/rmgr/proc.c+6 -60 replies
28/40DSPBRIDGE: err code replace DSP_EDCDLOADBASE with EACCESarch/arm/plat-omap/include/dspbridge/dbdcd.h drivers/dsp/bridge/rmgr/dbdcd.c+6 -60 replies
29/40DSPBRIDGE: err code replace DSP_EDCDGETSECT with EACCESarch/arm/plat-omap/include/dspbridge/dbdcd.h drivers/dsp/bridge/rmgr/dbdcd.c+2 -20 replies
30/40DSPBRIDGE: err code replace DSP_EDCDPARSESECT with EACCESarch/arm/plat-omap/include/dspbridge/dbdcd.h drivers/dsp/bridge/rmgr/dbdcd.c+2 -20 replies
31/40DSPBRIDGE: err code replace DSP_EDCDREADSECT with EACCESarch/arm/plat-omap/include/dspbridge/dbdcd.h drivers/dsp/bridge/rmgr/dbdcd.c+8 -80 replies
32/40DSPBRIDGE: err code replace DSP_ESYMBOL with ESPIPEarch/arm/plat-omap/include/dspbridge/nldrdefs.h arch/arm/plat-omap/include/dspbridge/node.h drivers/dsp/bridge/rmgr/nldr.c+7 -70 replies
33/40DSPBRIDGE: err code replace DSP_EWRONGSTATE with EBADRarch/arm/plat-omap/include/dspbridge/node.h arch/arm/plat-omap/include/dspbridge/proc.h drivers/dsp/bridge/core/msg_sm.c +2 more+21 -210 replies
34/40DSPBRIDGE: err code replace DSP_EPENDING with EPIPEarch/arm/plat-omap/include/dspbridge/strm.h drivers/dsp/bridge/rmgr/strm.c+4 -40 replies
35/40DSPBRIDGE: err code replace DSP_ECHANGEDURINGENUM with EIDRMarch/arm/plat-omap/include/dspbridge/mgr.h drivers/dsp/bridge/rmgr/dbdcd.c+2 -20 replies
36/40DSPBRIDGE: remove custom errbase definitionsarch/arm/plat-omap/include/dspbridge/errbase.h arch/arm/plat-omap/include/dspbridge/ntfy.h arch/arm/plat-omap/include/dspbridge/pwr.h +32 more+0 -2110 replies
37/40DSPBRIDGE: cleanup for duplicated error codesarch/arm/plat-omap/include/dspbridge/cfg.h arch/arm/plat-omap/include/dspbridge/chnl.h arch/arm/plat-omap/include/dspbridge/cod.h +9 more+44 -650 replies
38/40DSPBRIDGE: removed unused error codes from commentsarch/arm/plat-omap/include/dspbridge/chnl.h arch/arm/plat-omap/include/dspbridge/cod.h arch/arm/plat-omap/include/dspbridge/dblldefs.h +8 more+1 -490 replies
39/40DSPBRIDGE: error code guideDocumentation/tidspbridge/error-codes+157 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/40] dspbridge: trivial error code cleanup

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