From: kernel test robot <lkp@intel.com>
To: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Cc: oe-kbuild-all@lists.linux.dev, ntfs3@lists.linux.dev
Subject: [paragon-software-group-ntfs3:master 8/16] fs/ntfs3/frecord.c:1909:45: sparse: sparse: incorrect type in initializer (different address spaces)
Date: Sat, 24 Aug 2024 09:57:33 +0800 [thread overview]
Message-ID: <202408240903.7Yk8oU2k-lkp@intel.com> (raw)
tree: https://github.com/Paragon-Software-Group/linux-ntfs3.git master
head: 7529036a025ad8bbd664f3aad8bd726e664a6db7
commit: afeed485ef9286020da77b400f06894a0fe0ad1a [8/16] fs/ntfs3: Remove '__user' for kernel pointer
config: x86_64-randconfig-123-20240824 (https://download.01.org/0day-ci/archive/20240824/202408240903.7Yk8oU2k-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240824/202408240903.7Yk8oU2k-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408240903.7Yk8oU2k-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> fs/ntfs3/frecord.c:1909:45: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct fiemap_extent *dest @@ got struct fiemap_extent [noderef] __user *fi_extents_start @@
fs/ntfs3/frecord.c:1909:45: sparse: expected struct fiemap_extent *dest
fs/ntfs3/frecord.c:1909:45: sparse: got struct fiemap_extent [noderef] __user *fi_extents_start
fs/ntfs3/frecord.c:2011:35: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct fiemap_extent [noderef] __user *fi_extents_start @@ got struct fiemap_extent *[assigned] fe_k @@
fs/ntfs3/frecord.c:2011:35: sparse: expected struct fiemap_extent [noderef] __user *fi_extents_start
fs/ntfs3/frecord.c:2011:35: sparse: got struct fiemap_extent *[assigned] fe_k
fs/ntfs3/frecord.c: note: in included file:
fs/ntfs3/ntfs.h:461:21: sparse: sparse: self-comparison always evaluates to false
vim +1909 fs/ntfs3/frecord.c
1900
1901 /*
1902 * fiemap_fill_next_extent_k - a copy of fiemap_fill_next_extent
1903 * but it accepts kernel address for fi_extents_start
1904 */
1905 static int fiemap_fill_next_extent_k(struct fiemap_extent_info *fieinfo,
1906 u64 logical, u64 phys, u64 len, u32 flags)
1907 {
1908 struct fiemap_extent extent;
> 1909 struct fiemap_extent *dest = fieinfo->fi_extents_start;
1910
1911 /* only count the extents */
1912 if (fieinfo->fi_extents_max == 0) {
1913 fieinfo->fi_extents_mapped++;
1914 return (flags & FIEMAP_EXTENT_LAST) ? 1 : 0;
1915 }
1916
1917 if (fieinfo->fi_extents_mapped >= fieinfo->fi_extents_max)
1918 return 1;
1919
1920 if (flags & FIEMAP_EXTENT_DELALLOC)
1921 flags |= FIEMAP_EXTENT_UNKNOWN;
1922 if (flags & FIEMAP_EXTENT_DATA_ENCRYPTED)
1923 flags |= FIEMAP_EXTENT_ENCODED;
1924 if (flags & (FIEMAP_EXTENT_DATA_TAIL | FIEMAP_EXTENT_DATA_INLINE))
1925 flags |= FIEMAP_EXTENT_NOT_ALIGNED;
1926
1927 memset(&extent, 0, sizeof(extent));
1928 extent.fe_logical = logical;
1929 extent.fe_physical = phys;
1930 extent.fe_length = len;
1931 extent.fe_flags = flags;
1932
1933 dest += fieinfo->fi_extents_mapped;
1934 memcpy(dest, &extent, sizeof(extent));
1935
1936 fieinfo->fi_extents_mapped++;
1937 if (fieinfo->fi_extents_mapped == fieinfo->fi_extents_max)
1938 return 1;
1939 return (flags & FIEMAP_EXTENT_LAST) ? 1 : 0;
1940 }
1941
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-08-24 1:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202408240903.7Yk8oU2k-lkp@intel.com \
--to=lkp@intel.com \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=ntfs3@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox