mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/6] staging: hv: remove unnecessary code in netvsc_probe().
@ 2011-05-23 16:03 Haiyang Zhang
  2011-05-23 16:03 ` [PATCH 2/6] staging: hv: remove commented out code from netvsc_drv.c Haiyang Zhang
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Haiyang Zhang @ 2011-05-23 16:03 UTC (permalink / raw)
  To: haiyangz, hjanssen, kys, v-abkane, gregkh, linux-kernel, devel,
	virtualization

netif_carrier_off() was called earlier in this function, and there is
no other thread access this device yet. The status checking code is not
necessary here.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>

---
 drivers/staging/hv/netvsc_drv.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index 7b9c229..456d3df 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -364,17 +364,7 @@ static int netvsc_probe(struct hv_device *dev)
 		return ret;
 	}
 
-	/*
-	 * If carrier is still off ie we did not get a link status callback,
-	 * update it if necessary
-	 */
-	/*
-	 * FIXME: We should use a atomic or test/set instead to avoid getting
-	 * out of sync with the device's link status
-	 */
-	if (!netif_carrier_ok(net))
-		if (!device_info.link_state)
-			netif_carrier_on(net);
+	netif_carrier_on(net);
 
 	memcpy(net->dev_addr, device_info.mac_adr, ETH_ALEN);
 
-- 
1.6.3.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-05-23 16:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-23 16:03 [PATCH 1/6] staging: hv: remove unnecessary code in netvsc_probe() Haiyang Zhang
2011-05-23 16:03 ` [PATCH 2/6] staging: hv: remove commented out code from netvsc_drv.c Haiyang Zhang
2011-05-23 16:03 ` [PATCH 3/6] staging: hv: change rndis_filter_device_remove() to void return type Haiyang Zhang
2011-05-23 16:03 ` [PATCH 4/6] staging: hv: remove commented out code in netvsc_remove() Haiyang Zhang
2011-05-23 16:03 ` [PATCH 5/6] staging: hv: fix typo in name rndis_filte_device_add() Haiyang Zhang
2011-05-23 16:03 ` [PATCH 6/6] staging: hv: removed commented out code from rndis_filter_receive() Haiyang Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®