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=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HEXHASH_WORD,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gnuweeb.org (Postfix) with ESMTPS id A4F0D804D1 for ; Thu, 4 Aug 2022 11:17:18 +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=RqlD91QQ; 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=1659611838; x=1691147838; h=date:from:to:cc:subject:message-id:mime-version; bh=ZkEWO9a5g+ZmRoF05UShbk11PyLya6LFSPfDUH9Bm04=; b=RqlD91QQmfwrhHvdYtSlZYbkd+VbTq4hAJQncj/RoWWCs0EZQpOOj6HY ar9A/gVCOmdktnPt4B6JxWttYjvM83KMX6daQjaVeJPQNy7NM6o5CGXrV 35blAAt8rzAH2XvmphWDwUK1cnCTf+Q6KguvxQ8ko5AVFOO7TOewVkTvm +dtZsqGofaR2utZAfEhCRBil6GbG6niRcgmI1zl7Qk1zeDXPHcWLpcOaq UPuUFEhgd0GWPAU70WV/laz99ohE+l3F189s/vYpLzs1pP7n99zIOb1v5 BoBVV5pQMlz7I7+2VU/93aoeyun4/08wK+9CIsOyt5ZPhAs/L3leFbKkn A==; X-IronPort-AV: E=McAfee;i="6400,9594,10428"; a="353905516" X-IronPort-AV: E=Sophos;i="5.93,215,1654585200"; d="scan'208";a="353905516" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2022 04:17:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,215,1654585200"; d="scan'208";a="930770130" Received: from lkp-server01.sh.intel.com (HELO e0eace57cfef) ([10.239.97.150]) by fmsmga005.fm.intel.com with ESMTP; 04 Aug 2022 04:17:12 -0700 Received: from kbuild by e0eace57cfef with local (Exim 4.96) (envelope-from ) id 1oJYql-000ILf-1h; Thu, 04 Aug 2022 11:17:11 +0000 Date: Thu, 4 Aug 2022 19:16:46 +0800 From: kernel test robot To: Ammar Faizi , GNU/Weeb Mailing List Cc: kbuild-all@lists.01.org Subject: [ammarfaizi2-block:google/android/kernel/common/android-4.14-stable 4872/9999] fs/incfs/format.c:377:23: sparse: sparse: cast truncates bits from constant value (5346434e49 becomes 46434e49) Message-ID: <202208041918.nAK4o0gx-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 google/android/kernel/common/android-4.14-stable head: c529afa15a69594211793a68cb70c873508061df commit: 57e7c47daa1cae8cb8c1450ad359027bac68fb9b [4872/9999] ANDROID: Incremental fs: fix magic compatibility again config: i386-randconfig-s002 (https://download.01.org/0day-ci/archive/20220804/202208041918.nAK4o0gx-lkp@intel.com/config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-39-gce1a6720-dirty # https://github.com/ammarfaizi2/linux-block/commit/57e7c47daa1cae8cb8c1450ad359027bac68fb9b git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android-4.14-stable git checkout 57e7c47daa1cae8cb8c1450ad359027bac68fb9b # save the config file mkdir build_dir && cp config build_dir/.config make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/md/ fs/incfs/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> fs/incfs/format.c:377:23: sparse: sparse: cast truncates bits from constant value (5346434e49 becomes 46434e49) fs/incfs/format.c:559:41: sparse: sparse: cast truncates bits from constant value (5346434e49 becomes 46434e49) In file included from include/linux/printk.h:7:0, from include/linux/kernel.h:14, from include/linux/list.h:9, from include/linux/wait.h:7, from include/linux/wait_bit.h:8, from include/linux/fs.h:6, from fs/incfs/format.c:5: fs/incfs/format.c: In function 'incfs_read_next_metadata_record': include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t {aka unsigned int}' [-Wformat=] #define KERN_SOH "001" /* ASCII Start Of Header */ ^ include/linux/kern_levels.h:12:22: note: in expansion of macro 'KERN_SOH' #define KERN_WARNING KERN_SOH "4" /* warning conditions */ ^~~~~~~~ include/linux/printk.h:308:9: note: in expansion of macro 'KERN_WARNING' printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~ include/linux/printk.h:309:17: note: in expansion of macro 'pr_warning' #define pr_warn pr_warning ^~~~~~~~~~ fs/incfs/format.c:619:3: note: in expansion of macro 'pr_warn' pr_warn("incfs: The record is too large. Size: %ld", ^~~~~~~ fs/incfs/format.c:619:52: note: format string is defined here pr_warn("incfs: The record is too large. Size: %ld", ~~^ %d vim +377 fs/incfs/format.c 318babce66a62d8 Eugene Zemtsov 2019-11-18 361 318babce66a62d8 Eugene Zemtsov 2019-11-18 362 /* 318babce66a62d8 Eugene Zemtsov 2019-11-18 363 * Write a backing file header 318babce66a62d8 Eugene Zemtsov 2019-11-18 364 * It should always be called only on empty file. 318babce66a62d8 Eugene Zemtsov 2019-11-18 365 * incfs_super_block.s_first_md_offset is 0 for now, but will be updated 318babce66a62d8 Eugene Zemtsov 2019-11-18 366 * once first metadata record is added. 318babce66a62d8 Eugene Zemtsov 2019-11-18 367 */ 318babce66a62d8 Eugene Zemtsov 2019-11-18 368 int incfs_write_fh_to_backing_file(struct backing_file_context *bfc, 318babce66a62d8 Eugene Zemtsov 2019-11-18 369 incfs_uuid_t *uuid, u64 file_size) 318babce66a62d8 Eugene Zemtsov 2019-11-18 370 { 318babce66a62d8 Eugene Zemtsov 2019-11-18 371 struct incfs_file_header fh = {}; 318babce66a62d8 Eugene Zemtsov 2019-11-18 372 loff_t file_pos = 0; 318babce66a62d8 Eugene Zemtsov 2019-11-18 373 318babce66a62d8 Eugene Zemtsov 2019-11-18 374 if (!bfc) 318babce66a62d8 Eugene Zemtsov 2019-11-18 375 return -EFAULT; 318babce66a62d8 Eugene Zemtsov 2019-11-18 376 318babce66a62d8 Eugene Zemtsov 2019-11-18 @377 fh.fh_magic = cpu_to_le64(INCFS_MAGIC_NUMBER); 318babce66a62d8 Eugene Zemtsov 2019-11-18 378 fh.fh_version = cpu_to_le64(INCFS_FORMAT_CURRENT_VER); 318babce66a62d8 Eugene Zemtsov 2019-11-18 379 fh.fh_header_size = cpu_to_le16(sizeof(fh)); 318babce66a62d8 Eugene Zemtsov 2019-11-18 380 fh.fh_first_md_offset = cpu_to_le64(0); 318babce66a62d8 Eugene Zemtsov 2019-11-18 381 fh.fh_data_block_size = cpu_to_le16(INCFS_DATA_FILE_BLOCK_SIZE); 318babce66a62d8 Eugene Zemtsov 2019-11-18 382 318babce66a62d8 Eugene Zemtsov 2019-11-18 383 fh.fh_file_size = cpu_to_le64(file_size); 318babce66a62d8 Eugene Zemtsov 2019-11-18 384 fh.fh_uuid = *uuid; 318babce66a62d8 Eugene Zemtsov 2019-11-18 385 318babce66a62d8 Eugene Zemtsov 2019-11-18 386 LOCK_REQUIRED(bfc->bc_mutex); 318babce66a62d8 Eugene Zemtsov 2019-11-18 387 318babce66a62d8 Eugene Zemtsov 2019-11-18 388 file_pos = incfs_get_end_offset(bfc->bc_file); 318babce66a62d8 Eugene Zemtsov 2019-11-18 389 if (file_pos != 0) 318babce66a62d8 Eugene Zemtsov 2019-11-18 390 return -EEXIST; 318babce66a62d8 Eugene Zemtsov 2019-11-18 391 4f81903f2276fc9 Paul Lawrence 2020-04-07 392 return write_to_bf(bfc, &fh, sizeof(fh), file_pos); 318babce66a62d8 Eugene Zemtsov 2019-11-18 393 } 318babce66a62d8 Eugene Zemtsov 2019-11-18 394 :::::: The code at line 377 was first introduced by commit :::::: 318babce66a62d8bc8d5434909a044b89ab3a53e ANDROID: Initial commit of Incremental FS :::::: TO: Eugene Zemtsov :::::: CC: Paul Lawrence -- 0-DAY CI Kernel Test Service https://01.org/lkp