Hi Mauro,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on next-20190226]
[cannot apply to v5.0-rc8]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Mauro-Carvalho-Chehab/media-vim2m-improve-debug-messages/20190227-194011
base:   git://linuxtv.org/media_tree.git master
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 6.4.0
reproduce:
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=6.4.0 make.cross ARCH=nds32 

All warnings (new ones prefixed by >>):

   In file included from include/media/v4l2-subdev.h:24:0,
                    from include/media/v4l2-device.h:25,
                    from drivers/media/platform/vim2m.c:28:
   drivers/media/platform/vim2m.c: In function 'vim2m_buf_prepare':
   include/media/v4l2-common.h:84:13: warning: comparison between pointer and 
integer
      if (debug >= (level))     \
                ^
>> drivers/media/platform/vim2m.c:71:2: note: in expansion of macro 'v4l2_dbg'
     v4l2_dbg(lvl, debug, &dev->v4l2_dev, "%s: " fmt, __func__, ## arg)
     ^~~~~~~~
>> drivers/media/platform/vim2m.c:893:3: note: in expansion of macro 'dprintk'
      dprintk(ctx->dev, "%s data will not fit into plane (%lu < %lu)\n",
      ^~~~~~~
   drivers/media/platform/vim2m.c:894:5: error: expected ')' before '__func__'
        __func__, vb2_plane_size(vb, 0), (long)q_data->sizeimage);
        ^
   include/media/v4l2-common.h:69:22: note: in definition of macro 'v4l2_printk'
     printk(level "%s: " fmt, (dev)->name , ## arg)
                         ^~~
>> drivers/media/platform/vim2m.c:71:2: note: in expansion of macro 'v4l2_dbg'
     v4l2_dbg(lvl, debug, &dev->v4l2_dev, "%s: " fmt, __func__, ## arg)
     ^~~~~~~~
>> drivers/media/platform/vim2m.c:893:3: note: in expansion of macro 'dprintk'
      dprintk(ctx->dev, "%s data will not fit into plane (%lu < %lu)\n",
      ^~~~~~~
   include/linux/kern_levels.h:5:18: warning: format '%s' expects a matching 
'char *' argument [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/media/v4l2-common.h:69:9: note: in definition of macro 'v4l2_printk'
     printk(level "%s: " fmt, (dev)->name , ## arg)
            ^~~~~
   include/linux/kern_levels.h:15:20: note: in expansion of macro 'KERN_SOH'
    #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
                       ^~~~~~~~
   include/media/v4l2-common.h:85:16: note: in expansion of macro 'KERN_DEBUG'
       v4l2_printk(KERN_DEBUG, dev, fmt , ## arg); \
                   ^~~~~~~~~~
>> drivers/media/platform/vim2m.c:71:2: note: in expansion of macro 'v4l2_dbg'
     v4l2_dbg(lvl, debug, &dev->v4l2_dev, "%s: " fmt, __func__, ## arg)
     ^~~~~~~~
>> drivers/media/platform/vim2m.c:893:3: note: in expansion of macro 'dprintk'
      dprintk(ctx->dev, "%s data will not fit into plane (%lu < %lu)\n",
      ^~~~~~~
   include/linux/kern_levels.h:5:18: warning: format '%s' expects a matching 
'char *' argument [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/media/v4l2-common.h:69:9: note: in definition of macro 'v4l2_printk'
     printk(level "%s: " fmt, (dev)->name , ## arg)
            ^~~~~
   include/linux/kern_levels.h:15:20: note: in expansion of macro 'KERN_SOH'
    #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
                       ^~~~~~~~
   include/media/v4l2-common.h:85:16: note: in expansion of macro 'KERN_DEBUG'
       v4l2_printk(KERN_DEBUG, dev, fmt , ## arg); \
                   ^~~~~~~~~~
>> drivers/media/platform/vim2m.c:71:2: note: in expansion of macro 'v4l2_dbg'
     v4l2_dbg(lvl, debug, &dev->v4l2_dev, "%s: " fmt, __func__, ## arg)
     ^~~~~~~~
>> drivers/media/platform/vim2m.c:893:3: note: in expansion of macro 'dprintk'
      dprintk(ctx->dev, "%s data will not fit into plane (%lu < %lu)\n",
      ^~~~~~~

vim +/v4l2_dbg +71 drivers/media/platform/vim2m.c

    25  
    26  #include <linux/platform_device.h>
    27  #include <media/v4l2-mem2mem.h>
  > 28  #include <media/v4l2-device.h>
    29  #include <media/v4l2-ioctl.h>
    30  #include <media/v4l2-ctrls.h>
    31  #include <media/v4l2-event.h>
    32  #include <media/videobuf2-vmalloc.h>
    33  
    34  MODULE_DESCRIPTION("Virtual device for mem2mem framework testing");
    35  MODULE_AUTHOR("Pawel Osciak, <pa...@osciak.com>");
    36  MODULE_LICENSE("GPL");
    37  MODULE_VERSION("0.1.1");
    38  MODULE_ALIAS("mem2mem_testdev");
    39  
    40  static unsigned debug;
    41  module_param(debug, uint, 0644);
    42  MODULE_PARM_DESC(debug, "debug level");
    43  
    44  /* Default transaction time in msec */
    45  static unsigned int default_transtime = 40; /* Max 25 fps */
    46  module_param(default_transtime, uint, 0644);
    47  MODULE_PARM_DESC(default_transtime, "default transaction time in ms");
    48  
    49  #define MIN_W 32
    50  #define MIN_H 32
    51  #define MAX_W 640
    52  #define MAX_H 480
    53  #define DIM_ALIGN_MASK 7 /* 8-byte alignment for line length */
    54  
    55  /* Flags that indicate a format can be used for capture/output */
    56  #define MEM2MEM_CAPTURE (1 << 0)
    57  #define MEM2MEM_OUTPUT  (1 << 1)
    58  
    59  #define MEM2MEM_NAME            "vim2m"
    60  
    61  /* Per queue */
    62  #define MEM2MEM_DEF_NUM_BUFS    VIDEO_MAX_FRAME
    63  /* In bytes, per queue */
    64  #define MEM2MEM_VID_MEM_LIMIT   (16 * 1024 * 1024)
    65  
    66  /* Flags that indicate processing mode */
    67  #define MEM2MEM_HFLIP   (1 << 0)
    68  #define MEM2MEM_VFLIP   (1 << 1)
    69  
    70  #define dprintk(dev, lvl, fmt, arg...) \
  > 71          v4l2_dbg(lvl, debug, &dev->v4l2_dev, "%s: " fmt, __func__, ## 
arg)
    72  
    73  

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

Attachment: .config.gz
Description: application/gzip

Reply via email to