From: kernel test robot <lkp@intel.com>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>, richard@nod.at
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net,
linux-um@lists.infradead.org, linux-kernel@vger.kernel.org,
Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
Abaci Robot <abaci@linux.alibaba.com>
Subject: Re: [PATCH] um: Use swap() instead of open coding it
Date: Thu, 23 Nov 2023 07:32:24 +0800 [thread overview]
Message-ID: <202311230408.bRL1q7pc-lkp@intel.com> (raw)
In-Reply-To: <20231122032518.53305-1-jiapeng.chong@linux.alibaba.com>
Hi Jiapeng,
kernel test robot noticed the following build errors:
[auto build test ERROR on wireless-next/main]
[also build test ERROR on linus/master v6.7-rc2 next-20231122]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jiapeng-Chong/um-Use-swap-instead-of-open-coding-it/20231122-113031
base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link: https://lore.kernel.org/r/20231122032518.53305-1-jiapeng.chong%40linux.alibaba.com
patch subject: [PATCH] um: Use swap() instead of open coding it
config: um-randconfig-002-20231122 (https://download.01.org/0day-ci/archive/20231123/202311230408.bRL1q7pc-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231123/202311230408.bRL1q7pc-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311230408.bRL1q7pc-lkp@intel.com/
All errors (new ones prefixed by >>):
>> arch/um/os-Linux/sigio.c:80:5: error: call to undeclared function 'swap'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
80 | swap(current_poll, next_poll);
| ^
arch/um/os-Linux/sigio.c:80:5: note: did you mean 'swab'?
/usr/include/unistd.h:1168:13: note: 'swab' declared here
1168 | extern void swab (const void *__restrict __from, void *__restrict __to,
| ^
1 error generated.
vim +/swap +80 arch/um/os-Linux/sigio.c
50
51 static int write_sigio_thread(void *unused)
52 {
53 struct pollfds *fds;
54 struct pollfd *p;
55 int i, n, respond_fd;
56 char c;
57
58 os_fix_helper_signals();
59 fds = ¤t_poll;
60 while (1) {
61 n = poll(fds->poll, fds->used, -1);
62 if (n < 0) {
63 if (errno == EINTR)
64 continue;
65 printk(UM_KERN_ERR "write_sigio_thread : poll returned "
66 "%d, errno = %d\n", n, errno);
67 }
68 for (i = 0; i < fds->used; i++) {
69 p = &fds->poll[i];
70 if (p->revents == 0)
71 continue;
72 if (p->fd == sigio_private[1]) {
73 CATCH_EINTR(n = read(sigio_private[1], &c,
74 sizeof(c)));
75 if (n != sizeof(c))
76 printk(UM_KERN_ERR
77 "write_sigio_thread : "
78 "read on socket failed, "
79 "err = %d\n", errno);
> 80 swap(current_poll, next_poll);
81 respond_fd = sigio_private[1];
82 }
83 else {
84 respond_fd = write_sigio_fds[1];
85 fds->used--;
86 memmove(&fds->poll[i], &fds->poll[i + 1],
87 (fds->used - i) * sizeof(*fds->poll));
88 }
89
90 CATCH_EINTR(n = write(respond_fd, &c, sizeof(c)));
91 if (n != sizeof(c))
92 printk(UM_KERN_ERR "write_sigio_thread : "
93 "write on socket failed, err = %d\n",
94 errno);
95 }
96 }
97
98 return 0;
99 }
100
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-11-22 23:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 3:25 [PATCH] um: Use swap() instead of open coding it Jiapeng Chong
2023-11-22 7:25 ` Johannes Berg
2023-11-22 23:32 ` kernel test robot [this message]
2023-11-23 1:54 ` kernel test robot
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=202311230408.bRL1q7pc-lkp@intel.com \
--to=lkp@intel.com \
--cc=abaci@linux.alibaba.com \
--cc=anton.ivanov@cambridgegreys.com \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=richard@nod.at \
/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