tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: b9f85101cad3397ef1e509909602a90e257ab9d8 commit: a3a956c78efaa202b1d75190136671cf6e87bfbe [10959/12991] fs/ntfs3: Add option "nocase" config: i386-randconfig-s052-20221010 compiler: gcc-11 (Debian 11.3.0-5) 11.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-39-gce1a6720-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=a3a956c78efaa202b1d75190136671cf6e87bfbe git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout a3a956c78efaa202b1d75190136671cf6e87bfbe # 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 fs/cifs/ fs/ntfs3/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> fs/ntfs3/namei.c:481:31: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __le16 const [usertype] *s1 @@ got unsigned short * @@ fs/ntfs3/namei.c:481:31: sparse: expected restricted __le16 const [usertype] *s1 fs/ntfs3/namei.c:481:31: sparse: got unsigned short * >> fs/ntfs3/namei.c:481:54: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __le16 const [usertype] *s2 @@ got unsigned short * @@ fs/ntfs3/namei.c:481:54: sparse: expected restricted __le16 const [usertype] *s2 fs/ntfs3/namei.c:481:54: sparse: got unsigned short * vim +481 fs/ntfs3/namei.c 416 417 /* 418 * dentry_operations::d_compare 419 */ 420 static int ntfs_d_compare(const struct dentry *dentry, unsigned int len1, 421 const char *str, const struct qstr *name) 422 { 423 struct ntfs_sb_info *sbi; 424 int ret; 425 const char *n1 = str; 426 const char *n2 = name->name; 427 unsigned int len2 = name->len; 428 unsigned int lm = min(len1, len2); 429 unsigned char c1, c2; 430 struct cpu_str *uni1, *uni2; 431 432 /* First try fast implementation. */ 433 for (;;) { 434 if (!lm--) { 435 ret = len1 == len2 ? 0 : 1; 436 goto out; 437 } 438 439 if ((c1 = *n1++) == (c2 = *n2++)) 440 continue; 441 442 if (c1 >= 0x80 || c2 >= 0x80) 443 break; 444 445 if (toupper(c1) != toupper(c2)) { 446 ret = 1; 447 goto out; 448 } 449 } 450 451 /* 452 * Try slow way with current upcase table 453 */ 454 sbi = dentry->d_sb->s_fs_info; 455 uni1 = __getname(); 456 if (!uni1) 457 return -ENOMEM; 458 459 ret = ntfs_nls_to_utf16(sbi, str, len1, uni1, NTFS_NAME_LEN, 460 UTF16_HOST_ENDIAN); 461 if (ret < 0) 462 goto out; 463 464 if (!ret) { 465 ret = -EINVAL; 466 goto out; 467 } 468 469 uni2 = Add2Ptr(uni1, 2048); 470 471 ret = ntfs_nls_to_utf16(sbi, name->name, name->len, uni2, NTFS_NAME_LEN, 472 UTF16_HOST_ENDIAN); 473 if (ret < 0) 474 goto out; 475 476 if (!ret) { 477 ret = -EINVAL; 478 goto out; 479 } 480 > 481 ret = !ntfs_cmp_names(uni1->name, uni1->len, uni2->name, uni2->len, 482 sbi->upcase, false) 483 ? 0 484 : 1; 485 486 out: 487 __putname(uni1); 488 return ret; 489 } 490 -- 0-DAY CI Kernel Test Service https://01.org/lkp