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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3D30C433F5 for ; Wed, 16 Feb 2022 00:40:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244268AbiBPAkb (ORCPT ); Tue, 15 Feb 2022 19:40:31 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:51690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243144AbiBPAka (ORCPT ); Tue, 15 Feb 2022 19:40:30 -0500 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 493C7F8B93 for ; Tue, 15 Feb 2022 16:40:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644972019; x=1676508019; h=date:from:to:cc:subject:message-id:mime-version; bh=qjwGTshsg0Dm9IvhRP+zUM6LzmwFYMHgLZsHLiyiOfQ=; b=boTLekJrP76d7Mu3SARMMSQUkavEVo6Q4w+Zzn8OKNs5vKXqvkTDimBB Xvze6r6PMw77+wA4XcVwuDNzyutDVV4XWiJUvtGuuUKS03fMwdhvQQZPj RlmXRstwobniSl/JEGmbzBEZAlcer3gCyQpUJUdQnHrMKN5RZMgCXj05S Ms4opUMgvybd0K3+djmdtQqo6+oJ4QyEQevWALhQBMoMcplOYDmOUscBC Xp+J16dlqw/YxsyvX3y6K1bs5ktVvaJuhXsbGMf/cBmjkMAdP1Gi+keEt V+LThLe+K7hbN4Yt5+TgriGH8FgqtA5YzFKQhCMlJvSotbbNWayovQ0Sk A==; X-IronPort-AV: E=McAfee;i="6200,9189,10259"; a="311231772" X-IronPort-AV: E=Sophos;i="5.88,371,1635231600"; d="scan'208";a="311231772" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2022 16:40:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,371,1635231600"; d="scan'208";a="636227156" Received: from lkp-server01.sh.intel.com (HELO d95dc2dabeb1) ([10.239.97.150]) by orsmga004.jf.intel.com with ESMTP; 15 Feb 2022 16:40:17 -0800 Received: from kbuild by d95dc2dabeb1 with local (Exim 4.92) (envelope-from ) id 1nK8Mi-000ADK-MD; Wed, 16 Feb 2022 00:40:16 +0000 Date: Wed, 16 Feb 2022 08:40:08 +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/43] fs/netfs/write_helper.c:28:26: warning: comparison of distinct pointer types ('typeof (((1UL) << (12)) - offset) *' (aka 'unsigned long *') and 'typeof (size) *' (aka 'unsigned int *')) Message-ID: <202202160826.zdpmsgyh-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tree: https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/netfs-maple head: d40df0841e9f8de3713a19dd3f0ba283c860cb93 commit: 7de6bd1573006959937bf5d90e85f16cdec38284 [28/43] netfs: Implement buffered writes through netfs_file_write_iter() config: riscv-randconfig-r033-20220214 (https://download.01.org/0day-ci/archive/20220216/202202160826.zdpmsgyh-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 37f422f4ac31c8b8041c6b62065263314282dab6) 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/7de6bd1573006959937bf5d90e85f16cdec38284 git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/netfs-maple git checkout 7de6bd1573006959937bf5d90e85f16cdec38284 # 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=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/write_helper.c:28:26: warning: comparison of distinct pointer types ('typeof (((1UL) << (12)) - offset) *' (aka 'unsigned long *') and 'typeof (size) *' (aka 'unsigned int *')) [-Wcompare-distinct-pointer-types] unsigned int psize = min(PAGE_SIZE - offset, size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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))) ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ fs/netfs/write_helper.c:95:18: warning: comparison of distinct pointer types ('typeof (target->from) *' (aka 'unsigned long long *') and 'typeof (folio_pos(folio) + offset) *' (aka 'long long *')) [-Wcompare-distinct-pointer-types] target->from = min(target->from, folio_pos(folio) + 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))) ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ fs/netfs/write_helper.c:96:18: warning: comparison of distinct pointer types ('typeof (target->to) *' (aka 'unsigned long long *') and 'typeof (folio_pos(folio) + offset + len) *' (aka 'long long *')) [-Wcompare-distinct-pointer-types] target->to = max(target->to, folio_pos(folio) + offset + len); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:52:19: note: expanded from macro 'max' #define max(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))) ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ 3 warnings generated. vim +28 fs/netfs/write_helper.c 18 19 static size_t copy_folio_from_iter_atomic(struct folio *folio, 20 unsigned int offset, size_t size, 21 struct iov_iter *i) 22 { 23 size_t copied = 0, n; 24 25 do { 26 unsigned int index = offset / PAGE_SIZE; 27 unsigned int poffset = offset % PAGE_SIZE; > 28 unsigned int psize = min(PAGE_SIZE - offset, size); 29 30 n = copy_page_from_iter_atomic(folio_file_page(folio, index), 31 poffset, psize, i); 32 copied += n; 33 if (n < psize) 34 break; 35 size -= n; 36 } while (size); 37 return copied; 38 } 39 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org