Re: [RFC][PATCH 0/19] Cleanup- custom error codes

2010-03-25 Thread Nishanth Menon

Hebbar, Shivananda had written, on 03/25/2010 03:06 PM, the following:

This RFC patch series tries to address the use of Linux standard error codes in 
dspbridge.

1. 41 error codes are not currently used in bridge. Hence they can be removed.




2. 19 error codes are mapped to Linux standard error codes. Patches 1 to 19 
contains these changes.

3. 7 error codes are used as base address to access the rest of error codes 
which can be removed. Some base addresses are removed as part of 1 but some are 
still kept as point 4 has dependency on these addresses.
Ex: (Removed base address)
/* FAILURE Codes: LDR */
#define LDR_EBASE   (DSP_COMP_EBASE + 0x100)

/* Insufficient memory to export class driver services. */
#define LDR_E_NOMEMORY  (LDR_EBASE + 0x00)

/* Unable to find WMD file in system directory. */
#define LDR_E_FILEUNABLETOOPEN  (LDR_EBASE + 0x01)

4. For 46 error codes, couldn't find an exact match in Linux error code. This 
still needs to be worked out. This is not addressed in this patch series. (See 
attached text file for details)

lets keep this for stage 2 cleanup.


As for as OMX components concerned, they really don't care about the specific 
error codes. Hence no changes required for the OMX code.

Shivananda Hebbar (19)

DSPBRIDGE: Cleanup custom error code (DSP_EALREADYCONNECTED -EISCONN) DSPBRIDGE: 
Cleanup custom error code (DSP_ECORRUPTFILE -EBADF)
DSPBRIDGE: Cleanup custom error code (DSP_EFILE -ENOENT) 
DSPBRIDGE: Cleanup custom error code (DSP_EHANDLE - EFAULT) 
DSPBRIDGE: Cleanup custom error code (DSP_EINVALIDARG - EINVAL) 
DSPBRIDGE: Cleanup custom error code (DSP_ENOMEM - ENOMEM) 
DSPBRIDGE: Cleanup custom error code (DSP_ENODETYPE - EPERM)
DSPBRIDGE: Cleanup custom error code (DSP_ENOTIMPL - ENOSYS) 
DSPBRIDGE: Cleanup custom error code (DSP_EFOPEN - EBADF)
DSPBRIDGE: Cleanup custom error code (DSP_EPOINTER - EFAULT) 
DSPBRIDGE: Cleanup custom error code (DSP_ERANGE - EDOM)

DSPBRIDGE: Cleanup custom error code (DSP_ESIZE - EINVAL)
DSPBRIDGE: Cleanup custom error code (DSP_ETIMEOUT - ETIME)
DSPBRIDGE: Cleanup custom error code (DSP_EVALUE - EINVAL)
DSPBRIDGE: Cleanup custom error code (DSP_EUUID - ENOKEY)
DSPBRIDGE: Cleanup custom error code (DSP_ENOTCONNECTED - ENOTCONN)
DSPBRIDGE: Cleanup custom error code (CHNL_E_CHANBUSY - EALREADY)
DSPBRIDGE: Cleanup custom error code (CHNL_E_CANCELLED - ECANCELED)
DSPBRIDGE: Cleanup custom error code (WMD_E_TIMEOUT - ETIMEDOUT)



 Shivananda Hebbar (1)

 DSPBRIDGE: Cleanup- unused custom error codes

 Shivananda Hebbar (1)

 DSPBRIDGE: Cleanup- unused success codes

please add the remove unused codes into the series.
love the cleanup *but*:
arch/arm/plat-omap/include/dspbridge/dbdefs.h:typedef u32 dsp_status;
1) All usage of dsp_status should be changed to int
2) You should be using -E instead of Ex in all the patches.





[...]

--
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [RFC][PATCH 0/19] Cleanup- custom error codes

2010-03-25 Thread Hebbar, Shivananda

 -Original Message-
 From: Menon, Nishanth
 Sent: Thursday, March 25, 2010 3:58 PM
 To: Hebbar, Shivananda
 Cc: linux-omap@vger.kernel.org; Ramirez Luna, Omar; Felipe Contreras;
 Palande Ameya (Nokia-D/Helsinki)
 Subject: Re: [RFC][PATCH 0/19] Cleanup- custom error codes
 
 Hebbar, Shivananda had written, on 03/25/2010 03:06 PM, the following:
  This RFC patch series tries to address the use of Linux standard error
 codes in dspbridge.
 
  1. 41 error codes are not currently used in bridge. Hence they can be
 removed.
 
 
  2. 19 error codes are mapped to Linux standard error codes. Patches 1 to
 19 contains these changes.
 
  3. 7 error codes are used as base address to access the rest of error
 codes which can be removed. Some base addresses are removed as part of 1
 but some are still kept as point 4 has dependency on these addresses.
  Ex: (Removed base address)
  /* FAILURE Codes: LDR */
  #define LDR_EBASE   (DSP_COMP_EBASE + 0x100)
 
  /* Insufficient memory to export class driver services. */
  #define LDR_E_NOMEMORY  (LDR_EBASE + 0x00)
 
  /* Unable to find WMD file in system directory. */
  #define LDR_E_FILEUNABLETOOPEN  (LDR_EBASE + 0x01)
 
  4. For 46 error codes, couldn't find an exact match in Linux error code.
 This still needs to be worked out. This is not addressed in this patch
 series. (See attached text file for details)
 lets keep this for stage 2 cleanup.
 
  As for as OMX components concerned, they really don't care about the
 specific error codes. Hence no changes required for the OMX code.
 
  Shivananda Hebbar (19)
 
  DSPBRIDGE: Cleanup custom error code (DSP_EALREADYCONNECTED -EISCONN)
 DSPBRIDGE: Cleanup custom error code (DSP_ECORRUPTFILE -EBADF)
  DSPBRIDGE: Cleanup custom error code (DSP_EFILE -ENOENT)
  DSPBRIDGE: Cleanup custom error code (DSP_EHANDLE - EFAULT)
  DSPBRIDGE: Cleanup custom error code (DSP_EINVALIDARG - EINVAL)
  DSPBRIDGE: Cleanup custom error code (DSP_ENOMEM - ENOMEM)
  DSPBRIDGE: Cleanup custom error code (DSP_ENODETYPE - EPERM)
  DSPBRIDGE: Cleanup custom error code (DSP_ENOTIMPL - ENOSYS)
  DSPBRIDGE: Cleanup custom error code (DSP_EFOPEN - EBADF)
  DSPBRIDGE: Cleanup custom error code (DSP_EPOINTER - EFAULT)
  DSPBRIDGE: Cleanup custom error code (DSP_ERANGE - EDOM)
  DSPBRIDGE: Cleanup custom error code (DSP_ESIZE - EINVAL)
  DSPBRIDGE: Cleanup custom error code (DSP_ETIMEOUT - ETIME)
  DSPBRIDGE: Cleanup custom error code (DSP_EVALUE - EINVAL)
  DSPBRIDGE: Cleanup custom error code (DSP_EUUID - ENOKEY)
  DSPBRIDGE: Cleanup custom error code (DSP_ENOTCONNECTED - ENOTCONN)
  DSPBRIDGE: Cleanup custom error code (CHNL_E_CHANBUSY - EALREADY)
  DSPBRIDGE: Cleanup custom error code (CHNL_E_CANCELLED - ECANCELED)
  DSPBRIDGE: Cleanup custom error code (WMD_E_TIMEOUT - ETIMEDOUT)
 
 
   Shivananda Hebbar (1)
  
   DSPBRIDGE: Cleanup- unused custom error codes
  
   Shivananda Hebbar (1)
  
   DSPBRIDGE: Cleanup- unused success codes
 
 please add the remove unused codes into the series.
Ok
 love the cleanup *but*:
 arch/arm/plat-omap/include/dspbridge/dbdefs.h:typedef u32 dsp_status;
 1) All usage of dsp_status should be changed to int

Looks like MM code uses this variable. Even MM code needs to be changed for 
this. But changes are minimal.

 2) You should be using -E instead of Ex in all the patches.
 Ok!!

Regards,
Shivananda

 
 
 
 [...]
 
 --
 Regards,
 Nishanth Menon
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC][PATCH 0/19] Cleanup- custom error codes

2010-03-25 Thread Felipe Contreras
On Thu, Mar 25, 2010 at 11:37 PM, Hebbar, Shivananda x0heb...@ti.com wrote:
 love the cleanup *but*:
 arch/arm/plat-omap/include/dspbridge/dbdefs.h:typedef u32 dsp_status;
 1) All usage of dsp_status should be changed to int

 Looks like MM code uses this variable. Even MM code needs to be changed for 
 this. But changes are minimal.

What do you mean by MM uses this variable? If you mean user-space
(omx, gst-dsp), then no, error codes are passed through ioctl, which
returns an int.

And anyway on 32bit dsp_status = u32 = int.

 2) You should be using -E instead of Ex in all the patches.
  Ok!!

Yeah, otherwise DSP_FAILED will fail.

Cheers.

-- 
Felipe Contreras
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [RFC][PATCH 0/19] Cleanup- custom error codes

2010-03-25 Thread Hebbar, Shivananda


 -Original Message-
 From: Felipe Contreras [mailto:felipe.contre...@gmail.com]
 Sent: Thursday, March 25, 2010 5:08 PM
 To: Hebbar, Shivananda
 Cc: Menon, Nishanth; linux-omap@vger.kernel.org; Ramirez Luna, Omar;
 Felipe Contreras; Palande Ameya (Nokia-D/Helsinki)
 Subject: Re: [RFC][PATCH 0/19] Cleanup- custom error codes
 
 On Thu, Mar 25, 2010 at 11:37 PM, Hebbar, Shivananda x0heb...@ti.com
 wrote:
  love the cleanup *but*:
  arch/arm/plat-omap/include/dspbridge/dbdefs.h:typedef u32 dsp_status;
  1) All usage of dsp_status should be changed to int
 
  Looks like MM code uses this variable. Even MM code needs to be changed
 for this. But changes are minimal.
 
 What do you mean by MM uses this variable? If you mean user-space
 (omx, gst-dsp), then no, error codes are passed through ioctl, which
 returns an int.
Ok ignore my previous comment. TI Multimedia code (lcml) uses DSP_STATUS which 
is again declared in bridge user side header file.

So what Nishanth is referring to can be cleaned up from bridge driver code.

Regards,
Shivananda
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html