summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port_im.c
diff options
context:
space:
mode:
authorMandy Lavi <mandy.lavi@freescale.com>2014-11-19 05:17:46 (GMT)
committerMatthew Weigel <Matthew.Weigel@freescale.com>2014-12-11 18:40:48 (GMT)
commitca6d6c8930a031eeab8e121ae7de52dede339e21 (patch)
treea102319534e49b7624b67a40a3d906662ce5850b /drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port_im.c
parent5676273b1553c5920c90592f49a1d8fce560f24d (diff)
downloadlinux-fsl-qoriq-ca6d6c8930a031eeab8e121ae7de52dede339e21.tar.xz
fmd: fix static analysis issues
Change-Id: I2d6cead7b62116cd6a264ec91d82f3bdc3a03c10 Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/23939 Reviewed-by: Igal Liberman <Igal.Liberman@freescale.com> Tested-by: Richard Schmitt <richard.schmitt@freescale.com> Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
Diffstat (limited to 'drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port_im.c')
-rw-r--r--drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port_im.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port_im.c b/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port_im.c
index 7f70cc9..8de8f5f 100644
--- a/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port_im.c
+++ b/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port_im.c
@@ -39,6 +39,7 @@
#include "std_ext.h"
#include "string_ext.h"
#include "error_ext.h"
+#include "memcpy_ext.h"
#include "fm_muram_ext.h"
#include "fm_port.h"
@@ -140,7 +141,7 @@ t_Error FmPortImRx(t_FmPort *p_FmPort)
uint32_t bdStatus;
volatile uint8_t buffPos;
uint16_t length;
- uint16_t errors/*, reportErrors*/;
+ uint16_t errors;
uint8_t *p_CurData, *p_Data;
uint32_t flags;
@@ -168,7 +169,6 @@ t_Error FmPortImRx(t_FmPort *p_FmPort)
if (p_FmPort->im.firstBdOfFrameId == IM_ILEGAL_BD_ID)
p_FmPort->im.firstBdOfFrameId = p_FmPort->im.currBdId;
- errors = 0;
p_CurData = BdBufferGet(p_FmPort->im.rxPool.f_PhysToVirt, BD_GET(p_FmPort->im.currBdId));
h_CurrUserPriv = p_FmPort->im.p_BdShadow[p_FmPort->im.currBdId];
length = (uint16_t)((bdStatus & BD_L) ?
@@ -199,9 +199,8 @@ t_Error FmPortImRx(t_FmPort *p_FmPort)
WRITE_UINT16(p_FmPort->im.p_FmPortImPram->rxQd.offsetOut, (uint16_t)(p_FmPort->im.currBdId<<4));
/* Pass the buffer if one of the conditions is true:
- There are no errors
- - This is a part of a larger frame ( the application has already received some buffers )
- - There is an error, but it was defined to be passed anyway. */
- if ((buffPos != SINGLE_BUF) || !errors || (errors & (uint16_t)(BD_ERROR_PASS_FRAME>>16)))
+ - This is a part of a larger frame ( the application has already received some buffers ) */
+ if ((buffPos != SINGLE_BUF) || !errors)
{
if (p_FmPort->im.f_RxStore(p_FmPort->h_App,
p_CurData,