Hi Lukas, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v6.1-rc4 next-20221108] [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/Lukas-Czerner/shmem-user-and-group-quota-support-for-tmpfs/20221108-213245 patch link: https://lore.kernel.org/r/20221108133010.75226-2-lczerner%40redhat.com patch subject: [PATCH 1/2] shmem: implement user/group quota support for tmpfs config: riscv-randconfig-s033-20221108 compiler: riscv32-linux-gcc (GCC) 12.1.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-39-gce1a6720-dirty # https://github.com/intel-lab-lkp/linux/commit/6f979020eab836196937e50c4e87e4504a56a845 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Lukas-Czerner/shmem-user-and-group-quota-support-for-tmpfs/20221108-213245 git checkout 6f979020eab836196937e50c4e87e4504a56a845 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) WARNING: invalid argument to '-march': '_zihintpause' >> mm/shmem.c:385:54: sparse: sparse: Using plain integer as NULL pointer vim +385 mm/shmem.c 345 346 static int shmem_enable_quotas(struct super_block *sb) 347 { 348 int type, err = 0; 349 struct inode *inode; 350 struct v2_disk_dqheader qheader; 351 struct v2_disk_dqinfo qinfo; 352 static const uint quota_magics[] = V2_INITQMAGICS; 353 static const uint quota_versions[] = V2_INITQVERSIONS; 354 355 sb_dqopt(sb)->flags |= DQUOT_QUOTA_SYS_FILE | DQUOT_NOLIST_DIRTY; 356 for (type = 0; type < SHMEM_MAXQUOTAS; type++) { 357 inode = shmem_get_inode_noquota(sb, NULL, S_IFREG | 0777, 0, 358 VM_NORESERVE); 359 if (IS_ERR_OR_NULL(inode)) { 360 err = PTR_ERR(inode); 361 goto out_err; 362 } 363 inode->i_flags |= S_NOQUOTA; 364 365 /* Initialize generic quota file header */ 366 qheader.dqh_magic = cpu_to_le32(quota_magics[type]); 367 qheader.dqh_version = cpu_to_le32(quota_versions[type]); 368 369 /* Initialize the quota file info structure */ 370 qinfo.dqi_bgrace = cpu_to_le32(MAX_DQ_TIME); 371 qinfo.dqi_igrace = cpu_to_le32(MAX_IQ_TIME); 372 qinfo.dqi_flags = cpu_to_le32(0); 373 qinfo.dqi_blocks = cpu_to_le32(QT_TREEOFF + 1); 374 qinfo.dqi_free_blk = cpu_to_le32(0); 375 qinfo.dqi_free_entry = cpu_to_le32(0); 376 377 /* 378 * Write out generic quota header, quota info structure and 379 * zeroout first tree block. 380 */ 381 shmem_quota_write_inode(inode, type, (const char *)&qheader, 382 sizeof(qheader), 0); 383 shmem_quota_write_inode(inode, type, (const char *)&qinfo, 384 sizeof(qinfo), sizeof(qheader)); > 385 shmem_quota_write_inode(inode, type, 0, 386 QT_TREEOFF * QUOTABLOCK_SIZE, 387 QUOTABLOCK_SIZE); 388 389 shmem_set_inode_flags(inode, FS_NOATIME_FL | FS_IMMUTABLE_FL); 390 391 err = dquot_load_quota_inode(inode, type, QFMT_VFS_V1, 392 DQUOT_USAGE_ENABLED); 393 iput(inode); 394 if (err) 395 goto out_err; 396 } 397 return 0; 398 399 out_err: 400 pr_warn("tmpfs: failed to enable quota tracking (type=%d, err=%d)\n", 401 type, err); 402 for (type--; type >= 0; type--) { 403 inode = sb_dqopt(sb)->files[type]; 404 if (inode) 405 inode = igrab(inode); 406 dquot_quota_off(sb, type); 407 if (inode) 408 iput(inode); 409 } 410 return err; 411 } 412 -- 0-DAY CI Kernel Test Service https://01.org/lkp