Content-Type: multipart/mixed; boundary="===============0647318343912050999==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v2] media: vivid: fix timestamp and sequence wrapping Date: Sat, 04 Dec 2021 21:56:01 +0800 Message-ID: <202112042134.zRpYtrRg-lkp@intel.com> In-Reply-To: <20211204061351.53611-1-deborahbrouwer3563@gmail.com> List-Id: --===============0647318343912050999== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Deborah, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on media-tree/master] [also build test WARNING on v5.16-rc3 next-20211203] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Deborah-Brouwer/media-vivi= d-fix-timestamp-and-sequence-wrapping/20211204-141534 base: git://linuxtv.org/media_tree.git master config: i386-randconfig-a013-20211203 (https://download.01.org/0day-ci/arch= ive/20211204/202112042134.zRpYtrRg-lkp(a)intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5f1d18= 54eb1450d352663ee732235893c5782237) reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/e6e5201f7b5b9718f318a5c30= 34b71fcc79aa47f git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Deborah-Brouwer/media-vivid-fix-ti= mestamp-and-sequence-wrapping/20211204-141534 git checkout e6e5201f7b5b9718f318a5c3034b71fcc79aa47f # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cross W=3D= 1 O=3Dbuild_dir ARCH=3Di386 SHELL=3D/bin/bash drivers/media/test-drivers/vi= vid/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/media/test-drivers/vivid/vivid-ctrls.c:1125:49: warning: overflo= w in expression; result is -1179869184 with type 'long' [-Winteger-overflow] dev->time_wrap =3D (1ULL << 63) - NSEC_PER_SEC *= 16; ^ 1 warning generated. vim +/long +1125 drivers/media/test-drivers/vivid/vivid-ctrls.c 1083 = 1084 static int vivid_streaming_s_ctrl(struct v4l2_ctrl *ctrl) 1085 { 1086 struct vivid_dev *dev =3D container_of(ctrl->handler, struct vivid_= dev, ctrl_hdl_streaming); 1087 = 1088 switch (ctrl->id) { 1089 case VIVID_CID_DQBUF_ERROR: 1090 dev->dqbuf_error =3D true; 1091 break; 1092 case VIVID_CID_PERC_DROPPED: 1093 dev->perc_dropped_buffers =3D ctrl->val; 1094 break; 1095 case VIVID_CID_QUEUE_SETUP_ERROR: 1096 dev->queue_setup_error =3D true; 1097 break; 1098 case VIVID_CID_BUF_PREPARE_ERROR: 1099 dev->buf_prepare_error =3D true; 1100 break; 1101 case VIVID_CID_START_STR_ERROR: 1102 dev->start_streaming_error =3D true; 1103 break; 1104 case VIVID_CID_REQ_VALIDATE_ERROR: 1105 dev->req_validate_error =3D true; 1106 break; 1107 case VIVID_CID_QUEUE_ERROR: 1108 if (vb2_start_streaming_called(&dev->vb_vid_cap_q)) 1109 vb2_queue_error(&dev->vb_vid_cap_q); 1110 if (vb2_start_streaming_called(&dev->vb_vbi_cap_q)) 1111 vb2_queue_error(&dev->vb_vbi_cap_q); 1112 if (vb2_start_streaming_called(&dev->vb_vid_out_q)) 1113 vb2_queue_error(&dev->vb_vid_out_q); 1114 if (vb2_start_streaming_called(&dev->vb_vbi_out_q)) 1115 vb2_queue_error(&dev->vb_vbi_out_q); 1116 if (vb2_start_streaming_called(&dev->vb_sdr_cap_q)) 1117 vb2_queue_error(&dev->vb_sdr_cap_q); 1118 break; 1119 case VIVID_CID_SEQ_WRAP: 1120 dev->seq_wrap =3D ctrl->val; 1121 break; 1122 case VIVID_CID_TIME_WRAP: 1123 dev->time_wrap =3D ctrl->val; 1124 if (dev->time_wrap =3D=3D 1) > 1125 dev->time_wrap =3D (1ULL << 63) - NSEC_PER_SEC * 16; 1126 else if (dev->time_wrap =3D=3D 2) 1127 dev->time_wrap =3D ((1ULL << 31) - 16) * NSEC_PER_SEC; 1128 break; 1129 } 1130 return 0; 1131 } 1132 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org --===============0647318343912050999==--