public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: liuwf <liuwf@mailbox.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: Library: [RFC PATCH] btree_blue - a btree with linear travesal function and more
Date: Tue, 25 Apr 2023 03:31:44 +0800	[thread overview]
Message-ID: <202304250319.8IOPqkLH-lkp@intel.com> (raw)
In-Reply-To: <6d35bd15e3ec81bcde81b776a369d47ee1f373d2.camel@mailbox.org>

Hi liuwf,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.3 next-20230424]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/liuwf/Library-RFC-PATCH-btree_blue-a-btree-with-linear-travesal-function-and-more/20230424-214853
base:   linus/master
patch link:    https://lore.kernel.org/r/6d35bd15e3ec81bcde81b776a369d47ee1f373d2.camel%40mailbox.org
patch subject: Library: [RFC PATCH] btree_blue - a btree with linear travesal function and more
config: i386-randconfig-a002-20230424 (https://download.01.org/0day-ci/archive/20230425/202304250319.8IOPqkLH-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/intel-lab-lkp/linux/commit/749f2fb7789008fd7bb23287c37f4f5aaed09f25
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review liuwf/Library-RFC-PATCH-btree_blue-a-btree-with-linear-travesal-function-and-more/20230424-214853
        git checkout 749f2fb7789008fd7bb23287c37f4f5aaed09f25
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash lib/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304250319.8IOPqkLH-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> lib/btree_blue.c:109:5: warning: no previous prototype for function 'getpos' [-Wmissing-prototypes]
   int getpos(struct btree_blue_head *head, struct btree_blue_node_cb *cb, unsigned long *key)
       ^
   lib/btree_blue.c:109:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int getpos(struct btree_blue_head *head, struct btree_blue_node_cb *cb, unsigned long *key)
   ^
   static 
>> lib/btree_blue.c:144:5: warning: no previous prototype for function 'geteqv' [-Wmissing-prototypes]
   int geteqv(struct btree_blue_head *head, struct btree_blue_node_cb *cb, unsigned long *key)
       ^
   lib/btree_blue.c:144:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int geteqv(struct btree_blue_head *head, struct btree_blue_node_cb *cb, unsigned long *key)
   ^
   static 
>> lib/btree_blue.c:392:7: warning: no previous prototype for function 'btree_blue_prev_or_next' [-Wmissing-prototypes]
   void *btree_blue_prev_or_next(struct btree_blue_head *head, 
         ^
   lib/btree_blue.c:392:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void *btree_blue_prev_or_next(struct btree_blue_head *head, 
   ^
   static 
   lib/btree_blue.c:255:12: warning: unused function 'getpos_bin' [-Wunused-function]
   static int getpos_bin(struct btree_blue_head *head, struct btree_blue_node_cb *cb, 
              ^
   lib/btree_blue.c:277:12: warning: unused function 'geteqv_bin' [-Wunused-function]
   static int geteqv_bin(struct btree_blue_head *head, 
              ^
   5 warnings generated.


vim +/getpos +109 lib/btree_blue.c

   108	
 > 109	int getpos(struct btree_blue_head *head, struct btree_blue_node_cb *cb, unsigned long *key)
   110	{
   111		int i, o, x, nr, p, c;
   112	
   113		nr = cb->slots_info.slots_nr;
   114		x = nr / 8;
   115	
   116		for (i = 1; i <= x; i++) {
   117			p = i * 8 - 1;
   118			c = keycmp(head, cb, p, key);
   119			if (c < 0) {
   120				o = (i - 1) * 8;
   121				for (i = 0; i < 7; i++) {
   122					p = o + i;
   123					c = keycmp(head, cb, p, key);
   124					if (c <= 0) {
   125						return p;
   126					}
   127				}
   128				return o + 7;
   129			} else if (c == 0)
   130				return p;
   131		}
   132		
   133		o = x * 8;
   134		for (i = 0; i < nr % 8; i++) {
   135			p =  o + i;
   136			c = keycmp(head, cb, p, key);
   137			if (c <= 0)
   138				return p;
   139		}
   140	
   141		return nr;
   142	}
   143	
 > 144	int geteqv(struct btree_blue_head *head, struct btree_blue_node_cb *cb, unsigned long *key)
   145	{
   146		int i, o, x, nr, p, c;
   147	
   148		nr = cb->slots_info.slots_nr;
   149		x = nr / 8;
   150	
   151		for (i = 1; i <= x; i++) {
   152			p = i * 8 - 1;
   153			c = keycmp(head, cb, p, key);
   154			if (c < 0) {
   155				o = (i - 1) * 8;
   156				for (i = 0; i < 7; i++) {
   157					p =  o + i;
   158					c = keycmp(head, cb, p, key);
   159					if (c != 0)
   160						continue;
   161					else
   162						return p;
   163				}
   164				return nr;
   165			} else if (c == 0)
   166				return p;
   167		}
   168		
   169		o = x * 8;
   170		for (i = 0; i < nr % 8; i++) {
   171			p =  o + i;
   172			c = keycmp(head, cb, p, key);
   173			if (c == 0)
   174				return p;
   175		}
   176	
   177		return nr;
   178	}
   179	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

       reply	other threads:[~2023-04-24 19:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <6d35bd15e3ec81bcde81b776a369d47ee1f373d2.camel@mailbox.org>
2023-04-24 19:31 ` kernel test robot [this message]
2023-04-28 13:18   ` Library: [RFC PATCH] btree_blue - a btree with linear travesal function and more liuwf
2023-04-28 13:26   ` liuwf
2023-04-28 16:18     ` Linus Torvalds
2023-04-30  5:30       ` liuwf

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=202304250319.8IOPqkLH-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=liuwf@mailbox.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox