From: kbuild test robot <lkp@intel.com>
To: Matthew Wilcox <mawilcox@microsoft.com>
Cc: kbuild-all@01.org, Johannes Weiner <hannes@cmpxchg.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [mmotm:master 150/186] lib/idr.c:583:2: error: implicit declaration of function 'xa_lock_irqsave'; did you mean 'read_lock_irqsave'?
Date: Fri, 18 May 2018 02:19:28 +0800 [thread overview]
Message-ID: <201805180226.HGUXP2xa%fengguang.wu@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3411 bytes --]
tree: git://git.cmpxchg.org/linux-mmotm.git master
head: ba98a1cdad71d259a194461b3a61471b49b14df1
commit: 2bd748df742b49ee887ae07ff86a24b0d02f3817 [150/186] lib/idr.c: remove simple_ida_lock
config: x86_64-randconfig-v0-05140338 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
git checkout 2bd748df742b49ee887ae07ff86a24b0d02f3817
# save the attached .config to linux build tree
make ARCH=x86_64
Note: the mmotm/master HEAD ba98a1cdad71d259a194461b3a61471b49b14df1 builds fine.
It only hurts bisectibility.
All error/warnings (new ones prefixed by >>):
lib/idr.c: In function 'ida_simple_get':
>> lib/idr.c:583:2: error: implicit declaration of function 'xa_lock_irqsave'; did you mean 'read_lock_irqsave'? [-Werror=implicit-function-declaration]
xa_lock_irqsave(&ida->ida_rt, flags);
^~~~~~~~~~~~~~~
read_lock_irqsave
>> lib/idr.c:593:2: error: implicit declaration of function 'xa_unlock_irqrestore'; did you mean 'read_unlock_irqrestore'? [-Werror=implicit-function-declaration]
xa_unlock_irqrestore(&ida->ida_rt, flags);
^~~~~~~~~~~~~~~~~~~~
read_unlock_irqrestore
>> lib/idr.c:583:2: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
xa_lock_irqsave(&ida->ida_rt, flags);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/idr.c: In function 'ida_simple_remove':
lib/idr.c:617:2: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
xa_lock_irqsave(&ida->ida_rt, flags);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +583 lib/idr.c
546
547 /**
548 * ida_simple_get - get a new id.
549 * @ida: the (initialized) ida.
550 * @start: the minimum id (inclusive, < 0x8000000)
551 * @end: the maximum id (exclusive, < 0x8000000 or 0)
552 * @gfp_mask: memory allocation flags
553 *
554 * Allocates an id in the range start <= id < end, or returns -ENOSPC.
555 * On memory allocation failure, returns -ENOMEM.
556 *
557 * Compared to ida_get_new_above() this function does its own locking, and
558 * should be used unless there are special requirements.
559 *
560 * Use ida_simple_remove() to get rid of an id.
561 */
562 int ida_simple_get(struct ida *ida, unsigned int start, unsigned int end,
563 gfp_t gfp_mask)
564 {
565 int ret, id;
566 unsigned int max;
567 unsigned long flags;
568
569 BUG_ON((int)start < 0);
570 BUG_ON((int)end < 0);
571
572 if (end == 0)
573 max = 0x80000000;
574 else {
575 BUG_ON(end < start);
576 max = end - 1;
577 }
578
579 again:
580 if (!ida_pre_get(ida, gfp_mask))
581 return -ENOMEM;
582
> 583 xa_lock_irqsave(&ida->ida_rt, flags);
584 ret = ida_get_new_above(ida, start, &id);
585 if (!ret) {
586 if (id > max) {
587 ida_remove(ida, id);
588 ret = -ENOSPC;
589 } else {
590 ret = id;
591 }
592 }
> 593 xa_unlock_irqrestore(&ida->ida_rt, flags);
594
595 if (unlikely(ret == -EAGAIN))
596 goto again;
597
598 return ret;
599 }
600 EXPORT_SYMBOL(ida_simple_get);
601
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32255 bytes --]
reply other threads:[~2018-05-17 18:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201805180226.HGUXP2xa%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=kbuild-all@01.org \
--cc=linux-mm@kvack.org \
--cc=mawilcox@microsoft.com \
/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