From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: devel@linuxdriverproject.org
Cc: linux-kernel@vger.kernel.org,
Haiyang Zhang <haiyangz@microsoft.com>,
"K. Y. Srinivasan" <kys@microsoft.com>
Subject: [PATCH 2/2] Drivers: hv: get rid of id in struct vmbus_channel
Date: Tue, 9 Aug 2016 10:46:19 +0200 [thread overview]
Message-ID: <1470732379-5013-3-git-send-email-vkuznets@redhat.com> (raw)
In-Reply-To: <1470732379-5013-1-git-send-email-vkuznets@redhat.com>
The auto incremented counter is not being used anymore, get rid of it.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
drivers/hv/channel_mgmt.c | 2 --
include/linux/hyperv.h | 3 ---
2 files changed, 5 deletions(-)
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index b6c1211..4b4a41d 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -251,14 +251,12 @@ EXPORT_SYMBOL_GPL(vmbus_prep_negotiate_resp);
*/
static struct vmbus_channel *alloc_channel(void)
{
- static atomic_t chan_num = ATOMIC_INIT(0);
struct vmbus_channel *channel;
channel = kzalloc(sizeof(*channel), GFP_ATOMIC);
if (!channel)
return NULL;
- channel->id = atomic_inc_return(&chan_num);
channel->acquire_ring_lock = true;
spin_lock_init(&channel->inbound_lock);
spin_lock_init(&channel->lock);
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index b10954a..d9371a7 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -701,9 +701,6 @@ struct vmbus_device {
};
struct vmbus_channel {
- /* Unique channel id */
- int id;
-
struct list_head listentry;
struct hv_device *device_obj;
--
2.7.4
next prev parent reply other threads:[~2016-08-09 8:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-09 8:46 [PATCH 0/2] Drivers: hv: vmbus: make bus ids in sysfs persistent Vitaly Kuznetsov
2016-08-09 8:46 ` [PATCH 1/2] Drivers: hv: make VMBus bus ids persistent Vitaly Kuznetsov
2016-08-09 8:46 ` Vitaly Kuznetsov [this message]
2016-08-10 19:00 ` [PATCH 0/2] Drivers: hv: vmbus: make bus ids in sysfs persistent KY Srinivasan
2016-08-11 9:16 ` Vitaly Kuznetsov
2016-08-12 14:10 ` KY Srinivasan
2016-08-15 16:11 ` Vitaly Kuznetsov
2016-08-17 16:33 ` KY Srinivasan
-- strict thread matches above, loose matches on Subject: below --
2016-09-16 16:00 [PATCH 0/2] Drivers: hv: vmbus: Use persistent IDs for vmbus device names kys
2016-09-16 16:01 ` [PATCH 1/1] Drivers: hv: hv_util: Avoid dynamic allocation in time synch kys
2016-09-16 16:01 ` [PATCH 2/2] Drivers: hv: get rid of id in struct vmbus_channel kys
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1470732379-5013-3-git-send-email-vkuznets@redhat.com \
--to=vkuznets@redhat.com \
--cc=devel@linuxdriverproject.org \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).