[PATCH 03/67] staging: unisys: remove unused locking functions in timskmod.h

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

 



Delete a block of unused locking functions from timskmod.h. These
functions generated a lot of checkpatch warnings and were not being used
anyhow.

Signed-off-by: Benjamin Romer <benjamin.romer@xxxxxxxxxx>
---
 drivers/staging/unisys/include/timskmod.h | 88 -------------------------------
 1 file changed, 88 deletions(-)

diff --git a/drivers/staging/unisys/include/timskmod.h b/drivers/staging/unisys/include/timskmod.h
index e5e4ecd..ee7e85f 100644
--- a/drivers/staging/unisys/include/timskmod.h
+++ b/drivers/staging/unisys/include/timskmod.h
@@ -139,94 +139,6 @@
 	 ((fd)->sig1 == sizeof(PRIVATEFILEDATA)) &&    \
 	 ((fd)->sig2 == fd))
 
-/** Locks dd->lockDev if you havn't already locked it */
-#define LOCKDEV(dd)                                                    \
-	{                                                              \
-		if (!lockedDev) {				       \
-			spin_lock(&dd->lockDev);		       \
-			lockedDev = TRUE;			       \
-		}						       \
-	}
-
-/** Unlocks dd->lockDev if you previously locked it */
-#define UNLOCKDEV(dd)                                                  \
-	{                                                              \
-		if (lockedDev) {				       \
-			spin_unlock(&dd->lockDev);		       \
-			lockedDev = FALSE;			       \
-		}						       \
-	}
-
-/** Locks dd->lockDevISR if you havn't already locked it */
-#define LOCKDEVISR(dd)                                                 \
-	{                                                              \
-		if (!lockedDevISR) {				       \
-			spin_lock_irqsave(&dd->lockDevISR, flags);     \
-			lockedDevISR = TRUE;			       \
-		}						       \
-	}
-
-/** Unlocks dd->lockDevISR if you previously locked it */
-#define UNLOCKDEVISR(dd)						\
-	{								\
-		if (lockedDevISR) {					\
-			spin_unlock_irqrestore(&dd->lockDevISR, flags); \
-			lockedDevISR = FALSE;				\
-		}							\
-	}
-
-/** Locks LockGlobalISR if you havn't already locked it */
-#define LOCKGLOBALISR                                                  \
-	{                                                              \
-		if (!lockedGlobalISR) {				       \
-			spin_lock_irqsave(&LockGlobalISR, flags);      \
-			lockedGlobalISR = TRUE;			       \
-		}						       \
-	}
-
-/** Unlocks LockGlobalISR if you previously locked it */
-#define UNLOCKGLOBALISR                                                \
-	{                                                              \
-		if (lockedGlobalISR) {				       \
-			spin_unlock_irqrestore(&LockGlobalISR, flags); \
-			lockedGlobalISR = FALSE;		       \
-		}						       \
-	}
-
-/** Locks LockGlobal if you havn't already locked it */
-#define LOCKGLOBAL                                                     \
-	{                                                              \
-		if (!lockedGlobal) {				       \
-			spin_lock(&LockGlobal);			       \
-			lockedGlobal = TRUE;			       \
-		}						       \
-	}
-
-/** Unlocks LockGlobal if you previously locked it */
-#define UNLOCKGLOBAL                                                   \
-	{                                                              \
-		if (lockedGlobal) {				       \
-			spin_unlock(&LockGlobal);		       \
-			lockedGlobal = FALSE;			       \
-		}						       \
-	}
-
-/** Use this at the beginning of functions where you intend to
- *  use #LOCKDEV/#UNLOCKDEV, #LOCKDEVISR/#UNLOCKDEVISR,
- *  #LOCKGLOBAL/#UNLOCKGLOBAL, #LOCKGLOBALISR/#UNLOCKGLOBALISR.
- *
- *  Note that __attribute__((unused)) is how you tell GNU C to suppress
- *  any warning messages about the variable being unused.
- */
-#define LOCKPREAMBLE							\
-	ulong flags __attribute__((unused)) = 0;			\
-	BOOL lockedDev __attribute__((unused)) = FALSE;			\
-	BOOL lockedDevISR __attribute__((unused)) = FALSE;		\
-	BOOL lockedGlobal __attribute__((unused)) = FALSE;		\
-	BOOL lockedGlobalISR __attribute__((unused)) = FALSE
-
-
-
 /** Sleep for an indicated number of seconds (for use in kernel mode).
  *  @param x the number of seconds to sleep.
  */
-- 
1.9.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux