Skip to contentSkip to conversation

#if 0 aoedev_isbusy()

PATCH In review Adrian Bunk 3 participants 5 messages Feb 13, 2008 – Feb 14, 2008

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

PATCH 1/1 #if 0 aoedev_isbusy()

This patch #if 0's the no longer used aoedev_isbusy().

---

 drivers/block/aoe/aoe.h    |    1 -
 drivers/block/aoe/aoedev.c |    2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

3a516f0cdfe99486288c8379714dc17aa2c0d4b4 diff --git a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h index 280e71e..5b4c6e6 100644

drivers/block/aoe/aoe.h +0 -1
@@ -195,7 +195,6 @@ void aoedev_exit(void);
 struct aoedev *aoedev_by_aoeaddr(int maj, int min);
 struct aoedev *aoedev_by_sysminor_m(ulong sysminor);
 void aoedev_downdev(struct aoedev *d);
-int aoedev_isbusy(struct aoedev *d);
 int aoedev_flush(const char __user *str, size_t size);
 
 int aoenet_init(void);
drivers/block/aoe/aoedev.c +2 -0
index f9a1cd9..2f481d9 100644
@@ -18,6 +18,7 @@ static void skbpoolfree(struct aoedev *d);
 static struct aoedev *devlist;
 static DEFINE_SPINLOCK(devlist_lock);
 
+#if 0
 int
 aoedev_isbusy(struct aoedev *d)
 {
@@ -35,6 +36,7 @@ aoedev_isbusy(struct aoedev *d)
 	}
 	return 0;
 }
+#endif  /*  0  */
 
 struct aoedev *
 aoedev_by_aoeaddr(int maj, int min)
#1 lore raw
Quoted 2 lines · Adrian Bunk

This patch #if 0's the no longer used aoedev_isbusy().

Why not just remove it? (It can be resurrected from earlier revisions should it be needed again.)

#2 lore raw
Quoted 7 lines · Jan Engelhardt
Quoted 2 lines · Adrian Bunk

This patch #if 0's the no longer used aoedev_isbusy().

Why not just remove it? (It can be resurrected from earlier revisions should it be needed again.)

I've switched to doing #if 0 instead since this addresses the "It might be needed in the future." answer I otherwise sometimes got.

But if a maintainer wants to have such a function deleted instead that's fine with me.

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#3 lore raw
Quoted 9 lines · Adrian Bunk
Quoted 7 lines · Jan Engelhardt
Quoted 2 lines · Adrian Bunk

This patch #if 0's the no longer used aoedev_isbusy().

Why not just remove it? (It can be resurrected from earlier revisions should it be needed again.)

Quoted 6 lines

I've switched to doing #if 0 instead since this addresses the "It might be needed in the future." answer I otherwise sometimes got.

But if a maintainer wants to have such a function deleted instead that's fine with me.

Hello. That function can go away. I have some changes pending, but none of them use aoedev_isbusy. Thanks for Cc-ing me.

Signature · 1 line
  Ed L Cashin <[email protected]>
#4 lore raw

PATCH 1/1 remove aoedev_isbusy()

Quoted 14 lines · Ed L. Cashin
Quoted 13 lines · Adrian Bunk
Quoted 7 lines · Jan Engelhardt
Quoted 2 lines · Adrian Bunk

This patch #if 0's the no longer used aoedev_isbusy().

Why not just remove it? (It can be resurrected from earlier revisions should it be needed again.)

I've switched to doing #if 0 instead since this addresses the "It might be needed in the future." answer I otherwise sometimes got.

Quoted 5 lines
Quoted 2 lines

But if a maintainer wants to have such a function deleted instead that's fine with me.

Hello. That function can go away. I have some changes pending, but none of them use aoedev_isbusy. Thanks for Cc-ing me.

Updated patch below

cu
Adrian

<-- snip -->

This patch removes the no longer used aoedev_isbusy().

---

 drivers/block/aoe/aoe.h    |    1 -
 drivers/block/aoe/aoedev.c |   18 ------------------
 2 files changed, 19 deletions(-)

13d7ce5f6fa02341f1642f684847ce409bbd5b1d diff --git a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h index 280e71e..5b4c6e6 100644

drivers/block/aoe/aoe.h +0 -1
@@ -195,7 +195,6 @@ void aoedev_exit(void);
 struct aoedev *aoedev_by_aoeaddr(int maj, int min);
 struct aoedev *aoedev_by_sysminor_m(ulong sysminor);
 void aoedev_downdev(struct aoedev *d);
-int aoedev_isbusy(struct aoedev *d);
 int aoedev_flush(const char __user *str, size_t size);
 
 int aoenet_init(void);
drivers/block/aoe/aoedev.c +0 -18
index f9a1cd9..a1d813a 100644
@@ -18,24 +18,6 @@ static void skbpoolfree(struct aoedev *d);
 static struct aoedev *devlist;
 static DEFINE_SPINLOCK(devlist_lock);
 
-int
-aoedev_isbusy(struct aoedev *d)
-{
-	struct aoetgt **t, **te;
-	struct frame *f, *e;
-
-	t = d->targets;
-	te = t + NTARGETS;
-	for (; t < te && *t; t++) {
-		f = (*t)->frames;
-		e = f + (*t)->nframes;
-		for (; f < e; f++)
-			if (f->tag != FREETAG)
-				return 1;
-	}
-	return 0;
-}
-
 struct aoedev *
 aoedev_by_aoeaddr(int maj, int min)
 {