summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Sobota2015-06-26 13:42:04 -0500
committerJustin Sobota2015-06-26 13:42:04 -0500
commita71e631417b0bb059f557872524881cfb724c66c (patch)
tree5729465b77e2a233b3f74d53940c76e51b5d3ee9
parentd5e6113cba55e4707258fadb3b115213c5b826b7 (diff)
downloadmpm-transport-a71e631417b0bb059f557872524881cfb724c66c.tar.gz
mpm-transport-a71e631417b0bb059f557872524881cfb724c66c.tar.xz
mpm-transport-a71e631417b0bb059f557872524881cfb724c66c.zip
Resolved some -Wall warnings
-rwxr-xr-xsrc/transport/hyplnk/mpm_transport_hyplnk.c8
-rwxr-xr-xsrc/transport/hyplnk/mpm_transport_hyplnk.h4
-rwxr-xr-xsrc/transport/mpm_transport.c4
-rw-r--r--src/transport/qmss/mpm_transport_qmss_interface.c23
-rwxr-xr-xsrc/transport/sharedmem/mpm_transport_sharedmem.c1
-rw-r--r--src/transport/srio/mpm_transport_srio.c5
-rw-r--r--src/utils/edma3/mpm_transport_edma3.c1
-rw-r--r--src/utils/keystone_mmap/mpm_transport_keystone_mmap.c1
8 files changed, 23 insertions, 24 deletions
diff --git a/src/transport/hyplnk/mpm_transport_hyplnk.c b/src/transport/hyplnk/mpm_transport_hyplnk.c
index d049c65..440b6ed 100755
--- a/src/transport/hyplnk/mpm_transport_hyplnk.c
+++ b/src/transport/hyplnk/mpm_transport_hyplnk.c
@@ -464,7 +464,7 @@ int mpm_transport_hyplnk_munmap(mpm_transport_cfg_t *sp, void *va, uint32_t leng
464 464
465static void mpm_transport_hyplnk_rw_unmap(mpm_transport_cfg_t *sp, int user_index, uint32_t length) 465static void mpm_transport_hyplnk_rw_unmap(mpm_transport_cfg_t *sp, int user_index, uint32_t length)
466{ 466{
467 int logical_idx, logical_addr; 467 int logical_addr;
468 mpm_transport_hyplnk_t *td = (mpm_transport_hyplnk_t *) sp->td; 468 mpm_transport_hyplnk_t *td = (mpm_transport_hyplnk_t *) sp->td;
469 469
470 /* Record logical address */ 470 /* Record logical address */
@@ -502,7 +502,7 @@ int mpm_transport_hyplnk_munmap64(mpm_transport_cfg_t *sp, void *va, uint32_t le
502 502
503int mpm_transport_hyplnk_phys_unmap(mpm_transport_cfg_t *sp, void *va, uint32_t length) 503int mpm_transport_hyplnk_phys_unmap(mpm_transport_cfg_t *sp, void *va, uint32_t length)
504{ 504{
505 int user_index, logical_idx, logical_addr; 505 int user_index;
506 mpm_transport_hyplnk_t *td = (mpm_transport_hyplnk_t *) sp->td; 506 mpm_transport_hyplnk_t *td = (mpm_transport_hyplnk_t *) sp->td;
507 507
508 sem_wait(&mmap_sem); 508 sem_wait(&mmap_sem);
@@ -1295,7 +1295,7 @@ int mpm_transport_hyplnk_enable_peripheral(mpm_transport_cfg_t *sp, mpm_transpor
1295 1295
1296int mpm_transport_hyplnk_disable_peripheral(mpm_transport_cfg_t *sp) 1296int mpm_transport_hyplnk_disable_peripheral(mpm_transport_cfg_t *sp)
1297{ 1297{
1298 int reg, index; 1298 int index;
1299 mpm_transport_hyplnk_t *td = (mpm_transport_hyplnk_t *) sp->td; 1299 mpm_transport_hyplnk_t *td = (mpm_transport_hyplnk_t *) sp->td;
1300 int i; 1300 int i;
1301 1301
@@ -1306,7 +1306,7 @@ int mpm_transport_hyplnk_disable_peripheral(mpm_transport_cfg_t *sp)
1306 td->serdesInit = 1; 1306 td->serdesInit = 1;
1307 index = td->hyplnkIF; 1307 index = td->hyplnkIF;
1308 td->fd[index] = hyplnkActiveIF[index].hyp_fd; 1308 td->fd[index] = hyplnkActiveIF[index].hyp_fd;
1309 reg = mpm_transport_hyplnk_unregister_slave(sp); 1309 mpm_transport_hyplnk_unregister_slave(sp);
1310 if (hyplnkActiveIF[index].slavesActive == 0) { 1310 if (hyplnkActiveIF[index].slavesActive == 0) {
1311 mpm_transport_hyplnk_reset(td, index); 1311 mpm_transport_hyplnk_reset(td, index);
1312 close(hyplnkActiveIF[index].uio_fd); 1312 close(hyplnkActiveIF[index].uio_fd);
diff --git a/src/transport/hyplnk/mpm_transport_hyplnk.h b/src/transport/hyplnk/mpm_transport_hyplnk.h
index 672cd80..e89f7f8 100755
--- a/src/transport/hyplnk/mpm_transport_hyplnk.h
+++ b/src/transport/hyplnk/mpm_transport_hyplnk.h
@@ -105,7 +105,7 @@ void *mpm_transport_hyplnk_mmap(mpm_transport_cfg_t *sp, uint32_t addr, uint32_t
105int mpm_transport_hyplnk_munmap(mpm_transport_cfg_t *sp, void *va, uint32_t length); 105int mpm_transport_hyplnk_munmap(mpm_transport_cfg_t *sp, void *va, uint32_t length);
106 106
107void *mpm_transport_hyplnk_mmap64(mpm_transport_cfg_t *sp, uint64_t addr, uint32_t length, mpm_transport_mmap_t *mcfg); 107void *mpm_transport_hyplnk_mmap64(mpm_transport_cfg_t *sp, uint64_t addr, uint32_t length, mpm_transport_mmap_t *mcfg);
108 108
109int mpm_transport_hyplnk_munmap64(mpm_transport_cfg_t *sp, void *va, uint32_t length); 109int mpm_transport_hyplnk_munmap64(mpm_transport_cfg_t *sp, void *va, uint32_t length);
110 110
111void mpm_transport_hyplnk_close(mpm_transport_cfg_t *sp); 111void mpm_transport_hyplnk_close(mpm_transport_cfg_t *sp);
@@ -132,7 +132,7 @@ int mpm_transport_hyplnk_enable_peripheral(mpm_transport_cfg_t *sp, mpm_transpor
132 132
133int mpm_transport_hyplnk_disable_peripheral(mpm_transport_cfg_t *sp); 133int mpm_transport_hyplnk_disable_peripheral(mpm_transport_cfg_t *sp);
134 134
135int mpm_transport_hyplnk_get_device_fd(mpm_transport_cfg_t *sp); 135int mpm_transport_hyplnk_get_event_fd(mpm_transport_cfg_t *sp, uint32_t event_bitmap);
136 136
137int mpm_transport_hyplnk_read_and_ack_interrupt_event(mpm_transport_cfg_t *sp, 137int mpm_transport_hyplnk_read_and_ack_interrupt_event(mpm_transport_cfg_t *sp,
138 uint32_t event_bitmap, uint32_t *reported_event_bitmap ); 138 uint32_t event_bitmap, uint32_t *reported_event_bitmap );
diff --git a/src/transport/mpm_transport.c b/src/transport/mpm_transport.c
index 661ef5e..69f7fd1 100755
--- a/src/transport/mpm_transport.c
+++ b/src/transport/mpm_transport.c
@@ -1795,7 +1795,7 @@ int mpm_transport_peripheral_enable(char *slave_name, mpm_transport_open_t *cfg)
1795 goto close_n_exit; 1795 goto close_n_exit;
1796 break; 1796 break;
1797 case hyperlink: 1797 case hyperlink:
1798 if (retval = mpm_transport_hyplnk_enable_peripheral(sp, cfg)) { 1798 if ((retval = mpm_transport_hyplnk_enable_peripheral(sp, cfg))) {
1799 mpm_printf(1, "hyplnk peripheral enable failed\n"); 1799 mpm_printf(1, "hyplnk peripheral enable failed\n");
1800 goto close_n_exit; 1800 goto close_n_exit;
1801 } 1801 }
@@ -1887,7 +1887,7 @@ int mpm_transport_peripheral_disable(char *slave_name)
1887 goto close_n_exit; 1887 goto close_n_exit;
1888 break; 1888 break;
1889 case hyperlink: 1889 case hyperlink:
1890 if (retval = mpm_transport_hyplnk_disable_peripheral(sp)) { 1890 if ((retval = mpm_transport_hyplnk_disable_peripheral(sp))) {
1891 mpm_printf(1, "hyplnk peripheral disable failed\n"); 1891 mpm_printf(1, "hyplnk peripheral disable failed\n");
1892 goto close_n_exit; 1892 goto close_n_exit;
1893 } 1893 }
diff --git a/src/transport/qmss/mpm_transport_qmss_interface.c b/src/transport/qmss/mpm_transport_qmss_interface.c
index 7c5bfde..0597dad 100644
--- a/src/transport/qmss/mpm_transport_qmss_interface.c
+++ b/src/transport/qmss/mpm_transport_qmss_interface.c
@@ -432,12 +432,12 @@ int mpm_transport_qmss_open_infra_triplet(Cppi_Handle cppiHnd,
432 Qmss_QueueHnd *pTxQHnd) 432 Qmss_QueueHnd *pTxQHnd)
433{ 433{
434 Qmss_QueueHnd tmpTxQ; 434 Qmss_QueueHnd tmpTxQ;
435 Cppi_ChHnd tmpTxCh; 435 Cppi_ChHnd tmpTxCh = NULL;
436 Cppi_ChHnd tmpRxCh; 436 Cppi_ChHnd tmpRxCh = NULL;
437 Cppi_TxChInitCfg txChCfg; 437 Cppi_TxChInitCfg txChCfg;
438 Cppi_RxChInitCfg rxChCfg; 438 Cppi_RxChInitCfg rxChCfg;
439 Qmss_QueueHnd *invTrip = NULL; 439 Qmss_QueueHnd *invTrip = NULL;
440 int invIdx; 440 int invIdx = 0;
441 uint32_t isAllocated; 441 uint32_t isAllocated;
442 int foundTriplet; 442 int foundTriplet;
443 int i; 443 int i;
@@ -453,7 +453,6 @@ int mpm_transport_qmss_open_infra_triplet(Cppi_Handle cppiHnd,
453 } 453 }
454 454
455 memset(invTrip, 0, QMSS_MAX_INFRASTRUCTURE_QUEUE * sizeof(Qmss_QueueHnd)); 455 memset(invTrip, 0, QMSS_MAX_INFRASTRUCTURE_QUEUE * sizeof(Qmss_QueueHnd));
456 invIdx = 0;
457 456
458 foundTriplet = 0; 457 foundTriplet = 0;
459 while((!foundTriplet) && (invIdx < QMSS_MAX_INFRASTRUCTURE_QUEUE)) { 458 while((!foundTriplet) && (invIdx < QMSS_MAX_INFRASTRUCTURE_QUEUE)) {
@@ -499,17 +498,23 @@ int mpm_transport_qmss_open_infra_triplet(Cppi_Handle cppiHnd,
499 foundTriplet = 1; 498 foundTriplet = 1;
500 } 499 }
501 500
502 /* Save triplet */ 501 if (tmpTxCh && tmpRxCh) {
503 *pTxQHnd = tmpTxQ; 502 /* Save triplet */
504 *pTxChHnd = tmpTxCh; 503 *pTxQHnd = tmpTxQ;
505 *pRxChHnd = tmpRxCh; 504 *pTxChHnd = tmpTxCh;
505 *pRxChHnd = tmpRxCh;
506 } else {
507 ret_val = -3;
508 }
506 509
507triplet_error: 510triplet_error:
508 /* Free unused triplets */ 511 /* Free unused triplets */
509 for (i = 0; i < invIdx; i++) { 512 for (i = 0; i < invIdx; i++) {
510 Qmss_queueClose(invTrip[i]); 513 Qmss_queueClose(invTrip[i]);
511 } 514 }
512 free(invTrip); 515 if (invTrip) {
516 free(invTrip);
517 }
513 518
514 return(ret_val); 519 return(ret_val);
515} 520}
diff --git a/src/transport/sharedmem/mpm_transport_sharedmem.c b/src/transport/sharedmem/mpm_transport_sharedmem.c
index fec6849..0aefb44 100755
--- a/src/transport/sharedmem/mpm_transport_sharedmem.c
+++ b/src/transport/sharedmem/mpm_transport_sharedmem.c
@@ -74,7 +74,6 @@ int mpm_transport_sharedmem_open(mpm_transport_cfg_t *sp, mpm_transport_open_t *
74{ 74{
75 int i, j; 75 int i, j;
76 mpm_transport_sharedmem_t *td; 76 mpm_transport_sharedmem_t *td;
77 char dev_name[MAX_DEVICE_NAME_LEN];
78 77
79 td = calloc(1, sizeof(mpm_transport_sharedmem_t)); 78 td = calloc(1, sizeof(mpm_transport_sharedmem_t));
80 if (!td) { 79 if (!td) {
diff --git a/src/transport/srio/mpm_transport_srio.c b/src/transport/srio/mpm_transport_srio.c
index 177dd9c..b466c37 100644
--- a/src/transport/srio/mpm_transport_srio.c
+++ b/src/transport/srio/mpm_transport_srio.c
@@ -73,11 +73,6 @@ int mpm_transport_srio_init(mpm_transport_cfg_t *sp, mpm_transport_open_t *ocfg)
73 off_t pCMemBase = 0; 73 off_t pCMemBase = 0;
74 Srio_InitConfig srioInitCfg; 74 Srio_InitConfig srioInitCfg;
75 75
76 if (!Srio_initCfg) {
77 mpm_printf(1, "mpm_transport_srio_init(): Error!! SRIO init function null, please check if library was linked in correctly\n");
78 return -1;
79 }
80
81 /* Store necessary information into our MPM Transport handle */ 76 /* Store necessary information into our MPM Transport handle */
82 if (ocfg->rm_info.rm_client_handle == NULL) { 77 if (ocfg->rm_info.rm_client_handle == NULL) {
83 mpm_printf(1, "mpm_transport_srio_init(): RM client handle missing!\n"); 78 mpm_printf(1, "mpm_transport_srio_init(): RM client handle missing!\n");
diff --git a/src/utils/edma3/mpm_transport_edma3.c b/src/utils/edma3/mpm_transport_edma3.c
index 23a4a0b..aa2a6fc 100644
--- a/src/utils/edma3/mpm_transport_edma3.c
+++ b/src/utils/edma3/mpm_transport_edma3.c
@@ -391,7 +391,6 @@ int mpm_transport_edma3_transfer_linked(EDMA3_DRV_Handle hEdma, unsigned int *ch
391 EDMA3_DRV_Result result = EDMA3_DRV_SOK; 391 EDMA3_DRV_Result result = EDMA3_DRV_SOK;
392 EDMA3_DRV_PaRAMRegs paramSet = {0,0,0,0,0,0,0,0,0,0,0,0}; 392 EDMA3_DRV_PaRAMRegs paramSet = {0,0,0,0,0,0,0,0,0,0,0,0};
393 int i; 393 int i;
394 uint32_t destination;
395 uint32_t size; 394 uint32_t size;
396 int srcbidx = 0, desbidx = 0; 395 int srcbidx = 0, desbidx = 0;
397 int srccidx = 0, descidx = 0; 396 int srccidx = 0, descidx = 0;
diff --git a/src/utils/keystone_mmap/mpm_transport_keystone_mmap.c b/src/utils/keystone_mmap/mpm_transport_keystone_mmap.c
index 89410bb..1c6f9a2 100644
--- a/src/utils/keystone_mmap/mpm_transport_keystone_mmap.c
+++ b/src/utils/keystone_mmap/mpm_transport_keystone_mmap.c
@@ -32,6 +32,7 @@
32 * 32 *
33 */ 33 */
34 34
35#include <mpm_transport_cfg.h>
35#include "mpm_transport_keystone_mmap.h" 36#include "mpm_transport_keystone_mmap.h"
36 37
37keystone_mmap_handle_t mpm_transport_keystone_mmap_open(uint32_t base, 38keystone_mmap_handle_t mpm_transport_keystone_mmap_open(uint32_t base,