All of lore.kernel.org
 help / color / mirror / Atom feed
* [hverkuil-media-tree:saa7146 5/7] drivers/media/common/saa7146/saa7146_video.c:1204:22: warning: unused variable 'size'
@ 2023-02-27 17:19 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-02-27 17:19 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: oe-kbuild-all

tree:   git://linuxtv.org/hverkuil/media_tree.git saa7146
head:   5c5c956a0a7165bba8f5c499562b729b64ff2130
commit: 5c5c956a0a7165bba8f5c499562b729b64ff2130 [5/7] wip
config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20230228/202302280122.6aSdk7Xx-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        git remote add hverkuil-media-tree git://linuxtv.org/hverkuil/media_tree.git
        git fetch --no-tags hverkuil-media-tree saa7146
        git checkout 5c5c956a0a7165bba8f5c499562b729b64ff2130
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 olddefconfig
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/media/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302280122.6aSdk7Xx-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/media/common/saa7146/saa7146_video.c: In function 'buf_init':
>> drivers/media/common/saa7146/saa7146_video.c:1204:22: warning: unused variable 'size' [-Wunused-variable]
    1204 |         unsigned int size = vv->video_fmt.sizeimage;
         |                      ^~~~
   drivers/media/common/saa7146/saa7146_video.c: In function 'buf_prepare':
>> drivers/media/common/saa7146/saa7146_video.c:1226:33: warning: unused variable 'vbuf' [-Wunused-variable]
    1226 |         struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);
         |                                 ^~~~
   At top level:
   drivers/media/common/saa7146/saa7146_video.c:1022:12: warning: 'buffer_activate' defined but not used [-Wunused-function]
    1022 | static int buffer_activate (struct saa7146_dev *dev,
         |            ^~~~~~~~~~~~~~~
   drivers/media/common/saa7146/saa7146_video.c:378:12: warning: 'video_end' defined but not used [-Wunused-function]
     378 | static int video_end(struct saa7146_fh *fh, struct file *file)
         |            ^~~~~~~~~
   drivers/media/common/saa7146/saa7146_video.c:316:12: warning: 'video_begin' defined but not used [-Wunused-function]
     316 | static int video_begin(struct saa7146_fh *fh)
         |            ^~~~~~~~~~~


vim +/size +1204 drivers/media/common/saa7146/saa7146_video.c

  1196	
  1197	static int buf_init(struct vb2_buffer *vb)
  1198	{
  1199		struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);
  1200		struct saa7146_buf *buf = container_of(vbuf, struct saa7146_buf, vb);
  1201		struct vb2_queue *vq = vb->vb2_queue;
  1202		struct saa7146_dev *dev = vb2_get_drv_priv(vq);
  1203		struct saa7146_vv *vv = dev->vv_data;
> 1204		unsigned int size = vv->video_fmt.sizeimage;
  1205		struct saa7146_format *sfmt;
  1206		int ret;
  1207	
  1208		sfmt = saa7146_format_by_fourcc(dev, vv->video_fmt.pixelformat);
  1209	
  1210		if (IS_PLANAR(sfmt->trans)) {
  1211			saa7146_pgtable_alloc(dev->pci, &buf->pt[0]);
  1212			saa7146_pgtable_alloc(dev->pci, &buf->pt[1]);
  1213			saa7146_pgtable_alloc(dev->pci, &buf->pt[2]);
  1214		} else {
  1215			saa7146_pgtable_alloc(dev->pci, &buf->pt[0]);
  1216		}
  1217	
  1218		ret = saa7146_pgtable_build(dev,buf);
  1219		if (ret)
  1220			release_all_pagetables(dev, buf);
  1221		return ret;
  1222	}
  1223	
  1224	static int buf_prepare(struct vb2_buffer *vb)
  1225	{
> 1226		struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);
  1227		struct vb2_queue *vq = vb->vb2_queue;
  1228		struct saa7146_dev *dev = vb2_get_drv_priv(vq);
  1229		struct saa7146_vv *vv = dev->vv_data;
  1230		unsigned int size = vv->video_fmt.sizeimage;
  1231	
  1232		if (vb2_plane_size(vb, 0) < size)
  1233			return -EINVAL;
  1234		vb2_set_plane_payload(vb, 0, size);
  1235		return 0;
  1236	}
  1237	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-27 17:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-27 17:19 [hverkuil-media-tree:saa7146 5/7] drivers/media/common/saa7146/saa7146_video.c:1204:22: warning: unused variable 'size' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.