public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [DSPBRIDGE] Various compile warning fixes
@ 2009-04-17  9:30 Ameya Palande
  2009-04-17 14:13 ` Gupta, Ramesh
  0 siblings, 1 reply; 14+ messages in thread
From: Ameya Palande @ 2009-04-17  9:30 UTC (permalink / raw)
  To: linux-omap

From: Mika Kukkonen <mika.kukkonen@nokia.com>

This patch cleans up various warnings uncovered with extra warning flags:
  - empty if() bodies
  - incorrect use of unsigned variables
  - bad comparison of pointer value
  - pointless check of unsigned value being smaller than zero
  - keyword 'extern' has to be first one in variable declaration

Signed-off-by: Mika Kukkonen <mika.kukkonen@nokia.com>
---
 arch/arm/plat-omap/include/dspbridge/dbc.h |    6 +++---
 arch/arm/plat-omap/include/dspbridge/dbg.h |    4 ++--
 arch/arm/plat-omap/include/dspbridge/gt.h  |   14 +++++++-------
 arch/arm/plat-omap/include/dspbridge/mem.h |    2 +-
 drivers/dsp/bridge/services/kfile.c        |    4 ++--
 drivers/dsp/bridge/wmd/io_sm.c             |    8 +++-----
 drivers/dsp/bridge/wmd/ue_deh.c            |    2 +-
 7 files changed, 19 insertions(+), 21 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dbc.h b/arch/arm/plat-omap/include/dspbridge/dbc.h
index 0e6a67d..ec55c1d 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbc.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbc.h
@@ -57,9 +57,9 @@
 
 #else
 
-#define DBC_Assert(exp)
-#define DBC_Require(exp)
-#define DBC_Ensure(exp)
+#define DBC_Assert(exp) {}
+#define DBC_Require(exp) {}
+#define DBC_Ensure(exp) {}
 
 #endif				/* DEBUG */
 
diff --git a/arch/arm/plat-omap/include/dspbridge/dbg.h b/arch/arm/plat-omap/include/dspbridge/dbg.h
index 7f44ff9..59a0a20 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbg.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbg.h
@@ -101,9 +101,9 @@
 	extern DSP_STATUS DBG_Trace(IN u8 bLevel, IN char *pstrFormat, ...);
 #else
 
-#define DBG_Exit(void)
+#define DBG_Exit(void) do {} while(0)
 #define DBG_Init(void) true
-#define DBG_Trace(bLevel, pstrFormat, args...)
+#define DBG_Trace(bLevel, pstrFormat, args...) do {} while(0)
 
 #endif	     /* (defined(DEBUG) || defined(DDSP_DEBUG_PRODUCT)) && GT_TRACE */
 
diff --git a/arch/arm/plat-omap/include/dspbridge/gt.h b/arch/arm/plat-omap/include/dspbridge/gt.h
index 456c866..ebe75fe 100644
--- a/arch/arm/plat-omap/include/dspbridge/gt.h
+++ b/arch/arm/plat-omap/include/dspbridge/gt.h
@@ -261,13 +261,13 @@ extern struct GT_Config _GT_params;
 
 #define GT_query(mask, class)     false
 
-#define GT_0trace(mask, class, format)
-#define GT_1trace(mask, class, format, arg1)
-#define GT_2trace(mask, class, format, arg1, arg2)
-#define GT_3trace(mask, class, format, arg1, arg2, arg3)
-#define GT_4trace(mask, class, format, arg1, arg2, arg3, arg4)
-#define GT_5trace(mask, class, format, arg1, arg2, arg3, arg4, arg5)
-#define GT_6trace(mask, class, format, arg1, arg2, arg3, arg4, arg5, arg6)
+#define GT_0trace(mask, class, format) do {} while(0)
+#define GT_1trace(mask, class, format, arg1) do {} while(0)
+#define GT_2trace(mask, class, format, arg1, arg2) do {} while(0)
+#define GT_3trace(mask, class, format, arg1, arg2, arg3) do {} while(0)
+#define GT_4trace(mask, class, format, arg1, arg2, arg3, arg4) do {} while(0)
+#define GT_5trace(mask, class, format, arg1, arg2, arg3, arg4, arg5) do {} while(0)
+#define GT_6trace(mask, class, format, arg1, arg2, arg3, arg4, arg5, arg6) do {} while(0)
 
 #else				/* GT_TRACE == 1 */
 
diff --git a/arch/arm/plat-omap/include/dspbridge/mem.h b/arch/arm/plat-omap/include/dspbridge/mem.h
index 535ac3a..cc79047 100644
--- a/arch/arm/plat-omap/include/dspbridge/mem.h
+++ b/arch/arm/plat-omap/include/dspbridge/mem.h
@@ -317,7 +317,7 @@
  *  Ensures:
  *      - pBaseAddr no longer points to a valid linear address.
  */
-#define MEM_UnmapLinearAddress(pBaseAddr)
+#define MEM_UnmapLinearAddress(pBaseAddr) {}
 
 /*
  *  ======== MEM_ExtPhysPoolInit ========
diff --git a/drivers/dsp/bridge/services/kfile.c b/drivers/dsp/bridge/services/kfile.c
index ba1d26f..6356d05 100644
--- a/drivers/dsp/bridge/services/kfile.c
+++ b/drivers/dsp/bridge/services/kfile.c
@@ -262,7 +262,7 @@ KFILE_Read(void __user*pBuffer, s32 cSize, s32 cCount,
 s32 KFILE_Seek(struct KFILE_FileObj *hFile, s32 lOffset, s32 cOrigin)
 {
 	s32 cRetVal = 0;	/* 0 for success */
-	u32 dwCurPos = 0;
+	s32 dwCurPos = 0;
 
 	struct file *fileDesc = NULL;
 
@@ -315,7 +315,7 @@ s32 KFILE_Seek(struct KFILE_FileObj *hFile, s32 lOffset, s32 cOrigin)
  */
 s32 KFILE_Tell(struct KFILE_FileObj *hFile)
 {
-	u32 dwCurPos = 0;
+	s32 dwCurPos = 0;
 	s32 lRetVal = E_KFILE_ERROR;
 
 	GT_1trace(KFILE_debugMask, GT_ENTER, "KFILE_Tell: hFile 0x%x\n", hFile);
diff --git a/drivers/dsp/bridge/wmd/io_sm.c b/drivers/dsp/bridge/wmd/io_sm.c
index 8d106e1..a49eea1 100644
--- a/drivers/dsp/bridge/wmd/io_sm.c
+++ b/drivers/dsp/bridge/wmd/io_sm.c
@@ -236,10 +236,8 @@ DSP_STATUS WMD_IO_Create(OUT struct IO_MGR **phIOMgr,
        if (ref_count == 0)
                bridge_workqueue = create_workqueue("bridge_work-queue");
 
-       if (bridge_workqueue <= 0)
-               DBG_Trace(DBG_LEVEL1, "Workque Create"
-                       " failed 0x%d \n", bridge_workqueue);
-
+       if (!bridge_workqueue)
+               DBG_Trace(DBG_LEVEL1, "Workqueue creation failed!\n");
 
 	/* Allocate IO manager object: */
 	MEM_AllocObject(pIOMgr, struct IO_MGR, IO_MGRSIGNATURE);
@@ -1157,7 +1155,7 @@ static void InputChnl(struct IO_MGR *pIOMgr, struct CHNL_OBJECT *pChnl,
 			    pChnlMgr->uWordSize;
 	chnlId = IO_GetValue(pIOMgr->hWmdContext, struct SHM, sm, inputId);
 	dwArg = IO_GetLong(pIOMgr->hWmdContext, struct SHM, sm, arg);
-	if (!(chnlId >= 0) || !(chnlId < CHNL_MAXCHANNELS)) {
+	if (chnlId >= CHNL_MAXCHANNELS) {
 		/* Shouldn't be here: would indicate corrupted SHM. */
 		DBC_Assert(chnlId);
 		goto func_end;
diff --git a/drivers/dsp/bridge/wmd/ue_deh.c b/drivers/dsp/bridge/wmd/ue_deh.c
index d5551cb..0e6cfec 100644
--- a/drivers/dsp/bridge/wmd/ue_deh.c
+++ b/drivers/dsp/bridge/wmd/ue_deh.c
@@ -199,7 +199,7 @@ void WMD_DEH_Notify(struct DEH_MGR *hDehMgr, u32 ulEventMask,
 	DSP_STATUS status = DSP_SOK;
 	u32 memPhysical = 0;
 	u32 HW_MMU_MAX_TLB_COUNT = 31;
-	u32 extern faultAddr;
+	extern u32 faultAddr;
 	struct CFG_HOSTRES resources;
 	u32 dummyVaAddr;
 	HW_STATUS hwStatus;
-- 
1.5.6.5


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

* RE: [PATCH] [DSPBRIDGE] Various compile warning fixes
  2009-04-17  9:30 [PATCH] [DSPBRIDGE] " Ameya Palande
@ 2009-04-17 14:13 ` Gupta, Ramesh
  2009-04-17 14:20   ` Kanigeri, Hari
  0 siblings, 1 reply; 14+ messages in thread
From: Gupta, Ramesh @ 2009-04-17 14:13 UTC (permalink / raw)
  To: Ameya Palande, linux-omap@vger.kernel.org

Hi Ameya,

Ack, This patch looks good. I tested and not seen any issues.

Regards
Ramesh Gupta G

> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org 
> [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Ameya Palande
> Sent: Friday, April 17, 2009 3:00 PM
> To: linux-omap@vger.kernel.org
> Subject: [PATCH] [DSPBRIDGE] Various compile warning fixes
> 
> From: Mika Kukkonen <mika.kukkonen@nokia.com>
> 
> This patch cleans up various warnings uncovered with extra 
> warning flags:
>   - empty if() bodies
>   - incorrect use of unsigned variables
>   - bad comparison of pointer value
>   - pointless check of unsigned value being smaller than zero
>   - keyword 'extern' has to be first one in variable declaration
> 
> Signed-off-by: Mika Kukkonen <mika.kukkonen@nokia.com>
> ---
>  arch/arm/plat-omap/include/dspbridge/dbc.h |    6 +++---
>  arch/arm/plat-omap/include/dspbridge/dbg.h |    4 ++--
>  arch/arm/plat-omap/include/dspbridge/gt.h  |   14 +++++++-------
>  arch/arm/plat-omap/include/dspbridge/mem.h |    2 +-
>  drivers/dsp/bridge/services/kfile.c        |    4 ++--
>  drivers/dsp/bridge/wmd/io_sm.c             |    8 +++-----
>  drivers/dsp/bridge/wmd/ue_deh.c            |    2 +-
>  7 files changed, 19 insertions(+), 21 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/include/dspbridge/dbc.h 
> b/arch/arm/plat-omap/include/dspbridge/dbc.h
> index 0e6a67d..ec55c1d 100644
> --- a/arch/arm/plat-omap/include/dspbridge/dbc.h
> +++ b/arch/arm/plat-omap/include/dspbridge/dbc.h
> @@ -57,9 +57,9 @@
>  
>  #else
>  
> -#define DBC_Assert(exp)
> -#define DBC_Require(exp)
> -#define DBC_Ensure(exp)
> +#define DBC_Assert(exp) {}
> +#define DBC_Require(exp) {}
> +#define DBC_Ensure(exp) {}
>  
>  #endif				/* DEBUG */
>  
> diff --git a/arch/arm/plat-omap/include/dspbridge/dbg.h 
> b/arch/arm/plat-omap/include/dspbridge/dbg.h
> index 7f44ff9..59a0a20 100644
> --- a/arch/arm/plat-omap/include/dspbridge/dbg.h
> +++ b/arch/arm/plat-omap/include/dspbridge/dbg.h
> @@ -101,9 +101,9 @@
>  	extern DSP_STATUS DBG_Trace(IN u8 bLevel, IN char 
> *pstrFormat, ...);
>  #else
>  
> -#define DBG_Exit(void)
> +#define DBG_Exit(void) do {} while(0)
>  #define DBG_Init(void) true
> -#define DBG_Trace(bLevel, pstrFormat, args...)
> +#define DBG_Trace(bLevel, pstrFormat, args...) do {} while(0)
>  
>  #endif	     /* (defined(DEBUG) || 
> defined(DDSP_DEBUG_PRODUCT)) && GT_TRACE */
>  
> diff --git a/arch/arm/plat-omap/include/dspbridge/gt.h 
> b/arch/arm/plat-omap/include/dspbridge/gt.h
> index 456c866..ebe75fe 100644
> --- a/arch/arm/plat-omap/include/dspbridge/gt.h
> +++ b/arch/arm/plat-omap/include/dspbridge/gt.h
> @@ -261,13 +261,13 @@ extern struct GT_Config _GT_params;
>  
>  #define GT_query(mask, class)     false
>  
> -#define GT_0trace(mask, class, format)
> -#define GT_1trace(mask, class, format, arg1)
> -#define GT_2trace(mask, class, format, arg1, arg2)
> -#define GT_3trace(mask, class, format, arg1, arg2, arg3)
> -#define GT_4trace(mask, class, format, arg1, arg2, arg3, arg4)
> -#define GT_5trace(mask, class, format, arg1, arg2, arg3, arg4, arg5)
> -#define GT_6trace(mask, class, format, arg1, arg2, arg3, 
> arg4, arg5, arg6)
> +#define GT_0trace(mask, class, format) do {} while(0)
> +#define GT_1trace(mask, class, format, arg1) do {} while(0)
> +#define GT_2trace(mask, class, format, arg1, arg2) do {} while(0)
> +#define GT_3trace(mask, class, format, arg1, arg2, arg3) do 
> {} while(0)
> +#define GT_4trace(mask, class, format, arg1, arg2, arg3, 
> arg4) do {} while(0)
> +#define GT_5trace(mask, class, format, arg1, arg2, arg3, 
> arg4, arg5) do {} while(0)
> +#define GT_6trace(mask, class, format, arg1, arg2, arg3, 
> arg4, arg5, arg6) do {} while(0)
>  
>  #else				/* GT_TRACE == 1 */
>  
> diff --git a/arch/arm/plat-omap/include/dspbridge/mem.h 
> b/arch/arm/plat-omap/include/dspbridge/mem.h
> index 535ac3a..cc79047 100644
> --- a/arch/arm/plat-omap/include/dspbridge/mem.h
> +++ b/arch/arm/plat-omap/include/dspbridge/mem.h
> @@ -317,7 +317,7 @@
>   *  Ensures:
>   *      - pBaseAddr no longer points to a valid linear address.
>   */
> -#define MEM_UnmapLinearAddress(pBaseAddr)
> +#define MEM_UnmapLinearAddress(pBaseAddr) {}
>  
>  /*
>   *  ======== MEM_ExtPhysPoolInit ========
> diff --git a/drivers/dsp/bridge/services/kfile.c 
> b/drivers/dsp/bridge/services/kfile.c
> index ba1d26f..6356d05 100644
> --- a/drivers/dsp/bridge/services/kfile.c
> +++ b/drivers/dsp/bridge/services/kfile.c
> @@ -262,7 +262,7 @@ KFILE_Read(void __user*pBuffer, s32 
> cSize, s32 cCount,
>  s32 KFILE_Seek(struct KFILE_FileObj *hFile, s32 lOffset, s32 cOrigin)
>  {
>  	s32 cRetVal = 0;	/* 0 for success */
> -	u32 dwCurPos = 0;
> +	s32 dwCurPos = 0;
>  
>  	struct file *fileDesc = NULL;
>  
> @@ -315,7 +315,7 @@ s32 KFILE_Seek(struct KFILE_FileObj 
> *hFile, s32 lOffset, s32 cOrigin)
>   */
>  s32 KFILE_Tell(struct KFILE_FileObj *hFile)
>  {
> -	u32 dwCurPos = 0;
> +	s32 dwCurPos = 0;
>  	s32 lRetVal = E_KFILE_ERROR;
>  
>  	GT_1trace(KFILE_debugMask, GT_ENTER, "KFILE_Tell: hFile 
> 0x%x\n", hFile);
> diff --git a/drivers/dsp/bridge/wmd/io_sm.c 
> b/drivers/dsp/bridge/wmd/io_sm.c
> index 8d106e1..a49eea1 100644
> --- a/drivers/dsp/bridge/wmd/io_sm.c
> +++ b/drivers/dsp/bridge/wmd/io_sm.c
> @@ -236,10 +236,8 @@ DSP_STATUS WMD_IO_Create(OUT struct 
> IO_MGR **phIOMgr,
>         if (ref_count == 0)
>                 bridge_workqueue = 
> create_workqueue("bridge_work-queue");
>  
> -       if (bridge_workqueue <= 0)
> -               DBG_Trace(DBG_LEVEL1, "Workque Create"
> -                       " failed 0x%d \n", bridge_workqueue);
> -
> +       if (!bridge_workqueue)
> +               DBG_Trace(DBG_LEVEL1, "Workqueue creation failed!\n");
>  
>  	/* Allocate IO manager object: */
>  	MEM_AllocObject(pIOMgr, struct IO_MGR, IO_MGRSIGNATURE);
> @@ -1157,7 +1155,7 @@ static void InputChnl(struct IO_MGR 
> *pIOMgr, struct CHNL_OBJECT *pChnl,
>  			    pChnlMgr->uWordSize;
>  	chnlId = IO_GetValue(pIOMgr->hWmdContext, struct SHM, 
> sm, inputId);
>  	dwArg = IO_GetLong(pIOMgr->hWmdContext, struct SHM, sm, arg);
> -	if (!(chnlId >= 0) || !(chnlId < CHNL_MAXCHANNELS)) {
> +	if (chnlId >= CHNL_MAXCHANNELS) {
>  		/* Shouldn't be here: would indicate corrupted SHM. */
>  		DBC_Assert(chnlId);
>  		goto func_end;
> diff --git a/drivers/dsp/bridge/wmd/ue_deh.c 
> b/drivers/dsp/bridge/wmd/ue_deh.c
> index d5551cb..0e6cfec 100644
> --- a/drivers/dsp/bridge/wmd/ue_deh.c
> +++ b/drivers/dsp/bridge/wmd/ue_deh.c
> @@ -199,7 +199,7 @@ void WMD_DEH_Notify(struct DEH_MGR 
> *hDehMgr, u32 ulEventMask,
>  	DSP_STATUS status = DSP_SOK;
>  	u32 memPhysical = 0;
>  	u32 HW_MMU_MAX_TLB_COUNT = 31;
> -	u32 extern faultAddr;
> +	extern u32 faultAddr;
>  	struct CFG_HOSTRES resources;
>  	u32 dummyVaAddr;
>  	HW_STATUS hwStatus;
> -- 
> 1.5.6.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe 
> linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

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

* RE: [PATCH] [DSPBRIDGE] Various compile warning fixes
  2009-04-17 14:13 ` Gupta, Ramesh
@ 2009-04-17 14:20   ` Kanigeri, Hari
  2009-04-20  5:23     ` mika.kukkonen
  0 siblings, 1 reply; 14+ messages in thread
From: Kanigeri, Hari @ 2009-04-17 14:20 UTC (permalink / raw)
  To: Gupta, Ramesh, Ameya Palande, linux-omap@vger.kernel.org

Ameya,

-	if (!(chnlId >= 0) || !(chnlId < CHNL_MAXCHANNELS)) {
+	if (chnlId >= CHNL_MAXCHANNELS) {

-- How about declaring chnlId as s32 so that the checks can be extended to negative values too ? 

Thank you,
Best regards,
Hari

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

* RE: [PATCH] [DSPBRIDGE] Various compile warning fixes
  2009-04-17 14:20   ` Kanigeri, Hari
@ 2009-04-20  5:23     ` mika.kukkonen
  2009-04-20 12:59       ` Kanigeri, Hari
  0 siblings, 1 reply; 14+ messages in thread
From: mika.kukkonen @ 2009-04-20  5:23 UTC (permalink / raw)
  To: h-kanigeri2, grgupta, ameya.palande; +Cc: linux-omap

>-----Original Message-----
>From: linux-omap-owner@vger.kernel.org 
>[mailto:linux-omap-owner@vger.kernel.org] On Behalf Of ext 
>Kanigeri, Hari
>Sent: 17 April, 2009 17:21
>To: Gupta, Ramesh; Palande Ameya (Nokia-D/Helsinki); 
>linux-omap@vger.kernel.org
>Subject: RE: [PATCH] [DSPBRIDGE] Various compile warning fixes
>
>Ameya,
>
>-	if (!(chnlId >= 0) || !(chnlId < CHNL_MAXCHANNELS)) {
>+	if (chnlId >= CHNL_MAXCHANNELS) {
>
>-- How about declaring chnlId as s32 so that the checks can be 
>extended to negative values too ? 

The field in question is declared in
arch/arm/plat-omap/include/dspbridge/_chnl_sm.h in line 120 as
u32, so checking for negative value makes no sense unless you
modify struct SHM too.

--MiKu

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

* RE: [PATCH] [DSPBRIDGE] Various compile warning fixes
  2009-04-20  5:23     ` mika.kukkonen
@ 2009-04-20 12:59       ` Kanigeri, Hari
  0 siblings, 0 replies; 14+ messages in thread
From: Kanigeri, Hari @ 2009-04-20 12:59 UTC (permalink / raw)
  To: mika.kukkonen@nokia.com, Gupta, Ramesh, ameya.palande@nokia.com
  Cc: linux-omap@vger.kernel.org

Miku,

> The field in question is declared in
> arch/arm/plat-omap/include/dspbridge/_chnl_sm.h in line 120 as
> u32, so checking for negative value makes no sense unless you
> modify struct SHM too.

-- You are right. I missed checking the declaration in _chnl_sm.h

Thank you,
Best regards,
Hari

> -----Original Message-----
> From: mika.kukkonen@nokia.com [mailto:mika.kukkonen@nokia.com]
> Sent: Monday, April 20, 2009 12:23 AM
> To: Kanigeri, Hari; Gupta, Ramesh; ameya.palande@nokia.com
> Cc: linux-omap@vger.kernel.org
> Subject: RE: [PATCH] [DSPBRIDGE] Various compile warning fixes
> 
> >-----Original Message-----
> >From: linux-omap-owner@vger.kernel.org
> >[mailto:linux-omap-owner@vger.kernel.org] On Behalf Of ext
> >Kanigeri, Hari
> >Sent: 17 April, 2009 17:21
> >To: Gupta, Ramesh; Palande Ameya (Nokia-D/Helsinki);
> >linux-omap@vger.kernel.org
> >Subject: RE: [PATCH] [DSPBRIDGE] Various compile warning fixes
> >
> >Ameya,
> >
> >-	if (!(chnlId >= 0) || !(chnlId < CHNL_MAXCHANNELS)) {
> >+	if (chnlId >= CHNL_MAXCHANNELS) {
> >
> >-- How about declaring chnlId as s32 so that the checks can be
> >extended to negative values too ?
> 
> The field in question is declared in
> arch/arm/plat-omap/include/dspbridge/_chnl_sm.h in line 120 as
> u32, so checking for negative value makes no sense unless you
> modify struct SHM too.
> 
> --MiKu


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

* [PATCH] DSPBRIDGE: Various compile warning fixes
@ 2009-06-08 15:47 Ameya Palande
  0 siblings, 0 replies; 14+ messages in thread
From: Ameya Palande @ 2009-06-08 15:47 UTC (permalink / raw)
  To: linux-omap; +Cc: omar.ramirez, mika.kukkonen

From: Mika Kukkonen <mika.kukkonen@nokia.com>

This patch cleans up various warnings uncovered with extra warning flags:
  - empty if() bodies
  - bad comparison of pointer value
  - pointless check of unsigned value being smaller than zero
  - keyword 'extern' has to be first one in variable declaration
  - indentation fixes

Signed-off-by: Mika Kukkonen <mika.kukkonen@nokia.com>
Signed-off-by: Ameya Palande <ameya.palande@nokia.com>
---
 arch/arm/plat-omap/include/dspbridge/dbc.h |    6 +-
 arch/arm/plat-omap/include/dspbridge/dbg.h |    4 +-
 arch/arm/plat-omap/include/dspbridge/gt.h  |   16 ++++---
 arch/arm/plat-omap/include/dspbridge/mem.h |    2 +-
 drivers/dsp/bridge/wmd/io_sm.c             |   72 ++++++++++++++--------------
 drivers/dsp/bridge/wmd/ue_deh.c            |    2 +-
 6 files changed, 52 insertions(+), 50 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dbc.h b/arch/arm/plat-omap/include/dspbridge/dbc.h
index 0e6a67d..ec55c1d 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbc.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbc.h
@@ -57,9 +57,9 @@
 
 #else
 
-#define DBC_Assert(exp)
-#define DBC_Require(exp)
-#define DBC_Ensure(exp)
+#define DBC_Assert(exp) {}
+#define DBC_Require(exp) {}
+#define DBC_Ensure(exp) {}
 
 #endif				/* DEBUG */
 
diff --git a/arch/arm/plat-omap/include/dspbridge/dbg.h b/arch/arm/plat-omap/include/dspbridge/dbg.h
index 7f44ff9..442955c 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbg.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbg.h
@@ -101,9 +101,9 @@
 	extern DSP_STATUS DBG_Trace(IN u8 bLevel, IN char *pstrFormat, ...);
 #else
 
-#define DBG_Exit(void)
+#define DBG_Exit(void) do {} while (0)
 #define DBG_Init(void) true
-#define DBG_Trace(bLevel, pstrFormat, args...)
+#define DBG_Trace(bLevel, pstrFormat, args...) do {} while (0)
 
 #endif	     /* (defined(DEBUG) || defined(DDSP_DEBUG_PRODUCT)) && GT_TRACE */
 
diff --git a/arch/arm/plat-omap/include/dspbridge/gt.h b/arch/arm/plat-omap/include/dspbridge/gt.h
index 456c866..72ef42d 100644
--- a/arch/arm/plat-omap/include/dspbridge/gt.h
+++ b/arch/arm/plat-omap/include/dspbridge/gt.h
@@ -261,13 +261,15 @@ extern struct GT_Config _GT_params;
 
 #define GT_query(mask, class)     false
 
-#define GT_0trace(mask, class, format)
-#define GT_1trace(mask, class, format, arg1)
-#define GT_2trace(mask, class, format, arg1, arg2)
-#define GT_3trace(mask, class, format, arg1, arg2, arg3)
-#define GT_4trace(mask, class, format, arg1, arg2, arg3, arg4)
-#define GT_5trace(mask, class, format, arg1, arg2, arg3, arg4, arg5)
-#define GT_6trace(mask, class, format, arg1, arg2, arg3, arg4, arg5, arg6)
+#define GT_0trace(mask, class, format) do {} while (0)
+#define GT_1trace(mask, class, format, arg1) do {} while (0)
+#define GT_2trace(mask, class, format, arg1, arg2) do {} while (0)
+#define GT_3trace(mask, class, format, arg1, arg2, arg3) do {} while (0)
+#define GT_4trace(mask, class, format, arg1, arg2, arg3, arg4) do {} while (0)
+#define GT_5trace(mask, class, format, arg1, arg2, arg3, arg4, arg5) \
+	do {} while (0)
+#define GT_6trace(mask, class, format, arg1, arg2, arg3, arg4, arg5, arg6) \
+	do {} while (0)
 
 #else				/* GT_TRACE == 1 */
 
diff --git a/arch/arm/plat-omap/include/dspbridge/mem.h b/arch/arm/plat-omap/include/dspbridge/mem.h
index 535ac3a..cc79047 100644
--- a/arch/arm/plat-omap/include/dspbridge/mem.h
+++ b/arch/arm/plat-omap/include/dspbridge/mem.h
@@ -317,7 +317,7 @@
  *  Ensures:
  *      - pBaseAddr no longer points to a valid linear address.
  */
-#define MEM_UnmapLinearAddress(pBaseAddr)
+#define MEM_UnmapLinearAddress(pBaseAddr) {}
 
 /*
  *  ======== MEM_ExtPhysPoolInit ========
diff --git a/drivers/dsp/bridge/wmd/io_sm.c b/drivers/dsp/bridge/wmd/io_sm.c
index 6f7e338..39c34f7 100644
--- a/drivers/dsp/bridge/wmd/io_sm.c
+++ b/drivers/dsp/bridge/wmd/io_sm.c
@@ -204,7 +204,7 @@ DSP_STATUS WMD_IO_Create(OUT struct IO_MGR **phIOMgr,
 	struct CFG_HOSTRES hostRes;
 	struct CFG_DEVNODE *hDevNode;
 	struct CHNL_MGR *hChnlMgr;
-       static int ref_count;
+	static int ref_count;
 	u32 devType;
 	/* Check DBC requirements:  */
 	DBC_Require(phIOMgr != NULL);
@@ -215,31 +215,30 @@ DSP_STATUS WMD_IO_Create(OUT struct IO_MGR **phIOMgr,
 	DBC_Require(status != DSP_EHANDLE);
 	DBC_Require(hChnlMgr != NULL);
 	DBC_Require(hChnlMgr->hIOMgr == NULL);
-	 /*  Message manager will be created when a file is loaded, since
-	 *  size of message buffer in shared memory is configurable in
-	 *  the base image.  */
+	/*
+	 * Message manager will be created when a file is loaded, since
+	 * size of message buffer in shared memory is configurable in
+	 * the base image.
+	 */
 	DEV_GetWMDContext(hDevObject, &hWmdContext);
 	DBC_Assert(hWmdContext);
 	DEV_GetDevType(hDevObject, &devType);
-	/*  DSP shared memory area will get set properly when
-	 *  a program is loaded. They are unknown until a COFF file is
-	 *  loaded. I chose the value -1 because it was less likely to be
-	 *  a valid address than 0.  */
+	/*
+	 * DSP shared memory area will get set properly when
+	 * a program is loaded. They are unknown until a COFF file is
+	 * loaded. I chose the value -1 because it was less likely to be
+	 * a valid address than 0.
+	 */
 	pSharedMem = (struct SHM *) -1;
 	if (DSP_FAILED(status))
 		goto func_cont;
 
-    /*
-     *  Create a Single Threaded Work Queue
-     */
-
-       if (ref_count == 0)
-               bridge_workqueue = create_workqueue("bridge_work-queue");
-
-       if (bridge_workqueue <= 0)
-               DBG_Trace(DBG_LEVEL1, "Workque Create"
-                       " failed 0x%d \n", bridge_workqueue);
+	/* Create a Single Threaded Work Queue */
+	if (ref_count == 0)
+		bridge_workqueue = create_workqueue("bridge_work-queue");
 
+	if (!bridge_workqueue)
+		DBG_Trace(DBG_LEVEL1, "Workqueue creation failed!\n");
 
 	/* Allocate IO manager object: */
 	MEM_AllocObject(pIOMgr, struct IO_MGR, IO_MGRSIGNATURE);
@@ -247,12 +246,13 @@ DSP_STATUS WMD_IO_Create(OUT struct IO_MGR **phIOMgr,
 		status = DSP_EMEMORY;
 		goto func_cont;
 	}
-       /*Intializing Work Element*/
-       if (ref_count == 0) {
-               INIT_WORK(&pIOMgr->io_workq, (void *)IO_DispatchPM);
-               ref_count = 1;
-       } else
-               PREPARE_WORK(&pIOMgr->io_workq, (void *)IO_DispatchPM);
+
+	/* Intializing Work Element */
+	if (ref_count == 0) {
+		INIT_WORK(&pIOMgr->io_workq, (void *)IO_DispatchPM);
+		ref_count = 1;
+	} else
+		PREPARE_WORK(&pIOMgr->io_workq, (void *)IO_DispatchPM);
 
 	/* Initialize CHNL_MGR object:    */
 #ifndef DSP_TRACEBUF_DISABLED
@@ -283,18 +283,18 @@ DSP_STATUS WMD_IO_Create(OUT struct IO_MGR **phIOMgr,
 		IO_DisableInterrupt(hWmdContext);
 		if (devType == DSP_UNIT) {
 			/* Plug the channel ISR:. */
-                       if ((request_irq(INT_MAIL_MPU_IRQ, IO_ISR, 0,
-                               "DspBridge\tmailbox", (void *)pIOMgr)) == 0)
-                               status = DSP_SOK;
-                       else
-                               status = DSP_EFAIL;
+			if ((request_irq(INT_MAIL_MPU_IRQ, IO_ISR, 0,
+				"DspBridge\tmailbox", (void *)pIOMgr)) == 0)
+				status = DSP_SOK;
+			else
+				status = DSP_EFAIL;
 		}
-       if (DSP_SUCCEEDED(status))
-               DBG_Trace(DBG_LEVEL1, "ISR_IRQ Object 0x%x \n",
-                               pIOMgr);
-       else
-               status = CHNL_E_ISR;
-       } else
+		if (DSP_SUCCEEDED(status))
+			DBG_Trace(DBG_LEVEL1, "ISR_IRQ Object 0x%x \n",
+					pIOMgr);
+		else
+			status = CHNL_E_ISR;
+	} else
 		status = CHNL_E_ISR;
 func_cont:
 	if (DSP_FAILED(status)) {
@@ -1157,7 +1157,7 @@ static void InputChnl(struct IO_MGR *pIOMgr, struct CHNL_OBJECT *pChnl,
 			    pChnlMgr->uWordSize;
 	chnlId = IO_GetValue(pIOMgr->hWmdContext, struct SHM, sm, inputId);
 	dwArg = IO_GetLong(pIOMgr->hWmdContext, struct SHM, sm, arg);
-	if (!(chnlId >= 0) || !(chnlId < CHNL_MAXCHANNELS)) {
+	if (chnlId >= CHNL_MAXCHANNELS) {
 		/* Shouldn't be here: would indicate corrupted SHM. */
 		DBC_Assert(chnlId);
 		goto func_end;
diff --git a/drivers/dsp/bridge/wmd/ue_deh.c b/drivers/dsp/bridge/wmd/ue_deh.c
index dcb44dd..fed8bd4 100644
--- a/drivers/dsp/bridge/wmd/ue_deh.c
+++ b/drivers/dsp/bridge/wmd/ue_deh.c
@@ -205,7 +205,7 @@ void WMD_DEH_Notify(struct DEH_MGR *hDehMgr, u32 ulEventMask,
 	DSP_STATUS status1 = DSP_EFAIL;
 	u32 memPhysical = 0;
 	u32 HW_MMU_MAX_TLB_COUNT = 31;
-	u32 extern faultAddr;
+	extern u32 faultAddr;
 	struct CFG_HOSTRES resources;
 	HW_STATUS hwStatus;
 
-- 
1.6.2.4


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

* [PATCH] DSPBRIDGE: Various compile warning fixes
@ 2010-01-21 13:40 Ameya Palande
  2010-01-21 16:01 ` Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Ameya Palande @ 2010-01-21 13:40 UTC (permalink / raw)
  To: linux-omap; +Cc: omar.ramirez, nm, deepak.chitriki, mika.kukkonen

This patch contains indentation fixes and cleans up various warnings
uncovered with extra warning flags:

  - empty if() bodies
  - incorrect use of unsigned variables
  - bad comparison of pointer value
  - pointless check of unsigned value being smaller than zero
  - keyword 'extern' has to be first one in variable declaration

Signed-off-by: Mika Kukkonen <mika.kukkonen@nokia.com>
Signed-off-by: Ameya Palande <ameya.palande@nokia.com>
---
 arch/arm/plat-omap/include/dspbridge/dbc.h |    6 +++---
 arch/arm/plat-omap/include/dspbridge/dbg.h |    4 ++--
 arch/arm/plat-omap/include/dspbridge/gt.h  |   16 +++++++++-------
 arch/arm/plat-omap/include/dspbridge/mem.h |    2 +-
 drivers/dsp/bridge/wmd/io_sm.c             |    2 +-
 drivers/dsp/bridge/wmd/ue_deh.c            |    2 +-
 6 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dbc.h b/arch/arm/plat-omap/include/dspbridge/dbc.h
index ac5d178..1b3ac44 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbc.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbc.h
@@ -43,9 +43,9 @@
 
 #else
 
-#define DBC_Assert(exp)
-#define DBC_Require(exp)
-#define DBC_Ensure(exp)
+#define DBC_Assert(exp) {}
+#define DBC_Require(exp) {}
+#define DBC_Ensure(exp) {}
 
 #endif				/* DEBUG */
 
diff --git a/arch/arm/plat-omap/include/dspbridge/dbg.h b/arch/arm/plat-omap/include/dspbridge/dbg.h
index 2f61dab..4d01eca 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbg.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbg.h
@@ -80,9 +80,9 @@
 	extern DSP_STATUS DBG_Trace(IN u8 bLevel, IN char *pstrFormat, ...);
 #else
 
-#define DBG_Exit(void)
+#define DBG_Exit(void) do {} while (0)
 #define DBG_Init(void) true
-#define DBG_Trace(bLevel, pstrFormat, args...)
+#define DBG_Trace(bLevel, pstrFormat, args...) do {} while (0)
 
 #endif	/* (CONFIG_BRIDGE_DEBUG || DDSP_DEBUG_PRODUCT) && GT_TRACE */
 
diff --git a/arch/arm/plat-omap/include/dspbridge/gt.h b/arch/arm/plat-omap/include/dspbridge/gt.h
index 6082d15..9097910 100644
--- a/arch/arm/plat-omap/include/dspbridge/gt.h
+++ b/arch/arm/plat-omap/include/dspbridge/gt.h
@@ -252,13 +252,15 @@ extern struct GT_Config _GT_params;
 
 #define GT_query(mask, class)     false
 
-#define GT_0trace(mask, class, format)
-#define GT_1trace(mask, class, format, arg1)
-#define GT_2trace(mask, class, format, arg1, arg2)
-#define GT_3trace(mask, class, format, arg1, arg2, arg3)
-#define GT_4trace(mask, class, format, arg1, arg2, arg3, arg4)
-#define GT_5trace(mask, class, format, arg1, arg2, arg3, arg4, arg5)
-#define GT_6trace(mask, class, format, arg1, arg2, arg3, arg4, arg5, arg6)
+#define GT_0trace(mask, class, format) do {} while (0)
+#define GT_1trace(mask, class, format, arg1) do {} while (0)
+#define GT_2trace(mask, class, format, arg1, arg2) do {} while (0)
+#define GT_3trace(mask, class, format, arg1, arg2, arg3) do {} while (0)
+#define GT_4trace(mask, class, format, arg1, arg2, arg3, arg4) do {} while (0)
+#define GT_5trace(mask, class, format, arg1, arg2, arg3, arg4, arg5) \
+	do {} while (0)
+#define GT_6trace(mask, class, format, arg1, arg2, arg3, arg4, arg5, arg6) \
+	do {} while (0)
 
 #else				/* GT_TRACE == 1 */
 
diff --git a/arch/arm/plat-omap/include/dspbridge/mem.h b/arch/arm/plat-omap/include/dspbridge/mem.h
index 03b419a..353ffb0 100644
--- a/arch/arm/plat-omap/include/dspbridge/mem.h
+++ b/arch/arm/plat-omap/include/dspbridge/mem.h
@@ -286,7 +286,7 @@
  *  Ensures:
  *      - pBaseAddr no longer points to a valid linear address.
  */
-#define MEM_UnmapLinearAddress(pBaseAddr)
+#define MEM_UnmapLinearAddress(pBaseAddr) {}
 
 /*
  *  ======== MEM_ExtPhysPoolInit ========
diff --git a/drivers/dsp/bridge/wmd/io_sm.c b/drivers/dsp/bridge/wmd/io_sm.c
index e35ce57..64eba5a 100644
--- a/drivers/dsp/bridge/wmd/io_sm.c
+++ b/drivers/dsp/bridge/wmd/io_sm.c
@@ -1210,7 +1210,7 @@ static void InputChnl(struct IO_MGR *pIOMgr, struct CHNL_OBJECT *pChnl,
 			    pChnlMgr->uWordSize;
 	chnlId = IO_GetValue(pIOMgr->hWmdContext, struct SHM, sm, inputId);
 	dwArg = IO_GetLong(pIOMgr->hWmdContext, struct SHM, sm, arg);
-	if (!(chnlId >= 0) || !(chnlId < CHNL_MAXCHANNELS)) {
+	if (chnlId >= CHNL_MAXCHANNELS) {
 		/* Shouldn't be here: would indicate corrupted SHM. */
 		DBC_Assert(chnlId);
 		goto func_end;
diff --git a/drivers/dsp/bridge/wmd/ue_deh.c b/drivers/dsp/bridge/wmd/ue_deh.c
index 6166d97..2c3a2cd 100644
--- a/drivers/dsp/bridge/wmd/ue_deh.c
+++ b/drivers/dsp/bridge/wmd/ue_deh.c
@@ -189,7 +189,7 @@ void WMD_DEH_Notify(struct DEH_MGR *hDehMgr, u32 ulEventMask,
 	DSP_STATUS status = DSP_SOK;
 	u32 memPhysical = 0;
 	u32 HW_MMU_MAX_TLB_COUNT = 31;
-	u32 extern faultAddr;
+	extern u32 faultAddr;
 	struct CFG_HOSTRES resources;
 	HW_STATUS hwStatus;
 
-- 
1.6.3.3


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

* Re: [PATCH] DSPBRIDGE: Various compile warning fixes
  2010-01-21 13:40 [PATCH] DSPBRIDGE: Various compile warning fixes Ameya Palande
@ 2010-01-21 16:01 ` Andy Shevchenko
  2010-01-21 16:33   ` Ameya Palande
  2010-01-25 16:59 ` Omar Ramirez Luna
  2010-01-26 23:52 ` Omar Ramirez Luna
  2 siblings, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2010-01-21 16:01 UTC (permalink / raw)
  To: Ameya Palande
  Cc: linux-omap, omar.ramirez, nm, deepak.chitriki, mika.kukkonen

On Thu, Jan 21, 2010 at 3:40 PM, Ameya Palande <ameya.palande@nokia.com> wrote:
> --- a/drivers/dsp/bridge/wmd/io_sm.c
> +++ b/drivers/dsp/bridge/wmd/io_sm.c
> @@ -1210,7 +1210,7 @@ static void InputChnl(struct IO_MGR *pIOMgr, struct CHNL_OBJECT *pChnl,
>                            pChnlMgr->uWordSize;
>        chnlId = IO_GetValue(pIOMgr->hWmdContext, struct SHM, sm, inputId);
>        dwArg = IO_GetLong(pIOMgr->hWmdContext, struct SHM, sm, arg);
> -       if (!(chnlId >= 0) || !(chnlId < CHNL_MAXCHANNELS)) {
> +       if (chnlId >= CHNL_MAXCHANNELS) {
Could chnlld be less than zero? Anyway better to test:
(chnlId >= CHNL_MAXCHANNELS || chnlld < 0)

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

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

* Re: [PATCH] DSPBRIDGE: Various compile warning fixes
  2010-01-21 16:01 ` Andy Shevchenko
@ 2010-01-21 16:33   ` Ameya Palande
  2010-01-22  6:00     ` mika.kukkonen
  0 siblings, 1 reply; 14+ messages in thread
From: Ameya Palande @ 2010-01-21 16:33 UTC (permalink / raw)
  To: ext Andy Shevchenko
  Cc: linux-omap@vger.kernel.org, omar.ramirez@ti.com, nm@ti.com,
	deepak.chitriki@ti.com, Kukkonen Mika (Nokia-D/Helsinki)

On Thu, 2010-01-21 at 17:01 +0100, ext Andy Shevchenko wrote:
> On Thu, Jan 21, 2010 at 3:40 PM, Ameya Palande <ameya.palande@nokia.com> wrote:
> > --- a/drivers/dsp/bridge/wmd/io_sm.c
> > +++ b/drivers/dsp/bridge/wmd/io_sm.c
> > @@ -1210,7 +1210,7 @@ static void InputChnl(struct IO_MGR *pIOMgr, struct CHNL_OBJECT *pChnl,
> >                            pChnlMgr->uWordSize;
> >        chnlId = IO_GetValue(pIOMgr->hWmdContext, struct SHM, sm, inputId);
> >        dwArg = IO_GetLong(pIOMgr->hWmdContext, struct SHM, sm, arg);
> > -       if (!(chnlId >= 0) || !(chnlId < CHNL_MAXCHANNELS)) {
> > +       if (chnlId >= CHNL_MAXCHANNELS) {
> Could chnlld be less than zero? Anyway better to test:
> (chnlId >= CHNL_MAXCHANNELS || chnlld < 0)
> 

chnlId is defined as u32 ;)

Cheers,
Ameya.


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

* RE: [PATCH] DSPBRIDGE: Various compile warning fixes
  2010-01-21 16:33   ` Ameya Palande
@ 2010-01-22  6:00     ` mika.kukkonen
  0 siblings, 0 replies; 14+ messages in thread
From: mika.kukkonen @ 2010-01-22  6:00 UTC (permalink / raw)
  To: ameya.palande, andy.shevchenko
  Cc: linux-omap, omar.ramirez, nm, deepak.chitriki

>-----Original Message-----
>From: Palande Ameya (Nokia-D/Helsinki) 
>Sent: 21 January, 2010 18:33
>To: ext Andy Shevchenko
>Cc: linux-omap@vger.kernel.org; omar.ramirez@ti.com; 
>nm@ti.com; deepak.chitriki@ti.com; Kukkonen Mika (Nokia-D/Helsinki)
>Subject: Re: [PATCH] DSPBRIDGE: Various compile warning fixes
>
>On Thu, 2010-01-21 at 17:01 +0100, ext Andy Shevchenko wrote:
>> On Thu, Jan 21, 2010 at 3:40 PM, Ameya Palande 
><ameya.palande@nokia.com> wrote:
>> > --- a/drivers/dsp/bridge/wmd/io_sm.c
>> > +++ b/drivers/dsp/bridge/wmd/io_sm.c
>> > @@ -1210,7 +1210,7 @@ static void InputChnl(struct IO_MGR 
>*pIOMgr, struct CHNL_OBJECT *pChnl,
>> >                            pChnlMgr->uWordSize;
>> >        chnlId = IO_GetValue(pIOMgr->hWmdContext, struct 
>SHM, sm, inputId);
>> >        dwArg = IO_GetLong(pIOMgr->hWmdContext, struct SHM, 
>sm, arg);
>> > -       if (!(chnlId >= 0) || !(chnlId < CHNL_MAXCHANNELS)) {
>> > +       if (chnlId >= CHNL_MAXCHANNELS) {
>> Could chnlld be less than zero? Anyway better to test:
>> (chnlId >= CHNL_MAXCHANNELS || chnlld < 0)
>> 
>
>chnlId is defined as u32 ;)

Yeah, this is the ages old discussion about whether it makes
sense to test if unsigned is smaller than zero.

a) compiler complain (with extra flags), since it is NOP
b) from casual reader viewpoint, it is nice annotation
   (you know the range of the value without needing to
    check the type)
c) on the other hand, it may mislead somebody to think that
   the variable is signed
d) use of unsigned should always be a design decision, and
   things get pretty dangerous when there are lot of layers
   (I think over the years I have at least twice seen a driver
   that returned on lower levels -ERRNO that got assigned to
   unsigned at higher levels)

Summary: Linus likes the check, compiler (and I) don't.
Choose your side :-)

--MiKu

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

* Re: [PATCH] DSPBRIDGE: Various compile warning fixes
  2010-01-21 13:40 [PATCH] DSPBRIDGE: Various compile warning fixes Ameya Palande
  2010-01-21 16:01 ` Andy Shevchenko
@ 2010-01-25 16:59 ` Omar Ramirez Luna
  2010-01-25 17:03   ` ameya.palande
  2010-01-26 23:52 ` Omar Ramirez Luna
  2 siblings, 1 reply; 14+ messages in thread
From: Omar Ramirez Luna @ 2010-01-25 16:59 UTC (permalink / raw)
  To: Ameya Palande
  Cc: linux-omap@vger.kernel.org, Menon, Nishanth,
	Chitriki Rudramuni, Deepak, mika.kukkonen@nokia.com

Patch looks good, just one question:

> This patch contains indentation fixes and cleans up various warnings
> uncovered with extra warning flags:
>
>   - empty if() bodies

am i missing something? which hunk fix this?

>   - incorrect use of unsigned variables
>   - bad comparison of pointer value
>   - pointless check of unsigned value being smaller than zero
>   - keyword 'extern' has to be first one in variable declaration
>
> Signed-off-by: Mika Kukkonen <mika.kukkonen@nokia.com>
> Signed-off-by: Ameya Palande <ameya.palande@nokia.com>
> ---
>  arch/arm/plat-omap/include/dspbridge/dbc.h |    6 +++---
>  arch/arm/plat-omap/include/dspbridge/dbg.h |    4 ++--
>  arch/arm/plat-omap/include/dspbridge/gt.h  |   16 +++++++++-------
>  arch/arm/plat-omap/include/dspbridge/mem.h |    2 +-
>  drivers/dsp/bridge/wmd/io_sm.c             |    2 +-
>  drivers/dsp/bridge/wmd/ue_deh.c            |    2 +-
>  6 files changed, 17 insertions(+), 15 deletions(-)
>
> diff --git a/arch/arm/plat-omap/include/dspbridge/dbc.h b/arch/arm/plat-omap/include/dspbridge/dbc.h
> index ac5d178..1b3ac44 100644
> --- a/arch/arm/plat-omap/include/dspbridge/dbc.h
> +++ b/arch/arm/plat-omap/include/dspbridge/dbc.h
> @@ -43,9 +43,9 @@
>
>  #else
>
> -#define DBC_Assert(exp)
> -#define DBC_Require(exp)
> -#define DBC_Ensure(exp)
> +#define DBC_Assert(exp) {}
> +#define DBC_Require(exp) {}
> +#define DBC_Ensure(exp) {}
>
>  #endif				/* DEBUG */
>
> diff --git a/arch/arm/plat-omap/include/dspbridge/dbg.h b/arch/arm/plat-omap/include/dspbridge/dbg.h
> index 2f61dab..4d01eca 100644
> --- a/arch/arm/plat-omap/include/dspbridge/dbg.h
> +++ b/arch/arm/plat-omap/include/dspbridge/dbg.h
> @@ -80,9 +80,9 @@
>  	extern DSP_STATUS DBG_Trace(IN u8 bLevel, IN char *pstrFormat, ...);
>  #else
>
> -#define DBG_Exit(void)
> +#define DBG_Exit(void) do {} while (0)
>  #define DBG_Init(void) true
> -#define DBG_Trace(bLevel, pstrFormat, args...)
> +#define DBG_Trace(bLevel, pstrFormat, args...) do {} while (0)
>
>  #endif	/* (CONFIG_BRIDGE_DEBUG || DDSP_DEBUG_PRODUCT) && GT_TRACE */
>
> diff --git a/arch/arm/plat-omap/include/dspbridge/gt.h b/arch/arm/plat-omap/include/dspbridge/gt.h
> index 6082d15..9097910 100644
> --- a/arch/arm/plat-omap/include/dspbridge/gt.h
> +++ b/arch/arm/plat-omap/include/dspbridge/gt.h
> @@ -252,13 +252,15 @@ extern struct GT_Config _GT_params;
>
>  #define GT_query(mask, class)     false
>
> -#define GT_0trace(mask, class, format)
> -#define GT_1trace(mask, class, format, arg1)
> -#define GT_2trace(mask, class, format, arg1, arg2)
> -#define GT_3trace(mask, class, format, arg1, arg2, arg3)
> -#define GT_4trace(mask, class, format, arg1, arg2, arg3, arg4)
> -#define GT_5trace(mask, class, format, arg1, arg2, arg3, arg4, arg5)
> -#define GT_6trace(mask, class, format, arg1, arg2, arg3, arg4, arg5, arg6)
> +#define GT_0trace(mask, class, format) do {} while (0)
> +#define GT_1trace(mask, class, format, arg1) do {} while (0)
> +#define GT_2trace(mask, class, format, arg1, arg2) do {} while (0)
> +#define GT_3trace(mask, class, format, arg1, arg2, arg3) do {} while (0)
> +#define GT_4trace(mask, class, format, arg1, arg2, arg3, arg4) do {} while (0)
> +#define GT_5trace(mask, class, format, arg1, arg2, arg3, arg4, arg5) \
> +	do {} while (0)
> +#define GT_6trace(mask, class, format, arg1, arg2, arg3, arg4, arg5, arg6) \
> +	do {} while (0)
>
>  #else				/* GT_TRACE == 1 */
>
> diff --git a/arch/arm/plat-omap/include/dspbridge/mem.h b/arch/arm/plat-omap/include/dspbridge/mem.h
> index 03b419a..353ffb0 100644
> --- a/arch/arm/plat-omap/include/dspbridge/mem.h
> +++ b/arch/arm/plat-omap/include/dspbridge/mem.h
> @@ -286,7 +286,7 @@
>   *  Ensures:
>   *      - pBaseAddr no longer points to a valid linear address.
>   */
> -#define MEM_UnmapLinearAddress(pBaseAddr)
> +#define MEM_UnmapLinearAddress(pBaseAddr) {}
>
>  /*
>   *  ======== MEM_ExtPhysPoolInit ========
> diff --git a/drivers/dsp/bridge/wmd/io_sm.c b/drivers/dsp/bridge/wmd/io_sm.c
> index e35ce57..64eba5a 100644
> --- a/drivers/dsp/bridge/wmd/io_sm.c
> +++ b/drivers/dsp/bridge/wmd/io_sm.c
> @@ -1210,7 +1210,7 @@ static void InputChnl(struct IO_MGR *pIOMgr, struct CHNL_OBJECT *pChnl,
>  			    pChnlMgr->uWordSize;
>  	chnlId = IO_GetValue(pIOMgr->hWmdContext, struct SHM, sm, inputId);
>  	dwArg = IO_GetLong(pIOMgr->hWmdContext, struct SHM, sm, arg);
> -	if (!(chnlId >= 0) || !(chnlId < CHNL_MAXCHANNELS)) {
> +	if (chnlId >= CHNL_MAXCHANNELS) {
>  		/* Shouldn't be here: would indicate corrupted SHM. */
>  		DBC_Assert(chnlId);
>  		goto func_end;
> diff --git a/drivers/dsp/bridge/wmd/ue_deh.c b/drivers/dsp/bridge/wmd/ue_deh.c
> index 6166d97..2c3a2cd 100644
> --- a/drivers/dsp/bridge/wmd/ue_deh.c
> +++ b/drivers/dsp/bridge/wmd/ue_deh.c
> @@ -189,7 +189,7 @@ void WMD_DEH_Notify(struct DEH_MGR *hDehMgr, u32 ulEventMask,
>  	DSP_STATUS status = DSP_SOK;
>  	u32 memPhysical = 0;
>  	u32 HW_MMU_MAX_TLB_COUNT = 31;
> -	u32 extern faultAddr;
> +	extern u32 faultAddr;
>  	struct CFG_HOSTRES resources;
>  	HW_STATUS hwStatus;
>
> -- 1.6.3.3

- omar

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

* RE: [PATCH] DSPBRIDGE: Various compile warning fixes
  2010-01-25 16:59 ` Omar Ramirez Luna
@ 2010-01-25 17:03   ` ameya.palande
  2010-01-26  6:03     ` mika.kukkonen
  0 siblings, 1 reply; 14+ messages in thread
From: ameya.palande @ 2010-01-25 17:03 UTC (permalink / raw)
  To: omar.ramirez; +Cc: linux-omap, nm, deepak.chitriki, mika.kukkonen

Hi Omar,

Sorry for the top posthing :(
I guess the original patch had empty if() bodies. 
That comment can be removed :)

Cheers,
Ameya.
________________________________________
From: ext Omar Ramirez Luna [omar.ramirez@ti.com]
Sent: Monday, January 25, 2010 6:59 PM
To: Palande Ameya (Nokia-D/Helsinki)
Cc: linux-omap@vger.kernel.org; Menon, Nishanth; Chitriki Rudramuni, Deepak; Kukkonen Mika (Nokia-D/Helsinki)
Subject: Re: [PATCH] DSPBRIDGE: Various compile warning fixes

Patch looks good, just one question:

> This patch contains indentation fixes and cleans up various warnings
> uncovered with extra warning flags:
>
>   - empty if() bodies

am i missing something? which hunk fix this?

>   - incorrect use of unsigned variables
>   - bad comparison of pointer value
>   - pointless check of unsigned value being smaller than zero
>   - keyword 'extern' has to be first one in variable declaration
>
> Signed-off-by: Mika Kukkonen <mika.kukkonen@nokia.com>
> Signed-off-by: Ameya Palande <ameya.palande@nokia.com>
> ---
>  arch/arm/plat-omap/include/dspbridge/dbc.h |    6 +++---
>  arch/arm/plat-omap/include/dspbridge/dbg.h |    4 ++--
>  arch/arm/plat-omap/include/dspbridge/gt.h  |   16 +++++++++-------
>  arch/arm/plat-omap/include/dspbridge/mem.h |    2 +-
>  drivers/dsp/bridge/wmd/io_sm.c             |    2 +-
>  drivers/dsp/bridge/wmd/ue_deh.c            |    2 +-
>  6 files changed, 17 insertions(+), 15 deletions(-)
>
> diff --git a/arch/arm/plat-omap/include/dspbridge/dbc.h b/arch/arm/plat-omap/include/dspbridge/dbc.h
> index ac5d178..1b3ac44 100644
> --- a/arch/arm/plat-omap/include/dspbridge/dbc.h
> +++ b/arch/arm/plat-omap/include/dspbridge/dbc.h
> @@ -43,9 +43,9 @@
>
>  #else
>
> -#define DBC_Assert(exp)
> -#define DBC_Require(exp)
> -#define DBC_Ensure(exp)
> +#define DBC_Assert(exp) {}
> +#define DBC_Require(exp) {}
> +#define DBC_Ensure(exp) {}
>
>  #endif                               /* DEBUG */
>
> diff --git a/arch/arm/plat-omap/include/dspbridge/dbg.h b/arch/arm/plat-omap/include/dspbridge/dbg.h
> index 2f61dab..4d01eca 100644
> --- a/arch/arm/plat-omap/include/dspbridge/dbg.h
> +++ b/arch/arm/plat-omap/include/dspbridge/dbg.h
> @@ -80,9 +80,9 @@
>       extern DSP_STATUS DBG_Trace(IN u8 bLevel, IN char *pstrFormat, ...);
>  #else
>
> -#define DBG_Exit(void)
> +#define DBG_Exit(void) do {} while (0)
>  #define DBG_Init(void) true
> -#define DBG_Trace(bLevel, pstrFormat, args...)
> +#define DBG_Trace(bLevel, pstrFormat, args...) do {} while (0)
>
>  #endif       /* (CONFIG_BRIDGE_DEBUG || DDSP_DEBUG_PRODUCT) && GT_TRACE */
>
> diff --git a/arch/arm/plat-omap/include/dspbridge/gt.h b/arch/arm/plat-omap/include/dspbridge/gt.h
> index 6082d15..9097910 100644
> --- a/arch/arm/plat-omap/include/dspbridge/gt.h
> +++ b/arch/arm/plat-omap/include/dspbridge/gt.h
> @@ -252,13 +252,15 @@ extern struct GT_Config _GT_params;
>
>  #define GT_query(mask, class)     false
>
> -#define GT_0trace(mask, class, format)
> -#define GT_1trace(mask, class, format, arg1)
> -#define GT_2trace(mask, class, format, arg1, arg2)
> -#define GT_3trace(mask, class, format, arg1, arg2, arg3)
> -#define GT_4trace(mask, class, format, arg1, arg2, arg3, arg4)
> -#define GT_5trace(mask, class, format, arg1, arg2, arg3, arg4, arg5)
> -#define GT_6trace(mask, class, format, arg1, arg2, arg3, arg4, arg5, arg6)
> +#define GT_0trace(mask, class, format) do {} while (0)
> +#define GT_1trace(mask, class, format, arg1) do {} while (0)
> +#define GT_2trace(mask, class, format, arg1, arg2) do {} while (0)
> +#define GT_3trace(mask, class, format, arg1, arg2, arg3) do {} while (0)
> +#define GT_4trace(mask, class, format, arg1, arg2, arg3, arg4) do {} while (0)
> +#define GT_5trace(mask, class, format, arg1, arg2, arg3, arg4, arg5) \
> +     do {} while (0)
> +#define GT_6trace(mask, class, format, arg1, arg2, arg3, arg4, arg5, arg6) \
> +     do {} while (0)
>
>  #else                                /* GT_TRACE == 1 */
>
> diff --git a/arch/arm/plat-omap/include/dspbridge/mem.h b/arch/arm/plat-omap/include/dspbridge/mem.h
> index 03b419a..353ffb0 100644
> --- a/arch/arm/plat-omap/include/dspbridge/mem.h
> +++ b/arch/arm/plat-omap/include/dspbridge/mem.h
> @@ -286,7 +286,7 @@
>   *  Ensures:
>   *      - pBaseAddr no longer points to a valid linear address.
>   */
> -#define MEM_UnmapLinearAddress(pBaseAddr)
> +#define MEM_UnmapLinearAddress(pBaseAddr) {}
>
>  /*
>   *  ======== MEM_ExtPhysPoolInit ========
> diff --git a/drivers/dsp/bridge/wmd/io_sm.c b/drivers/dsp/bridge/wmd/io_sm.c
> index e35ce57..64eba5a 100644
> --- a/drivers/dsp/bridge/wmd/io_sm.c
> +++ b/drivers/dsp/bridge/wmd/io_sm.c
> @@ -1210,7 +1210,7 @@ static void InputChnl(struct IO_MGR *pIOMgr, struct CHNL_OBJECT *pChnl,
>                           pChnlMgr->uWordSize;
>       chnlId = IO_GetValue(pIOMgr->hWmdContext, struct SHM, sm, inputId);
>       dwArg = IO_GetLong(pIOMgr->hWmdContext, struct SHM, sm, arg);
> -     if (!(chnlId >= 0) || !(chnlId < CHNL_MAXCHANNELS)) {
> +     if (chnlId >= CHNL_MAXCHANNELS) {
>               /* Shouldn't be here: would indicate corrupted SHM. */
>               DBC_Assert(chnlId);
>               goto func_end;
> diff --git a/drivers/dsp/bridge/wmd/ue_deh.c b/drivers/dsp/bridge/wmd/ue_deh.c
> index 6166d97..2c3a2cd 100644
> --- a/drivers/dsp/bridge/wmd/ue_deh.c
> +++ b/drivers/dsp/bridge/wmd/ue_deh.c
> @@ -189,7 +189,7 @@ void WMD_DEH_Notify(struct DEH_MGR *hDehMgr, u32 ulEventMask,
>       DSP_STATUS status = DSP_SOK;
>       u32 memPhysical = 0;
>       u32 HW_MMU_MAX_TLB_COUNT = 31;
> -     u32 extern faultAddr;
> +     extern u32 faultAddr;
>       struct CFG_HOSTRES resources;
>       HW_STATUS hwStatus;
>
> -- 1.6.3.3

- omar

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

* RE: [PATCH] DSPBRIDGE: Various compile warning fixes
  2010-01-25 17:03   ` ameya.palande
@ 2010-01-26  6:03     ` mika.kukkonen
  0 siblings, 0 replies; 14+ messages in thread
From: mika.kukkonen @ 2010-01-26  6:03 UTC (permalink / raw)
  To: ameya.palande, omar.ramirez; +Cc: linux-omap, nm, deepak.chitriki

 

>-----Original Message-----
>From: Palande Ameya (Nokia-D/Helsinki) 
>Sent: 25 January, 2010 19:03
>To: ext Omar Ramirez Luna
>Cc: linux-omap@vger.kernel.org; Menon, Nishanth; Chitriki 
>Rudramuni, Deepak; Kukkonen Mika (Nokia-D/Helsinki)
>Subject: RE: [PATCH] DSPBRIDGE: Various compile warning fixes
>
>Hi Omar,
>
>Sorry for the top posthing :(
>I guess the original patch had empty if() bodies. 
>That comment can be removed :)

No, the empty if() bodies fix is the chunk that modifies
those macros:

>> -#define DBC_Assert(exp)
>> -#define DBC_Require(exp)
>> -#define DBC_Ensure(exp)
>> +#define DBC_Assert(exp) {}
>> +#define DBC_Require(exp) {}
>> +#define DBC_Ensure(exp) {}
(...)
>> -#define DBG_Exit(void)
>> +#define DBG_Exit(void) do {} while (0)

etc. Those are used in code as

if (whatever)
   do_stuff();
else
   DBC_Assert(exp);
do_something_else();

and you really want to DBC_Assert() not to be totally
empty, but instead evaluate to an empty statement block.

--MiKu

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

* Re: [PATCH] DSPBRIDGE: Various compile warning fixes
  2010-01-21 13:40 [PATCH] DSPBRIDGE: Various compile warning fixes Ameya Palande
  2010-01-21 16:01 ` Andy Shevchenko
  2010-01-25 16:59 ` Omar Ramirez Luna
@ 2010-01-26 23:52 ` Omar Ramirez Luna
  2 siblings, 0 replies; 14+ messages in thread
From: Omar Ramirez Luna @ 2010-01-26 23:52 UTC (permalink / raw)
  To: Ameya Palande
  Cc: linux-omap@vger.kernel.org, Menon, Nishanth,
	Chitriki Rudramuni, Deepak, mika.kukkonen@nokia.com

On 1/21/2010 7:40 AM, Ameya Palande wrote:
> This patch contains indentation fixes and cleans up various warnings
> uncovered with extra warning flags:
>
>    - empty if() bodies
>    - incorrect use of unsigned variables
>    - bad comparison of pointer value
>    - pointless check of unsigned value being smaller than zero
>    - keyword 'extern' has to be first one in variable declaration
>
> Signed-off-by: Mika Kukkonen<mika.kukkonen@nokia.com>
> Signed-off-by: Ameya Palande<ameya.palande@nokia.com>

Acked-by: Omar Ramirez Luna <omar.ramirez@ti.com>

Pushed to dspbridge

> ---
>   arch/arm/plat-omap/include/dspbridge/dbc.h |    6 +++---
>   arch/arm/plat-omap/include/dspbridge/dbg.h |    4 ++--
>   arch/arm/plat-omap/include/dspbridge/gt.h  |   16 +++++++++-------
>   arch/arm/plat-omap/include/dspbridge/mem.h |    2 +-
>   drivers/dsp/bridge/wmd/io_sm.c             |    2 +-
>   drivers/dsp/bridge/wmd/ue_deh.c            |    2 +-
>   6 files changed, 17 insertions(+), 15 deletions(-)
>
> diff --git a/arch/arm/plat-omap/include/dspbridge/dbc.h b/arch/arm/plat-omap/include/dspbridge/dbc.h
> index ac5d178..1b3ac44 100644
> --- a/arch/arm/plat-omap/include/dspbridge/dbc.h
> +++ b/arch/arm/plat-omap/include/dspbridge/dbc.h
> @@ -43,9 +43,9 @@
>
>   #else
>
> -#define DBC_Assert(exp)
> -#define DBC_Require(exp)
> -#define DBC_Ensure(exp)
> +#define DBC_Assert(exp) {}
> +#define DBC_Require(exp) {}
> +#define DBC_Ensure(exp) {}
>
>   #endif				/* DEBUG */
>
> diff --git a/arch/arm/plat-omap/include/dspbridge/dbg.h b/arch/arm/plat-omap/include/dspbridge/dbg.h
> index 2f61dab..4d01eca 100644
> --- a/arch/arm/plat-omap/include/dspbridge/dbg.h
> +++ b/arch/arm/plat-omap/include/dspbridge/dbg.h
> @@ -80,9 +80,9 @@
>   	extern DSP_STATUS DBG_Trace(IN u8 bLevel, IN char *pstrFormat, ...);
>   #else
>
> -#define DBG_Exit(void)
> +#define DBG_Exit(void) do {} while (0)
>   #define DBG_Init(void) true
> -#define DBG_Trace(bLevel, pstrFormat, args...)
> +#define DBG_Trace(bLevel, pstrFormat, args...) do {} while (0)
>
>   #endif	/* (CONFIG_BRIDGE_DEBUG || DDSP_DEBUG_PRODUCT)&&  GT_TRACE */
>
> diff --git a/arch/arm/plat-omap/include/dspbridge/gt.h b/arch/arm/plat-omap/include/dspbridge/gt.h
> index 6082d15..9097910 100644
> --- a/arch/arm/plat-omap/include/dspbridge/gt.h
> +++ b/arch/arm/plat-omap/include/dspbridge/gt.h
> @@ -252,13 +252,15 @@ extern struct GT_Config _GT_params;
>
>   #define GT_query(mask, class)     false
>
> -#define GT_0trace(mask, class, format)
> -#define GT_1trace(mask, class, format, arg1)
> -#define GT_2trace(mask, class, format, arg1, arg2)
> -#define GT_3trace(mask, class, format, arg1, arg2, arg3)
> -#define GT_4trace(mask, class, format, arg1, arg2, arg3, arg4)
> -#define GT_5trace(mask, class, format, arg1, arg2, arg3, arg4, arg5)
> -#define GT_6trace(mask, class, format, arg1, arg2, arg3, arg4, arg5, arg6)
> +#define GT_0trace(mask, class, format) do {} while (0)
> +#define GT_1trace(mask, class, format, arg1) do {} while (0)
> +#define GT_2trace(mask, class, format, arg1, arg2) do {} while (0)
> +#define GT_3trace(mask, class, format, arg1, arg2, arg3) do {} while (0)
> +#define GT_4trace(mask, class, format, arg1, arg2, arg3, arg4) do {} while (0)
> +#define GT_5trace(mask, class, format, arg1, arg2, arg3, arg4, arg5) \
> +	do {} while (0)
> +#define GT_6trace(mask, class, format, arg1, arg2, arg3, arg4, arg5, arg6) \
> +	do {} while (0)
>
>   #else				/* GT_TRACE == 1 */
>
> diff --git a/arch/arm/plat-omap/include/dspbridge/mem.h b/arch/arm/plat-omap/include/dspbridge/mem.h
> index 03b419a..353ffb0 100644
> --- a/arch/arm/plat-omap/include/dspbridge/mem.h
> +++ b/arch/arm/plat-omap/include/dspbridge/mem.h
> @@ -286,7 +286,7 @@
>    *  Ensures:
>    *      - pBaseAddr no longer points to a valid linear address.
>    */
> -#define MEM_UnmapLinearAddress(pBaseAddr)
> +#define MEM_UnmapLinearAddress(pBaseAddr) {}
>
>   /*
>    *  ======== MEM_ExtPhysPoolInit ========
> diff --git a/drivers/dsp/bridge/wmd/io_sm.c b/drivers/dsp/bridge/wmd/io_sm.c
> index e35ce57..64eba5a 100644
> --- a/drivers/dsp/bridge/wmd/io_sm.c
> +++ b/drivers/dsp/bridge/wmd/io_sm.c
> @@ -1210,7 +1210,7 @@ static void InputChnl(struct IO_MGR *pIOMgr, struct CHNL_OBJECT *pChnl,
>   			    pChnlMgr->uWordSize;
>   	chnlId = IO_GetValue(pIOMgr->hWmdContext, struct SHM, sm, inputId);
>   	dwArg = IO_GetLong(pIOMgr->hWmdContext, struct SHM, sm, arg);
> -	if (!(chnlId>= 0) || !(chnlId<  CHNL_MAXCHANNELS)) {
> +	if (chnlId>= CHNL_MAXCHANNELS) {
>   		/* Shouldn't be here: would indicate corrupted SHM. */
>   		DBC_Assert(chnlId);
>   		goto func_end;
> diff --git a/drivers/dsp/bridge/wmd/ue_deh.c b/drivers/dsp/bridge/wmd/ue_deh.c
> index 6166d97..2c3a2cd 100644
> --- a/drivers/dsp/bridge/wmd/ue_deh.c
> +++ b/drivers/dsp/bridge/wmd/ue_deh.c
> @@ -189,7 +189,7 @@ void WMD_DEH_Notify(struct DEH_MGR *hDehMgr, u32 ulEventMask,
>   	DSP_STATUS status = DSP_SOK;
>   	u32 memPhysical = 0;
>   	u32 HW_MMU_MAX_TLB_COUNT = 31;
> -	u32 extern faultAddr;
> +	extern u32 faultAddr;
>   	struct CFG_HOSTRES resources;
>   	HW_STATUS hwStatus;
>


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

end of thread, other threads:[~2010-01-26 23:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-21 13:40 [PATCH] DSPBRIDGE: Various compile warning fixes Ameya Palande
2010-01-21 16:01 ` Andy Shevchenko
2010-01-21 16:33   ` Ameya Palande
2010-01-22  6:00     ` mika.kukkonen
2010-01-25 16:59 ` Omar Ramirez Luna
2010-01-25 17:03   ` ameya.palande
2010-01-26  6:03     ` mika.kukkonen
2010-01-26 23:52 ` Omar Ramirez Luna
  -- strict thread matches above, loose matches on Subject: below --
2009-06-08 15:47 Ameya Palande
2009-04-17  9:30 [PATCH] [DSPBRIDGE] " Ameya Palande
2009-04-17 14:13 ` Gupta, Ramesh
2009-04-17 14:20   ` Kanigeri, Hari
2009-04-20  5:23     ` mika.kukkonen
2009-04-20 12:59       ` Kanigeri, Hari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox