Hi Philipp,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.18-rc1 next-20180622]
[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/Philipp-Zabel/i-MX-media-mem2mem-scaler/20180623-024533
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.1.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=8.1.0 make.cross ARCH=ia64 

All warnings (new ones prefixed by >>):

   drivers/staging/media/imx/imx-media-mem2mem.c: In function 'vidioc_querycap':
>> drivers/staging/media/imx/imx-media-mem2mem.c:160:2: warning: 'strncpy' 
>> output truncated copying 15 bytes from a string of length 17 
>> [-Wstringop-truncation]
     strncpy(cap->driver, "imx-media-mem2mem", sizeof(cap->driver) - 1);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/strncpy +160 drivers/staging/media/imx/imx-media-mem2mem.c

   153  
   154  /*
   155   * Video ioctls
   156   */
   157  static int vidioc_querycap(struct file *file, void *priv,
   158                             struct v4l2_capability *cap)
   159  {
 > 160          strncpy(cap->driver, "imx-media-mem2mem", sizeof(cap->driver) - 
 > 1);
   161          strncpy(cap->card, "imx-media-mem2mem", sizeof(cap->card) - 1);
   162          strncpy(cap->bus_info, "platform:imx-media-mem2mem",
   163                  sizeof(cap->bus_info) - 1);
   164          cap->device_caps = V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING;
   165          cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
   166  
   167          return 0;
   168  }
   169  

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