[BugFix] PDK-9298 REL.CORESDK.07.03.02.04 REL.CORESDK.07.03.02.05 REL.CORESDK.07.03.03.01
authorPrasad Konnur <prasadkonnur@ti.com>
Sun, 4 Apr 2021 05:33:29 +0000 (11:03 +0530)
committerPrasad Konnur <prasadkonnur@ti.com>
Sun, 4 Apr 2021 05:33:29 +0000 (11:03 +0530)
 - Desc: Warning generated when driver compiled with non-TI compiler

 - Resolution: remove assignment inside if condition
   make it seperate statement before if condition.

Signed-off-by: Prasad Konnur <prasadkonnur@ti.com>
packages/ti/drv/edma/src/edma.c

index d90b3991638c273f65bc4b8f5f0e203c7d56020f..38d3ecea14edd57559c21d1bb2ca5065ad477a72 100644 (file)
@@ -852,7 +852,8 @@ int32_t EDMA_getErrorStatus(EDMA_Handle handle, bool *isAnyError, EDMA_errorInfo
         hwAttrs = edmaConfig->hwAttrs;
         ccBaseAddr = hwAttrs->CCbaseAddress;
 
-        if (*isAnyError = EDMA_isError(ccBaseAddr))
+        *isAnyError = EDMA_isError(ccBaseAddr);
+        if (*isAnyError == TRUE)
         {
             EDMA_getErrorStatusInfo(hwAttrs, ccBaseAddr, errorInfo);
             EDMA_clearErrors(hwAttrs, ccBaseAddr, edmaConfig->initParams.regionId, errorInfo);
@@ -987,8 +988,9 @@ int32_t EDMA_getTransferControllerErrorStatus(EDMA_Handle handle, uint8_t transf
         edmaConfig = (EDMA_Config_t *) handle;
         hwAttrs = edmaConfig->hwAttrs;
         tcBaseAddr = hwAttrs->TCbaseAddress[transferControllerId];
+        *isAnyError = EDMA_isTransferControllerError(tcBaseAddr);
 
-        if (*isAnyError = EDMA_isTransferControllerError(tcBaseAddr))
+        if (*isAnyError == TRUE)
         {
             EDMA_getTransferControllerErrorStatusInfo(tcBaseAddr, errorInfo);
             EDMA_clearTransferControllerErrors(tcBaseAddr, errorInfo);