From: kernel test robot <lkp@intel.com>
To: David Howells <dhowells@redhat.com>
Cc: kbuild-all@lists.01.org,
GNU/Weeb Mailing List <gwml@vger.gnuweeb.org>,
linux-kernel@vger.kernel.org
Subject: [ammarfaizi2-block:dhowells/linux-fs/netfs-maple 35/44] fs/netfs/buffered_write.c:28:40: sparse: sparse: incompatible types in comparison expression (different type sizes):
Date: Sat, 23 Apr 2022 21:25:43 +0800 [thread overview]
Message-ID: <202204232146.Fu9gGEta-lkp@intel.com> (raw)
tree: https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/netfs-maple
head: 931e50676c6598d0eda1954ead465519ff91874d
commit: f343507aeda88b2f1a528a659b8fadaa9b6b0f79 [35/44] netfs: Implement buffered writes through netfs_file_write_iter()
config: arc-randconfig-s032-20220422 (https://download.01.org/0day-ci/archive/20220423/202204232146.Fu9gGEta-lkp@intel.com/config)
compiler: arc-elf-gcc (GCC) 11.2.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-dirty
# https://github.com/ammarfaizi2/linux-block/commit/f343507aeda88b2f1a528a659b8fadaa9b6b0f79
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/netfs-maple
git checkout f343507aeda88b2f1a528a659b8fadaa9b6b0f79
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arc SHELL=/bin/bash fs/netfs/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> fs/netfs/buffered_write.c:28:40: sparse: sparse: incompatible types in comparison expression (different type sizes):
>> fs/netfs/buffered_write.c:28:40: sparse: unsigned long *
>> fs/netfs/buffered_write.c:28:40: sparse: unsigned int *
>> fs/netfs/buffered_write.c:94:25: sparse: sparse: incompatible types in comparison expression (different signedness):
>> fs/netfs/buffered_write.c:94:25: sparse: unsigned long long *
>> fs/netfs/buffered_write.c:94:25: sparse: long long *
fs/netfs/buffered_write.c:95:25: sparse: sparse: incompatible types in comparison expression (different signedness):
fs/netfs/buffered_write.c:95:25: sparse: unsigned long long *
fs/netfs/buffered_write.c:95:25: sparse: long long *
vim +28 fs/netfs/buffered_write.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
40 /*
41 * Initialise a new dirty folio group. We have to round it out to any crypto
42 * alignment.
43 */
44 static void netfs_init_dirty_region(struct netfs_i_context *ctx,
45 struct netfs_dirty_region *region,
46 struct file *file,
47 loff_t start, size_t len)
48 {
49 region->from = start;
50 region->to = start + len;
51 region->debug_id = atomic_inc_return(&netfs_region_debug_ids);
52
53 if (file && ctx->ops->init_dirty_region)
54 ctx->ops->init_dirty_region(region, file);
55
56 trace_netfs_ref_region(region->debug_id, refcount_read(®ion->ref),
57 netfs_region_trace_new);
58 }
59
60 /*
61 * Return true if two dirty regions are compatible such that b can be merged
62 * onto the end of a.
63 */
64 bool netfs_are_regions_mergeable(struct netfs_i_context *ctx,
65 struct netfs_dirty_region *a,
66 struct netfs_dirty_region *b)
67 {
68 if (!netfs_mas_is_valid(a) || !netfs_mas_is_valid(b))
69 return a == b;
70 if (b->waiting_on_wb != a->waiting_on_wb)
71 return false;
72 if (b->from != a->to &&
73 b->from < ctx->zero_point)
74 return false;
75 if (ctx->ops->are_regions_mergeable)
76 return ctx->ops->are_regions_mergeable(ctx, a, b);
77 return true;
78 }
79
80 /*
81 * Subsume the modifications into an existing target region. Returns true if
82 * we need to update the dirty_regions tree.
83 */
84 static bool netfs_subsume_into_existing(struct netfs_i_context *ctx,
85 struct folio *folio,
86 struct ma_state *mas,
87 struct netfs_dirty_region **_target,
88 struct netfs_dirty_region **_to_put,
89 pgoff_t *_first, pgoff_t *_last,
90 size_t offset, size_t len)
91 {
92 struct netfs_dirty_region *target = *_target, *prev;
93
> 94 target->from = min(target->from, folio_pos(folio) + offset);
95 target->to = max(target->to, folio_pos(folio) + offset + len);
96 trace_netfs_dirty(ctx, target, NULL, *_first, *_last,
97 netfs_dirty_trace_modified);
98
99 /* We might have bridged to the previous region also. */
100 prev = mas_prev(mas, *_first - 1);
101 if (!netfs_mas_is_valid(prev))
102 return false;
103
104 if (prev->to != target->from ||
105 prev->waiting_on_wb != target->waiting_on_wb)
106 return false;
107
108 *_first = mas->index;
109 prev->to = target->to;
110 *_to_put = target;
111 trace_netfs_dirty(ctx, prev, NULL, *_first, *_last,
112 netfs_dirty_trace_merged_prev);
113 return true;
114 }
115
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-04-23 13:27 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=202204232146.Fu9gGEta-lkp@intel.com \
--to=lkp@intel.com \
--cc=dhowells@redhat.com \
--cc=gwml@vger.gnuweeb.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.