From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: [rhvgoyal:virtiofs-dax-5.5 13/27] fs/fuse/file.c:340 dmap_removemapping_list() error: uninitialized symbol 'ret'.
Date: Fri, 10 Jan 2020 08:42:58 +0300 [thread overview]
Message-ID: <20200110054258.GE1770@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 3439 bytes --]
tree: https://github.com/rhvgoyal/linux virtiofs-dax-5.5
head: 1e5ce59e58194ee5ad14fa26fb617a2c54ab8bf1
commit: 294ba78007c7bdd196f37c85a82e57eecc1918ae [13/27] fuse, dax: Implement dax read/write operations
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
fs/fuse/file.c:340 dmap_removemapping_list() error: uninitialized symbol 'ret'.
# https://github.com/rhvgoyal/linux/commit/294ba78007c7bdd196f37c85a82e57eecc1918ae
git remote add rhvgoyal https://github.com/rhvgoyal/linux
git remote update rhvgoyal
git checkout 294ba78007c7bdd196f37c85a82e57eecc1918ae
vim +/ret +340 fs/fuse/file.c
294ba78007c7bd Vivek Goyal 2018-11-19 307 static int dmap_removemapping_list(struct inode *inode, unsigned num,
294ba78007c7bd Vivek Goyal 2018-11-19 308 struct list_head *to_remove)
294ba78007c7bd Vivek Goyal 2018-11-19 309 {
294ba78007c7bd Vivek Goyal 2018-11-19 310 struct fuse_removemapping_one *remove_one, *ptr;
294ba78007c7bd Vivek Goyal 2018-11-19 311 struct fuse_removemapping_in inarg;
294ba78007c7bd Vivek Goyal 2018-11-19 312 struct fuse_dax_mapping *dmap;
294ba78007c7bd Vivek Goyal 2018-11-19 313 int ret, i = 0, nr_alloc;
294ba78007c7bd Vivek Goyal 2018-11-19 314
294ba78007c7bd Vivek Goyal 2018-11-19 315 nr_alloc = min_t(unsigned int, num, FUSE_REMOVEMAPPING_MAX_ENTRY);
294ba78007c7bd Vivek Goyal 2018-11-19 316 remove_one = kmalloc_array(nr_alloc, sizeof(*remove_one), GFP_NOFS);
294ba78007c7bd Vivek Goyal 2018-11-19 317 if (!remove_one)
294ba78007c7bd Vivek Goyal 2018-11-19 318 return -ENOMEM;
294ba78007c7bd Vivek Goyal 2018-11-19 319
294ba78007c7bd Vivek Goyal 2018-11-19 320 ptr = remove_one;
294ba78007c7bd Vivek Goyal 2018-11-19 321 list_for_each_entry(dmap, to_remove, list) {
^^^^^^^^^
Can this list be empty?
294ba78007c7bd Vivek Goyal 2018-11-19 322 ptr->moffset = dmap->window_offset;
294ba78007c7bd Vivek Goyal 2018-11-19 323 ptr->len = dmap->length;
294ba78007c7bd Vivek Goyal 2018-11-19 324 ptr++;
294ba78007c7bd Vivek Goyal 2018-11-19 325 i++;
294ba78007c7bd Vivek Goyal 2018-11-19 326 num--;
294ba78007c7bd Vivek Goyal 2018-11-19 327 if (i >= nr_alloc || num == 0) {
294ba78007c7bd Vivek Goyal 2018-11-19 328 memset(&inarg, 0, sizeof(inarg));
294ba78007c7bd Vivek Goyal 2018-11-19 329 inarg.count = i;
294ba78007c7bd Vivek Goyal 2018-11-19 330 ret = fuse_send_removemapping(inode, &inarg,
294ba78007c7bd Vivek Goyal 2018-11-19 331 remove_one);
294ba78007c7bd Vivek Goyal 2018-11-19 332 if (ret)
294ba78007c7bd Vivek Goyal 2018-11-19 333 goto out;
294ba78007c7bd Vivek Goyal 2018-11-19 334 ptr = remove_one;
294ba78007c7bd Vivek Goyal 2018-11-19 335 i = 0;
294ba78007c7bd Vivek Goyal 2018-11-19 336 }
294ba78007c7bd Vivek Goyal 2018-11-19 337 }
294ba78007c7bd Vivek Goyal 2018-11-19 338 out:
294ba78007c7bd Vivek Goyal 2018-11-19 339 kfree(remove_one);
294ba78007c7bd Vivek Goyal 2018-11-19 @340 return ret;
294ba78007c7bd Vivek Goyal 2018-11-19 341 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: [rhvgoyal:virtiofs-dax-5.5 13/27] fs/fuse/file.c:340 dmap_removemapping_list() error: uninitialized symbol 'ret'.
Date: Fri, 10 Jan 2020 08:42:58 +0300 [thread overview]
Message-ID: <20200110054258.GE1770@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 3439 bytes --]
tree: https://github.com/rhvgoyal/linux virtiofs-dax-5.5
head: 1e5ce59e58194ee5ad14fa26fb617a2c54ab8bf1
commit: 294ba78007c7bdd196f37c85a82e57eecc1918ae [13/27] fuse, dax: Implement dax read/write operations
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
fs/fuse/file.c:340 dmap_removemapping_list() error: uninitialized symbol 'ret'.
# https://github.com/rhvgoyal/linux/commit/294ba78007c7bdd196f37c85a82e57eecc1918ae
git remote add rhvgoyal https://github.com/rhvgoyal/linux
git remote update rhvgoyal
git checkout 294ba78007c7bdd196f37c85a82e57eecc1918ae
vim +/ret +340 fs/fuse/file.c
294ba78007c7bd Vivek Goyal 2018-11-19 307 static int dmap_removemapping_list(struct inode *inode, unsigned num,
294ba78007c7bd Vivek Goyal 2018-11-19 308 struct list_head *to_remove)
294ba78007c7bd Vivek Goyal 2018-11-19 309 {
294ba78007c7bd Vivek Goyal 2018-11-19 310 struct fuse_removemapping_one *remove_one, *ptr;
294ba78007c7bd Vivek Goyal 2018-11-19 311 struct fuse_removemapping_in inarg;
294ba78007c7bd Vivek Goyal 2018-11-19 312 struct fuse_dax_mapping *dmap;
294ba78007c7bd Vivek Goyal 2018-11-19 313 int ret, i = 0, nr_alloc;
294ba78007c7bd Vivek Goyal 2018-11-19 314
294ba78007c7bd Vivek Goyal 2018-11-19 315 nr_alloc = min_t(unsigned int, num, FUSE_REMOVEMAPPING_MAX_ENTRY);
294ba78007c7bd Vivek Goyal 2018-11-19 316 remove_one = kmalloc_array(nr_alloc, sizeof(*remove_one), GFP_NOFS);
294ba78007c7bd Vivek Goyal 2018-11-19 317 if (!remove_one)
294ba78007c7bd Vivek Goyal 2018-11-19 318 return -ENOMEM;
294ba78007c7bd Vivek Goyal 2018-11-19 319
294ba78007c7bd Vivek Goyal 2018-11-19 320 ptr = remove_one;
294ba78007c7bd Vivek Goyal 2018-11-19 321 list_for_each_entry(dmap, to_remove, list) {
^^^^^^^^^
Can this list be empty?
294ba78007c7bd Vivek Goyal 2018-11-19 322 ptr->moffset = dmap->window_offset;
294ba78007c7bd Vivek Goyal 2018-11-19 323 ptr->len = dmap->length;
294ba78007c7bd Vivek Goyal 2018-11-19 324 ptr++;
294ba78007c7bd Vivek Goyal 2018-11-19 325 i++;
294ba78007c7bd Vivek Goyal 2018-11-19 326 num--;
294ba78007c7bd Vivek Goyal 2018-11-19 327 if (i >= nr_alloc || num == 0) {
294ba78007c7bd Vivek Goyal 2018-11-19 328 memset(&inarg, 0, sizeof(inarg));
294ba78007c7bd Vivek Goyal 2018-11-19 329 inarg.count = i;
294ba78007c7bd Vivek Goyal 2018-11-19 330 ret = fuse_send_removemapping(inode, &inarg,
294ba78007c7bd Vivek Goyal 2018-11-19 331 remove_one);
294ba78007c7bd Vivek Goyal 2018-11-19 332 if (ret)
294ba78007c7bd Vivek Goyal 2018-11-19 333 goto out;
294ba78007c7bd Vivek Goyal 2018-11-19 334 ptr = remove_one;
294ba78007c7bd Vivek Goyal 2018-11-19 335 i = 0;
294ba78007c7bd Vivek Goyal 2018-11-19 336 }
294ba78007c7bd Vivek Goyal 2018-11-19 337 }
294ba78007c7bd Vivek Goyal 2018-11-19 338 out:
294ba78007c7bd Vivek Goyal 2018-11-19 339 kfree(remove_one);
294ba78007c7bd Vivek Goyal 2018-11-19 @340 return ret;
294ba78007c7bd Vivek Goyal 2018-11-19 341 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
next reply other threads:[~2020-01-10 5:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-10 5:42 Dan Carpenter [this message]
2020-01-10 5:42 ` [rhvgoyal:virtiofs-dax-5.5 13/27] fs/fuse/file.c:340 dmap_removemapping_list() error: uninitialized symbol 'ret' Dan Carpenter
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=20200110054258.GE1770@kadam \
--to=dan.carpenter@oracle.com \
--cc=kbuild@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.