All of lore.kernel.org
 help / color / mirror / Atom feed
* [driver-core:debugfs_cleanup 1/1] fs/d_path.c:20:20: warning: Unsigned variable '.' can't be negative so it is unnecessary to test it. [unsignedPositive]
@ 2021-11-14 16:20 kernel test robot
  2021-11-15  9:22   ` kernel test robot
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-11-14 16:20 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 2357 bytes --]

CC: kbuild-all(a)lists.01.org
CC: devel(a)driverdev.osuosl.org
CC: linux-kernel(a)vger.kernel.org
TO: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git debugfs_cleanup
head:   8247270bcf99bc7bf661ae2a3f2ee6e64c7f957d
commit: 8247270bcf99bc7bf661ae2a3f2ee6e64c7f957d [1/1] fs: make d_path-like functions all have unsigned size
:::::: branch date: 4 hours ago
:::::: commit date: 4 hours ago
compiler: ia64-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> fs/d_path.c:20:20: warning: Unsigned variable '.' can't be negative so it is unnecessary to test it. [unsignedPositive]
    if (likely(p->len >= 0))
                      ^

vim +20 fs/d_path.c

7a5cf791a74764 Al Viro            2018-03-05  10  
ad08ae586586ea Al Viro            2021-05-12  11  struct prepend_buffer {
ad08ae586586ea Al Viro            2021-05-12  12  	char *buf;
8247270bcf99bc Greg Kroah-Hartman 2021-07-27  13  	unsigned int len;
ad08ae586586ea Al Viro            2021-05-12  14  };
ad08ae586586ea Al Viro            2021-05-12  15  #define DECLARE_BUFFER(__name, __buf, __len) \
ad08ae586586ea Al Viro            2021-05-12  16  	struct prepend_buffer __name = {.buf = __buf + __len, .len = __len}
ad08ae586586ea Al Viro            2021-05-12  17  
ad08ae586586ea Al Viro            2021-05-12  18  static char *extract_string(struct prepend_buffer *p)
7a5cf791a74764 Al Viro            2018-03-05  19  {
ad08ae586586ea Al Viro            2021-05-12 @20  	if (likely(p->len >= 0))
ad08ae586586ea Al Viro            2021-05-12  21  		return p->buf;
ad08ae586586ea Al Viro            2021-05-12  22  	return ERR_PTR(-ENAMETOOLONG);
ad08ae586586ea Al Viro            2021-05-12  23  }
ad08ae586586ea Al Viro            2021-05-12  24  

:::::: The code at line 20 was first introduced by commit
:::::: ad08ae586586ea9e2c0228a3d5a083500ea54202 d_path: introduce struct prepend_buffer

:::::: TO: Al Viro <viro@zeniv.linux.org.uk>
:::::: CC: Al Viro <viro@zeniv.linux.org.uk>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [driver-core:debugfs_cleanup 1/1] fs/d_path.c:20:20: warning: Unsigned variable '.' can't be negative so it is unnecessary to test it. [unsignedPositive]
  2021-11-14 16:20 [driver-core:debugfs_cleanup 1/1] fs/d_path.c:20:20: warning: Unsigned variable '.' can't be negative so it is unnecessary to test it. [unsignedPositive] kernel test robot
@ 2021-11-15  9:22   ` kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-11-15  9:22 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2130 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git debugfs_cleanup
head:   8247270bcf99bc7bf661ae2a3f2ee6e64c7f957d
commit: 8247270bcf99bc7bf661ae2a3f2ee6e64c7f957d [1/1] fs: make d_path-like functions all have unsigned size
compiler: ia64-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

 >> fs/d_path.c:20:20: warning: Unsigned variable '.' can't be negative so it is unnecessary to test it. [unsignedPositive]
     if (likely(p->len >= 0))
                       ^

vim +20 fs/d_path.c

7a5cf791a74764 Al Viro            2018-03-05  10
ad08ae586586ea Al Viro            2021-05-12  11  struct prepend_buffer {
ad08ae586586ea Al Viro            2021-05-12  12  	char *buf;
8247270bcf99bc Greg Kroah-Hartman 2021-07-27  13  	unsigned int len;
ad08ae586586ea Al Viro            2021-05-12  14  };
ad08ae586586ea Al Viro            2021-05-12  15  #define DECLARE_BUFFER(__name, __buf, __len) \
ad08ae586586ea Al Viro            2021-05-12  16  	struct prepend_buffer __name = {.buf = __buf + __len, .len = __len}
ad08ae586586ea Al Viro            2021-05-12  17
ad08ae586586ea Al Viro            2021-05-12  18  static char *extract_string(struct prepend_buffer *p)
7a5cf791a74764 Al Viro            2018-03-05  19  {
ad08ae586586ea Al Viro            2021-05-12 @20  	if (likely(p->len >= 0))
ad08ae586586ea Al Viro            2021-05-12  21  		return p->buf;
ad08ae586586ea Al Viro            2021-05-12  22  	return ERR_PTR(-ENAMETOOLONG);
ad08ae586586ea Al Viro            2021-05-12  23  }
ad08ae586586ea Al Viro            2021-05-12  24

:::::: The code at line 20 was first introduced by commit
:::::: ad08ae586586ea9e2c0228a3d5a083500ea54202 d_path: introduce struct prepend_buffer

:::::: TO: Al Viro <viro@zeniv.linux.org.uk>
:::::: CC: Al Viro <viro@zeniv.linux.org.uk>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [driver-core:debugfs_cleanup 1/1] fs/d_path.c:20:20: warning: Unsigned variable '.' can't be negative so it is unnecessary to test it. [unsignedPositive]
@ 2021-11-15  9:22   ` kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-11-15  9:22 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: kbuild-all, devel, Linux Kernel Mailing List

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git debugfs_cleanup
head:   8247270bcf99bc7bf661ae2a3f2ee6e64c7f957d
commit: 8247270bcf99bc7bf661ae2a3f2ee6e64c7f957d [1/1] fs: make d_path-like functions all have unsigned size
compiler: ia64-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

 >> fs/d_path.c:20:20: warning: Unsigned variable '.' can't be negative so it is unnecessary to test it. [unsignedPositive]
     if (likely(p->len >= 0))
                       ^

vim +20 fs/d_path.c

7a5cf791a74764 Al Viro            2018-03-05  10
ad08ae586586ea Al Viro            2021-05-12  11  struct prepend_buffer {
ad08ae586586ea Al Viro            2021-05-12  12  	char *buf;
8247270bcf99bc Greg Kroah-Hartman 2021-07-27  13  	unsigned int len;
ad08ae586586ea Al Viro            2021-05-12  14  };
ad08ae586586ea Al Viro            2021-05-12  15  #define DECLARE_BUFFER(__name, __buf, __len) \
ad08ae586586ea Al Viro            2021-05-12  16  	struct prepend_buffer __name = {.buf = __buf + __len, .len = __len}
ad08ae586586ea Al Viro            2021-05-12  17
ad08ae586586ea Al Viro            2021-05-12  18  static char *extract_string(struct prepend_buffer *p)
7a5cf791a74764 Al Viro            2018-03-05  19  {
ad08ae586586ea Al Viro            2021-05-12 @20  	if (likely(p->len >= 0))
ad08ae586586ea Al Viro            2021-05-12  21  		return p->buf;
ad08ae586586ea Al Viro            2021-05-12  22  	return ERR_PTR(-ENAMETOOLONG);
ad08ae586586ea Al Viro            2021-05-12  23  }
ad08ae586586ea Al Viro            2021-05-12  24

:::::: The code at line 20 was first introduced by commit
:::::: ad08ae586586ea9e2c0228a3d5a083500ea54202 d_path: introduce struct prepend_buffer

:::::: TO: Al Viro <viro@zeniv.linux.org.uk>
:::::: CC: Al Viro <viro@zeniv.linux.org.uk>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-15  9:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-14 16:20 [driver-core:debugfs_cleanup 1/1] fs/d_path.c:20:20: warning: Unsigned variable '.' can't be negative so it is unnecessary to test it. [unsignedPositive] kernel test robot
2021-11-15  9:22 ` kernel test robot
2021-11-15  9:22   ` kernel test robot

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.