@@ -641,8 +641,7 @@ static int __devinit atl1e_sw_init(struct atl1e_adapter *adapter)
641641 */
642642static void atl1e_clean_tx_ring (struct atl1e_adapter * adapter )
643643{
644- struct atl1e_tx_ring * tx_ring = (struct atl1e_tx_ring * )
645- & adapter -> tx_ring ;
644+ struct atl1e_tx_ring * tx_ring = & adapter -> tx_ring ;
646645 struct atl1e_tx_buffer * tx_buffer = NULL ;
647646 struct pci_dev * pdev = adapter -> pdev ;
648647 u16 index , ring_count ;
@@ -686,7 +685,7 @@ static void atl1e_clean_tx_ring(struct atl1e_adapter *adapter)
686685static void atl1e_clean_rx_ring (struct atl1e_adapter * adapter )
687686{
688687 struct atl1e_rx_ring * rx_ring =
689- ( struct atl1e_rx_ring * ) & adapter -> rx_ring ;
688+ & adapter -> rx_ring ;
690689 struct atl1e_rx_page_desc * rx_page_desc = rx_ring -> rx_page_desc ;
691690 u16 i , j ;
692691
@@ -884,14 +883,12 @@ static int atl1e_setup_ring_resources(struct atl1e_adapter *adapter)
884883 return err ;
885884}
886885
887- static inline void atl1e_configure_des_ring (const struct atl1e_adapter * adapter )
886+ static inline void atl1e_configure_des_ring (struct atl1e_adapter * adapter )
888887{
889888
890- struct atl1e_hw * hw = (struct atl1e_hw * )& adapter -> hw ;
891- struct atl1e_rx_ring * rx_ring =
892- (struct atl1e_rx_ring * )& adapter -> rx_ring ;
893- struct atl1e_tx_ring * tx_ring =
894- (struct atl1e_tx_ring * )& adapter -> tx_ring ;
889+ struct atl1e_hw * hw = & adapter -> hw ;
890+ struct atl1e_rx_ring * rx_ring = & adapter -> rx_ring ;
891+ struct atl1e_tx_ring * tx_ring = & adapter -> tx_ring ;
895892 struct atl1e_rx_page_desc * rx_page_desc = NULL ;
896893 int i , j ;
897894
@@ -932,7 +929,7 @@ static inline void atl1e_configure_des_ring(const struct atl1e_adapter *adapter)
932929
933930static inline void atl1e_configure_tx (struct atl1e_adapter * adapter )
934931{
935- struct atl1e_hw * hw = ( struct atl1e_hw * ) & adapter -> hw ;
932+ struct atl1e_hw * hw = & adapter -> hw ;
936933 u32 dev_ctrl_data = 0 ;
937934 u32 max_pay_load = 0 ;
938935 u32 jumbo_thresh = 0 ;
@@ -975,7 +972,7 @@ static inline void atl1e_configure_tx(struct atl1e_adapter *adapter)
975972
976973static inline void atl1e_configure_rx (struct atl1e_adapter * adapter )
977974{
978- struct atl1e_hw * hw = ( struct atl1e_hw * ) & adapter -> hw ;
975+ struct atl1e_hw * hw = & adapter -> hw ;
979976 u32 rxf_len = 0 ;
980977 u32 rxf_low = 0 ;
981978 u32 rxf_high = 0 ;
@@ -1224,8 +1221,7 @@ static inline void atl1e_clear_phy_int(struct atl1e_adapter *adapter)
12241221
12251222static bool atl1e_clean_tx_irq (struct atl1e_adapter * adapter )
12261223{
1227- struct atl1e_tx_ring * tx_ring = (struct atl1e_tx_ring * )
1228- & adapter -> tx_ring ;
1224+ struct atl1e_tx_ring * tx_ring = & adapter -> tx_ring ;
12291225 struct atl1e_tx_buffer * tx_buffer = NULL ;
12301226 u16 hw_next_to_clean = AT_READ_REGW (& adapter -> hw , REG_TPD_CONS_IDX );
12311227 u16 next_to_clean = atomic_read (& tx_ring -> next_to_clean );
@@ -1384,15 +1380,14 @@ static struct atl1e_rx_page *atl1e_get_rx_page(struct atl1e_adapter *adapter,
13841380 (struct atl1e_rx_page_desc * ) adapter -> rx_ring .rx_page_desc ;
13851381 u8 rx_using = rx_page_desc [que ].rx_using ;
13861382
1387- return ( struct atl1e_rx_page * ) & (rx_page_desc [que ].rx_page [rx_using ]);
1383+ return & (rx_page_desc [que ].rx_page [rx_using ]);
13881384}
13891385
13901386static void atl1e_clean_rx_irq (struct atl1e_adapter * adapter , u8 que ,
13911387 int * work_done , int work_to_do )
13921388{
13931389 struct net_device * netdev = adapter -> netdev ;
1394- struct atl1e_rx_ring * rx_ring = (struct atl1e_rx_ring * )
1395- & adapter -> rx_ring ;
1390+ struct atl1e_rx_ring * rx_ring = & adapter -> rx_ring ;
13961391 struct atl1e_rx_page_desc * rx_page_desc =
13971392 (struct atl1e_rx_page_desc * ) rx_ring -> rx_page_desc ;
13981393 struct sk_buff * skb = NULL ;
@@ -1576,7 +1571,7 @@ static struct atl1e_tpd_desc *atl1e_get_tpd(struct atl1e_adapter *adapter)
15761571 tx_ring -> next_to_use = 0 ;
15771572
15781573 memset (& tx_ring -> desc [next_to_use ], 0 , sizeof (struct atl1e_tpd_desc ));
1579- return ( struct atl1e_tpd_desc * ) & tx_ring -> desc [next_to_use ];
1574+ return & tx_ring -> desc [next_to_use ];
15801575}
15811576
15821577static struct atl1e_tx_buffer *
@@ -2061,8 +2056,8 @@ static int atl1e_suspend(struct pci_dev *pdev, pm_message_t state)
20612056
20622057 if (wufc ) {
20632058 /* get link status */
2064- atl1e_read_phy_reg (hw , MII_BMSR , ( u16 * ) & mii_bmsr_data );
2065- atl1e_read_phy_reg (hw , MII_BMSR , ( u16 * ) & mii_bmsr_data );
2059+ atl1e_read_phy_reg (hw , MII_BMSR , & mii_bmsr_data );
2060+ atl1e_read_phy_reg (hw , MII_BMSR , & mii_bmsr_data );
20662061
20672062 mii_advertise_data = ADVERTISE_10HALF ;
20682063
@@ -2086,7 +2081,7 @@ static int atl1e_suspend(struct pci_dev *pdev, pm_message_t state)
20862081 for (i = 0 ; i < AT_SUSPEND_LINK_TIMEOUT ; i ++ ) {
20872082 msleep (100 );
20882083 atl1e_read_phy_reg (hw , MII_BMSR ,
2089- ( u16 * ) & mii_bmsr_data );
2084+ & mii_bmsr_data );
20902085 if (mii_bmsr_data & BMSR_LSTATUS )
20912086 break ;
20922087 }
0 commit comments