[staging:staging-testing 190/190] drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:95:23: warning: unused variable 'fw'

[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:   ecbc62fd441210e54e25fa9683422bbc0143049d
commit: ecbc62fd441210e54e25fa9683422bbc0143049d [190/190] staging: vc04_services: add CONFIG_COMPILE_TEST ability
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
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 ecbc62fd441210e54e25fa9683422bbc0143049d
        # save the attached .config to linux build tree
        make.cross ARCH=ia64 

All warnings (new ones prefixed by >>):

   In file included from arch/ia64/include/asm/bug.h:12:0,
                    from include/linux/bug.h:4,
                    from include/linux/thread_info.h:11,
                    from include/asm-generic/preempt.h:4,
                    from ./arch/ia64/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:59,
                    from include/linux/interrupt.h:8,
                    from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:37:
   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:121:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     WARN_ON(((int)slot_mem & (PAGE_SIZE - 1)) != 0);
              ^
   include/asm-generic/bug.h:92:25: note: in definition of macro 'WARN_ON'
     int __ret_warn_on = !!(condition);    \
                            ^~~~~~~~~
   In file included from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h:42:0,
                    from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:55:
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:175:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      (unsigned int)vchiq_slot_zero, &slot_phys);
      ^
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h:67:39: note: in definition of macro 'vchiq_log_info'
      printk(VCHIQ_LOG_PREFIX fmt "\n", ##__VA_ARGS__); } while (0)
                                          ^~~~~~~~~~~
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:95:23: warning: unused variable 'fw' [-Wunused-variable]
     struct rpi_firmware *fw = platform_get_drvdata(pdev);
                          ^~
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c: In function 'vchiq_copy_from_user':
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:222:6: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     if ((uint32_t)src < TASK_SIZE) {
         ^
   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:375:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     offset = (unsigned int)buf & (PAGE_SIZE - 1);
              ^
   In file included from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h:42:0,
                    from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:55:
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:390:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      "create_pagelist - %x", (unsigned int)pagelist);
                              ^
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h:72:39: note: in definition of macro 'vchiq_log_trace'
      printk(VCHIQ_LOG_PREFIX fmt "\n", ##__VA_ARGS__); } while (0)
                                          ^~~~~~~~~~~
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:413:35: warning: value computed is not used [-Wunused-value]
       dmac_map_area(page_address(pg) + off, bytes, dir);
                                       
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:413:40: warning: right-hand operand of comma expression has no effect [-Wunused-value]
       dmac_map_area(page_address(pg) + off, bytes, dir);
                                           ^
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:413:47: warning: right-hand operand of comma expression has no effect [-Wunused-value]
       dmac_map_area(page_address(pg) + off, bytes, dir);
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
   In file included from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h:42:0,
                    from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:55:
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c: In function 'free_pagelist':
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:515:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      "free_pagelist - %x, %d", (unsigned int)pagelist, actual);
                                ^
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h:72:39: note: in definition of macro 'vchiq_log_trace'
      printk(VCHIQ_LOG_PREFIX fmt "\n", ##__VA_ARGS__); } while (0)
                                          ^~~~~~~~~~~
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:572:38: warning: value computed is not used [-Wunused-value]
        dmac_unmap_area(page_address(pg) + offset,
                                          
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:572:46: warning: right-hand operand of comma expression has no effect [-Wunused-value]
        dmac_unmap_area(page_address(pg) + offset,
                                                 ^
   drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:573:12: warning: right-hand operand of comma expression has no effect [-Wunused-value]
        dmac_unmap_area(page_address(pg) + offset,
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~
          bytes, DMA_FROM_DEVICE);
          ~~~~~^~~~~~~~~~~~~~~~~~

vim +/fw +95 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c

71bad7f0 popcornmix 2013-07-02  49  #define dmac_unmap_area 		__glue(_CACHE,_dma_unmap_area)
71bad7f0 popcornmix 2013-07-02  50  
71bad7f0 popcornmix 2013-07-02  51  #define TOTAL_SLOTS (VCHIQ_SLOT_ZERO_SLOTS + 2 * 32)
71bad7f0 popcornmix 2013-07-02  52  
71bad7f0 popcornmix 2013-07-02  53  #define VCHIQ_ARM_ADDRESS(x) ((void *)((char *)x + g_virt_to_bus_offset))
71bad7f0 popcornmix 2013-07-02  54  
71bad7f0 popcornmix 2013-07-02 @55  #include "vchiq_arm.h"
71bad7f0 popcornmix 2013-07-02  56  #include "vchiq_2835.h"
71bad7f0 popcornmix 2013-07-02  57  #include "vchiq_connected.h"
71bad7f0 popcornmix 2013-07-02  58  #include "vchiq_killable.h"
71bad7f0 popcornmix 2013-07-02  59  
71bad7f0 popcornmix 2013-07-02  60  #define MAX_FRAGMENTS (VCHIQ_NUM_CURRENT_BULKS * 2)
71bad7f0 popcornmix 2013-07-02  61  
71bad7f0 popcornmix 2013-07-02  62  #define BELL0	0x00
71bad7f0 popcornmix 2013-07-02  63  #define BELL2	0x08
71bad7f0 popcornmix 2013-07-02  64  
71bad7f0 popcornmix 2013-07-02  65  typedef struct vchiq_2835_state_struct {
71bad7f0 popcornmix 2013-07-02  66     int inited;
71bad7f0 popcornmix 2013-07-02  67     VCHIQ_ARM_STATE_T arm_state;
71bad7f0 popcornmix 2013-07-02  68  } VCHIQ_2835_ARM_STATE_T;
71bad7f0 popcornmix 2013-07-02  69  
71bad7f0 popcornmix 2013-07-02  70  static void __iomem *g_regs;
71bad7f0 popcornmix 2013-07-02  71  static unsigned int g_cache_line_size = sizeof(CACHE_LINE_SIZE);
71bad7f0 popcornmix 2013-07-02  72  static unsigned int g_fragments_size;
71bad7f0 popcornmix 2013-07-02  73  static char *g_fragments_base;
71bad7f0 popcornmix 2013-07-02  74  static char *g_free_fragments;
71bad7f0 popcornmix 2013-07-02  75  static struct semaphore g_free_fragments_sema;
71bad7f0 popcornmix 2013-07-02  76  static unsigned long g_virt_to_bus_offset;
71bad7f0 popcornmix 2013-07-02  77  
71bad7f0 popcornmix 2013-07-02  78  extern int vchiq_arm_log_level;
71bad7f0 popcornmix 2013-07-02  79  
71bad7f0 popcornmix 2013-07-02  80  static DEFINE_SEMAPHORE(g_free_fragments_mutex);
71bad7f0 popcornmix 2013-07-02  81  
71bad7f0 popcornmix 2013-07-02  82  static irqreturn_t
71bad7f0 popcornmix 2013-07-02  83  vchiq_doorbell_irq(int irq, void *dev_id);
71bad7f0 popcornmix 2013-07-02  84  
71bad7f0 popcornmix 2013-07-02  85  static int
71bad7f0 popcornmix 2013-07-02  86  create_pagelist(char __user *buf, size_t count, unsigned short type,
71bad7f0 popcornmix 2013-07-02  87                  struct task_struct *task, PAGELIST_T ** ppagelist);
71bad7f0 popcornmix 2013-07-02  88  
71bad7f0 popcornmix 2013-07-02  89  static void
71bad7f0 popcornmix 2013-07-02  90  free_pagelist(PAGELIST_T *pagelist, int actual);
71bad7f0 popcornmix 2013-07-02  91  
71bad7f0 popcornmix 2013-07-02  92  int vchiq_platform_init(struct platform_device *pdev, VCHIQ_STATE_T *state)
71bad7f0 popcornmix 2013-07-02  93  {
71bad7f0 popcornmix 2013-07-02  94  	struct device *dev = &pdev->dev;
71bad7f0 popcornmix 2013-07-02 @95  	struct rpi_firmware *fw = platform_get_drvdata(pdev);
71bad7f0 popcornmix 2013-07-02  96  	VCHIQ_SLOT_ZERO_T *vchiq_slot_zero;
71bad7f0 popcornmix 2013-07-02  97  	struct resource *res;
71bad7f0 popcornmix 2013-07-02  98  	void *slot_mem;

:::::: The code at line 95 was first introduced by commit
:::::: 71bad7f086419dc674244b91ca35a12bfa4cb597 staging: add bcm2708 vchiq driver

:::::: TO: popcornmix <popcornmix@xxxxxxxxx>
:::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
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