From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [djwong-xfs:scrub-rtsummary 43/43] fs/xfs/scrub/rtsummary.c:199:45: sparse: sparse: Using plain integer as NULL pointer
Date: Wed, 25 Mar 2020 23:11:56 +0800 [thread overview]
Message-ID: <202003252343.6qB4ixps%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2258 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git scrub-rtsummary
head: 2e7ef2860bfce11463cddefdb4fddc674825d445
commit: 2e7ef2860bfce11463cddefdb4fddc674825d445 [43/43] xfs: implement online scrubbing of rtsummary info
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-187-gbff9b106-dirty
git checkout 2e7ef2860bfce11463cddefdb4fddc674825d445
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> fs/xfs/scrub/rtsummary.c:199:45: sparse: sparse: Using plain integer as NULL pointer
vim +199 fs/xfs/scrub/rtsummary.c
189
190 /*
191 * Compute the realtime summary from the realtime bitmap. This is a kernel
192 * port of the defunct process_rtbitmap function in xfs_repair.
193 */
194 STATIC int
195 xchk_rtsum_compute(
196 struct xfs_scrub *sc,
197 struct file *sumfile)
198 {
> 199 struct xchk_rtsum_compute state = { 0 } ;
200 struct xfs_mount *mp = sc->mp;
201 unsigned long long rtbmp_bytes;
202 xfs_fileoff_t off = 0;
203 xfs_fileoff_t end_off;
204 int error;
205
206 state.sumfile = sumfile;
207 rtbmp_bytes = howmany(mp->m_sb.sb_rextents, NBBY);
208 end_off = howmany(rtbmp_bytes, mp->m_sb.sb_blocksize);
209
210 /* If the bitmap size doesn't match the computed size, bail. */
211 if (roundup(rtbmp_bytes, mp->m_sb.sb_blocksize) !=
212 mp->m_rbmip->i_d.di_size)
213 return -EFSCORRUPTED;
214
215 for (off = 0; off < end_off; off++) {
216 error = xchk_rtsum_process_bmblock(sc, off, &state);
217 if (error)
218 return error;
219 if (state.rt_extent_nr == mp->m_sb.sb_rextents)
220 break;
221 }
222 if (state.in_extent) {
223 error = xchk_rtsum_record_free(sc, &state);
224 if (error)
225 return error;
226 }
227
228 return 0;
229 }
230
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
reply other threads:[~2020-03-25 15:11 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=202003252343.6qB4ixps%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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.