From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 061CB173 for ; Wed, 19 Jan 2022 21:56:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642629367; x=1674165367; h=date:from:to:cc:subject:message-id:mime-version; bh=otFg3swqPlUELCxL5/8SOVueOWKX3jF6HqiI/xk8r4Q=; b=iuCBnd0tQv/7i/ckQQX1dSZEJQG3AUOf/58zXd+zeVKk8Xq83VT/AEor ur/lTIaa06Eg4+c1fsyuh6DdVrhfv4CRx0RNDI+5hpcJqtssaoubcYauL JpB8vnny89swieGe9jpo+IumTbWqMmaANh1j4UDhT/GX4VOUCnjees401 HNs2dCwEyiCtP6+6sLxRNUHhuKef3dduWFsS3nNyzCyskLiuf+bnBHAck CgppmiHeDcoHbcPlDwjCxXnwEQaKCroOf9ZYjlcayYJnJl6Pi7bCNl+jN YQbr/mB+DajPB3PKsoNoIIeMcRP1LMEWLOZvmLNBTUpr/XWQAotZONxHF A==; X-IronPort-AV: E=McAfee;i="6200,9189,10231"; a="269598666" X-IronPort-AV: E=Sophos;i="5.88,300,1635231600"; d="scan'208";a="269598666" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2022 13:55:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,300,1635231600"; d="scan'208";a="477548959" Received: from lkp-server01.sh.intel.com (HELO 276f1b88eecb) ([10.239.97.150]) by orsmga006.jf.intel.com with ESMTP; 19 Jan 2022 13:55:42 -0800 Received: from kbuild by 276f1b88eecb with local (Exim 4.92) (envelope-from ) id 1nAIvd-000DmU-Ea; Wed, 19 Jan 2022 21:55:41 +0000 Date: Thu, 20 Jan 2022 05:54:54 +0800 From: kernel test robot To: Andreas Gruenbacher Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org Subject: mm/gup.c:1674:16: error: unexpected token, expected comma Message-ID: <202201200528.F5X9Vnfb-lkp@intel.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 User-Agent: Mutt/1.10.1 (2018-07-13) tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 1d1df41c5a33359a00e919d54eaebfb789711fdc commit: bb523b406c849eef8f265a07cd7f320f1f177743 gup: Turn fault_in_pages_{readable,writeable} into fault_in_{readable,writeable} date: 3 months ago config: mips-randconfig-r003-20220118 (https://download.01.org/0day-ci/archive/20220120/202201200528.F5X9Vnfb-lkp@intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5f782d25a742302d25ef3c8b84b54f7483c2deb9) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install mips cross compiling tool for clang build # apt-get install binutils-mips-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb523b406c849eef8f265a07cd7f320f1f177743 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout bb523b406c849eef8f265a07cd7f320f1f177743 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> mm/gup.c:1674:16: error: unexpected token, expected comma if (unlikely(__put_user(0, uaddr) != 0)) ^ arch/mips/include/asm/uaccess.h:171:18: note: expanded from macro '__put_user' __put_data_asm(user_sb, __pu_ptr); \ ^ :3:10: note: instantiated into assembly here .set eva ^ >> mm/gup.c:1674:16: error: invalid operand for instruction if (unlikely(__put_user(0, uaddr) != 0)) ^ arch/mips/include/asm/uaccess.h:171:18: note: expanded from macro '__put_user' __put_data_asm(user_sb, __pu_ptr); \ ^ :4:10: note: instantiated into assembly here sbe $0, 0($17) ^ mm/gup.c:1682:16: error: unexpected token, expected comma if (unlikely(__put_user(0, uaddr) != 0)) ^ arch/mips/include/asm/uaccess.h:171:18: note: expanded from macro '__put_user' __put_data_asm(user_sb, __pu_ptr); \ ^ :3:10: note: instantiated into assembly here .set eva ^ mm/gup.c:1682:16: error: invalid operand for instruction if (unlikely(__put_user(0, uaddr) != 0)) ^ arch/mips/include/asm/uaccess.h:171:18: note: expanded from macro '__put_user' __put_data_asm(user_sb, __pu_ptr); \ ^ :4:10: note: instantiated into assembly here sbe $0, 0($2) ^ mm/gup.c:1710:16: error: unexpected token, expected comma if (unlikely(__get_user(c, uaddr) != 0)) ^ arch/mips/include/asm/uaccess.h:218:23: note: expanded from macro '__get_user' __get_data_asm((x), user_lb, __gu_ptr); \ ^ :3:10: note: instantiated into assembly here .set eva ^ mm/gup.c:1710:16: error: invalid operand for instruction if (unlikely(__get_user(c, uaddr) != 0)) ^ arch/mips/include/asm/uaccess.h:218:23: note: expanded from macro '__get_user' __get_data_asm((x), user_lb, __gu_ptr); \ ^ :4:10: note: instantiated into assembly here lbe $3, 0($17) ^ mm/gup.c:1718:16: error: unexpected token, expected comma if (unlikely(__get_user(c, uaddr) != 0)) ^ arch/mips/include/asm/uaccess.h:218:23: note: expanded from macro '__get_user' __get_data_asm((x), user_lb, __gu_ptr); \ ^ :3:10: note: instantiated into assembly here .set eva ^ mm/gup.c:1718:16: error: invalid operand for instruction if (unlikely(__get_user(c, uaddr) != 0)) ^ arch/mips/include/asm/uaccess.h:218:23: note: expanded from macro '__get_user' __get_data_asm((x), user_lb, __gu_ptr); \ ^ :4:10: note: instantiated into assembly here lbe $5, 0($2) ^ 8 errors generated. vim +1674 mm/gup.c 1658 1659 /** 1660 * fault_in_writeable - fault in userspace address range for writing 1661 * @uaddr: start of address range 1662 * @size: size of address range 1663 * 1664 * Returns the number of bytes not faulted in (like copy_to_user() and 1665 * copy_from_user()). 1666 */ 1667 size_t fault_in_writeable(char __user *uaddr, size_t size) 1668 { 1669 char __user *start = uaddr, *end; 1670 1671 if (unlikely(size == 0)) 1672 return 0; 1673 if (!PAGE_ALIGNED(uaddr)) { > 1674 if (unlikely(__put_user(0, uaddr) != 0)) 1675 return size; 1676 uaddr = (char __user *)PAGE_ALIGN((unsigned long)uaddr); 1677 } 1678 end = (char __user *)PAGE_ALIGN((unsigned long)start + size); 1679 if (unlikely(end < start)) 1680 end = NULL; 1681 while (uaddr != end) { 1682 if (unlikely(__put_user(0, uaddr) != 0)) 1683 goto out; 1684 uaddr += PAGE_SIZE; 1685 } 1686 1687 out: 1688 if (size > uaddr - start) 1689 return size - (uaddr - start); 1690 return 0; 1691 } 1692 EXPORT_SYMBOL(fault_in_writeable); 1693 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============2648796134114908181==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: mm/gup.c:1674:16: error: unexpected token, expected comma Date: Thu, 20 Jan 2022 05:54:54 +0800 Message-ID: <202201200528.F5X9Vnfb-lkp@intel.com> List-Id: --===============2648796134114908181== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git = master head: 1d1df41c5a33359a00e919d54eaebfb789711fdc commit: bb523b406c849eef8f265a07cd7f320f1f177743 gup: Turn fault_in_pages_{= readable,writeable} into fault_in_{readable,writeable} date: 3 months ago config: mips-randconfig-r003-20220118 (https://download.01.org/0day-ci/arch= ive/20220120/202201200528.F5X9Vnfb-lkp(a)intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5f782d= 25a742302d25ef3c8b84b54f7483c2deb9) reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install mips cross compiling tool for clang build # apt-get install binutils-mips-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.gi= t/commit/?id=3Dbb523b406c849eef8f265a07cd7f320f1f177743 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/gi= t/torvalds/linux.git git fetch --no-tags linus master git checkout bb523b406c849eef8f265a07cd7f320f1f177743 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cross W=3D= 1 O=3Dbuild_dir ARCH=3Dmips SHELL=3D/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> mm/gup.c:1674:16: error: unexpected token, expected comma if (unlikely(__put_user(0, uaddr) !=3D 0)) ^ arch/mips/include/asm/uaccess.h:171:18: note: expanded from macro '__put= _user' __put_data_asm(user_sb, __pu_ptr); \ ^ :3:10: note: instantiated into assembly here .set eva ^ >> mm/gup.c:1674:16: error: invalid operand for instruction if (unlikely(__put_user(0, uaddr) !=3D 0)) ^ arch/mips/include/asm/uaccess.h:171:18: note: expanded from macro '__put= _user' __put_data_asm(user_sb, __pu_ptr); \ ^ :4:10: note: instantiated into assembly here sbe $0, 0($17) ^ mm/gup.c:1682:16: error: unexpected token, expected comma if (unlikely(__put_user(0, uaddr) !=3D 0)) ^ arch/mips/include/asm/uaccess.h:171:18: note: expanded from macro '__put= _user' __put_data_asm(user_sb, __pu_ptr); \ ^ :3:10: note: instantiated into assembly here .set eva ^ mm/gup.c:1682:16: error: invalid operand for instruction if (unlikely(__put_user(0, uaddr) !=3D 0)) ^ arch/mips/include/asm/uaccess.h:171:18: note: expanded from macro '__put= _user' __put_data_asm(user_sb, __pu_ptr); \ ^ :4:10: note: instantiated into assembly here sbe $0, 0($2) ^ mm/gup.c:1710:16: error: unexpected token, expected comma if (unlikely(__get_user(c, uaddr) !=3D 0)) ^ arch/mips/include/asm/uaccess.h:218:23: note: expanded from macro '__get= _user' __get_data_asm((x), user_lb, __gu_ptr); \ ^ :3:10: note: instantiated into assembly here .set eva ^ mm/gup.c:1710:16: error: invalid operand for instruction if (unlikely(__get_user(c, uaddr) !=3D 0)) ^ arch/mips/include/asm/uaccess.h:218:23: note: expanded from macro '__get= _user' __get_data_asm((x), user_lb, __gu_ptr); \ ^ :4:10: note: instantiated into assembly here lbe $3, 0($17) ^ mm/gup.c:1718:16: error: unexpected token, expected comma if (unlikely(__get_user(c, uaddr) !=3D 0)) ^ arch/mips/include/asm/uaccess.h:218:23: note: expanded from macro '__get= _user' __get_data_asm((x), user_lb, __gu_ptr); \ ^ :3:10: note: instantiated into assembly here .set eva ^ mm/gup.c:1718:16: error: invalid operand for instruction if (unlikely(__get_user(c, uaddr) !=3D 0)) ^ arch/mips/include/asm/uaccess.h:218:23: note: expanded from macro '__get= _user' __get_data_asm((x), user_lb, __gu_ptr); \ ^ :4:10: note: instantiated into assembly here lbe $5, 0($2) ^ 8 errors generated. vim +1674 mm/gup.c 1658 = 1659 /** 1660 * fault_in_writeable - fault in userspace address range for writing 1661 * @uaddr: start of address range 1662 * @size: size of address range 1663 * 1664 * Returns the number of bytes not faulted in (like copy_to_user() a= nd 1665 * copy_from_user()). 1666 */ 1667 size_t fault_in_writeable(char __user *uaddr, size_t size) 1668 { 1669 char __user *start =3D uaddr, *end; 1670 = 1671 if (unlikely(size =3D=3D 0)) 1672 return 0; 1673 if (!PAGE_ALIGNED(uaddr)) { > 1674 if (unlikely(__put_user(0, uaddr) !=3D 0)) 1675 return size; 1676 uaddr =3D (char __user *)PAGE_ALIGN((unsigned long)uaddr); 1677 } 1678 end =3D (char __user *)PAGE_ALIGN((unsigned long)start + size); 1679 if (unlikely(end < start)) 1680 end =3D NULL; 1681 while (uaddr !=3D end) { 1682 if (unlikely(__put_user(0, uaddr) !=3D 0)) 1683 goto out; 1684 uaddr +=3D PAGE_SIZE; 1685 } 1686 = 1687 out: 1688 if (size > uaddr - start) 1689 return size - (uaddr - start); 1690 return 0; 1691 } 1692 EXPORT_SYMBOL(fault_in_writeable); 1693 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============2648796134114908181==--