[PATCH 10/13] DSPBRIDGE: Remove CHNL_IS_VALID_MGR and CHNL_IS_VALID_CHNL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From 37f1d02dec398cbc29d98299f45fbbf148dc068b Mon Sep 17 00:00:00 2001
From: Ivan Gomez Castellanos <ivan.gomez@xxxxxx>
Date: Mon, 29 Mar 2010 16:33:23 -0600
Subject: [PATCH 10/13] DSPBRIDGE: Remove CHNL_IS_VALID_MGR and CHNL_IS_VALID_CHNL

The patch "DSPBRIDGE: Replace MEM_ALLOC_OBJECT macro by kzalloc function"
do not set the dw_signature, then all the signature checking will be
removed. So CHNL_IS_VALID_MGR is replaced by a pointer check.

CHNL_IS_VALID_CHNL is also removed because it is not used.

Signed-off-by: Ivan Gomez Castellanos <ivan.gomez@xxxxxx>
---
 drivers/dsp/bridge/pmgr/chnl.c    |    6 +++---
 drivers/dsp/bridge/pmgr/chnlobj.h |    7 -------
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/dsp/bridge/pmgr/chnl.c b/drivers/dsp/bridge/pmgr/chnl.c
index 6adc3c3..57b22c5 100644
--- a/drivers/dsp/bridge/pmgr/chnl.c
+++ b/drivers/dsp/bridge/pmgr/chnl.c
@@ -101,7 +101,7 @@ dsp_status chnl_create(OUT struct chnl_mgr **phChnlMgr,
 		}
 	}
 
-	DBC_ENSURE(DSP_FAILED(status) || CHNL_IS_VALID_MGR(chnl_mgr_obj));
+	DBC_ENSURE(DSP_FAILED(status) || chnl_mgr_obj);
 
 	return status;
 }
@@ -119,7 +119,7 @@ dsp_status chnl_destroy(struct chnl_mgr *hchnl_mgr)
 
 	DBC_REQUIRE(refs > 0);
 
-	if (CHNL_IS_VALID_MGR(chnl_mgr_obj)) {
+	if (chnl_mgr_obj) {
 		intf_fxns = chnl_mgr_obj->intf_fxns;
 		/* Let WMD channel module destroy the chnl_mgr: */
 		status = (*intf_fxns->pfn_chnl_destroy) (hchnl_mgr);
@@ -127,7 +127,7 @@ dsp_status chnl_destroy(struct chnl_mgr *hchnl_mgr)
 		status = DSP_EHANDLE;
 	}
 
-	DBC_ENSURE(DSP_FAILED(status) || !CHNL_IS_VALID_MGR(chnl_mgr_obj));
+	DBC_ENSURE(DSP_FAILED(status) || !chnl_mgr_obj);
 
 	return status;
 }
diff --git a/drivers/dsp/bridge/pmgr/chnlobj.h b/drivers/dsp/bridge/pmgr/chnlobj.h
index ceff374..6750273 100644
--- a/drivers/dsp/bridge/pmgr/chnlobj.h
+++ b/drivers/dsp/bridge/pmgr/chnlobj.h
@@ -23,13 +23,6 @@
 #include <dspbridge/chnldefs.h>
 #include <dspbridge/wmd.h>
 
-/* Object validateion macros: */
-#define CHNL_IS_VALID_MGR(h) \
-		((h != NULL) && ((h)->dw_signature == CHNL_MGRSIGNATURE))
-
-#define CHNL_IS_VALID_CHNL(h)\
-		((h != NULL) && ((h)->dw_signature == CHNL_SIGNATURE))
-
 /*
  *  This struct is the first field in a chnl_mgr struct, as implemented in
  *  a WMD channel class library.  Other, implementation specific fields
-- 
1.7.0.3
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux