From: kernel test robot <lkp@intel.com>
To: "Jason A. Donenfeld" <zx2c4@kernel.org>
Cc: kbuild-all@lists.01.org, build@wireguard.com,
linux-kernel@vger.kernel.org
Subject: [zx2c4-wireguard:jd/new-archs 3/9] arch/um/drivers/tty.c:26:24: error: 'NULL' undeclared
Date: Thu, 14 Jul 2022 18:11:09 +0800 [thread overview]
Message-ID: <202207141802.1bmhOfxR-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/zx2c4/wireguard-linux.git jd/new-archs
head: b41a21fc924011fb4c7463c8b7b4761dc798e795
commit: 2c1370ee8e1c862e1de8c624d7900d575a131150 [3/9] um: include sys/types.h instead of stddef.h for size_t
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20220714/202207141802.1bmhOfxR-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/zx2c4/wireguard-linux.git/commit/?id=2c1370ee8e1c862e1de8c624d7900d575a131150
git remote add zx2c4-wireguard https://git.kernel.org/pub/scm/linux/kernel/git/zx2c4/wireguard-linux.git
git fetch --no-tags zx2c4-wireguard jd/new-archs
git checkout 2c1370ee8e1c862e1de8c624d7900d575a131150
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=um SUBARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
arch/um/drivers/tty.c: In function 'tty_chan_init':
>> arch/um/drivers/tty.c:26:24: error: 'NULL' undeclared (first use in this function)
26 | return NULL;
| ^~~~
arch/um/drivers/tty.c:12:1: note: 'NULL' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
11 | #include <um_malloc.h>
+++ |+#include <stddef.h>
12 |
arch/um/drivers/tty.c:26:24: note: each undeclared identifier is reported only once for each function it appears in
26 | return NULL;
| ^~~~
--
arch/um/drivers/cow_user.c: In function 'read_cow_header':
>> arch/um/drivers/cow_user.c:296:17: error: implicit declaration of function 'offsetof' [-Werror=implicit-function-declaration]
296 | if (n < offsetof(typeof(header->v1), backing_file)) {
| ^~~~~~~~
arch/um/drivers/cow_user.c:17:1: note: 'offsetof' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
16 | #include "cow_sys.h"
+++ |+#include <stddef.h>
17 |
>> arch/um/drivers/cow_user.c:296:26: error: expected expression before 'typeof'
296 | if (n < offsetof(typeof(header->v1), backing_file)) {
| ^~~~~~
cc1: some warnings being treated as errors
vim +/NULL +26 arch/um/drivers/tty.c
^1da177e4c3f415 Linus Torvalds 2005-04-16 18
5e7672ec3f059f7 Jeff Dike 2006-09-27 19 static void *tty_chan_init(char *str, int device, const struct chan_opts *opts)
^1da177e4c3f415 Linus Torvalds 2005-04-16 20 {
^1da177e4c3f415 Linus Torvalds 2005-04-16 21 struct tty_chan *data;
^1da177e4c3f415 Linus Torvalds 2005-04-16 22
^1da177e4c3f415 Linus Torvalds 2005-04-16 23 if (*str != ':') {
e99525f97069004 Jeff Dike 2007-10-16 24 printk(UM_KERN_ERR "tty_init : channel type 'tty' must specify "
^1da177e4c3f415 Linus Torvalds 2005-04-16 25 "a device\n");
108ffa8cbfa323d Jeff Dike 2006-07-10 @26 return NULL;
^1da177e4c3f415 Linus Torvalds 2005-04-16 27 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 28 str++;
^1da177e4c3f415 Linus Torvalds 2005-04-16 29
43f5b3085fdd27c Jeff Dike 2008-05-12 30 data = uml_kmalloc(sizeof(*data), UM_GFP_KERNEL);
^1da177e4c3f415 Linus Torvalds 2005-04-16 31 if (data == NULL)
108ffa8cbfa323d Jeff Dike 2006-07-10 32 return NULL;
^1da177e4c3f415 Linus Torvalds 2005-04-16 33 *data = ((struct tty_chan) { .dev = str,
^1da177e4c3f415 Linus Torvalds 2005-04-16 34 .raw = opts->raw });
^1da177e4c3f415 Linus Torvalds 2005-04-16 35
108ffa8cbfa323d Jeff Dike 2006-07-10 36 return data;
^1da177e4c3f415 Linus Torvalds 2005-04-16 37 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 38
:::::: The code at line 26 was first introduced by commit
:::::: 108ffa8cbfa323d462a2f4b49f38da3205d36e5a [PATCH] uml: formatting fixes
:::::: TO: Jeff Dike <jdike@addtoit.com>
:::::: CC: Linus Torvalds <torvalds@g5.osdl.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-07-14 10:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202207141802.1bmhOfxR-lkp@intel.com \
--to=lkp@intel.com \
--cc=build@wireguard.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zx2c4@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).