]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
lib/base64: fix copy-pasted @padding doc in base64_decode()
authorJosh Law <objecting@objecting.org>
Tue, 24 Mar 2026 22:32:10 +0000 (22:32 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 29 May 2026 04:24:43 +0000 (21:24 -0700)
The @padding kernel-doc for base64_decode() says "whether to append '='
padding characters", which was copy-pasted from base64_encode().  In the
decode context, it controls whether the input is expected to include
padding, not whether to append it.

Link: https://lore.kernel.org/20260324223210.47676-3-objecting@objecting.org
Signed-off-by: Josh Law <objecting@objecting.org>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/base64.c

index 20dacee25f65080b6d671d10d9cc6038f2842c87..325c7332b049288421bb8d059bfbe09c6e210492 100644 (file)
@@ -122,7 +122,7 @@ EXPORT_SYMBOL_GPL(base64_encode);
  * @src: the string to decode.  Doesn't need to be NUL-terminated.
  * @srclen: the length of @src in bytes
  * @dst: (output) the decoded binary data
- * @padding: whether to append '=' padding characters
+ * @padding: whether the input is expected to include '=' padding characters
  * @variant: which base64 variant to use
  *
  * Decodes a string using the selected Base64 variant.