summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d51cd49)
raw | patch | inline | side by side (parent: d51cd49)
author | Chris Ring <cring@ti.com> | |
Tue, 25 Jun 2013 21:32:23 +0000 (14:32 -0700) | ||
committer | Chris Ring <cring@ti.com> | |
Tue, 25 Jun 2013 21:32:23 +0000 (14:32 -0700) |
Found by static analysis.
Signed-off-by: Chris Ring <cring@ti.com>
Signed-off-by: Chris Ring <cring@ti.com>
index 6feff19a58ba1b75fa233692ffd733ab00867a46..356ee9b3573073f8948b573cbc2c03eb4631342a 100644 (file)
--- a/packages/ti/ipc/GateMP.h
+++ b/packages/ti/ipc/GateMP.h
/*!
* @brief The resource is still in use
*/
-#define GateMP_S_BUSY 2
+#define GateMP_S_BUSY (2)
/*!
* @brief The module has been already setup
*/
-#define GateMP_S_ALREADYSETUP 1
+#define GateMP_S_ALREADYSETUP (1)
/*!
* @brief Operation is successful.
*/
-#define GateMP_S_SUCCESS 0
+#define GateMP_S_SUCCESS (0)
/*!
* @brief Generic failure.
*/
-#define GateMP_E_FAIL -1
+#define GateMP_E_FAIL (-1)
/*!
* @brief Argument passed to function is invalid.
*/
-#define GateMP_E_INVALIDARG -2
+#define GateMP_E_INVALIDARG (-2)
/*!
* @brief Operation resulted in memory failure.
*/
-#define GateMP_E_MEMORY -3
+#define GateMP_E_MEMORY (-3)
/*!
* @brief The specified entity already exists.
*/
-#define GateMP_E_ALREADYEXISTS -4
+#define GateMP_E_ALREADYEXISTS (-4)
/*!
* @brief Unable to find the specified entity.
*/
-#define GateMP_E_NOTFOUND -5
+#define GateMP_E_NOTFOUND (-5)
/*!
* @brief Operation timed out.
*/
-#define GateMP_E_TIMEOUT -6
+#define GateMP_E_TIMEOUT (-6)
/*!
* @brief Module is not initialized.
*/
-#define GateMP_E_INVALIDSTATE -7
+#define GateMP_E_INVALIDSTATE (-7)
/*!
* @brief A failure occurred in an OS-specific call */
-#define GateMP_E_OSFAILURE -8
+#define GateMP_E_OSFAILURE (-8)
/*!
* @brief Specified resource is not available */
-#define GateMP_E_RESOURCE -9
+#define GateMP_E_RESOURCE (-9)
/*!
* @brief Operation was interrupted. Please restart the operation */
-#define GateMP_E_RESTART -10
+#define GateMP_E_RESTART (-10)
/* =============================================================================
* Structures & Enums
diff --git a/packages/ti/ipc/Ipc.h b/packages/ti/ipc/Ipc.h
index 4d2aee88470ae4df4c9601bcaa7bc35729753daf..445a7476764a488418a56a30ee9990c2b211bb6e 100644 (file)
--- a/packages/ti/ipc/Ipc.h
+++ b/packages/ti/ipc/Ipc.h
/*!
* @brief The resource is still in use
*/
-#define Ipc_S_BUSY 2
+#define Ipc_S_BUSY (2)
/*!
* @brief The module has been already setup
*/
-#define Ipc_S_ALREADYSETUP 1
+#define Ipc_S_ALREADYSETUP (1)
/*!
* @brief Operation is successful.
*/
-#define Ipc_S_SUCCESS 0
+#define Ipc_S_SUCCESS (0)
/*!
* @brief Generic failure.
*/
-#define Ipc_E_FAIL -1
+#define Ipc_E_FAIL (-1)
/*!
* @brief Argument passed to function is invalid.
*/
-#define Ipc_E_INVALIDARG -2
+#define Ipc_E_INVALIDARG (-2)
/*!
* @brief Operation resulted in memory failure.
*/
-#define Ipc_E_MEMORY -3
+#define Ipc_E_MEMORY (-3)
/*!
* @brief The specified entity already exists.
*/
-#define Ipc_E_ALREADYEXISTS -4
+#define Ipc_E_ALREADYEXISTS (-4)
/*!
* @brief Unable to find the specified entity.
*/
-#define Ipc_E_NOTFOUND -5
+#define Ipc_E_NOTFOUND (-5)
/*!
* @brief Operation timed out.
*/
-#define Ipc_E_TIMEOUT -6
+#define Ipc_E_TIMEOUT (-6)
/*!
* @brief Module is not initialized or in an invalid state.
*/
-#define Ipc_E_INVALIDSTATE -7
+#define Ipc_E_INVALIDSTATE (-7)
/*!
* @brief A failure occurred in an OS-specific call
*/
-#define Ipc_E_OSFAILURE -8
+#define Ipc_E_OSFAILURE (-8)
/*!
* @brief Specified resource is not available
*/
-#define Ipc_E_RESOURCE -9
+#define Ipc_E_RESOURCE (-9)
/*!
* @brief Operation was interrupted. Please restart the operation
*/
-#define Ipc_E_RESTART -10
+#define Ipc_E_RESTART (-10)
/*!
* @brief Operation was not ready.
*/
-#define Ipc_E_NOTREADY -11
+#define Ipc_E_NOTREADY (-11)
/* =============================================================================
index 820713ca19d915848b5803cab03fbba9eb67fa9b..9b23f1a0389266b8a69bbd813f284ff619a8f218 100644 (file)
/*!
* @brief The resource is still in use
*/
-#define MessageQ_S_BUSY 2
+#define MessageQ_S_BUSY (2)
/*!
* @brief The module has been already setup
*/
-#define MessageQ_S_ALREADYSETUP 1
+#define MessageQ_S_ALREADYSETUP (1)
/*!
* @brief Operation is successful.
*/
-#define MessageQ_S_SUCCESS 0
+#define MessageQ_S_SUCCESS (0)
/*!
* @brief Operation is not successful.
*/
-#define MessageQ_E_FAIL -1
+#define MessageQ_E_FAIL (-1)
/*!
* @brief There is an invalid argument.
*/
-#define MessageQ_E_INVALIDARG -2
+#define MessageQ_E_INVALIDARG (-2)
/*!
* @brief Operation resulted in memory failure.
*/
-#define MessageQ_E_MEMORY -3
+#define MessageQ_E_MEMORY (-3)
/*!
* @brief The specified entity already exists.
*/
-#define MessageQ_E_ALREADYEXISTS -4
+#define MessageQ_E_ALREADYEXISTS (-4)
/*!
* @brief Unable to find the specified entity.
*/
-#define MessageQ_E_NOTFOUND -5
+#define MessageQ_E_NOTFOUND (-5)
/*!
* @brief Operation timed out.
*/
-#define MessageQ_E_TIMEOUT -6
+#define MessageQ_E_TIMEOUT (-6)
/*!
* @brief Module is not initialized.
*/
-#define MessageQ_E_INVALIDSTATE -7
+#define MessageQ_E_INVALIDSTATE (-7)
/*!
* @brief A failure occurred in an OS-specific call
*/
-#define MessageQ_E_OSFAILURE -8
+#define MessageQ_E_OSFAILURE (-8)
/*!
* @brief Specified resource is not available
*/
-#define MessageQ_E_RESOURCE -9
+#define MessageQ_E_RESOURCE (-9)
/*!
* @brief Operation was interrupted. Please restart the operation
*/
-#define MessageQ_E_RESTART -10
+#define MessageQ_E_RESTART (-10)
/*!
* @brief An invalid message was encountered
*/
-#define MessageQ_E_INVALIDMSG -11
+#define MessageQ_E_INVALIDMSG (-11)
/*!
* @brief Not the owner
*/
-#define MessageQ_E_NOTOWNER -12
+#define MessageQ_E_NOTOWNER (-12)
/*!
* @brief Operation resulted in error
*/
-#define MessageQ_E_REMOTEACTIVE -13
+#define MessageQ_E_REMOTEACTIVE (-13)
/*!
* @brief An invalid heap id was encountered
*/
-#define MessageQ_E_INVALIDHEAPID -14
+#define MessageQ_E_INVALIDHEAPID (-14)
/*!
* @brief An invalid MultiProc id was encountered
*/
-#define MessageQ_E_INVALIDPROCID -15
+#define MessageQ_E_INVALIDPROCID (-15)
/*!
* @brief The max has been reached.
*/
-#define MessageQ_E_MAXREACHED -16
+#define MessageQ_E_MAXREACHED (-16)
/*!
* @brief Attempting to use an unregistered heap id.
*/
-#define MessageQ_E_UNREGISTEREDHEAPID -17
+#define MessageQ_E_UNREGISTEREDHEAPID (-17)
/*!
* @brief Trying to free a statically initialized message
*/
-#define MessageQ_E_CANNOTFREESTATICMSG -18
+#define MessageQ_E_CANNOTFREESTATICMSG (-18)
/*!
* @brief MessageQ was unblocked
*/
-#define MessageQ_E_UNBLOCKED -19
+#define MessageQ_E_UNBLOCKED (-19)
/* =============================================================================
* Macros
/*!
* @brief Used as the timeout value to specify wait forever
*/
-#define MessageQ_FOREVER ~(0)
+#define MessageQ_FOREVER (~(0))
/*!
* @brief Invalid message id
*/
-#define MessageQ_INVALIDMSGID 0xffff
+#define MessageQ_INVALIDMSGID (0xffff)
/*!
* @brief Invalid message queue
*/
-#define MessageQ_INVALIDMESSAGEQ 0xffff
+#define MessageQ_INVALIDMESSAGEQ (0xffff)
/*!
* @brief Mask to extract priority setting
*/
-#define MessageQ_PRIORITYMASK 0x3
+#define MessageQ_PRIORITYMASK (0x3)
/*!
* @brief Extract the destination queue ID from a message.
index cda9a74182234c7d971f775304f78a52b6aed134..3b2d2425203f070ade2729383a072ec11f0b4eb3 100644 (file)
/*!
* @brief The resource is still in use
*/
-#define MultiProc_S_BUSY 2
+#define MultiProc_S_BUSY (2)
/*!
* @brief The module has been already setup
*/
-#define MultiProc_S_ALREADYSETUP 1
+#define MultiProc_S_ALREADYSETUP (1)
/*!
* @brief Operation is successful.
*/
-#define MultiProc_S_SUCCESS 0
+#define MultiProc_S_SUCCESS (0)
/*!
* @brief Generic failure.
*/
-#define MultiProc_E_FAIL -1
+#define MultiProc_E_FAIL (-1)
/*!
* @brief Argument passed to function is invalid.
*/
-#define MultiProc_E_INVALIDARG -2
+#define MultiProc_E_INVALIDARG (-2)
/*!
* @brief Operation resulted in memory failure.
*/
-#define MultiProc_E_MEMORY -3
+#define MultiProc_E_MEMORY (-3)
/*!
* @brief The specified entity already exists.
*/
-#define MultiProc_E_ALREADYEXISTS -4
+#define MultiProc_E_ALREADYEXISTS (-4)
/*!
* @brief Unable to find the specified entity.
*/
-#define MultiProc_E_NOTFOUND -5
+#define MultiProc_E_NOTFOUND (-5)
/*!
* @brief Operation timed out.
*/
-#define MultiProc_E_TIMEOUT -6
+#define MultiProc_E_TIMEOUT (-6)
/*!
* @brief Module is not initialized.
*/
-#define MultiProc_E_INVALIDSTATE -7
+#define MultiProc_E_INVALIDSTATE (-7)
/*!
* @brief A failure occurred in an OS-specific call
*/
-#define MultiProc_E_OSFAILURE -8
+#define MultiProc_E_OSFAILURE (-8)
/*!
* @brief Specified resource is not available
*/
-#define MultiProc_E_RESOURCE -9
+#define MultiProc_E_RESOURCE (-9)
/*!
* @brief Operation was interrupted. Please restart the operation
*/
-#define MultiProc_E_RESTART -10
+#define MultiProc_E_RESTART (-10)
/* =============================================================================
* Macros
index 7e8666c93a12ce3f14ade9825f11c83cc8bf7605..770b2f27651a6512a31a87e7569e50da900d3293 100644 (file)
/*!
* @brief The resource is still in use
*/
-#define NameServer_S_BUSY 2
+#define NameServer_S_BUSY (2)
/*!
* @brief The module has been already setup
*/
-#define NameServer_S_ALREADYSETUP 1
+#define NameServer_S_ALREADYSETUP (1)
/*!
* @brief Operation is successful.
*/
-#define NameServer_S_SUCCESS 0
+#define NameServer_S_SUCCESS (0)
/*!
* @brief Generic failure.
*/
-#define NameServer_E_FAIL -1
+#define NameServer_E_FAIL (-1)
/*!
* @brief Argument passed to function is invalid.
*/
-#define NameServer_E_INVALIDARG -2
+#define NameServer_E_INVALIDARG (-2)
/*!
* @brief Operation resulted in memory failure.
*/
-#define NameServer_E_MEMORY -3
+#define NameServer_E_MEMORY (-3)
/*!
* @brief The specified entity already exists.
*/
-#define NameServer_E_ALREADYEXISTS -4
+#define NameServer_E_ALREADYEXISTS (-4)
/*!
* @brief Unable to find the specified entity.
*/
-#define NameServer_E_NOTFOUND -5
+#define NameServer_E_NOTFOUND (-5)
/*!
* @brief Operation timed out.
*/
-#define NameServer_E_TIMEOUT -6
+#define NameServer_E_TIMEOUT (-6)
/*!
* @brief Module is not initialized.
*/
-#define NameServer_E_INVALIDSTATE -7
+#define NameServer_E_INVALIDSTATE (-7)
/*!
* @brief A failure occurred in an OS-specific call
*/
-#define NameServer_E_OSFAILURE -8
+#define NameServer_E_OSFAILURE (-8)
/*!
* @brief Specified resource is not available
*/
-#define NameServer_E_RESOURCE -9
+#define NameServer_E_RESOURCE (-9)
/*!
* @brief Operation was interrupted. Please restart the operation
*/
-#define NameServer_E_RESTART -10
+#define NameServer_E_RESTART (-10)
/* =============================================================================
* Macros
/*!
* @brief The default maximum length of the name for the name/value pair
*/
-#define NameServer_Params_MAXNAMELEN 16
+#define NameServer_Params_MAXNAMELEN (16)
/* =============================================================================
* Structures & Enums
index e629aa275e7711270911baa91445ed89480e43fe..dca17a3e8acc7f53f650bd93883280a2c95cf67e 100644 (file)
--- a/packages/ti/ipc/Notify.h
+++ b/packages/ti/ipc/Notify.h
/*!
* @brief The resource is still in use
*/
-#define Notify_S_BUSY 2
+#define Notify_S_BUSY (2)
/*!
* @brief Module already set up
*/
-#define Notify_S_ALREADYSETUP 1
+#define Notify_S_ALREADYSETUP (1)
/*!
* @brief Operation is successful.
*/
-#define Notify_S_SUCCESS 0
+#define Notify_S_SUCCESS (0)
/*!
* @brief Generic failure.
*/
-#define Notify_E_FAIL -1
+#define Notify_E_FAIL (-1)
/*!
* @brief Argument passed to function is invalid.
*/
-#define Notify_E_INVALIDARG -2
+#define Notify_E_INVALIDARG (-2)
/*!
* @brief Operation resulted in memory failure.
*/
-#define Notify_E_MEMORY -3
+#define Notify_E_MEMORY (-3)
/*!
* @brief The specified entity already exists.
*/
-#define Notify_E_ALREADYEXISTS -4
+#define Notify_E_ALREADYEXISTS (-4)
/*!
* @brief Unable to find the specified entity.
*/
-#define Notify_E_NOTFOUND -5
+#define Notify_E_NOTFOUND (-5)
/*!
* @brief Operation timed out.
*/
-#define Notify_E_TIMEOUT -6
+#define Notify_E_TIMEOUT (-6)
/*!
* @brief Module is not initialized.
*/
-#define Notify_E_INVALIDSTATE -7
+#define Notify_E_INVALIDSTATE (-7)
/*!
* @brief A failure occurred in an OS-specific call
*/
-#define Notify_E_OSFAILURE -8
+#define Notify_E_OSFAILURE (-8)
/*!
* @brief The module has been already setup
*/
-#define Notify_E_ALREADYSETUP -9
+#define Notify_E_ALREADYSETUP (-9)
/*!
* @brief Specified resource is not available
*/
-#define Notify_E_RESOURCE -10
+#define Notify_E_RESOURCE (-10)
/*!
* @brief Operation was interrupted. Please restart the operation
*/
-#define Notify_E_RESTART -11
+#define Notify_E_RESTART (-11)
/*!
* @brief The resource is still in use
*/
-#define Notify_E_BUSY -12
+#define Notify_E_BUSY (-12)
/*!
* @brief Driver corresponding to the specified eventId is not registered
*/
-#define Notify_E_DRIVERNOTREGISTERED -13
+#define Notify_E_DRIVERNOTREGISTERED (-13)
/*!
* @brief Event not registered
*/
-#define Notify_E_EVTNOTREGISTERED -14
+#define Notify_E_EVTNOTREGISTERED (-14)
/*!
* @brief Event is disabled
*/
-#define Notify_E_EVTDISABLED -15
+#define Notify_E_EVTDISABLED (-15)
/*!
* @brief Remote notification is not initialized
*/
-#define Notify_E_NOTINITIALIZED -16
+#define Notify_E_NOTINITIALIZED (-16)
/*!
* @brief Trying to illegally use a reserved event
*/
-#define Notify_E_EVTRESERVED -17
+#define Notify_E_EVTRESERVED (-17)
/* =============================================================================
* Macros
index 660aed01121e54520a14043e6e8a706e36bcbd35..068df2ca4929ae44b5d0766b959c68c06c3536c2 100644 (file)
/*!
* @brief Used as the timeout value to specify wait forever
*/
-#define RPMessage_FOREVER ~(0)
+#define RPMessage_FOREVER (~(0))
/*!
* @def RPMessage_S_SUCCESS
* @brief Operation is successful.
*/
-#define RPMessage_S_SUCCESS 0
+#define RPMessage_S_SUCCESS (0)
/*!
* @def RPMessage_E_FAIL
* @brief Operation is not successful.
*/
-#define RPMessage_E_FAIL -1
+#define RPMessage_E_FAIL (-1)
/*!
* @def RPMessage_E_MEMORY
* @brief Operation resulted in memory failure.
*/
-#define RPMessage_E_MEMORY -3
+#define RPMessage_E_MEMORY (-3)
/*!
* @def RPMessage_E_TIMEOUT
* @brief Operation timed out.
*/
-#define RPMessage_E_TIMEOUT -6
+#define RPMessage_E_TIMEOUT (-6)
/*!
* @def RPMessage_E_NOENDPT
* @brief No endpoint for a message.
*/
-#define RPMessage_E_NOENDPT -7
+#define RPMessage_E_NOENDPT (-7)
/*!
* @def MessageQ_E_UNBLOCKED
* @brief RPMessage was unblocked
*/
-#define RPMessage_E_UNBLOCKED -19
+#define RPMessage_E_UNBLOCKED (-19)
/*!
* @def RPMessage_MAX_RESERVED_ENDPOINT
* @brief Maximum Value for System Reserved Endpoints.
*/
-#define RPMessage_MAX_RESERVED_ENDPOINT 100
+#define RPMessage_MAX_RESERVED_ENDPOINT (100)
/*!
* @def RPMessage_MAX_RESERVED_ENDPOINT
* @brief Maximum Value for System Reserved Endpoints.
*/
-#define RPMessage_ASSIGN_ANY 0xFFFFFFFF
+#define RPMessage_ASSIGN_ANY (0xFFFFFFFF)
/*!
* @brief RPMessage_Handle type
*/
index f52d873dafeedf22fb08ab12a7da6bde3d273f8d..325ad1bc1d294b1e31d9ae65aca57530ffb78f80 100644 (file)
#include <ti/pm/IpcPower.h>
#include "_IpcPower.h"
-#define MASTERCORE 1
-#define NO_MASTERCORE 0
-#define CPU_COPY -1
+#define MASTERCORE (1)
+#define NO_MASTERCORE (0)
+#define CPU_COPY (-1)
#define REG32(A) (*(volatile UInt32 *) (A))
#define SET_DEEPSLEEP (REG32(M3_SCR_REG) | (1 << DEEPSLEEP_BIT))
index 2b0043613fdb8a9c979fd998f1ebf1fb9fe3a743..bf3cd8553b903b21840a372393f1f430bf09f56d 100644 (file)
* @def IpcPower_S_SUCCESS
* @brief Operation is successful.
*/
-#define IpcPower_S_SUCCESS 0
+#define IpcPower_S_SUCCESS (0)
/*!
* @def IpcPower_E_FAIL
* @brief Operation is not successful.
*/
-#define IpcPower_E_FAIL -1
+#define IpcPower_E_FAIL (-1)
/*!
* @def IpcPower_E_MEMORY
* @brief Operation resulted in memory failure.
*/
-#define IpcPower_E_MEMORY -2
+#define IpcPower_E_MEMORY (-2)
/*!
* @brief Event types for power management callbacks
index e7b1ab0029a5098369d4dc48cfe4209e46d0da49..41e1fa7d8362067445313330c1332ba22f95e327 100644 (file)
#include <ti/grcm/RcmTypes.h>
#include <ti/grcm/RcmServer.h>
-#include <stdio.h>
#include <string.h>
#include <stdlib.h>
index 9469fe3a7aef04db51e12a4fae8acf781f62b152..c39a1e74f17fcaced1465adfbad7b5ea938129eb 100644 (file)
* @def OmapRpc_S_SUCCESS
* @brief Operation is successful.
*/
-#define OmapRpc_S_SUCCESS 0
+#define OmapRpc_S_SUCCESS (0)
/*!
* @def OmapRpc_E_FAIL
* @brief Operation is not successful.
*/
-#define OmapRpc_E_FAIL -1
+#define OmapRpc_E_FAIL (-1)
#define OmapRpc_NUM_PARAMETERS(size) \
((size)/sizeof(struct OmapRpc_Parameter))