aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErnesto Ramos <ernesto@ti.com>2010-07-28 10:45:29 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-07-28 11:22:43 -0400
commitd1b2216d13679557b56c1e4a53e4e3c5683bf3d5 (patch)
tree8aff86c05a4368cfe843d16385100b8ef68be790
parent54621f031c037d4df9844e5246ce1924c49a703e (diff)
staging:ti dspbridge: remove DSP_FAILED macro from core
Since status succeeded is 0, DSP_FAILED macro is not necessary anymore. Signed-off-by: Ernesto Ramos <ernesto@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/tidspbridge/core/chnl_sm.c20
-rw-r--r--drivers/staging/tidspbridge/core/io_sm.c64
-rw-r--r--drivers/staging/tidspbridge/core/msg_sm.c4
-rw-r--r--drivers/staging/tidspbridge/core/tiomap3430.c4
-rw-r--r--drivers/staging/tidspbridge/core/tiomap3430_pwr.c2
5 files changed, 47 insertions, 47 deletions
diff --git a/drivers/staging/tidspbridge/core/chnl_sm.c b/drivers/staging/tidspbridge/core/chnl_sm.c
index 1b231414589d..bee2b23a09a1 100644
--- a/drivers/staging/tidspbridge/core/chnl_sm.c
+++ b/drivers/staging/tidspbridge/core/chnl_sm.c
@@ -135,7 +135,7 @@ int bridge_chnl_add_io_req(struct chnl_object *chnl_obj, void *host_buf,
135 if (!dev_ctxt) 135 if (!dev_ctxt)
136 status = -EFAULT; 136 status = -EFAULT;
137 137
138 if (DSP_FAILED(status)) 138 if (status)
139 goto func_end; 139 goto func_end;
140 140
141 if (pchnl->chnl_type == CHNL_PCPY && pchnl->chnl_id > 1 && host_buf) { 141 if (pchnl->chnl_type == CHNL_PCPY && pchnl->chnl_id > 1 && host_buf) {
@@ -266,7 +266,7 @@ int bridge_chnl_cancel_io(struct chnl_object *chnl_obj)
266 } else { 266 } else {
267 status = -EFAULT; 267 status = -EFAULT;
268 } 268 }
269 if (DSP_FAILED(status)) 269 if (status)
270 goto func_end; 270 goto func_end;
271 271
272 /* Mark this channel as cancelled, to prevent further IORequests or 272 /* Mark this channel as cancelled, to prevent further IORequests or
@@ -372,7 +372,7 @@ func_cont:
372 kfree(pchnl); 372 kfree(pchnl);
373 pchnl = NULL; 373 pchnl = NULL;
374 } 374 }
375 DBC_ENSURE(DSP_FAILED(status) || !pchnl); 375 DBC_ENSURE(status || !pchnl);
376 return status; 376 return status;
377} 377}
378 378
@@ -428,7 +428,7 @@ int bridge_chnl_create(struct chnl_mgr **channel_mgr,
428 status = -ENOMEM; 428 status = -ENOMEM;
429 } 429 }
430 430
431 if (DSP_FAILED(status)) { 431 if (status) {
432 bridge_chnl_destroy(chnl_mgr_obj); 432 bridge_chnl_destroy(chnl_mgr_obj);
433 *channel_mgr = NULL; 433 *channel_mgr = NULL;
434 } else { 434 } else {
@@ -456,7 +456,7 @@ int bridge_chnl_destroy(struct chnl_mgr *hchnl_mgr)
456 status = 456 status =
457 bridge_chnl_close(chnl_mgr_obj->ap_channel 457 bridge_chnl_close(chnl_mgr_obj->ap_channel
458 [chnl_id]); 458 [chnl_id]);
459 if (DSP_FAILED(status)) 459 if (status)
460 dev_dbg(bridge, "%s: Error status 0x%x\n", 460 dev_dbg(bridge, "%s: Error status 0x%x\n",
461 __func__, status); 461 __func__, status);
462 } 462 }
@@ -509,7 +509,7 @@ int bridge_chnl_flush_io(struct chnl_object *chnl_obj, u32 timeout)
509 while (!LST_IS_EMPTY(pchnl->pio_requests) && !status) { 509 while (!LST_IS_EMPTY(pchnl->pio_requests) && !status) {
510 status = bridge_chnl_get_ioc(chnl_obj, 510 status = bridge_chnl_get_ioc(chnl_obj,
511 timeout, &chnl_ioc_obj); 511 timeout, &chnl_ioc_obj);
512 if (DSP_FAILED(status)) 512 if (status)
513 continue; 513 continue;
514 514
515 if (chnl_ioc_obj.status & CHNL_IOCSTATTIMEOUT) 515 if (chnl_ioc_obj.status & CHNL_IOCSTATTIMEOUT)
@@ -522,7 +522,7 @@ int bridge_chnl_flush_io(struct chnl_object *chnl_obj, u32 timeout)
522 pchnl->dw_state &= ~CHNL_STATECANCEL; 522 pchnl->dw_state &= ~CHNL_STATECANCEL;
523 } 523 }
524 } 524 }
525 DBC_ENSURE(DSP_FAILED(status) || LST_IS_EMPTY(pchnl->pio_requests)); 525 DBC_ENSURE(status || LST_IS_EMPTY(pchnl->pio_requests));
526 return status; 526 return status;
527} 527}
528 528
@@ -592,7 +592,7 @@ int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 timeout,
592 if (!dev_ctxt) 592 if (!dev_ctxt)
593 status = -EFAULT; 593 status = -EFAULT;
594 594
595 if (DSP_FAILED(status)) 595 if (status)
596 goto func_end; 596 goto func_end;
597 597
598 ioc.status = CHNL_IOCSTATCOMPLETE; 598 ioc.status = CHNL_IOCSTATCOMPLETE;
@@ -806,7 +806,7 @@ int bridge_chnl_open(struct chnl_object **chnl,
806 } 806 }
807 } 807 }
808 } 808 }
809 if (DSP_FAILED(status)) 809 if (status)
810 goto func_end; 810 goto func_end;
811 811
812 DBC_ASSERT(ch_id < chnl_mgr_obj->max_channels); 812 DBC_ASSERT(ch_id < chnl_mgr_obj->max_channels);
@@ -860,7 +860,7 @@ int bridge_chnl_open(struct chnl_object **chnl,
860 } 860 }
861 } 861 }
862 862
863 if (DSP_FAILED(status)) { 863 if (status) {
864 /* Free memory */ 864 /* Free memory */
865 if (pchnl->pio_completions) { 865 if (pchnl->pio_completions) {
866 free_chirp_list(pchnl->pio_completions); 866 free_chirp_list(pchnl->pio_completions);
diff --git a/drivers/staging/tidspbridge/core/io_sm.c b/drivers/staging/tidspbridge/core/io_sm.c
index 1d433a93b4e3..02c660dbcf68 100644
--- a/drivers/staging/tidspbridge/core/io_sm.c
+++ b/drivers/staging/tidspbridge/core/io_sm.c
@@ -242,7 +242,7 @@ int bridge_io_create(struct io_mgr **io_man,
242 status = -EIO; 242 status = -EIO;
243 } 243 }
244func_end: 244func_end:
245 if (DSP_FAILED(status)) { 245 if (status) {
246 /* Cleanup */ 246 /* Cleanup */
247 bridge_io_destroy(pio_mgr); 247 bridge_io_destroy(pio_mgr);
248 if (io_man) 248 if (io_man)
@@ -357,13 +357,13 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
357 /* Get start and length of channel part of shared memory */ 357 /* Get start and length of channel part of shared memory */
358 status = cod_get_sym_value(cod_man, CHNL_SHARED_BUFFER_BASE_SYM, 358 status = cod_get_sym_value(cod_man, CHNL_SHARED_BUFFER_BASE_SYM,
359 &ul_shm_base); 359 &ul_shm_base);
360 if (DSP_FAILED(status)) { 360 if (status) {
361 status = -EFAULT; 361 status = -EFAULT;
362 goto func_end; 362 goto func_end;
363 } 363 }
364 status = cod_get_sym_value(cod_man, CHNL_SHARED_BUFFER_LIMIT_SYM, 364 status = cod_get_sym_value(cod_man, CHNL_SHARED_BUFFER_LIMIT_SYM,
365 &ul_shm_limit); 365 &ul_shm_limit);
366 if (DSP_FAILED(status)) { 366 if (status) {
367 status = -EFAULT; 367 status = -EFAULT;
368 goto func_end; 368 goto func_end;
369 } 369 }
@@ -414,18 +414,18 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
414 status = cod_get_sym_value(cod_man, SHM0_SHARED_END_SYM, 414 status = cod_get_sym_value(cod_man, SHM0_SHARED_END_SYM,
415 &shm0_end); 415 &shm0_end);
416#endif 416#endif
417 if (DSP_FAILED(status)) 417 if (status)
418 status = -EFAULT; 418 status = -EFAULT;
419 } 419 }
420 if (!status) { 420 if (!status) {
421 status = 421 status =
422 cod_get_sym_value(cod_man, DYNEXTBASE, &ul_dyn_ext_base); 422 cod_get_sym_value(cod_man, DYNEXTBASE, &ul_dyn_ext_base);
423 if (DSP_FAILED(status)) 423 if (status)
424 status = -EFAULT; 424 status = -EFAULT;
425 } 425 }
426 if (!status) { 426 if (!status) {
427 status = cod_get_sym_value(cod_man, EXTEND, &ul_ext_end); 427 status = cod_get_sym_value(cod_man, EXTEND, &ul_ext_end);
428 if (DSP_FAILED(status)) 428 if (status)
429 status = -EFAULT; 429 status = -EFAULT;
430 } 430 }
431 if (!status) { 431 if (!status) {
@@ -469,7 +469,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
469 status = -ENOMEM; 469 status = -ENOMEM;
470 } 470 }
471 } 471 }
472 if (DSP_FAILED(status)) 472 if (status)
473 goto func_end; 473 goto func_end;
474 474
475 pa_curr = ul_gpp_pa; 475 pa_curr = ul_gpp_pa;
@@ -508,7 +508,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
508 pa_curr, va_curr, 508 pa_curr, va_curr,
509 page_size[i], map_attrs, 509 page_size[i], map_attrs,
510 NULL); 510 NULL);
511 if (DSP_FAILED(status)) 511 if (status)
512 goto func_end; 512 goto func_end;
513 pa_curr += page_size[i]; 513 pa_curr += page_size[i];
514 va_curr += page_size[i]; 514 va_curr += page_size[i];
@@ -581,7 +581,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
581 ae_proc[ndx].ul_gpp_va, 581 ae_proc[ndx].ul_gpp_va,
582 ae_proc[ndx].ul_dsp_va * 582 ae_proc[ndx].ul_dsp_va *
583 hio_mgr->word_size, page_size[i]); 583 hio_mgr->word_size, page_size[i]);
584 if (DSP_FAILED(status)) 584 if (status)
585 goto func_end; 585 goto func_end;
586 } 586 }
587 pa_curr += page_size[i]; 587 pa_curr += page_size[i];
@@ -645,7 +645,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
645 NULL); 645 NULL);
646 } 646 }
647 } 647 }
648 if (DSP_FAILED(status)) 648 if (status)
649 goto func_end; 649 goto func_end;
650 } 650 }
651 651
@@ -662,7 +662,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
662 (hio_mgr->hbridge_context, l4_peripheral_table[i].phys_addr, 662 (hio_mgr->hbridge_context, l4_peripheral_table[i].phys_addr,
663 l4_peripheral_table[i].dsp_virt_addr, HW_PAGE_SIZE4KB, 663 l4_peripheral_table[i].dsp_virt_addr, HW_PAGE_SIZE4KB,
664 map_attrs, NULL); 664 map_attrs, NULL);
665 if (DSP_FAILED(status)) 665 if (status)
666 goto func_end; 666 goto func_end;
667 i++; 667 i++;
668 } 668 }
@@ -707,7 +707,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
707 hio_mgr->intf_fxns->pfn_dev_cntrl(hio_mgr->hbridge_context, 707 hio_mgr->intf_fxns->pfn_dev_cntrl(hio_mgr->hbridge_context,
708 BRDIOCTL_SETMMUCONFIG, 708 BRDIOCTL_SETMMUCONFIG,
709 ae_proc); 709 ae_proc);
710 if (DSP_FAILED(status)) 710 if (status)
711 goto func_end; 711 goto func_end;
712 ul_shm_base = hio_mgr->ext_proc_info.ty_tlb[0].ul_gpp_phys; 712 ul_shm_base = hio_mgr->ext_proc_info.ty_tlb[0].ul_gpp_phys;
713 ul_shm_base += ul_shm_base_offset; 713 ul_shm_base += ul_shm_base_offset;
@@ -756,7 +756,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
756 /* Get the start address of trace buffer */ 756 /* Get the start address of trace buffer */
757 status = cod_get_sym_value(cod_man, SYS_PUTCBEG, 757 status = cod_get_sym_value(cod_man, SYS_PUTCBEG,
758 &hio_mgr->ul_trace_buffer_begin); 758 &hio_mgr->ul_trace_buffer_begin);
759 if (DSP_FAILED(status)) { 759 if (status) {
760 status = -EFAULT; 760 status = -EFAULT;
761 goto func_end; 761 goto func_end;
762 } 762 }
@@ -767,7 +767,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
767 /* Get the end address of trace buffer */ 767 /* Get the end address of trace buffer */
768 status = cod_get_sym_value(cod_man, SYS_PUTCEND, 768 status = cod_get_sym_value(cod_man, SYS_PUTCEND,
769 &hio_mgr->ul_trace_buffer_end); 769 &hio_mgr->ul_trace_buffer_end);
770 if (DSP_FAILED(status)) { 770 if (status) {
771 status = -EFAULT; 771 status = -EFAULT;
772 goto func_end; 772 goto func_end;
773 } 773 }
@@ -777,7 +777,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
777 /* Get the current address of DSP write pointer */ 777 /* Get the current address of DSP write pointer */
778 status = cod_get_sym_value(cod_man, BRIDGE_SYS_PUTC_CURRENT, 778 status = cod_get_sym_value(cod_man, BRIDGE_SYS_PUTC_CURRENT,
779 &hio_mgr->ul_trace_buffer_current); 779 &hio_mgr->ul_trace_buffer_current);
780 if (DSP_FAILED(status)) { 780 if (status) {
781 status = -EFAULT; 781 status = -EFAULT;
782 goto func_end; 782 goto func_end;
783 } 783 }
@@ -852,7 +852,7 @@ static void io_dispatch_pm(struct io_mgr *pio_mgr)
852 status = pio_mgr->intf_fxns-> 852 status = pio_mgr->intf_fxns->
853 pfn_dev_cntrl(pio_mgr->hbridge_context, 853 pfn_dev_cntrl(pio_mgr->hbridge_context,
854 BRDIOCTL_PWR_HIBERNATE, parg); 854 BRDIOCTL_PWR_HIBERNATE, parg);
855 if (DSP_FAILED(status)) 855 if (status)
856 pr_err("%s: hibernate cmd failed 0x%x\n", 856 pr_err("%s: hibernate cmd failed 0x%x\n",
857 __func__, status); 857 __func__, status);
858 } else if (parg[0] == MBX_PM_OPP_REQ) { 858 } else if (parg[0] == MBX_PM_OPP_REQ) {
@@ -861,16 +861,16 @@ static void io_dispatch_pm(struct io_mgr *pio_mgr)
861 status = pio_mgr->intf_fxns-> 861 status = pio_mgr->intf_fxns->
862 pfn_dev_cntrl(pio_mgr->hbridge_context, 862 pfn_dev_cntrl(pio_mgr->hbridge_context,
863 BRDIOCTL_CONSTRAINT_REQUEST, parg); 863 BRDIOCTL_CONSTRAINT_REQUEST, parg);
864 if (DSP_FAILED(status)) 864 if (status)
865 dev_dbg(bridge, "PM: Failed to set constraint " 865 dev_dbg(bridge, "PM: Failed to set constraint "
866 "= 0x%x \n", parg[1]); 866 "= 0x%x\n", parg[1]);
867 } else { 867 } else {
868 dev_dbg(bridge, "PM: clk control value of msg = 0x%x\n", 868 dev_dbg(bridge, "PM: clk control value of msg = 0x%x\n",
869 parg[0]); 869 parg[0]);
870 status = pio_mgr->intf_fxns-> 870 status = pio_mgr->intf_fxns->
871 pfn_dev_cntrl(pio_mgr->hbridge_context, 871 pfn_dev_cntrl(pio_mgr->hbridge_context,
872 BRDIOCTL_CLK_CTRL, parg); 872 BRDIOCTL_CLK_CTRL, parg);
873 if (DSP_FAILED(status)) 873 if (status)
874 dev_dbg(bridge, "PM: Failed to ctrl the DSP clk" 874 dev_dbg(bridge, "PM: Failed to ctrl the DSP clk"
875 "= 0x%x\n", *parg); 875 "= 0x%x\n", *parg);
876 } 876 }
@@ -1849,7 +1849,7 @@ int print_dsp_trace_buffer(struct bridge_dev_context *hbridge_context)
1849 status = cod_get_sym_value(cod_mgr, COD_TRACECURPOS, 1849 status = cod_get_sym_value(cod_mgr, COD_TRACECURPOS,
1850 &trace_cur_pos); 1850 &trace_cur_pos);
1851 1851
1852 if (DSP_FAILED(status)) 1852 if (status)
1853 goto func_end; 1853 goto func_end;
1854 1854
1855 ul_num_bytes = (ul_trace_end - ul_trace_begin); 1855 ul_num_bytes = (ul_trace_end - ul_trace_begin);
@@ -1857,7 +1857,7 @@ int print_dsp_trace_buffer(struct bridge_dev_context *hbridge_context)
1857 ul_num_words = ul_num_bytes * ul_word_size; 1857 ul_num_words = ul_num_bytes * ul_word_size;
1858 status = dev_get_intf_fxns(dev_obj, &intf_fxns); 1858 status = dev_get_intf_fxns(dev_obj, &intf_fxns);
1859 1859
1860 if (DSP_FAILED(status)) 1860 if (status)
1861 goto func_end; 1861 goto func_end;
1862 1862
1863 psz_buf = kzalloc(ul_num_bytes + 2, GFP_ATOMIC); 1863 psz_buf = kzalloc(ul_num_bytes + 2, GFP_ATOMIC);
@@ -1867,7 +1867,7 @@ int print_dsp_trace_buffer(struct bridge_dev_context *hbridge_context)
1867 (u8 *)psz_buf, (u32)ul_trace_begin, 1867 (u8 *)psz_buf, (u32)ul_trace_begin,
1868 ul_num_bytes, 0); 1868 ul_num_bytes, 0);
1869 1869
1870 if (DSP_FAILED(status)) 1870 if (status)
1871 goto func_end; 1871 goto func_end;
1872 1872
1873 /* Pack and do newline conversion */ 1873 /* Pack and do newline conversion */
@@ -1881,7 +1881,7 @@ int print_dsp_trace_buffer(struct bridge_dev_context *hbridge_context)
1881 status = (*intf_fxns->pfn_brd_read)(pbridge_context, 1881 status = (*intf_fxns->pfn_brd_read)(pbridge_context,
1882 (u8 *)&trace_cur_pos, (u32)trace_cur_pos, 1882 (u8 *)&trace_cur_pos, (u32)trace_cur_pos,
1883 4, 0); 1883 4, 0);
1884 if (DSP_FAILED(status)) 1884 if (status)
1885 goto func_end; 1885 goto func_end;
1886 /* Pack and do newline conversion */ 1886 /* Pack and do newline conversion */
1887 pr_info("DSP Trace Buffer Begin:\n" 1887 pr_info("DSP Trace Buffer Begin:\n"
@@ -1967,7 +1967,7 @@ int print_dsp_trace_buffer(struct bridge_dev_context *hbridge_context)
1967 status = -ENOMEM; 1967 status = -ENOMEM;
1968 } 1968 }
1969func_end: 1969func_end:
1970 if (DSP_FAILED(status)) 1970 if (status)
1971 dev_dbg(bridge, "%s Failed, status 0x%x\n", __func__, status); 1971 dev_dbg(bridge, "%s Failed, status 0x%x\n", __func__, status);
1972 return status; 1972 return status;
1973} 1973}
@@ -2025,7 +2025,7 @@ int dump_dsp_stack(struct bridge_dev_context *bridge_context)
2025 cod_get_sym_value(code_mgr, COD_TRACEBEG, &trace_begin); 2025 cod_get_sym_value(code_mgr, COD_TRACEBEG, &trace_begin);
2026 pr_debug("%s: trace_begin Value 0x%x\n", 2026 pr_debug("%s: trace_begin Value 0x%x\n",
2027 __func__, trace_begin); 2027 __func__, trace_begin);
2028 if (DSP_FAILED(status)) 2028 if (status)
2029 pr_debug("%s: Failed on cod_get_sym_value.\n", 2029 pr_debug("%s: Failed on cod_get_sym_value.\n",
2030 __func__); 2030 __func__);
2031 } 2031 }
@@ -2049,7 +2049,7 @@ int dump_dsp_stack(struct bridge_dev_context *bridge_context)
2049 (u8 *)&mmu_fault_dbg_info, (u32)trace_begin, 2049 (u8 *)&mmu_fault_dbg_info, (u32)trace_begin,
2050 sizeof(mmu_fault_dbg_info), 0); 2050 sizeof(mmu_fault_dbg_info), 0);
2051 2051
2052 if (DSP_FAILED(status)) 2052 if (status)
2053 break; 2053 break;
2054 2054
2055 poll_cnt++; 2055 poll_cnt++;
@@ -2084,7 +2084,7 @@ int dump_dsp_stack(struct bridge_dev_context *bridge_context)
2084 status = (*intf_fxns->pfn_brd_read)(bridge_context, 2084 status = (*intf_fxns->pfn_brd_read)(bridge_context,
2085 (u8 *)buffer, (u32)trace_begin, 2085 (u8 *)buffer, (u32)trace_begin,
2086 total_size, 0); 2086 total_size, 0);
2087 if (DSP_FAILED(status)) { 2087 if (status) {
2088 pr_debug("%s: Failed to Read Trace Buffer.\n", 2088 pr_debug("%s: Failed to Read Trace Buffer.\n",
2089 __func__); 2089 __func__);
2090 goto func_end; 2090 goto func_end;
@@ -2101,7 +2101,7 @@ int dump_dsp_stack(struct bridge_dev_context *bridge_context)
2101 2101
2102 status = 2102 status =
2103 cod_get_sym_value(code_mgr, DYNEXTBASE, &dyn_ext_base); 2103 cod_get_sym_value(code_mgr, DYNEXTBASE, &dyn_ext_base);
2104 if (DSP_FAILED(status)) { 2104 if (status) {
2105 status = -EFAULT; 2105 status = -EFAULT;
2106 goto func_end; 2106 goto func_end;
2107 } 2107 }
@@ -2219,7 +2219,7 @@ void dump_dl_modules(struct bridge_dev_context *bridge_context)
2219 int status = 0; 2219 int status = 0;
2220 2220
2221 status = dev_get_intf_fxns(dev_object, &intf_fxns); 2221 status = dev_get_intf_fxns(dev_object, &intf_fxns);
2222 if (DSP_FAILED(status)) { 2222 if (status) {
2223 pr_debug("%s: Failed on dev_get_intf_fxns.\n", __func__); 2223 pr_debug("%s: Failed on dev_get_intf_fxns.\n", __func__);
2224 goto func_end; 2224 goto func_end;
2225 } 2225 }
@@ -2233,7 +2233,7 @@ void dump_dl_modules(struct bridge_dev_context *bridge_context)
2233 2233
2234 /* Lookup the address of the modules_header structure */ 2234 /* Lookup the address of the modules_header structure */
2235 status = cod_get_sym_value(code_mgr, "_DLModules", &module_dsp_addr); 2235 status = cod_get_sym_value(code_mgr, "_DLModules", &module_dsp_addr);
2236 if (DSP_FAILED(status)) { 2236 if (status) {
2237 pr_debug("%s: Failed on cod_get_sym_value for _DLModules.\n", 2237 pr_debug("%s: Failed on cod_get_sym_value for _DLModules.\n",
2238 __func__); 2238 __func__);
2239 goto func_end; 2239 goto func_end;
@@ -2245,7 +2245,7 @@ void dump_dl_modules(struct bridge_dev_context *bridge_context)
2245 status = (*intf_fxns->pfn_brd_read)(bridge_context, (u8 *) &modules_hdr, 2245 status = (*intf_fxns->pfn_brd_read)(bridge_context, (u8 *) &modules_hdr,
2246 (u32) module_dsp_addr, sizeof(modules_hdr), 0); 2246 (u32) module_dsp_addr, sizeof(modules_hdr), 0);
2247 2247
2248 if (DSP_FAILED(status)) { 2248 if (status) {
2249 pr_debug("%s: Failed failed to read modules header.\n", 2249 pr_debug("%s: Failed failed to read modules header.\n",
2250 __func__); 2250 __func__);
2251 goto func_end; 2251 goto func_end;
@@ -2280,7 +2280,7 @@ void dump_dl_modules(struct bridge_dev_context *bridge_context)
2280 status = (*intf_fxns->pfn_brd_read)(bridge_context, 2280 status = (*intf_fxns->pfn_brd_read)(bridge_context,
2281 (u8 *)module_struct, module_dsp_addr, module_size, 0); 2281 (u8 *)module_struct, module_dsp_addr, module_size, 0);
2282 2282
2283 if (DSP_FAILED(status)) { 2283 if (status) {
2284 pr_debug( 2284 pr_debug(
2285 "%s: Failed to read dll_module stuct for 0x%x.\n", 2285 "%s: Failed to read dll_module stuct for 0x%x.\n",
2286 __func__, module_dsp_addr); 2286 __func__, module_dsp_addr);
diff --git a/drivers/staging/tidspbridge/core/msg_sm.c b/drivers/staging/tidspbridge/core/msg_sm.c
index 85ca448d10ba..87712e24dfb1 100644
--- a/drivers/staging/tidspbridge/core/msg_sm.c
+++ b/drivers/staging/tidspbridge/core/msg_sm.c
@@ -210,7 +210,7 @@ int bridge_msg_create_queue(struct msg_mgr *hmsg_mgr,
210 status = add_new_msg(msg_q->msg_free_list); 210 status = add_new_msg(msg_q->msg_free_list);
211 } 211 }
212 } 212 }
213 if (DSP_FAILED(status)) { 213 if (status) {
214 /* Stay inside CS to prevent others from taking any 214 /* Stay inside CS to prevent others from taking any
215 * of the newly allocated message frames. */ 215 * of the newly allocated message frames. */
216 delete_msg_queue(msg_q, num_allocated); 216 delete_msg_queue(msg_q, num_allocated);
@@ -439,7 +439,7 @@ int bridge_msg_put(struct msg_queue *msg_queue_obj,
439 syncs[1] = msg_queue_obj->sync_done; 439 syncs[1] = msg_queue_obj->sync_done;
440 status = sync_wait_on_multiple_events(syncs, 2, utimeout, 440 status = sync_wait_on_multiple_events(syncs, 2, utimeout,
441 &index); 441 &index);
442 if (DSP_FAILED(status)) 442 if (status)
443 goto func_end; 443 goto func_end;
444 /* Enter critical section */ 444 /* Enter critical section */
445 spin_lock_bh(&hmsg_mgr->msg_mgr_lock); 445 spin_lock_bh(&hmsg_mgr->msg_mgr_lock);
diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c
index 8f25a05ea8ce..9673acba9913 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430.c
@@ -1318,7 +1318,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
1318 } 1318 }
1319 status = pte_set(dev_context->pt_attrs, pa, 1319 status = pte_set(dev_context->pt_attrs, pa,
1320 va, HW_PAGE_SIZE4KB, &hw_attrs); 1320 va, HW_PAGE_SIZE4KB, &hw_attrs);
1321 if (DSP_FAILED(status)) 1321 if (status)
1322 break; 1322 break;
1323 1323
1324 va += HW_PAGE_SIZE4KB; 1324 va += HW_PAGE_SIZE4KB;
@@ -1344,7 +1344,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
1344 status = pte_set(dev_context->pt_attrs, 1344 status = pte_set(dev_context->pt_attrs,
1345 page_to_phys(mapped_page), va, 1345 page_to_phys(mapped_page), va,
1346 HW_PAGE_SIZE4KB, &hw_attrs); 1346 HW_PAGE_SIZE4KB, &hw_attrs);
1347 if (DSP_FAILED(status)) 1347 if (status)
1348 break; 1348 break;
1349 1349
1350 if (mapped_pages) 1350 if (mapped_pages)
diff --git a/drivers/staging/tidspbridge/core/tiomap3430_pwr.c b/drivers/staging/tidspbridge/core/tiomap3430_pwr.c
index d9386450d4f7..b789f8fdd89b 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430_pwr.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430_pwr.c
@@ -228,7 +228,7 @@ int sleep_dsp(struct bridge_dev_context *dev_context, u32 dw_cmd,
228 228
229 /* Turn off DSP Peripheral clocks */ 229 /* Turn off DSP Peripheral clocks */
230 status = dsp_clock_disable_all(dev_context->dsp_per_clks); 230 status = dsp_clock_disable_all(dev_context->dsp_per_clks);
231 if (DSP_FAILED(status)) 231 if (status)
232 return status; 232 return status;
233#ifdef CONFIG_TIDSPBRIDGE_DVFS 233#ifdef CONFIG_TIDSPBRIDGE_DVFS
234 else if (target_pwr_state == PWRDM_POWER_OFF) { 234 else if (target_pwr_state == PWRDM_POWER_OFF) {