[mmotm:master 150/186] lib/idr.c:583:2: error: implicit declaration of function 'xa_lock_irqsave'; did you mean 'read_lock_irqsave'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux