From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gnuweeb.org (Postfix) with ESMTPS id D68AC7E383 for ; Fri, 22 Apr 2022 22:42:28 +0000 (UTC) Authentication-Results: gnuweeb.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=HHGsdYkU; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650667348; x=1682203348; h=date:from:to:cc:subject:message-id:mime-version; bh=zu+1/MDJ67d3IOeBAAnls5zDrulU66rJk6n5OaR6ZlM=; b=HHGsdYkUV5qVOmOjQkGYjJi/eJd5aV8aBlpB2sAH2ctfAAwOKhDv35OZ /NaXnYd/QbtVNwR97SubUR8/hHPREVFHsNn3R4DAr7gG/6Afy/Q0RRnVK /qR4LviKNBn2TXOCU8UNVS4af8w7nV5sdZeWtgOwahSuf/KcGll66qlW2 oPfWZ4K1cdE8LmRSDQu72yGNdd8ii0rQRAgGV/Lseez/r3FB3rDhAVliA FZKhNVvHa5L61qcT+ImLSyORhtb3fBmmNtGKx3L5kNA5yFhy7i/VIRjQX 0FVKP92oHA0gpU4ZNhPPi4efnzAfYkPFE0vWbHZniW6tFoz7WmSUZKgBb w==; X-IronPort-AV: E=McAfee;i="6400,9594,10324"; a="351255092" X-IronPort-AV: E=Sophos;i="5.90,282,1643702400"; d="scan'208";a="351255092" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2022 15:42:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,282,1643702400"; d="scan'208";a="594343118" Received: from lkp-server01.sh.intel.com (HELO 3abc53900bec) ([10.239.97.150]) by orsmga001.jf.intel.com with ESMTP; 22 Apr 2022 15:42:21 -0700 Received: from kbuild by 3abc53900bec with local (Exim 4.95) (envelope-from ) id 1ni1yl-000AdC-D0; Fri, 22 Apr 2022 22:42:19 +0000 Date: Sat, 23 Apr 2022 06:41:23 +0800 From: kernel test robot To: David Howells Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, GNU/Weeb Mailing List , linux-kernel@vger.kernel.org Subject: [ammarfaizi2-block:dhowells/linux-fs/netfs-maple 28/44] fs/netfs/crypto.c:76:10: warning: comparison of distinct pointer types ('typeof (len) *' (aka 'unsigned int *') and 'typeof (((1UL) << (12)) - offset) *' (aka 'unsigned long *')) Message-ID: <202204230602.rfRK0GR6-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline List-Id: tree: https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/netfs-maple head: 931e50676c6598d0eda1954ead465519ff91874d commit: 777536e6af57becf14b8f4f34007ed3e3a95c911 [28/44] netfs: Perform content encryption config: riscv-randconfig-r042-20220422 (https://download.01.org/0day-ci/archive/20220423/202204230602.rfRK0GR6-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5bd87350a5ae429baf8f373cb226a57b62f87280) 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 riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://github.com/ammarfaizi2/linux-block/commit/777536e6af57becf14b8f4f34007ed3e3a95c911 git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/netfs-maple git checkout 777536e6af57becf14b8f4f34007ed3e3a95c911 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash fs/netfs/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> fs/netfs/crypto.c:76:10: warning: comparison of distinct pointer types ('typeof (len) *' (aka 'unsigned int *') and 'typeof (((1UL) << (12)) - offset) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types] seg = min(len, PAGE_SIZE - offset); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:45:19: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp' __builtin_choose_expr(__safe_cmp(x, y), \ ^~~~~~~~~~~~~~~~ include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp' (__typecheck(x, y) && __no_side_effects(x, y)) ^~~~~~~~~~~~~~~~~ include/linux/minmax.h:20:28: note: expanded from macro '__typecheck' (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ 1 warning generated. vim +76 fs/netfs/crypto.c 45 46 /* 47 * Populate a scatterlist from folios in an xarray. 48 */ 49 static int netfs_xarray_to_sglist(struct xarray *xa, loff_t pos, size_t len, 50 struct scatterlist *sg, unsigned int n_sg) 51 { 52 struct scatterlist *p = sg; 53 struct folio *folio = NULL; 54 size_t seg, offset, skip = 0; 55 loff_t start = pos; 56 pgoff_t index = start >> PAGE_SHIFT; 57 int j; 58 59 XA_STATE(xas, xa, index); 60 61 sg_init_table(sg, n_sg); 62 63 rcu_read_lock(); 64 65 xas_for_each(&xas, folio, ULONG_MAX) { 66 if (xas_retry(&xas, folio)) 67 continue; 68 if (WARN_ON(xa_is_value(folio)) || WARN_ON(folio_test_hugetlb(folio))) 69 break; 70 for (j = (folio_index(folio) < index) ? index - folio_index(folio) : 0; 71 j < folio_nr_pages(folio); j++ 72 ) { 73 struct page *subpage = folio_file_page(folio, j); 74 75 offset = (pos + skip) & ~PAGE_MASK; > 76 seg = min(len, PAGE_SIZE - offset); 77 78 sg_set_page(p++, subpage, seg, offset); 79 80 len -= seg; 81 skip += seg; 82 if (len == 0) 83 break; 84 } 85 if (len == 0) 86 break; 87 } 88 89 rcu_read_unlock(); 90 if (len > 0) { 91 kdebug("*** Insufficient source (%zx)", len); 92 //WARN_ON(len > 0); 93 return -EIO; 94 } 95 96 sg_mark_end(p - 1); 97 return p - sg; 98 } 99 -- 0-DAY CI Kernel Test Service https://01.org/lkp