[staging:staging-testing 1122/1122] drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head:   36c3c6ecedac0e96207e9454d77231b5b1857a3f
commit: 36c3c6ecedac0e96207e9454d77231b5b1857a3f [1122/1122] staging: add bcm2708 vchiq driver
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 36c3c6ecedac0e96207e9454d77231b5b1857a3f
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All warnings (new ones prefixed by >>):

   In file included from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:35:0:
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
    #define mutex_lock_interruptible mutex_lock_interruptible_killable
    
   In file included from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h:37:0,
                    from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:34:
   include/linux/mutex.h:147:0: note: this is the location of the previous definition
    #define mutex_lock_interruptible(lock) mutex_lock_interruptible_nested(lock, 0)
    
--
   In file included from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:56:0:
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
    #define mutex_lock_interruptible mutex_lock_interruptible_killable
    
   In file included from include/linux/notifier.h:13:0,
                    from include/linux/memory_hotplug.h:6,
                    from include/linux/mmzone.h:777,
                    from include/linux/gfp.h:5,
                    from include/linux/kmod.h:22,
                    from include/linux/module.h:13,
                    from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:36:
   include/linux/mutex.h:147:0: note: this is the location of the previous definition
    #define mutex_lock_interruptible(lock) mutex_lock_interruptible_nested(lock, 0)
    
   In file included from ./arch/arm/include/generated/asm/current.h:1:0,
                    from include/linux/wait.h:9,
                    from include/linux/mmzone.h:9,
                    from include/linux/gfp.h:5,
                    from include/linux/kmod.h:22,
                    from include/linux/module.h:13,
                    from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:36:
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c: In function 'dump_phys_mem':
   include/asm-generic/current.h:6:23: warning: passing argument 1 of 'get_user_pages' makes integer from pointer without a cast [-Wint-conversion]
    #define get_current() (current_thread_info()->task)
                          ^
   include/asm-generic/current.h:7:17: note: in expansion of macro 'get_current'
    #define current get_current()
                    ^~~~~~~~~~~
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1476:22: note: in expansion of macro 'current'
     rc = get_user_pages(current,      /* task */
                         ^~~~~~~
   In file included from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:42:0:
   include/linux/mm.h:1293:6: note: expected 'long unsigned int' but argument is of type 'struct task_struct *'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   In file included from ./arch/arm/include/generated/asm/current.h:1:0,
                    from include/linux/wait.h:9,
                    from include/linux/mmzone.h:9,
                    from include/linux/gfp.h:5,
                    from include/linux/kmod.h:22,
                    from include/linux/module.h:13,
                    from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:36:
   include/asm-generic/current.h:6:23: warning: passing argument 2 of 'get_user_pages' makes integer from pointer without a cast [-Wint-conversion]
    #define get_current() (current_thread_info()->task)
                          ^
   include/asm-generic/current.h:7:17: note: in expansion of macro 'get_current'
    #define current get_current()
                    ^~~~~~~~~~~
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1477:3: note: in expansion of macro 'current'
      current->mm,              /* mm */
      ^~~~~~~
   In file included from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:42:0:
   include/linux/mm.h:1293:6: note: expected 'long unsigned int' but argument is of type 'struct mm_struct *'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1476:7: error: too many arguments to function 'get_user_pages'
     rc = get_user_pages(current,      /* task */
          ^~~~~~~~~~~~~~
   In file included from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:42:0:
   include/linux/mm.h:1293:6: note: declared here
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1516:3: error: implicit declaration of function 'page_cache_release' [-Werror=implicit-function-declaration]
      page_cache_release(pages[page_idx]);
      ^~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   In file included from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c:42:0:
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
    #define mutex_lock_interruptible mutex_lock_interruptible_killable
    
   In file included from include/linux/notifier.h:13:0,
                    from include/linux/memory_hotplug.h:6,
                    from include/linux/mmzone.h:777,
                    from include/linux/gfp.h:5,
                    from include/linux/kmod.h:22,
                    from include/linux/module.h:13,
                    from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c:37:
   include/linux/mutex.h:147:0: note: this is the location of the previous definition
    #define mutex_lock_interruptible(lock) mutex_lock_interruptible_nested(lock, 0)
    
   In file included from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c:42:0:
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
    #define mutex_lock_interruptible mutex_lock_interruptible_killable
    
   In file included from include/linux/notifier.h:13:0,
                    from include/linux/memory_hotplug.h:6,
                    from include/linux/mmzone.h:777,
                    from include/linux/gfp.h:5,
                    from include/linux/kmod.h:22,
                    from include/linux/module.h:13,
                    from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c:37:
   include/linux/mutex.h:147:0: note: this is the location of the previous definition
    #define mutex_lock_interruptible(lock) mutex_lock_interruptible_nested(lock, 0)
    
--
   In file included from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:61:0:
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h:67:0: warning: "mutex_lock_interruptible" redefined
    #define mutex_lock_interruptible mutex_lock_interruptible_killable
    
   In file included from include/linux/kref.h:21:0,
                    from include/linux/interrupt.h:15,
                    from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:37:
   include/linux/mutex.h:147:0: note: this is the location of the previous definition
    #define mutex_lock_interruptible(lock) mutex_lock_interruptible_nested(lock, 0)
    
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c: In function 'vchiq_platform_init':
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:169:34: error: 'RPI_FIRMWARE_VCHIQ_INIT' undeclared (first use in this function)
     err = rpi_firmware_property(fw, RPI_FIRMWARE_VCHIQ_INIT,
                                     ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:169:34: note: each undeclared identifier is reported only once for each function it appears in
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c: In function 'create_pagelist':
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:423:33: warning: passing argument 1 of 'get_user_pages' makes integer from pointer without a cast [-Wint-conversion]
      actual_pages = get_user_pages(task, task->mm,
                                    ^~~~
   In file included from include/linux/pagemap.h:7:0,
                    from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:38:
   include/linux/mm.h:1293:6: note: expected 'long unsigned int' but argument is of type 'struct task_struct *'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:423:39: warning: passing argument 2 of 'get_user_pages' makes integer from pointer without a cast [-Wint-conversion]
      actual_pages = get_user_pages(task, task->mm,
                                          ^~~~
   In file included from include/linux/pagemap.h:7:0,
                    from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:38:
   include/linux/mm.h:1293:6: note: expected 'long unsigned int' but argument is of type 'struct mm_struct *'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:426:8: warning: passing argument 5 of 'get_user_pages' makes pointer from integer without a cast [-Wint-conversion]
           (type == PAGELIST_READ) /*Write */ ,
           ^
   In file included from include/linux/pagemap.h:7:0,
                    from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:38:
   include/linux/mm.h:1293:6: note: expected 'struct page **' but argument is of type 'int'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:423:18: error: too many arguments to function 'get_user_pages'
      actual_pages = get_user_pages(task, task->mm,
                     ^~~~~~~~~~~~~~
   In file included from include/linux/pagemap.h:7:0,
                    from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:38:
   include/linux/mm.h:1293:6: note: declared here
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:442:5: error: implicit declaration of function 'page_cache_release' [-Werror=implicit-function-declaration]
        page_cache_release(pages[actual_pages]);
        ^~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/mutex_lock_interruptible +67 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_killable.h

    51		return ret;
    52	}
    53	#define down_interruptible down_interruptible_killable
    54	
    55	
    56	static inline int __must_check mutex_lock_interruptible_killable(struct mutex *lock)
    57	{
    58		/* Allow interception of killable signals only. We don't want to be interrupted by harmless signals like SIGALRM */
    59		int ret;
    60		sigset_t blocked, oldset;
    61		siginitsetinv(&blocked, SHUTDOWN_SIGS);
    62		sigprocmask(SIG_SETMASK, &blocked, &oldset);
    63		ret = mutex_lock_interruptible(lock);
    64		sigprocmask(SIG_SETMASK, &oldset, NULL);
    65		return ret;
    66	}
  > 67	#define mutex_lock_interruptible mutex_lock_interruptible_killable
    68	
    69	#endif

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux