lkml.org 
[lkml]   [2011]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/1] Staging: hv: netvsc: Cleanup the name and type of link_stat variable
Date
Consistently name the variable tracking the link status. Use a consistent
type for this variable and get rid of some unnecessary parentheses as well.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
---
drivers/staging/hv/rndis_filter.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/hv/rndis_filter.c b/drivers/staging/hv/rndis_filter.c
index 963582a..696d2c5 100644
--- a/drivers/staging/hv/rndis_filter.c
+++ b/drivers/staging/hv/rndis_filter.c
@@ -41,7 +41,7 @@ struct rndis_device {
struct netvsc_device *net_dev;

enum rndis_device_state state;
- u32 link_stat;
+ bool link_state;
atomic_t new_req_id;

spinlock_t request_lock;
@@ -514,7 +514,7 @@ static int rndis_filter_query_device_link_status(struct rndis_device *dev)

return rndis_filter_query_device(dev,
RNDIS_OID_GEN_MEDIA_CONNECT_STATUS,
- &dev->link_stat, &size);
+ &dev->link_state, &size);
}

static int rndis_filter_set_packet_filter(struct rndis_device *dev,
@@ -736,11 +736,11 @@ int rndis_filter_device_add(struct hv_device *dev,

rndis_filter_query_device_link_status(rndis_device);

- device_info->link_state = rndis_device->link_stat;
+ device_info->link_state = rndis_device->link_state;

dev_info(&dev->device, "Device MAC %pM link state %s",
rndis_device->hw_mac_adr,
- ((device_info->link_state) ? ("down\n") : ("up\n")));
+ device_info->link_state ? "down\n" : "up\n");

return ret;
}
--
1.7.4.1


\
 
 \ /
  Last update: 2011-09-13 21:57    [W:0.110 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site