Skip to contentSkip to conversation

percpu_ida: Removing unused arguement from alloc_local_tag

PATCH In review Nick Swenson 2 participants 2 messages Oct 3, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 percpu_ida: Removing unused arguement from alloc_local_tag

Removing unused struct percpu_ida *pool from arguemnts of alloc_local_tag, changed it's one use in idr.c

---
 lib/idr.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
lib/idr.c +2 -3
index 26495e1..86e8f73 100644
@@ -1254,8 +1254,7 @@ static inline void alloc_global_tags(struct percpu_ida *pool,
 		  min(pool->nr_free, IDA_PCPU_BATCH_MOVE));
 }
 
-static inline unsigned alloc_local_tag(struct percpu_ida *pool,
-				       struct percpu_ida_cpu *tags)
+static inline unsigned alloc_local_tag(struct percpu_ida_cpu *tags)
 {
 	int tag = -ENOSPC;
 
@@ -1291,7 +1290,7 @@ int percpu_ida_alloc(struct percpu_ida *pool, gfp_t gfp)
 	tags = this_cpu_ptr(pool->tag_cpu);
 
 	/* Fastpath */
-	tag = alloc_local_tag(pool, tags);
+	tag = alloc_local_tag(tags);
 	if (likely(tag >= 0)) {
 		local_irq_restore(flags);
 		return tag;
Signature · 1 line
1.8.4.rc3
#1 lore raw
Quoted 5 lines · Nick Swenson

Removing unused struct percpu_ida *pool from arguemnts of alloc_local_tag, changed it's one use in idr.c

---

Nice patch, but the upstream version of percpu_ida lives in lib/percpu_ida.c, and not lib/idr.c. :-)

Soooo, modified your patch to use this location instead, and applied target-pending/for-next.

Thanks!

--nab

Quoted 26 lines
 lib/idr.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
lib/idr.c +2 -3
index 26495e1..86e8f73 100644
@@ -1254,8 +1254,7 @@ static inline void alloc_global_tags(struct percpu_ida *pool,
 		  min(pool->nr_free, IDA_PCPU_BATCH_MOVE));
 }
 
-static inline unsigned alloc_local_tag(struct percpu_ida *pool,
-				       struct percpu_ida_cpu *tags)
+static inline unsigned alloc_local_tag(struct percpu_ida_cpu *tags)
 {
 	int tag = -ENOSPC;
 
@@ -1291,7 +1290,7 @@ int percpu_ida_alloc(struct percpu_ida *pool, gfp_t gfp)
 	tags = this_cpu_ptr(pool->tag_cpu);
 
 	/* Fastpath */
-	tag = alloc_local_tag(pool, tags);
+	tag = alloc_local_tag(tags);
 	if (likely(tag >= 0)) {
 		local_irq_restore(flags);
 		return tag;