Hi Shaobo, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v5.0-rc8 next-20190225] [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/Shaobo-He/Remove-deductively-redundant-NULL-pointer-checks/20190226-133616 base: git://linuxtv.org/media_tree.git master config: x86_64-allyesconfig (attached as .config) compiler: gcc-8 (Debian 8.2.0-20) 8.2.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 Note: it may well be a FALSE warning. FWIW you are at least aware of it now. http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings All warnings (new ones prefixed by >>): drivers/media//platform/vim2m.c: In function 'vidioc_s_fmt': >> drivers/media//platform/vim2m.c:689:6: warning: 'vq' may be used uninitialized in this function [-Wmaybe-uninitialized] if (vb2_is_busy(vq)) { ^~~~~~~~~~~~~~~ vim +/vq +689 drivers/media//platform/vim2m.c 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 679 1f923a42 drivers/media/platform/vim2m.c Hans Verkuil 2014-09-22 680 static int vidioc_s_fmt(struct vim2m_ctx *ctx, struct v4l2_format *f) 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 681 { 1f923a42 drivers/media/platform/vim2m.c Hans Verkuil 2014-09-22 682 struct vim2m_q_data *q_data; d80ee38c drivers/media/video/mem2mem_testdev.c Marek Szyprowski 2011-01-12 683 struct vb2_queue *vq; 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 684 9f4161a6 drivers/media/video/mem2mem_testdev.c Tomasz Moń 2012-06-08 685 q_data = get_q_data(ctx, f->type); 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 686 if (!q_data) 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 687 return -EINVAL; 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 688 d80ee38c drivers/media/video/mem2mem_testdev.c Marek Szyprowski 2011-01-12 @689 if (vb2_is_busy(vq)) { 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 690 v4l2_err(&ctx->dev->v4l2_dev, "%s queue busy\n", __func__); 07e80305 drivers/media/video/mem2mem_testdev.c Marek Szyprowski 2010-12-20 691 return -EBUSY; 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 692 } 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 693 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 694 q_data->fmt = find_format(f); 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 695 q_data->width = f->fmt.pix.width; 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 696 q_data->height = f->fmt.pix.height; 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 697 q_data->sizeimage = q_data->width * q_data->height 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 698 * q_data->fmt->depth >> 3; 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 699 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 700 dprintk(ctx->dev, 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 701 "Setting format for type %d, wxh: %dx%d, fmt: %d\n", 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 702 f->type, q_data->width, q_data->height, q_data->fmt->fourcc); 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 703 07e80305 drivers/media/video/mem2mem_testdev.c Marek Szyprowski 2010-12-20 704 return 0; 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 705 } 96d8eab5 drivers/media/video/mem2mem_testdev.c Pawel Osciak 2010-04-23 706 :::::: The code at line 689 was first introduced by commit :::::: d80ee38cd845baadef175893b99df24e7a03ec40 [media] v4l: mem2mem: port m2m_testdev to vb2 :::::: TO: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> :::::: CC: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip