Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
axiethernet: Removed the assert condition for speed.
Removes the assert condition for speed in xaxiethernet.c as
the default condition is there for speed check.This patch fixes
the below warning.

"Execution cannot reach this statement: "default:""

Signed-off-by: Arunima Mishra <anunima.mishra@xilinx.com>

Acked-by :  Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
  • Loading branch information
Arunima Mishra authored and saddepal committed Aug 29, 2019
1 parent 9ca30d0 commit acf82d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Expand Up @@ -36,7 +36,7 @@ BEGIN driver axiethernet
OPTION supported_peripherals = (axi_ethernet_v[3-9]_[0-9][1-9]_[a-z] axi_ethernet_v[3-9]_[0-9]);
OPTION driver_state = ACTIVE;
OPTION copyfiles = all;
OPTION VERSION = 5.9;
OPTION VERSION = 5.10;
OPTION NAME = axiethernet;

END driver
6 changes: 1 addition & 5 deletions XilinxProcessorIPLib/drivers/axiethernet/src/xaxiethernet.c
Expand Up @@ -51,6 +51,7 @@
* 5.7 srm 01/16/18 Implemented poll timeout API which replaces while loops
* to ensure a deterministic time delay.
* 5.8 rsp 07/20/18 Fix cppcheck warning in Aptr assignment.
* 5.10 aru 08/16/19 Fix coverity warning
*
* </pre>
******************************************************************************/
Expand Down Expand Up @@ -1418,11 +1419,6 @@ int XAxiEthernet_SetOperatingSpeed(XAxiEthernet *InstancePtr, u16 Speed)

Xil_AssertNonvoid(InstancePtr != NULL);
Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
Xil_AssertNonvoid((Speed == XAE_SPEED_10_MBPS) ||
(Speed == XAE_SPEED_100_MBPS) ||
(Speed == XAE_SPEED_1000_MBPS) ||
(Speed == XAE_SPEED_2500_MBPS));


xdbg_printf(XDBG_DEBUG_GENERAL, "XAxiEthernet_SetOperatingSpeed\n");
xdbg_printf(XDBG_DEBUG_GENERAL,
Expand Down

0 comments on commit acf82d5

Please sign in to comment.