[mmotm:master 149/199] 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:   7400fc6942aefa2e009272d0e118284f110c5088
commit: d5f90621ff2af7f139b01b7bcf8649a91665965e [149/199] lib/idr.c: remove simple_ida_lock
config: x86_64-randconfig-i0-201819 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        git checkout d5f90621ff2af7f139b01b7bcf8649a91665965e
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: the mmotm/master HEAD 7400fc6942aefa2e009272d0e118284f110c5088 builds fine.
      It only hurts bisectibility.

All errors (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
   Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size
   Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:__set_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:__clear_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:constant_test_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:variable_test_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:__ffs
   Cyclomatic Complexity 1 include/linux/err.h:ERR_PTR
   Cyclomatic Complexity 1 include/linux/err.h:PTR_ERR
   Cyclomatic Complexity 1 include/linux/radix-tree.h:radix_tree_is_internal_node
   Cyclomatic Complexity 1 include/linux/radix-tree.h:iter_shift
   Cyclomatic Complexity 1 include/linux/radix-tree.h:radix_tree_iter_init
   Cyclomatic Complexity 1 include/linux/radix-tree.h:__radix_tree_iter_add
   Cyclomatic Complexity 1 include/linux/radix-tree.h:radix_tree_chunk_size
   Cyclomatic Complexity 1 include/linux/radix-tree.h:__radix_tree_next_slot
   Cyclomatic Complexity 9 include/linux/radix-tree.h:radix_tree_next_slot
   Cyclomatic Complexity 1 include/linux/err.h:IS_ERR
   Cyclomatic Complexity 1 include/linux/radix-tree.h:radix_tree_exception
   Cyclomatic Complexity 1 include/linux/radix-tree.h:radix_tree_iter_find
   Cyclomatic Complexity 1 include/linux/radix-tree.h:radix_tree_iter_lookup
   Cyclomatic Complexity 3 include/linux/bitmap.h:bitmap_full
   Cyclomatic Complexity 3 include/linux/bitmap.h:bitmap_empty
   Cyclomatic Complexity 7 lib/idr.c:idr_alloc_u32
   Cyclomatic Complexity 5 lib/idr.c:idr_alloc
   Cyclomatic Complexity 6 lib/idr.c:idr_alloc_cyclic
   Cyclomatic Complexity 1 lib/idr.c:idr_remove
   Cyclomatic Complexity 1 lib/idr.c:idr_find
   Cyclomatic Complexity 6 lib/idr.c:idr_for_each
   Cyclomatic Complexity 5 lib/idr.c:idr_get_next
   Cyclomatic Complexity 3 lib/idr.c:idr_get_next_ul
   Cyclomatic Complexity 5 lib/idr.c:idr_replace
   Cyclomatic Complexity 18 lib/idr.c:ida_get_new_above
   Cyclomatic Complexity 10 lib/idr.c:ida_remove
   Cyclomatic Complexity 4 lib/idr.c:ida_destroy
   Cyclomatic Complexity 6 lib/idr.c:ida_simple_get
   Cyclomatic Complexity 1 lib/idr.c:ida_simple_remove
   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