All of lore.kernel.org
 help / color / mirror / Atom feed
* [hare-scsi-devel:auth.v2 3/12] lib/base64.c:27:5: warning: no previous prototype for 'base64_encode'
@ 2021-07-12 18:29 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-07-12 18:29 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 3340 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git auth.v2
head:   9107ea4a3526c6801b38b7a2345b7372278a35ba
commit: 245c033d4a03bc806ab510cf072583c9076eb9d2 [3/12] lib/base64: RFC4648-compliant base64 encoding
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commit/?id=245c033d4a03bc806ab510cf072583c9076eb9d2
        git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
        git fetch --no-tags hare-scsi-devel auth.v2
        git checkout 245c033d4a03bc806ab510cf072583c9076eb9d2
        # save the attached .config to linux build tree
        make W=1 ARCH=um SUBARCH=x86_64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> lib/base64.c:27:5: warning: no previous prototype for 'base64_encode' [-Wmissing-prototypes]
      27 | int base64_encode(const u8 *src, int len, char *dst)
         |     ^~~~~~~~~~~~~
>> lib/base64.c:74:5: warning: no previous prototype for 'base64_decode' [-Wmissing-prototypes]
      74 | int base64_decode(const char *src, int len, u8 *dst)
         |     ^~~~~~~~~~~~~


vim +/base64_encode +27 lib/base64.c

    12	
    13	static const char lookup_table[65] =
    14		"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    15	
    16	/**
    17	 * base64_encode() - base64-encode some bytes
    18	 * @src: the bytes to encode
    19	 * @len: number of bytes to encode
    20	 * @dst: (output) the base64-encoded string.  Not NUL-terminated.
    21	 *
    22	 * Encodes the input string using characters from the set [A-Za-z0-9+,].
    23	 * The encoded string is roughly 4/3 times the size of the input string.
    24	 *
    25	 * Return: length of the encoded string
    26	 */
  > 27	int base64_encode(const u8 *src, int len, char *dst)
    28	{
    29		int i, bits = 0;
    30		u32 ac = 0;
    31		char *cp = dst;
    32	
    33		for (i = 0; i < len; i++) {
    34			ac = (ac << 8) | src[i];
    35			bits += 8;
    36			if (bits < 24)
    37				continue;
    38			do {
    39				bits -= 6;
    40				*cp++ = lookup_table[(ac >> bits) & 0x3f];
    41			} while (bits);
    42			ac = 0;
    43		}
    44		if (bits) {
    45			int more = 0;
    46	
    47			if (bits < 16)
    48				more = 2;
    49			ac = (ac << (2 + more));
    50			bits += (2 + more);
    51			do {
    52				bits -= 6;
    53				*cp++ = lookup_table[(ac >> bits) & 0x3f];
    54			} while (bits);
    55			*cp++ = '=';
    56			if (more)
    57				*cp++ = '=';
    58		}
    59	
    60		return cp - dst;
    61	}
    62	EXPORT_SYMBOL_GPL(base64_encode);
    63	
    64	/**
    65	 * base64_decode() - base64-decode some bytes
    66	 * @src: the base64-encoded string to decode
    67	 * @len: number of bytes to decode
    68	 * @dst: (output) the decoded bytes.
    69	 *
    70	 * Decodes the base64-encoded bytes @src according to RFC 4648.
    71	 *
    72	 * Return: number of decoded bytes
    73	 */
  > 74	int base64_decode(const char *src, int len, u8 *dst)

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 8647 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [hare-scsi-devel:auth.v2 3/12] lib/base64.c:27:5: warning: no previous prototype for 'base64_encode'
@ 2021-07-12 18:29 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-07-12 18:29 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3437 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git auth.v2
head:   9107ea4a3526c6801b38b7a2345b7372278a35ba
commit: 245c033d4a03bc806ab510cf072583c9076eb9d2 [3/12] lib/base64: RFC4648-compliant base64 encoding
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commit/?id=245c033d4a03bc806ab510cf072583c9076eb9d2
        git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
        git fetch --no-tags hare-scsi-devel auth.v2
        git checkout 245c033d4a03bc806ab510cf072583c9076eb9d2
        # save the attached .config to linux build tree
        make W=1 ARCH=um SUBARCH=x86_64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> lib/base64.c:27:5: warning: no previous prototype for 'base64_encode' [-Wmissing-prototypes]
      27 | int base64_encode(const u8 *src, int len, char *dst)
         |     ^~~~~~~~~~~~~
>> lib/base64.c:74:5: warning: no previous prototype for 'base64_decode' [-Wmissing-prototypes]
      74 | int base64_decode(const char *src, int len, u8 *dst)
         |     ^~~~~~~~~~~~~


vim +/base64_encode +27 lib/base64.c

    12	
    13	static const char lookup_table[65] =
    14		"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    15	
    16	/**
    17	 * base64_encode() - base64-encode some bytes
    18	 * @src: the bytes to encode
    19	 * @len: number of bytes to encode
    20	 * @dst: (output) the base64-encoded string.  Not NUL-terminated.
    21	 *
    22	 * Encodes the input string using characters from the set [A-Za-z0-9+,].
    23	 * The encoded string is roughly 4/3 times the size of the input string.
    24	 *
    25	 * Return: length of the encoded string
    26	 */
  > 27	int base64_encode(const u8 *src, int len, char *dst)
    28	{
    29		int i, bits = 0;
    30		u32 ac = 0;
    31		char *cp = dst;
    32	
    33		for (i = 0; i < len; i++) {
    34			ac = (ac << 8) | src[i];
    35			bits += 8;
    36			if (bits < 24)
    37				continue;
    38			do {
    39				bits -= 6;
    40				*cp++ = lookup_table[(ac >> bits) & 0x3f];
    41			} while (bits);
    42			ac = 0;
    43		}
    44		if (bits) {
    45			int more = 0;
    46	
    47			if (bits < 16)
    48				more = 2;
    49			ac = (ac << (2 + more));
    50			bits += (2 + more);
    51			do {
    52				bits -= 6;
    53				*cp++ = lookup_table[(ac >> bits) & 0x3f];
    54			} while (bits);
    55			*cp++ = '=';
    56			if (more)
    57				*cp++ = '=';
    58		}
    59	
    60		return cp - dst;
    61	}
    62	EXPORT_SYMBOL_GPL(base64_encode);
    63	
    64	/**
    65	 * base64_decode() - base64-decode some bytes
    66	 * @src: the base64-encoded string to decode
    67	 * @len: number of bytes to decode
    68	 * @dst: (output) the decoded bytes.
    69	 *
    70	 * Decodes the base64-encoded bytes @src according to RFC 4648.
    71	 *
    72	 * Return: number of decoded bytes
    73	 */
  > 74	int base64_decode(const char *src, int len, u8 *dst)

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 8647 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-12 18:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12 18:29 [hare-scsi-devel:auth.v2 3/12] lib/base64.c:27:5: warning: no previous prototype for 'base64_encode' kernel test robot
2021-07-12 18:29 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.