Skip to contentSkip to conversation

ucc_geth: suppress compile warnings

PATCH In review Li Yang 1 participant 1 message Mar 6, 2007

Subsystems (2)
lore
Share & tools
lore

Li Yang

author
#0 lore raw

PATCH 3/3 ucc_geth: suppress compile warnings

Add casts to suppress warnings introduced by kmalloc cast cleanup patch.

---
drivers/net/ucc_geth.c | 6 ++++--

1 files changed, 4 insertions(+), 2 deletions(-)
drivers/net/ucc_geth.c +0 -0
index dab88b9..c2db49b 100644
@@ -2804,7 +2804,8 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
			if (UCC_GETH_TX_BD_RING_ALIGNMENT > 4)
				align = UCC_GETH_TX_BD_RING_ALIGNMENT;
			ugeth->tx_bd_ring_offset[j] =

- kmalloc((u32) (length + align), GFP_KERNEL);
+ (u32)kmalloc((u32) (length + align),
+ GFP_KERNEL);

			if (ugeth->tx_bd_ring_offset[j] != 0)
				ugeth->p_tx_bd_ring[j] =
@@ -2840,7 +2841,8 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
			if (UCC_GETH_RX_BD_RING_ALIGNMENT > 4)
				align = UCC_GETH_RX_BD_RING_ALIGNMENT;
			ugeth->rx_bd_ring_offset[j] =
-				kmalloc((u32) (length + align), GFP_KERNEL);
+				(u32)kmalloc((u32) (length + align),
+					     GFP_KERNEL);
			if (ugeth->rx_bd_ring_offset[j] != 0)
				ugeth->p_rx_bd_ring[j] =
					(void*)((ugeth->rx_bd_ring_offset[j] +