From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 40BB1C61D99 for ; Wed, 22 Nov 2023 23:32:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PmaGiJh0A1q1SxLyW6xtU9IH4tk1nIqec6xkOQNy8L4=; b=4H37A1MaU9iy5s 2CoP7yeUNHlSvb2TbVwsa3l2Yvg5XpOYUxh7xQ0n+0rAHEMp5lPef6DJsy+Q8WBQGsAyYxoHHsrWs MgNNf9uYO1vGE+SBaFmJNzGhnHunlKj1IfP1xcgUq5tKZ8UZpD6q7PZ3B8EyXv25yV0s/pYbo8Sei DgFqhrmYZKh1Gjh9aawaMCwpe6/yd1aDZOfBD4d992K51Gaz+CzCo01HLWqqWrl2Y5R9h9kQfPf9L sCB5pkS078I+VS8ZDegaVycajPasLuVvanbbzRij5og1wsbRGZLN2UlpmExPvePAw2eXGiW/tnumk XILR+BXNr+L1lId9ektg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r5wi2-003Jn5-1I; Wed, 22 Nov 2023 23:32:42 +0000 Received: from mgamail.intel.com ([192.55.52.115]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r5why-003Jkd-25 for linux-um@lists.infradead.org; Wed, 22 Nov 2023 23:32:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700695958; x=1732231958; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=9cJ1ng2mXXK5ewpNB6+ptRqyDKNDtSOkI0dhJ9ArZGk=; b=I/n4j+4XTXto0wbfoO+8YjKMVntVcRBuibpf/3wrqSB1C4YDvl4JD0YD BJ4gM6VJDjyiFzEebhPXmBZhY+fNNRQWnH4SjW4KInMfPIISIPx7i3YGH MZitEs1B8GlCQVM8MNwyFtZvu063KN7h3nbTL7WbNJLVACcgiJ7NCY4hB M5RTmTWWFZht5qSj444GfW/Sj9zr1aRMt8YWx/msAGS18Ddyt9gt7sk3e 8HmD8gq4KeCVMA2YxKjA0IoJOG9bCOdMFG1cbqh8L5x1kizELaSP20pY7 5+YJYIJDWPRhgWmotEUtmkY2qXzKd9uYSHQpJbh/8oAHlfyuJO5vXIJrN g==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="391936053" X-IronPort-AV: E=Sophos;i="6.04,219,1695711600"; d="scan'208";a="391936053" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2023 15:32:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="760510883" X-IronPort-AV: E=Sophos;i="6.04,219,1695711600"; d="scan'208";a="760510883" Received: from lkp-server01.sh.intel.com (HELO d584ee6ebdcc) ([10.239.97.150]) by orsmga007.jf.intel.com with ESMTP; 22 Nov 2023 15:32:34 -0800 Received: from kbuild by d584ee6ebdcc with local (Exim 4.96) (envelope-from ) id 1r5whs-0000zI-0s; Wed, 22 Nov 2023 23:32:32 +0000 Date: Thu, 23 Nov 2023 07:32:24 +0800 From: kernel test robot To: Jiapeng Chong , 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 , Abaci Robot Subject: Re: [PATCH] um: Use swap() instead of open coding it Message-ID: <202311230408.bRL1q7pc-lkp@intel.com> References: <20231122032518.53305-1-jiapeng.chong@linux.alibaba.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231122032518.53305-1-jiapeng.chong@linux.alibaba.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231122_153238_693339_CA254EE2 X-CRM114-Status: GOOD ( 14.17 ) X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" Errors-To: linux-um-bounces+linux-um=archiver.kernel.org@lists.infradead.org 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 | 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 _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 02A3A208B9; Wed, 22 Nov 2023 23:32:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ACSoMv3z" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700695959; x=1732231959; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=9cJ1ng2mXXK5ewpNB6+ptRqyDKNDtSOkI0dhJ9ArZGk=; b=ACSoMv3zVynkrbqO6UDUZgTOvWVYRVNViGXALHmQ0B+lZZM1MFo71WSe UiU878ZrLaaZApZBvsXsnGYwOdIuqP9FPHWimzgNrPdGaaFlvON77GE5+ cBSGmwOif7Bxx6W5Ms0/9efOls1rEl06tX8O2Ns7fzzyw7BgxEh/rw1t6 Had8gwYhVmwJUMIe1BPaRhZxfgYCnyV7cUL8sRihte2P/hl7jchN2hSGk /ItsYEJW7M3+9++u6HtI1QIsTj4KPqBEdG4nr06AVq0nRMBWI6FkNX8tH Oyu8p1vsd9q7uZ/OLj2u6umhPmLfFTj3AqGJjku5lBk2tHF6kfjQa3zz8 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="391936057" X-IronPort-AV: E=Sophos;i="6.04,219,1695711600"; d="scan'208";a="391936057" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2023 15:32:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="760510883" X-IronPort-AV: E=Sophos;i="6.04,219,1695711600"; d="scan'208";a="760510883" Received: from lkp-server01.sh.intel.com (HELO d584ee6ebdcc) ([10.239.97.150]) by orsmga007.jf.intel.com with ESMTP; 22 Nov 2023 15:32:34 -0800 Received: from kbuild by d584ee6ebdcc with local (Exim 4.96) (envelope-from ) id 1r5whs-0000zI-0s; Wed, 22 Nov 2023 23:32:32 +0000 Date: Thu, 23 Nov 2023 07:32:24 +0800 From: kernel test robot To: Jiapeng Chong , 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 , Abaci Robot Subject: Re: [PATCH] um: Use swap() instead of open coding it Message-ID: <202311230408.bRL1q7pc-lkp@intel.com> References: <20231122032518.53305-1-jiapeng.chong@linux.alibaba.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 | 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