[patch 48/54] Staging: hv: osd: remove spinlock wrapper functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Greg Kroah-Hartman <gregkh@xxxxxxx>

Now that there are no users of the wrapper functions for spinlocks,
remove them.

Cc: Hank Janssen <hjanssen@xxxxxxxxxxxxx>
Cc: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
 drivers/staging/hv/include/osd.h |    5 -----
 drivers/staging/hv/osd.c         |   37 -------------------------------------
 2 files changed, 42 deletions(-)

--- a/drivers/staging/hv/include/osd.h
+++ b/drivers/staging/hv/include/osd.h
@@ -137,11 +137,6 @@ extern int	WaitEventWait(HANDLE hWait);
 // If >0, hWait got signaled. If ==0, timeout. If < 0, error
 extern int	WaitEventWaitEx(HANDLE hWait, u32 TimeoutInMs);
 
-extern HANDLE SpinlockCreate(void);
-extern void SpinlockClose(HANDLE hSpin);
-extern void SpinlockAcquire(HANDLE hSpin);
-extern void	SpinlockRelease(HANDLE hSpin);
-
 
 #define GetVirtualAddress Physical2LogicalAddr
 void* Physical2LogicalAddr(unsigned long PhysAddr);
--- a/drivers/staging/hv/osd.c
+++ b/drivers/staging/hv/osd.c
@@ -61,11 +61,6 @@ typedef struct _WAITEVENT {
 	wait_queue_head_t event;
 } WAITEVENT;
 
-typedef struct _SPINLOCK {
-	spinlock_t		lock;
-	unsigned long	flags;
-} SPINLOCK;
-
 typedef struct _WORKQUEUE {
 	struct workqueue_struct *queue;
 } WORKQUEUE;
@@ -323,38 +318,6 @@ int WaitEventWaitEx(HANDLE hWait, u32 Ti
 	return ret;
 }
 
-HANDLE SpinlockCreate(void)
-{
-	SPINLOCK* spin = kmalloc(sizeof(SPINLOCK), GFP_KERNEL);
-	if (!spin)
-	{
-		return NULL;
-	}
-	spin_lock_init(&spin->lock);
-
-	return spin;
-}
-
-void SpinlockAcquire(HANDLE hSpin)
-{
-	SPINLOCK* spin = (SPINLOCK* )hSpin;
-
-	spin_lock_irqsave(&spin->lock, spin->flags);
-}
-
-void SpinlockRelease(HANDLE hSpin)
-{
-	SPINLOCK* spin = (SPINLOCK* )hSpin;
-
-	spin_unlock_irqrestore(&spin->lock, spin->flags);
-}
-
-void SpinlockClose(HANDLE hSpin)
-{
-	SPINLOCK* spin = (SPINLOCK* )hSpin;
-	kfree(spin);
-}
-
 void* Physical2LogicalAddr(unsigned long PhysAddr)
 {
 	void* logicalAddr = phys_to_virt(PhysAddr);


_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization

[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux