Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lib/oid_registry.c: remove unused sprint_OID

sprint_OID() was added as part of 2012's commit 4f73175d0375 ("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/20250501010502.326472-1-linux@treblig.org
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Dr. David Alan Gilbert and committed by
Andrew Morton
479d26ee 8e39fbb1

+1 -25
-1
include/linux/oid_registry.h
··· 151 151 extern enum OID look_up_OID(const void *data, size_t datasize); 152 152 extern int parse_OID(const void *data, size_t datasize, enum OID *oid); 153 153 extern int sprint_oid(const void *, size_t, char *, size_t); 154 - extern int sprint_OID(enum OID, char *, size_t); 155 154 156 155 #endif /* _LINUX_OID_REGISTRY_H */
+1 -24
lib/oid_registry.c
··· 117 117 EXPORT_SYMBOL_GPL(parse_OID); 118 118 119 119 /* 120 - * sprint_OID - Print an Object Identifier into a buffer 120 + * sprint_oid - Print an Object Identifier into a buffer 121 121 * @data: The encoded OID to print 122 122 * @datasize: The size of the encoded OID 123 123 * @buffer: The buffer to render into ··· 173 173 return -EBADMSG; 174 174 } 175 175 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);