Skip to contentSkip to conversation

hid: intel-ish-hid: ipc: remove unused macro

PATCH Applied Even Xu 2 participants 2 messages Nov 11, 2016 – Nov 15, 2016

Subsystems (2)
lore
Share & tools
lore

Even Xu

author
#0 lore raw

PATCH 1/3 hid: intel-ish-hid: ipc: remove unused macro

The macro timed_wait_for() in utils.h isn't used in current ipc driver, so remove it for avoiding confusion.

---
 drivers/hid/intel-ish-hid/ipc/utils.h | 21 ---------------------
 1 file changed, 21 deletions(-)
drivers/hid/intel-ish-hid/ipc/utils.h +0 -21
index 5a82123..dc39dfe 100644
@@ -19,27 +19,6 @@
 #define	WAIT_FOR_CONNECT_SLICE	(HZ / 10)
 
 /*
- * Waits for specified event when a thread that triggers event can't signal
- * Also, waits *at_least* `timeinc` after condition is satisfied
- */
-#define	timed_wait_for(timeinc, condition)			\
-	do {							\
-		int completed = 0;				\
-		do {						\
-			unsigned long	j;			\
-			int	done = 0;			\
-								\
-			completed = (condition);		\
-			for (j = jiffies, done = 0; !done; ) {	\
-				schedule_timeout(timeinc);	\
-				if (time_is_before_eq_jiffies(j + timeinc)) \
-					done = 1;		\
-			}					\
-		} while (!(completed));				\
-	} while (0)
-
-
-/*
  * Waits for specified event when a thread that triggers event
  * can't signal with timeout (use whenever we may hang)
  */
Signature · 1 line
2.7.4
Acked-by Srinivas Pandruvada on v1 1/3
#1 lore raw
Quoted 4 lines · Even Xu

The macro timed_wait_for() in utils.h isn't used in current ipc driver, so remove it for avoiding confusion.

Quoted 46 lines

---
 drivers/hid/intel-ish-hid/ipc/utils.h | 21 ---------------------

 1 file changed, 21 deletions(-)
drivers/hid/intel-ish-hid/ipc/utils.h +0 -0
index 5a82123..dc39dfe 100644
@@ -19,27 +19,6 @@
  #define	WAIT_FOR_CONNECT_SLICE	(HZ / 10)


 /*
- * Waits for specified event when a thread that triggers event can't signal
- * Also, waits *at_least* timeinc after condition is satisfied
- */
-#define timed_wait_for(timeinc, condition)
\

drivers/hid/intel-ish-hid/ipc/utils.h +0 -1
-	do {							

\

drivers/hid/intel-ish-hid/ipc/utils.h +0 -2
-		int completed = 0;				\
-		do {						

\

drivers/hid/intel-ish-hid/ipc/utils.h +0 -1
-			unsigned long	j;			

\

drivers/hid/intel-ish-hid/ipc/utils.h +0 -1
-			int	done = 0;			

\

drivers/hid/intel-ish-hid/ipc/utils.h +0 -3
-								\
-			completed = (condition);		\
-			for (j = jiffies, done = 0; !done; ) {	

\

drivers/hid/intel-ish-hid/ipc/utils.h +0 -2
-				schedule_timeout(timeinc);	\
-				if (time_is_before_eq_jiffies(j +

timeinc)) \

drivers/hid/intel-ish-hid/ipc/utils.h +0 -3
-					done = 1;		\
-			}					\
-		} while (!(completed));				

\

drivers/hid/intel-ish-hid/ipc/utils.h +0 -4
-	} while (0)
-
-
-/*

  * Waits for specified event when a thread that triggers event
  * can't signal with timeout (use whenever we may hang) */