From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============0652048466027059180==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v15 05/13] media: amphion: implement vpu core communication based on mailbox Date: Tue, 25 Jan 2022 18:22:41 +0800 Message-ID: <202201251843.dnXV2QBt-lkp@intel.com> In-Reply-To: List-Id: --===============0652048466027059180== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Ming, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on e783362eb54cd99b2cac8b3a9aeac942e6f6ac07] url: https://github.com/0day-ci/linux/commits/Ming-Qian/amphion-video-de= coder-encoder-driver/20220125-152112 base: e783362eb54cd99b2cac8b3a9aeac942e6f6ac07 config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/2022012= 5/202201251843.dnXV2QBt-lkp(a)intel.com/config) compiler: alpha-linux-gcc (GCC) 11.2.0 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/0c5b974ccd2c9ad228d908fac= c5c73e93c750600 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Ming-Qian/amphion-video-decoder-en= coder-driver/20220125-152112 git checkout 0c5b974ccd2c9ad228d908facc5c73e93c750600 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Dalpha SHELL=3D/bin/bash drivers/media/platform/amphio= n/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/media/platform/amphion/vpu_core.c: In function 'vpu_core_registe= r': drivers/media/platform/amphion/vpu_core.c:246:28: error: implicit declar= ation of function 'vzalloc'; did you mean 'kvzalloc'? [-Werror=3Dimplicit-f= unction-declaration] 246 | core->msg_buffer =3D vzalloc(core->msg_buffer_size); | ^~~~~~~ | kvzalloc >> drivers/media/platform/amphion/vpu_core.c:246:26: warning: assignment to= 'void *' from 'int' makes pointer from integer without a cast [-Wint-conve= rsion] 246 | core->msg_buffer =3D vzalloc(core->msg_buffer_size); | ^ drivers/media/platform/amphion/vpu_core.c:270:17: error: implicit declar= ation of function 'vfree'; did you mean 'kvfree'? [-Werror=3Dimplicit-funct= ion-declaration] 270 | vfree(core->msg_buffer); | ^~~~~ | kvfree cc1: some warnings being treated as errors vim +246 drivers/media/platform/amphion/vpu_core.c 78cda8a2c04ed7f Ming Qian 2022-01-25 228 = 78cda8a2c04ed7f Ming Qian 2022-01-25 229 static int vpu_core_register(str= uct device *dev, struct vpu_core *core) 78cda8a2c04ed7f Ming Qian 2022-01-25 230 { 78cda8a2c04ed7f Ming Qian 2022-01-25 231 struct vpu_dev *vpu =3D dev_get= _drvdata(dev); 78cda8a2c04ed7f Ming Qian 2022-01-25 232 int ret =3D 0; 78cda8a2c04ed7f Ming Qian 2022-01-25 233 = 78cda8a2c04ed7f Ming Qian 2022-01-25 234 dev_dbg(core->dev, "register co= re %s\n", vpu_core_type_desc(core->type)); 78cda8a2c04ed7f Ming Qian 2022-01-25 235 if (vpu_core_is_exist(vpu, core= )) 78cda8a2c04ed7f Ming Qian 2022-01-25 236 return 0; 78cda8a2c04ed7f Ming Qian 2022-01-25 237 = 78cda8a2c04ed7f Ming Qian 2022-01-25 238 core->workqueue =3D alloc_workq= ueue("vpu", WQ_UNBOUND | WQ_MEM_RECLAIM, 1); 78cda8a2c04ed7f Ming Qian 2022-01-25 239 if (!core->workqueue) { 78cda8a2c04ed7f Ming Qian 2022-01-25 240 dev_err(core->dev, "fail to al= loc workqueue\n"); 78cda8a2c04ed7f Ming Qian 2022-01-25 241 return -ENOMEM; 78cda8a2c04ed7f Ming Qian 2022-01-25 242 } 78cda8a2c04ed7f Ming Qian 2022-01-25 243 INIT_WORK(&core->msg_work, vpu_= msg_run_work); 78cda8a2c04ed7f Ming Qian 2022-01-25 244 INIT_DELAYED_WORK(&core->msg_de= layed_work, vpu_msg_delayed_work); 78cda8a2c04ed7f Ming Qian 2022-01-25 245 core->msg_buffer_size =3D round= up_pow_of_two(VPU_MSG_BUFFER_SIZE); 78cda8a2c04ed7f Ming Qian 2022-01-25 @246 core->msg_buffer =3D vzalloc(co= re->msg_buffer_size); 78cda8a2c04ed7f Ming Qian 2022-01-25 247 if (!core->msg_buffer) { 78cda8a2c04ed7f Ming Qian 2022-01-25 248 dev_err(core->dev, "failed all= ocate buffer for fifo\n"); 78cda8a2c04ed7f Ming Qian 2022-01-25 249 ret =3D -ENOMEM; 78cda8a2c04ed7f Ming Qian 2022-01-25 250 goto error; 78cda8a2c04ed7f Ming Qian 2022-01-25 251 } 78cda8a2c04ed7f Ming Qian 2022-01-25 252 ret =3D kfifo_init(&core->msg_f= ifo, core->msg_buffer, core->msg_buffer_size); 78cda8a2c04ed7f Ming Qian 2022-01-25 253 if (ret) { 78cda8a2c04ed7f Ming Qian 2022-01-25 254 dev_err(core->dev, "failed ini= t kfifo\n"); 78cda8a2c04ed7f Ming Qian 2022-01-25 255 goto error; 78cda8a2c04ed7f Ming Qian 2022-01-25 256 } 78cda8a2c04ed7f Ming Qian 2022-01-25 257 = 78cda8a2c04ed7f Ming Qian 2022-01-25 258 list_add_tail(&core->list, &vpu= ->cores); 78cda8a2c04ed7f Ming Qian 2022-01-25 259 = 78cda8a2c04ed7f Ming Qian 2022-01-25 260 vpu_core_get_vpu(core); 78cda8a2c04ed7f Ming Qian 2022-01-25 261 = 78cda8a2c04ed7f Ming Qian 2022-01-25 262 if (vpu_iface_get_power_state(c= ore)) 78cda8a2c04ed7f Ming Qian 2022-01-25 263 ret =3D vpu_core_restore(core); 78cda8a2c04ed7f Ming Qian 2022-01-25 264 if (ret) 78cda8a2c04ed7f Ming Qian 2022-01-25 265 goto error; 78cda8a2c04ed7f Ming Qian 2022-01-25 266 = 78cda8a2c04ed7f Ming Qian 2022-01-25 267 return 0; 78cda8a2c04ed7f Ming Qian 2022-01-25 268 error: 78cda8a2c04ed7f Ming Qian 2022-01-25 269 if (core->msg_buffer) { 78cda8a2c04ed7f Ming Qian 2022-01-25 270 vfree(core->msg_buffer); 78cda8a2c04ed7f Ming Qian 2022-01-25 271 core->msg_buffer =3D NULL; 78cda8a2c04ed7f Ming Qian 2022-01-25 272 } 78cda8a2c04ed7f Ming Qian 2022-01-25 273 if (core->workqueue) { 78cda8a2c04ed7f Ming Qian 2022-01-25 274 destroy_workqueue(core->workqu= eue); 78cda8a2c04ed7f Ming Qian 2022-01-25 275 core->workqueue =3D NULL; 78cda8a2c04ed7f Ming Qian 2022-01-25 276 } 78cda8a2c04ed7f Ming Qian 2022-01-25 277 return ret; 78cda8a2c04ed7f Ming Qian 2022-01-25 278 } 78cda8a2c04ed7f Ming Qian 2022-01-25 279 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============0652048466027059180==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2924FC433FE for ; Tue, 25 Jan 2022 10:33:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358122AbiAYKco (ORCPT ); Tue, 25 Jan 2022 05:32:44 -0500 Received: from mga05.intel.com ([192.55.52.43]:10127 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355727AbiAYK3I (ORCPT ); Tue, 25 Jan 2022 05:29:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643106543; x=1674642543; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=2R3DZV36aiJGj6333DSl6IxQRf+LOmclIxRWAZb98Po=; b=DgOgXnGKAhdbBAptTJICK3ZiJyv0t9/CoMGv7u8asINAK2/buzGzV1Iz AM1P27ThpFYE0GoJaNedPn/0ZMm+9QlnrtvMDgvcQSl3ecvabYa31Uwkn fPPpd1BIynEnHBOAIw1hhW9bZSMrmVFbhasKDWdpMscdzcGgHy6RNvjcV hsi0gujXcfEkbUjbtmZkn+Xqe4V5Yhsovw92OJqeyTnAYMecSoHmmtyOc y95d2XzZ20wLwoimrINFOWMOLpJCMwf8vUx1V7CJYF7Yl6e/yCev9YK3X PXfIi49NrIsySnfiD7yWQl+rpPVFb3lSstsKoCazDsohynw9YIFzMCneK g==; X-IronPort-AV: E=McAfee;i="6200,9189,10237"; a="332626146" X-IronPort-AV: E=Sophos;i="5.88,314,1635231600"; d="scan'208";a="332626146" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jan 2022 02:23:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,314,1635231600"; d="scan'208";a="580708360" Received: from lkp-server01.sh.intel.com (HELO 276f1b88eecb) ([10.239.97.150]) by fmsmga008.fm.intel.com with ESMTP; 25 Jan 2022 02:23:37 -0800 Received: from kbuild by 276f1b88eecb with local (Exim 4.92) (envelope-from ) id 1nCIzA-000Jjq-Ab; Tue, 25 Jan 2022 10:23:36 +0000 Date: Tue, 25 Jan 2022 18:22:41 +0800 From: kernel test robot To: Ming Qian , mchehab@kernel.org, shawnguo@kernel.org, robh+dt@kernel.org, s.hauer@pengutronix.de Cc: kbuild-all@lists.01.org, hverkuil-cisco@xs4all.nl, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, aisheng.dong@nxp.com, linux-media@vger.kernel.org Subject: Re: [PATCH v15 05/13] media: amphion: implement vpu core communication based on mailbox Message-ID: <202201251843.dnXV2QBt-lkp@intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hi Ming, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on e783362eb54cd99b2cac8b3a9aeac942e6f6ac07] url: https://github.com/0day-ci/linux/commits/Ming-Qian/amphion-video-decoder-encoder-driver/20220125-152112 base: e783362eb54cd99b2cac8b3a9aeac942e6f6ac07 config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20220125/202201251843.dnXV2QBt-lkp@intel.com/config) compiler: alpha-linux-gcc (GCC) 11.2.0 reproduce (this is a W=1 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/0c5b974ccd2c9ad228d908facc5c73e93c750600 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Ming-Qian/amphion-video-decoder-encoder-driver/20220125-152112 git checkout 0c5b974ccd2c9ad228d908facc5c73e93c750600 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/media/platform/amphion/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/media/platform/amphion/vpu_core.c: In function 'vpu_core_register': drivers/media/platform/amphion/vpu_core.c:246:28: error: implicit declaration of function 'vzalloc'; did you mean 'kvzalloc'? [-Werror=implicit-function-declaration] 246 | core->msg_buffer = vzalloc(core->msg_buffer_size); | ^~~~~~~ | kvzalloc >> drivers/media/platform/amphion/vpu_core.c:246:26: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 246 | core->msg_buffer = vzalloc(core->msg_buffer_size); | ^ drivers/media/platform/amphion/vpu_core.c:270:17: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration] 270 | vfree(core->msg_buffer); | ^~~~~ | kvfree cc1: some warnings being treated as errors vim +246 drivers/media/platform/amphion/vpu_core.c 78cda8a2c04ed7f Ming Qian 2022-01-25 228 78cda8a2c04ed7f Ming Qian 2022-01-25 229 static int vpu_core_register(struct device *dev, struct vpu_core *core) 78cda8a2c04ed7f Ming Qian 2022-01-25 230 { 78cda8a2c04ed7f Ming Qian 2022-01-25 231 struct vpu_dev *vpu = dev_get_drvdata(dev); 78cda8a2c04ed7f Ming Qian 2022-01-25 232 int ret = 0; 78cda8a2c04ed7f Ming Qian 2022-01-25 233 78cda8a2c04ed7f Ming Qian 2022-01-25 234 dev_dbg(core->dev, "register core %s\n", vpu_core_type_desc(core->type)); 78cda8a2c04ed7f Ming Qian 2022-01-25 235 if (vpu_core_is_exist(vpu, core)) 78cda8a2c04ed7f Ming Qian 2022-01-25 236 return 0; 78cda8a2c04ed7f Ming Qian 2022-01-25 237 78cda8a2c04ed7f Ming Qian 2022-01-25 238 core->workqueue = alloc_workqueue("vpu", WQ_UNBOUND | WQ_MEM_RECLAIM, 1); 78cda8a2c04ed7f Ming Qian 2022-01-25 239 if (!core->workqueue) { 78cda8a2c04ed7f Ming Qian 2022-01-25 240 dev_err(core->dev, "fail to alloc workqueue\n"); 78cda8a2c04ed7f Ming Qian 2022-01-25 241 return -ENOMEM; 78cda8a2c04ed7f Ming Qian 2022-01-25 242 } 78cda8a2c04ed7f Ming Qian 2022-01-25 243 INIT_WORK(&core->msg_work, vpu_msg_run_work); 78cda8a2c04ed7f Ming Qian 2022-01-25 244 INIT_DELAYED_WORK(&core->msg_delayed_work, vpu_msg_delayed_work); 78cda8a2c04ed7f Ming Qian 2022-01-25 245 core->msg_buffer_size = roundup_pow_of_two(VPU_MSG_BUFFER_SIZE); 78cda8a2c04ed7f Ming Qian 2022-01-25 @246 core->msg_buffer = vzalloc(core->msg_buffer_size); 78cda8a2c04ed7f Ming Qian 2022-01-25 247 if (!core->msg_buffer) { 78cda8a2c04ed7f Ming Qian 2022-01-25 248 dev_err(core->dev, "failed allocate buffer for fifo\n"); 78cda8a2c04ed7f Ming Qian 2022-01-25 249 ret = -ENOMEM; 78cda8a2c04ed7f Ming Qian 2022-01-25 250 goto error; 78cda8a2c04ed7f Ming Qian 2022-01-25 251 } 78cda8a2c04ed7f Ming Qian 2022-01-25 252 ret = kfifo_init(&core->msg_fifo, core->msg_buffer, core->msg_buffer_size); 78cda8a2c04ed7f Ming Qian 2022-01-25 253 if (ret) { 78cda8a2c04ed7f Ming Qian 2022-01-25 254 dev_err(core->dev, "failed init kfifo\n"); 78cda8a2c04ed7f Ming Qian 2022-01-25 255 goto error; 78cda8a2c04ed7f Ming Qian 2022-01-25 256 } 78cda8a2c04ed7f Ming Qian 2022-01-25 257 78cda8a2c04ed7f Ming Qian 2022-01-25 258 list_add_tail(&core->list, &vpu->cores); 78cda8a2c04ed7f Ming Qian 2022-01-25 259 78cda8a2c04ed7f Ming Qian 2022-01-25 260 vpu_core_get_vpu(core); 78cda8a2c04ed7f Ming Qian 2022-01-25 261 78cda8a2c04ed7f Ming Qian 2022-01-25 262 if (vpu_iface_get_power_state(core)) 78cda8a2c04ed7f Ming Qian 2022-01-25 263 ret = vpu_core_restore(core); 78cda8a2c04ed7f Ming Qian 2022-01-25 264 if (ret) 78cda8a2c04ed7f Ming Qian 2022-01-25 265 goto error; 78cda8a2c04ed7f Ming Qian 2022-01-25 266 78cda8a2c04ed7f Ming Qian 2022-01-25 267 return 0; 78cda8a2c04ed7f Ming Qian 2022-01-25 268 error: 78cda8a2c04ed7f Ming Qian 2022-01-25 269 if (core->msg_buffer) { 78cda8a2c04ed7f Ming Qian 2022-01-25 270 vfree(core->msg_buffer); 78cda8a2c04ed7f Ming Qian 2022-01-25 271 core->msg_buffer = NULL; 78cda8a2c04ed7f Ming Qian 2022-01-25 272 } 78cda8a2c04ed7f Ming Qian 2022-01-25 273 if (core->workqueue) { 78cda8a2c04ed7f Ming Qian 2022-01-25 274 destroy_workqueue(core->workqueue); 78cda8a2c04ed7f Ming Qian 2022-01-25 275 core->workqueue = NULL; 78cda8a2c04ed7f Ming Qian 2022-01-25 276 } 78cda8a2c04ed7f Ming Qian 2022-01-25 277 return ret; 78cda8a2c04ed7f Ming Qian 2022-01-25 278 } 78cda8a2c04ed7f Ming Qian 2022-01-25 279 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org