From: kernel test robot <lkp@intel.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [hverkuil-media-tree:saa7146 5/7] drivers/media/common/saa7146/saa7146_video.c:1204:22: warning: unused variable 'size'
Date: Tue, 28 Feb 2023 01:19:23 +0800 [thread overview]
Message-ID: <202302280122.6aSdk7Xx-lkp@intel.com> (raw)
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
reply other threads:[~2023-02-27 17:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202302280122.6aSdk7Xx-lkp@intel.com \
--to=lkp@intel.com \
--cc=hverkuil@xs4all.nl \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.