Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp66176rdh; Wed, 22 Nov 2023 18:39:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IEpF+4l5MUxsy6czdx07tZksCarG39ZIfv9AZYKCut3KlJO24YzSvVlkCP+blbxvxO7TN8k X-Received: by 2002:a17:902:d48c:b0:1cf:6da2:dc22 with SMTP id c12-20020a170902d48c00b001cf6da2dc22mr4515255plg.3.1700707151713; Wed, 22 Nov 2023 18:39:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700707151; cv=none; d=google.com; s=arc-20160816; b=KUUuTHKZ866j84r0zfDquhIbP7OSSB9M9aG0V/S4x2pJMKUp6vI8Xi1EkfAS+67BEi Im5jATTu6m++Sv95bBVXAAGRxmsvGHuWmPI5jwsHcA3Q+kobVt2JFZKBehgY+IfD6EAi d2wISnc8v93C2x2EjtoTXsKFrkefnvDurZqBCWeacdjDZbdgyafOqTUfERGMy1fDhDAE ZR8WnLN5O691dfMt8ebZa0N4mkmaOHmVJDmcyP9iKnYn1uSIKktfk4v+rAXS5eoRV5XG 1rvLo2boLC/lvmqdEG6LdnbjhUhtO0q9synFNTh/tptATqEX57Tzz6/g9jqVldtf7PTh 2jzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5/OrD5ToJygv64xhTfyGIg75wr1DzpRCxvHEaEYFa8E=; fh=bkTPCeKyWVP/CPj7i96m6RT3H9+gPlTFwHeV4FGq/BQ=; b=kpeKJCznUJcDjtxbRGqNQVMjYDVmTy6Z0AU19CR6GM3yjAfCuqpOKB9d1hxjqlAJGO ckUkHkV/WSD8ySeKMhoQZaeDfBts4rEF+XDd/odhcLtsjeJBlvZ5RQNGZOvGmS2/zRY8 uLGyLss6d/yu9o8kgqJmTzdmtPoG/2Ap2+sxYXJ9RF2yJ2PcFWYni4wgl5RKSSaII4To p4WO1b3NWRdxmoQCsP0OzSte2pO9fRAF3SluBvRh5ZcmSnf3Txk6N47hd1xITTjATG3p s78AVCGWCBiZBujejXjbskchaGvt+JGPj6dUqAsclIVsxk2QusYxquuC9eGMf9BERdUn zwew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cyvtGX5G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id e10-20020a170902b78a00b001cf5c997609si196866pls.569.2023.11.22.18.39.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 18:39:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cyvtGX5G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id EC274837FA27; Wed, 22 Nov 2023 18:39:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234755AbjKWBzm (ORCPT + 99 others); Wed, 22 Nov 2023 20:55:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232653AbjKWBzU (ORCPT ); Wed, 22 Nov 2023 20:55:20 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71FACD60 for ; Wed, 22 Nov 2023 17:55:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700704515; x=1732240515; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Tv124qrk/IgCGAlbtvyJsHJxF3modJvGb4pfuyL/oPc=; b=cyvtGX5GIQCeaQ3GSqD7u4bcH6MME83f2Xkziuhp5YTS9VcLS/cqH+Ai Aym4oQqmYofTJa2ilwcI679NDiPZ4/IrN9uKM49n9XFHEsNrMh6klb8YF jNgLN/aKWbI5OAHy7GKsprpneD1V8xjN1JTBXDU4Xcm2GWm+OxRmu57P7 hPqvJGXjz9sko0cXiGiwjMmjeyXxpQtRCKA2EYNaumHBluCB1aYZnV3Mi uFXR0OBzugvdmvehWFNfyqoiuz4JCdUQ56d18079OaXjueR7LbUrLkVJD iH7GY5V4D5R6WeizDYTCNxBOQOsBDOKgyfslzVg8qX9wEukwZDuhSqno0 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="13737185" X-IronPort-AV: E=Sophos;i="6.04,220,1695711600"; d="scan'208";a="13737185" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2023 17:55:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="801909598" X-IronPort-AV: E=Sophos;i="6.04,220,1695711600"; d="scan'208";a="801909598" Received: from lkp-server01.sh.intel.com (HELO d584ee6ebdcc) ([10.239.97.150]) by orsmga001.jf.intel.com with ESMTP; 22 Nov 2023 17:55:12 -0800 Received: from kbuild by d584ee6ebdcc with local (Exim 4.96) (envelope-from ) id 1r5yvu-00016N-0q; Thu, 23 Nov 2023 01:55:10 +0000 Date: Thu, 23 Nov 2023 09:54:38 +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: <202311230538.6Fd2FqkL-lkp@intel.com> References: <20231122032518.53305-1-jiapeng.chong@linux.alibaba.com> 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> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 22 Nov 2023 18:39:09 -0800 (PST) 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-001-20231122 (https://download.01.org/0day-ci/archive/20231123/202311230538.6Fd2FqkL-lkp@intel.com/config) compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231123/202311230538.6Fd2FqkL-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/202311230538.6Fd2FqkL-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 [-Werror,-Wimplicit-function-declaration] 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 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