Skip to content

Commit 479d26e

Browse files
Dr. David Alan Gilbertakpm00
authored andcommitted
lib/oid_registry.c: remove unused sprint_OID
sprint_OID() was added as part of 2012's commit 4f73175 ("X.509: Add utility functions to render OIDs as strings") but it hasn't been used. Remove it. Note that there's also 'sprint_oid' (lower case) which is used in a lot of places; that's left as is except for fixing its case in a comment. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 8e39fbb commit 479d26e

File tree

2 files changed

+1
-25
lines changed

2 files changed

+1
-25
lines changed

include/linux/oid_registry.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,5 @@ enum OID {
151151
extern enum OID look_up_OID(const void *data, size_t datasize);
152152
extern int parse_OID(const void *data, size_t datasize, enum OID *oid);
153153
extern int sprint_oid(const void *, size_t, char *, size_t);
154-
extern int sprint_OID(enum OID, char *, size_t);
155154

156155
#endif /* _LINUX_OID_REGISTRY_H */

lib/oid_registry.c

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ int parse_OID(const void *data, size_t datasize, enum OID *oid)
117117
EXPORT_SYMBOL_GPL(parse_OID);
118118

119119
/*
120-
* sprint_OID - Print an Object Identifier into a buffer
120+
* sprint_oid - Print an Object Identifier into a buffer
121121
* @data: The encoded OID to print
122122
* @datasize: The size of the encoded OID
123123
* @buffer: The buffer to render into
@@ -173,26 +173,3 @@ int sprint_oid(const void *data, size_t datasize, char *buffer, size_t bufsize)
173173
return -EBADMSG;
174174
}
175175
EXPORT_SYMBOL_GPL(sprint_oid);
176-
177-
/**
178-
* sprint_OID - Print an Object Identifier into a buffer
179-
* @oid: The OID to print
180-
* @buffer: The buffer to render into
181-
* @bufsize: The size of the buffer
182-
*
183-
* The OID is rendered into the buffer in "a.b.c.d" format and the number of
184-
* bytes is returned.
185-
*/
186-
int sprint_OID(enum OID oid, char *buffer, size_t bufsize)
187-
{
188-
int ret;
189-
190-
BUG_ON(oid >= OID__NR);
191-
192-
ret = sprint_oid(oid_data + oid_index[oid],
193-
oid_index[oid + 1] - oid_index[oid],
194-
buffer, bufsize);
195-
BUG_ON(ret == -EBADMSG);
196-
return ret;
197-
}
198-
EXPORT_SYMBOL_GPL(sprint_OID);

0 commit comments

Comments
 (0)