From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756434Ab1F2OXD (ORCPT ); Wed, 29 Jun 2011 10:23:03 -0400 Received: from p3plsmtps2ded01.prod.phx3.secureserver.net ([208.109.80.58]:48297 "HELO p3plsmtps2ded01-01.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755356Ab1F2OWw (ORCPT ); Wed, 29 Jun 2011 10:22:52 -0400 From: "K. Y. Srinivasan" To: gregkh@suse.de, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, virtualization@lists.osdl.org Cc: "K. Y. Srinivasan" , Haiyang Zhang , Abhishek Kane , Hank Janssen Subject: [PATCH 02/40] Staging: hv: storvsc: Rename must_get_stor_device() Date: Wed, 29 Jun 2011 07:38:59 -0700 Message-Id: <1309358377-8537-2-git-send-email-kys@microsoft.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1309358377-8537-1-git-send-email-kys@microsoft.com> References: <1309358301-8488-1-git-send-email-kys@microsoft.com> <1309358377-8537-1-git-send-email-kys@microsoft.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation for cleaning up how we manage reference counts on the stor device, clearly distinguish why we are attempting to acquire a reference. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/storvsc.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/hv/storvsc.c b/drivers/staging/hv/storvsc.c index cd38cd6..89708b1 100644 --- a/drivers/staging/hv/storvsc.c +++ b/drivers/staging/hv/storvsc.c @@ -41,7 +41,7 @@ static inline struct storvsc_device *alloc_stor_device(struct hv_device *device) return NULL; /* Set to 2 to allow both inbound and outbound traffics */ - /* (ie get_stor_device() and must_get_stor_device()) to proceed. */ + /* (ie get_stor_device() and get_in_stor_device()) to proceed. */ atomic_cmpxchg(&stor_device->ref_count, 0, 2); init_waitqueue_head(&stor_device->waiting_to_drain); @@ -53,7 +53,7 @@ static inline struct storvsc_device *alloc_stor_device(struct hv_device *device) /* Get the stordevice object iff exists and its refcount > 0 */ -static inline struct storvsc_device *must_get_stor_device( +static inline struct storvsc_device *get_in_stor_device( struct hv_device *device) { struct storvsc_device *stor_device; @@ -305,7 +305,7 @@ static void storvsc_on_channel_callback(void *context) int ret; - stor_device = must_get_stor_device(device); + stor_device = get_in_stor_device(device); if (!stor_device) return; -- 1.7.4.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: "K. Y. Srinivasan" Subject: [PATCH 02/40] Staging: hv: storvsc: Rename must_get_stor_device() Date: Wed, 29 Jun 2011 07:38:59 -0700 Message-ID: <1309358377-8537-2-git-send-email-kys@microsoft.com> References: <1309358301-8488-1-git-send-email-kys@microsoft.com> <1309358377-8537-1-git-send-email-kys@microsoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1309358377-8537-1-git-send-email-kys@microsoft.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: devel-bounces@linuxdriverproject.org Errors-To: devel-bounces@linuxdriverproject.org To: gregkh@suse.de, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, virtualization@lists.osdl.org Cc: Haiyang Zhang , Abhishek Kane List-Id: virtualization@lists.linuxfoundation.org In preparation for cleaning up how we manage reference counts on the stor device, clearly distinguish why we are attempting to acquire a reference. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/storvsc.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/hv/storvsc.c b/drivers/staging/hv/storvsc.c index cd38cd6..89708b1 100644 --- a/drivers/staging/hv/storvsc.c +++ b/drivers/staging/hv/storvsc.c @@ -41,7 +41,7 @@ static inline struct storvsc_device *alloc_stor_device(struct hv_device *device) return NULL; /* Set to 2 to allow both inbound and outbound traffics */ - /* (ie get_stor_device() and must_get_stor_device()) to proceed. */ + /* (ie get_stor_device() and get_in_stor_device()) to proceed. */ atomic_cmpxchg(&stor_device->ref_count, 0, 2); init_waitqueue_head(&stor_device->waiting_to_drain); @@ -53,7 +53,7 @@ static inline struct storvsc_device *alloc_stor_device(struct hv_device *device) /* Get the stordevice object iff exists and its refcount > 0 */ -static inline struct storvsc_device *must_get_stor_device( +static inline struct storvsc_device *get_in_stor_device( struct hv_device *device) { struct storvsc_device *stor_device; @@ -305,7 +305,7 @@ static void storvsc_on_channel_callback(void *context) int ret; - stor_device = must_get_stor_device(device); + stor_device = get_in_stor_device(device); if (!stor_device) return; -- 1.7.4.1