All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 1/2] rbtree: Expose a test tree to userspace
Date: Fri, 22 Oct 2021 13:45:40 +0800	[thread overview]
Message-ID: <202110221325.ool2AMLI-lkp@intel.com> (raw)
In-Reply-To: <20211019091349.39788-2-metepolat2000@gmail.com>

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

Hi Mete,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.15-rc6 next-20211021]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Mete-Polat/rbtree-Test-against-a-verified-oracle/20211019-171711
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 519d81956ee277b4419c723adfb154603c2565ba
config: nds32-randconfig-r032-20211019 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/d73723d42ad47ca335de00e899a9e94b03d8b57d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Mete-Polat/rbtree-Test-against-a-verified-oracle/20211019-171711
        git checkout d73723d42ad47ca335de00e899a9e94b03d8b57d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nds32 

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

All warnings (new ones prefixed by >>):

>> lib/test_rbtree_interface.c:91:9: warning: no previous prototype for 'cmd_exec' [-Wmissing-prototypes]
      91 | ssize_t cmd_exec(struct file *file, const char __user *ubuf, size_t len, loff_t *offp)
         |         ^~~~~~~~
>> lib/test_rbtree_interface.c:138:12: warning: no previous prototype for 'rbt_if_init' [-Wmissing-prototypes]
     138 | int __init rbt_if_init(void)
         |            ^~~~~~~~~~~
>> lib/test_rbtree_interface.c:149:13: warning: no previous prototype for 'rbt_if_exit' [-Wmissing-prototypes]
     149 | void __exit rbt_if_exit(void)
         |             ^~~~~~~~~~~


vim +/cmd_exec +91 lib/test_rbtree_interface.c

    90	
  > 91	ssize_t cmd_exec(struct file *file, const char __user *ubuf, size_t len, loff_t *offp)
    92	{
    93		int cmd;
    94		struct data *data, *_n;
    95		struct rb_node *node;
    96		int ret = kstrtoint_from_user(ubuf, len, 10, &cmd);
    97		if (ret)
    98			return ret;
    99	
   100		switch (cmd) {
   101		case RESET:
   102			rbtree_postorder_for_each_entry_safe(data, _n, &rbt, node)
   103				kfree(data);
   104			rbt = RB_ROOT;
   105			break;
   106		case INSERT:
   107			data = kzalloc(sizeof(*data), GFP_KERNEL);
   108			data->key = input_key;
   109			rb_find_add(&data->node, &rbt, node_cmp);
   110			break;
   111		case DELETE:
   112			node = rb_find(&input_key, &rbt, key_cmp);
   113			if (!node)
   114				break;
   115			rb_erase(node, &rbt);
   116			kfree(data_from_node(node));
   117			break;
   118		default:
   119			return -EINVAL;
   120		}
   121		return len;
   122	}
   123	
   124	static int cmd_open(struct inode *inode, struct file *file)
   125	{
   126		return single_open(file, cmd_show, inode->i_private);
   127	}
   128	
   129	static const struct file_operations cmd_fops = {
   130		.owner		= THIS_MODULE,
   131		.open		= cmd_open,
   132		.read		= seq_read,
   133		.write		= cmd_exec,
   134		.llseek		= seq_lseek,
   135		.release	= single_release,
   136	};
   137	
 > 138	int __init rbt_if_init(void)
   139	{
   140		rbt_if_root = debugfs_create_dir("rbt_if", NULL);
   141		if (IS_ERR(rbt_if_root))
   142			return PTR_ERR(rbt_if_root);
   143	
   144		debugfs_create_file("cmd", 0644, rbt_if_root, NULL, &cmd_fops);
   145		debugfs_create_u64("key", 0644, rbt_if_root, &input_key);
   146		return 0;
   147	}
   148	
 > 149	void __exit rbt_if_exit(void)
   150	{
   151		struct data *_n, *pos;
   152		debugfs_remove_recursive(rbt_if_root);
   153		rbtree_postorder_for_each_entry_safe(pos, _n, &rbt, node)
   154			kfree(pos);
   155	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 25009 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Mete Polat <metepolat2000@gmail.com>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Michel Lespinasse <michel@lespinasse.org>
Cc: kbuild-all@lists.01.org, Andrii Nakryiko <andrii@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	linux-kernel@vger.kernel.org,
	Mete Polat <metepolat2000@gmail.com>
Subject: Re: [PATCH 1/2] rbtree: Expose a test tree to userspace
Date: Fri, 22 Oct 2021 13:45:40 +0800	[thread overview]
Message-ID: <202110221325.ool2AMLI-lkp@intel.com> (raw)
In-Reply-To: <20211019091349.39788-2-metepolat2000@gmail.com>

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

Hi Mete,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.15-rc6 next-20211021]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Mete-Polat/rbtree-Test-against-a-verified-oracle/20211019-171711
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 519d81956ee277b4419c723adfb154603c2565ba
config: nds32-randconfig-r032-20211019 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/d73723d42ad47ca335de00e899a9e94b03d8b57d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Mete-Polat/rbtree-Test-against-a-verified-oracle/20211019-171711
        git checkout d73723d42ad47ca335de00e899a9e94b03d8b57d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nds32 

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

All warnings (new ones prefixed by >>):

>> lib/test_rbtree_interface.c:91:9: warning: no previous prototype for 'cmd_exec' [-Wmissing-prototypes]
      91 | ssize_t cmd_exec(struct file *file, const char __user *ubuf, size_t len, loff_t *offp)
         |         ^~~~~~~~
>> lib/test_rbtree_interface.c:138:12: warning: no previous prototype for 'rbt_if_init' [-Wmissing-prototypes]
     138 | int __init rbt_if_init(void)
         |            ^~~~~~~~~~~
>> lib/test_rbtree_interface.c:149:13: warning: no previous prototype for 'rbt_if_exit' [-Wmissing-prototypes]
     149 | void __exit rbt_if_exit(void)
         |             ^~~~~~~~~~~


vim +/cmd_exec +91 lib/test_rbtree_interface.c

    90	
  > 91	ssize_t cmd_exec(struct file *file, const char __user *ubuf, size_t len, loff_t *offp)
    92	{
    93		int cmd;
    94		struct data *data, *_n;
    95		struct rb_node *node;
    96		int ret = kstrtoint_from_user(ubuf, len, 10, &cmd);
    97		if (ret)
    98			return ret;
    99	
   100		switch (cmd) {
   101		case RESET:
   102			rbtree_postorder_for_each_entry_safe(data, _n, &rbt, node)
   103				kfree(data);
   104			rbt = RB_ROOT;
   105			break;
   106		case INSERT:
   107			data = kzalloc(sizeof(*data), GFP_KERNEL);
   108			data->key = input_key;
   109			rb_find_add(&data->node, &rbt, node_cmp);
   110			break;
   111		case DELETE:
   112			node = rb_find(&input_key, &rbt, key_cmp);
   113			if (!node)
   114				break;
   115			rb_erase(node, &rbt);
   116			kfree(data_from_node(node));
   117			break;
   118		default:
   119			return -EINVAL;
   120		}
   121		return len;
   122	}
   123	
   124	static int cmd_open(struct inode *inode, struct file *file)
   125	{
   126		return single_open(file, cmd_show, inode->i_private);
   127	}
   128	
   129	static const struct file_operations cmd_fops = {
   130		.owner		= THIS_MODULE,
   131		.open		= cmd_open,
   132		.read		= seq_read,
   133		.write		= cmd_exec,
   134		.llseek		= seq_lseek,
   135		.release	= single_release,
   136	};
   137	
 > 138	int __init rbt_if_init(void)
   139	{
   140		rbt_if_root = debugfs_create_dir("rbt_if", NULL);
   141		if (IS_ERR(rbt_if_root))
   142			return PTR_ERR(rbt_if_root);
   143	
   144		debugfs_create_file("cmd", 0644, rbt_if_root, NULL, &cmd_fops);
   145		debugfs_create_u64("key", 0644, rbt_if_root, &input_key);
   146		return 0;
   147	}
   148	
 > 149	void __exit rbt_if_exit(void)
   150	{
   151		struct data *_n, *pos;
   152		debugfs_remove_recursive(rbt_if_root);
   153		rbtree_postorder_for_each_entry_safe(pos, _n, &rbt, node)
   154			kfree(pos);
   155	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25009 bytes --]

  parent reply	other threads:[~2021-10-22  5:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19  9:13 [PATCH 0/2] rbtree: Test against a verified oracle Mete Polat
2021-10-19  9:13 ` [PATCH 1/2] rbtree: Expose a test tree to userspace Mete Polat
2021-10-20  6:46   ` kernel test robot
2021-10-20  6:46     ` kernel test robot
2021-10-22  5:45   ` kernel test robot [this message]
2021-10-22  5:45     ` kernel test robot
2021-10-19  9:13 ` [PATCH 2/2] rbtree: add verified oracle with testing harness Mete Polat
2021-10-22  9:32 ` [PATCH 0/2] rbtree: Test against a verified oracle Michel Lespinasse
2021-10-28 14:44   ` Mete Polat

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=202110221325.ool2AMLI-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.