lkml.org 
[lkml]   [2012]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/1] staging: usbip: remove an unnecessary lock in usbip_event_happened. The variable "happened" is local. So I think there is no need to lock here.
Date
From: harvey.yang <harvey.huawei.yang@gmail.com>


Signed-off-by: harvey.yang <harvey.huawei.yang@gmail.com>
---
drivers/staging/usbip/usbip_event.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/usbip/usbip_event.c b/drivers/staging/usbip/usbip_event.c
index d332a34..668f8e0 100644
--- a/drivers/staging/usbip/usbip_event.c
+++ b/drivers/staging/usbip/usbip_event.c
@@ -116,10 +116,8 @@ int usbip_event_happened(struct usbip_device *ud)
{
int happened = 0;

- spin_lock(&ud->lock);
if (ud->event != 0)
happened = 1;
- spin_unlock(&ud->lock);

return happened;
}
--
1.7.1


\
 
 \ /
  Last update: 2012-11-05 06:42    [W:0.036 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site