Skip to contentSkip to conversation

btree: Export btree_get_prev() so modules can use btree_for_each

PATCH In review Roland Dreier 2 participants 3 messages Dec 28, 2011 – Jan 1, 2012 1 message not in the archive Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btree: Export btree_get_prev() so modules can use btree_for_each

From: Steve Hodgson <[email protected]>

The btree_for_each API is implemented with macros that internally call btree_get_prev(), so if btree_get_prev() isn't exported then modules fail to link if they try to use one of the btree_for_each macros. Since the rest of the btree API is exported, we should keep things orthogonal and make this work too.

---
 lib/btree.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
lib/btree.c +1 -0
index 2a34392..e5ec1e9 100644
@@ -357,6 +357,7 @@ miss:
 	}
 	return NULL;
 }
+EXPORT_SYMBOL_GPL(btree_get_prev);
 
 static int getpos(struct btree_geo *geo, unsigned long *node,
 		unsigned long *key)
Signature · 1 line
1.7.5.4
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Roland Dreier

From: Steve Hodgson <[email protected]>

The btree_for_each API is implemented with macros that internally call btree_get_prev(), so if btree_get_prev() isn't exported then modules fail to link if they try to use one of the btree_for_each macros. Since the rest of the btree API is exported, we should keep things orthogonal and make this work too.

Quoted 19 lines
---
 lib/btree.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
lib/btree.c +1 -0
index 2a34392..e5ec1e9 100644
@@ -357,6 +357,7 @@ miss:
 	}
 	return NULL;
 }
+EXPORT_SYMBOL_GPL(btree_get_prev);
 
 static int getpos(struct btree_geo *geo, unsigned long *node,
 		unsigned long *key)
Signature · 1 line
1.7.5.4

Jörn

Signature · 2 lines
"Error protection by error detection and correction."
-- from a university class
#3 lore raw
In reply to a message not in the archive
Quoted 4 lines · Steve Hodgson
Signed-off-by Steve Hodgson

Or you would prefer the patch is resent with my Sign-off in the commit message?

A properly formed S-o-b line has the email address too... but in any case I don't think it should be necessary in this case. First of all the patch is a pretty trivial one-liner... but in any case as I understand things I should be able to submit patches from our company's internal tree and both preserve authorship (ie "From: Steve") but also be the first person sending it out.

Looking at "Developer's Certificate of Origin 1.1" in SubmittingPatches, I guess I am certifying (b), ie

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(Since I actually did write the changelog for the patch)

- R.