summaryrefslogtreecommitdiffstats
path: root/drivers/staging/tidspbridge/rmgr/nldr.c
diff options
context:
space:
mode:
authorArmando Uribe <x0095078@ti.com>2010-07-22 20:25:33 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-07-26 15:32:20 -0700
commitbf968b0a521fc5fd3faf66afa315d8183246c72f (patch)
treeb3b049e3d6da559b00472ee453678457f8aeac0a /drivers/staging/tidspbridge/rmgr/nldr.c
parent803cd75eff2d560d622da69569f0bf66a3ea4ed1 (diff)
downloadop-kernel-dev-bf968b0a521fc5fd3faf66afa315d8183246c72f.zip
op-kernel-dev-bf968b0a521fc5fd3faf66afa315d8183246c72f.tar.gz
staging: tidspbridge: Change macros to static inline functions
This patch changes preprocesing macros to static inline funcions. Also the function is_equal_uuid (IS_EQUAL_UUID) now uses the memcmp function. Signed-off-by: Armando Uribe <x0095078@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/tidspbridge/rmgr/nldr.c')
-rw-r--r--drivers/staging/tidspbridge/rmgr/nldr.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/staging/tidspbridge/rmgr/nldr.c b/drivers/staging/tidspbridge/rmgr/nldr.c
index 6cf0be9..33d2872 100644
--- a/drivers/staging/tidspbridge/rmgr/nldr.c
+++ b/drivers/staging/tidspbridge/rmgr/nldr.c
@@ -135,13 +135,11 @@
#define PDELETE "delete"
#define PEXECUTE "execute"
-#define IS_EQUAL_UUID(uuid1, uuid2) (\
- ((uuid1).ul_data1 == (uuid2).ul_data1) && \
- ((uuid1).us_data2 == (uuid2).us_data2) && \
- ((uuid1).us_data3 == (uuid2).us_data3) && \
- ((uuid1).uc_data4 == (uuid2).uc_data4) && \
- ((uuid1).uc_data5 == (uuid2).uc_data5) && \
- (strncmp((void *)(uuid1).uc_data6, (void *)(uuid2).uc_data6, 6)) == 0)
+static inline bool is_equal_uuid(struct dsp_uuid *uuid1,
+ struct dsp_uuid *uuid2)
+{
+ return !memcmp(uuid1, uuid2, sizeof(struct dsp_uuid));
+}
/*
* ======== mem_seg_info ========
@@ -1487,8 +1485,8 @@ static int load_ovly(struct nldr_nodeobject *nldr_node_obj,
/* Find the node in the table */
for (i = 0; i < nldr_obj->ovly_nodes; i++) {
- if (IS_EQUAL_UUID
- (nldr_node_obj->uuid, nldr_obj->ovly_table[i].uuid)) {
+ if (is_equal_uuid
+ (&nldr_node_obj->uuid, &nldr_obj->ovly_table[i].uuid)) {
/* Found it */
po_node = &(nldr_obj->ovly_table[i]);
break;
@@ -1825,8 +1823,8 @@ static void unload_ovly(struct nldr_nodeobject *nldr_node_obj,
/* Find the node in the table */
for (i = 0; i < nldr_obj->ovly_nodes; i++) {
- if (IS_EQUAL_UUID
- (nldr_node_obj->uuid, nldr_obj->ovly_table[i].uuid)) {
+ if (is_equal_uuid
+ (&nldr_node_obj->uuid, &nldr_obj->ovly_table[i].uuid)) {
/* Found it */
po_node = &(nldr_obj->ovly_table[i]);
break;
OpenPOWER on IntegriCloud