public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: XueBing Chen <chenxb_99091@126.com>, akpm@linux-foundation.org
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	XueBing Chen <chenxb_99091@126.com>
Subject: Re: [PATCH] lib/bsearch: add mutex protection for thread-safe binary search
Date: Fri, 17 Oct 2025 15:28:41 +0800	[thread overview]
Message-ID: <202510171538.n1mAFlu0-lkp@intel.com> (raw)
In-Reply-To: <20251016090640.6331-1-chenxb_99091@126.com>

Hi XueBing,

kernel test robot noticed the following build warnings:

[auto build test WARNING on akpm-mm/mm-nonmm-unstable]
[also build test WARNING on akpm-mm/mm-everything linus/master v6.18-rc1 next-20251016]
[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/XueBing-Chen/lib-bsearch-add-mutex-protection-for-thread-safe-binary-search/20251016-171911
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-nonmm-unstable
patch link:    https://lore.kernel.org/r/20251016090640.6331-1-chenxb_99091%40126.com
patch subject: [PATCH] lib/bsearch: add mutex protection for thread-safe binary search
config: arm-randconfig-r121-20251017 (https://download.01.org/0day-ci/archive/20251017/202510171538.n1mAFlu0-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251017/202510171538.n1mAFlu0-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510171538.n1mAFlu0-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> lib/bsearch.c:34:1: sparse: sparse: symbol 'cmp_mutex' was not declared. Should it be static?

vim +/cmp_mutex +34 lib/bsearch.c

    15	
    16	/*
    17	 * bsearch - binary search an array of elements
    18	 * @key: pointer to item being searched for
    19	 * @base: pointer to first element to search
    20	 * @num: number of elements
    21	 * @size: size of each element
    22	 * @cmp: pointer to comparison function
    23	 *
    24	 * This function does a binary search on the given array.  The
    25	 * contents of the array should already be in ascending sorted order
    26	 * under the provided comparison function.
    27	 *
    28	 * Note that the key need not have the same type as the elements in
    29	 * the array, e.g. key could be a string and the comparison function
    30	 * could compare the string with the struct's name field.  However, if
    31	 * the key and elements in the array are of the same type, you can use
    32	 * the same comparison function for both sort() and bsearch().
    33	 */
  > 34	DEFINE_MUTEX(cmp_mutex);

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

  parent reply	other threads:[~2025-10-17  7:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-16  9:06 [PATCH] lib/bsearch: add mutex protection for thread-safe binary search XueBing Chen
2025-10-16  9:42 ` Kuan-Wei Chiu
2025-10-17  7:28 ` kernel test robot [this message]
2025-10-21  4:47 ` kernel test robot

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=202510171538.n1mAFlu0-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=chenxb_99091@126.com \
    --cc=linux-kernel@vger.kernel.org \
    --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