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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0ECF6C433EF for ; Sun, 1 May 2022 06:02:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ZyCyup8iTTkJDiMmTtK0D5yGCkkY9QcCcWtED0tSTP4=; b=MlSLZbOYqP0KSi mMULZdUDyEsOI4CHsKAAG2oiACLexE4GKz2nbt3uS0+MBzZ4WWO6uVBJxZ+UcNU58WmOvbwt4U+Ps 24M2A9+r5Wnh4oA4Q68Z5v0dYAp7mtt3HXAGOSyPyF3ZzLYYiFxqp44LbwFjeeqXxuK20UCcB7u26 Gzy5VzezkUcUnuUQCdEuDE1scmFkFQ79bMBjQQL/z8VhtcpBnHPnVnOi3HCqUMM1AlDruQotr80Cf tZKUDZ9GhrV5Aj2Nweqleh/+QyjDAflChmpZl66MnWGvD9JHoBWIPV23lvAcpOHcYPylCP0vfTelN sGFjhrkzWM/laYIfZ0zw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nl2dx-00Fd2Q-7g; Sun, 01 May 2022 06:01:17 +0000 Received: from mga07.intel.com ([134.134.136.100]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nl2dt-00Fd23-TG for linux-arm-kernel@lists.infradead.org; Sun, 01 May 2022 06:01:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651384873; x=1682920873; h=date:from:to:cc:subject:message-id:mime-version; bh=nWhywd+yuKMAkl9HuN46sKdpc1hoUOj/p6iCuWd1tM8=; b=BPvfn5nXvm+067K5vil/y6cDekCF93HSDm0qVMFHImzuekns1FcBc+qO 3SChwvol+HDlyeCdodRmyFdHgyo3xjIct/lpOXzb3absYlF3hZsceZH6P JQZU6hWG/JoEgpJ6NfN99gI51W42bTmT2pzyRRX3pYuFMRoCLooM/06vm rWoD2l2r0L1YAjEN0lX383cB73EketYHzhOZhXFsbMMIkU4rqpUS12sd8 RB2GjUuzxKztddqA310A3lc3CllVr1BE/54rqi0MNQ+DDICbEn7Ws53LG 4KVywYeHuM/4kPWeQDzRgr8Ty31lZJZkQfmhgBjYzqD2ipPFdB9x244XE A==; X-IronPort-AV: E=McAfee;i="6400,9594,10333"; a="329939809" X-IronPort-AV: E=Sophos;i="5.91,189,1647327600"; d="scan'208";a="329939809" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2022 23:01:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,189,1647327600"; d="scan'208";a="598068985" Received: from lkp-server01.sh.intel.com (HELO 5056e131ad90) ([10.239.97.150]) by orsmga001.jf.intel.com with ESMTP; 30 Apr 2022 23:01:09 -0700 Received: from kbuild by 5056e131ad90 with local (Exim 4.95) (envelope-from ) id 1nl2do-0008XX-Nd; Sun, 01 May 2022 06:01:08 +0000 Date: Sun, 1 May 2022 14:01:05 +0800 From: kernel test robot To: Allen Pais Cc: kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org, Linus Walleij Subject: [linusw-nomadik:ux500-charging-v5.18-rc1 14/14] drivers/dma/qcom/bam_dma.c:1316:32: error: 'dma_work' undeclared Message-ID: <202205011351.PbUolxgm-lkp@intel.com> MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220430_230114_037758_A8314C59 X-CRM114-Status: GOOD ( 17.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git ux500-charging-v5.18-rc1 head: 1e198cb5bdd34fd231f456c23fe57d35d71fdeda commit: 1e198cb5bdd34fd231f456c23fe57d35d71fdeda [14/14] drivers/dma/*: replace tasklets with workqueue config: arm-allmodconfig (https://download.01.org/0day-ci/archive/20220501/202205011351.PbUolxgm-lkp@intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 11.3.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://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git/commit/?id=1e198cb5bdd34fd231f456c23fe57d35d71fdeda git remote add linusw-nomadik https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git git fetch --no-tags linusw-nomadik ux500-charging-v5.18-rc1 git checkout 1e198cb5bdd34fd231f456c23fe57d35d71fdeda # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/dma/qcom/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from include/linux/mm_types.h:18, from include/linux/mmzone.h:21, from include/linux/gfp.h:6, from include/linux/slab.h:15, from drivers/dma/qcom/bam_dma.c:29: drivers/dma/qcom/bam_dma.c: In function 'bam_dma_probe': >> drivers/dma/qcom/bam_dma.c:1316:32: error: 'dma_work' undeclared (first use in this function) 1316 | INIT_WORK(&bdev->work, dma_work); | ^~~~~~~~ include/linux/workqueue.h:232:34: note: in definition of macro '__INIT_WORK' 232 | (_work)->func = (_func); \ | ^~~~~ drivers/dma/qcom/bam_dma.c:1316:9: note: in expansion of macro 'INIT_WORK' 1316 | INIT_WORK(&bdev->work, dma_work); | ^~~~~~~~~ drivers/dma/qcom/bam_dma.c:1316:32: note: each undeclared identifier is reported only once for each function it appears in 1316 | INIT_WORK(&bdev->work, dma_work); | ^~~~~~~~ include/linux/workqueue.h:232:34: note: in definition of macro '__INIT_WORK' 232 | (_work)->func = (_func); \ | ^~~~~ drivers/dma/qcom/bam_dma.c:1316:9: note: in expansion of macro 'INIT_WORK' 1316 | INIT_WORK(&bdev->work, dma_work); | ^~~~~~~~~ At top level: drivers/dma/qcom/bam_dma.c:1123:13: warning: 'dma_workqueue' defined but not used [-Wunused-function] 1123 | static void dma_workqueue(struct work_struct *work) | ^~~~~~~~~~~~~ vim +/dma_work +1316 drivers/dma/qcom/bam_dma.c 1244 1245 static int bam_dma_probe(struct platform_device *pdev) 1246 { 1247 struct bam_device *bdev; 1248 const struct of_device_id *match; 1249 struct resource *iores; 1250 int ret, i; 1251 1252 bdev = devm_kzalloc(&pdev->dev, sizeof(*bdev), GFP_KERNEL); 1253 if (!bdev) 1254 return -ENOMEM; 1255 1256 bdev->dev = &pdev->dev; 1257 1258 match = of_match_node(bam_of_match, pdev->dev.of_node); 1259 if (!match) { 1260 dev_err(&pdev->dev, "Unsupported BAM module\n"); 1261 return -ENODEV; 1262 } 1263 1264 bdev->layout = match->data; 1265 1266 iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1267 bdev->regs = devm_ioremap_resource(&pdev->dev, iores); 1268 if (IS_ERR(bdev->regs)) 1269 return PTR_ERR(bdev->regs); 1270 1271 bdev->irq = platform_get_irq(pdev, 0); 1272 if (bdev->irq < 0) 1273 return bdev->irq; 1274 1275 ret = of_property_read_u32(pdev->dev.of_node, "qcom,ee", &bdev->ee); 1276 if (ret) { 1277 dev_err(bdev->dev, "Execution environment unspecified\n"); 1278 return ret; 1279 } 1280 1281 bdev->controlled_remotely = of_property_read_bool(pdev->dev.of_node, 1282 "qcom,controlled-remotely"); 1283 bdev->powered_remotely = of_property_read_bool(pdev->dev.of_node, 1284 "qcom,powered-remotely"); 1285 1286 if (bdev->controlled_remotely || bdev->powered_remotely) { 1287 ret = of_property_read_u32(pdev->dev.of_node, "num-channels", 1288 &bdev->num_channels); 1289 if (ret) 1290 dev_err(bdev->dev, "num-channels unspecified in dt\n"); 1291 1292 ret = of_property_read_u32(pdev->dev.of_node, "qcom,num-ees", 1293 &bdev->num_ees); 1294 if (ret) 1295 dev_err(bdev->dev, "num-ees unspecified in dt\n"); 1296 } 1297 1298 if (bdev->controlled_remotely || bdev->powered_remotely) 1299 bdev->bamclk = devm_clk_get_optional(bdev->dev, "bam_clk"); 1300 else 1301 bdev->bamclk = devm_clk_get(bdev->dev, "bam_clk"); 1302 1303 if (IS_ERR(bdev->bamclk)) 1304 return PTR_ERR(bdev->bamclk); 1305 1306 ret = clk_prepare_enable(bdev->bamclk); 1307 if (ret) { 1308 dev_err(bdev->dev, "failed to prepare/enable clock\n"); 1309 return ret; 1310 } 1311 1312 ret = bam_init(bdev); 1313 if (ret) 1314 goto err_disable_clk; 1315 > 1316 INIT_WORK(&bdev->work, dma_work); 1317 1318 bdev->channels = devm_kcalloc(bdev->dev, bdev->num_channels, 1319 sizeof(*bdev->channels), GFP_KERNEL); 1320 1321 if (!bdev->channels) { 1322 ret = -ENOMEM; 1323 goto err_wq_kill; 1324 } 1325 1326 /* allocate and initialize channels */ 1327 INIT_LIST_HEAD(&bdev->common.channels); 1328 1329 for (i = 0; i < bdev->num_channels; i++) 1330 bam_channel_init(bdev, &bdev->channels[i], i); 1331 1332 ret = devm_request_irq(bdev->dev, bdev->irq, bam_dma_irq, 1333 IRQF_TRIGGER_HIGH, "bam_dma", bdev); 1334 if (ret) 1335 goto err_bam_channel_exit; 1336 1337 /* set max dma segment size */ 1338 bdev->common.dev = bdev->dev; 1339 ret = dma_set_max_seg_size(bdev->common.dev, BAM_FIFO_SIZE); 1340 if (ret) { 1341 dev_err(bdev->dev, "cannot set maximum segment size\n"); 1342 goto err_bam_channel_exit; 1343 } 1344 1345 platform_set_drvdata(pdev, bdev); 1346 1347 /* set capabilities */ 1348 dma_cap_zero(bdev->common.cap_mask); 1349 dma_cap_set(DMA_SLAVE, bdev->common.cap_mask); 1350 1351 /* initialize dmaengine apis */ 1352 bdev->common.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); 1353 bdev->common.residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT; 1354 bdev->common.src_addr_widths = DMA_SLAVE_BUSWIDTH_4_BYTES; 1355 bdev->common.dst_addr_widths = DMA_SLAVE_BUSWIDTH_4_BYTES; 1356 bdev->common.device_alloc_chan_resources = bam_alloc_chan; 1357 bdev->common.device_free_chan_resources = bam_free_chan; 1358 bdev->common.device_prep_slave_sg = bam_prep_slave_sg; 1359 bdev->common.device_config = bam_slave_config; 1360 bdev->common.device_pause = bam_pause; 1361 bdev->common.device_resume = bam_resume; 1362 bdev->common.device_terminate_all = bam_dma_terminate_all; 1363 bdev->common.device_issue_pending = bam_issue_pending; 1364 bdev->common.device_tx_status = bam_tx_status; 1365 bdev->common.dev = bdev->dev; 1366 1367 ret = dma_async_device_register(&bdev->common); 1368 if (ret) { 1369 dev_err(bdev->dev, "failed to register dma async device\n"); 1370 goto err_bam_channel_exit; 1371 } 1372 1373 ret = of_dma_controller_register(pdev->dev.of_node, bam_dma_xlate, 1374 &bdev->common); 1375 if (ret) 1376 goto err_unregister_dma; 1377 1378 if (!bdev->bamclk) { 1379 pm_runtime_disable(&pdev->dev); 1380 return 0; 1381 } 1382 1383 pm_runtime_irq_safe(&pdev->dev); 1384 pm_runtime_set_autosuspend_delay(&pdev->dev, BAM_DMA_AUTOSUSPEND_DELAY); 1385 pm_runtime_use_autosuspend(&pdev->dev); 1386 pm_runtime_mark_last_busy(&pdev->dev); 1387 pm_runtime_set_active(&pdev->dev); 1388 pm_runtime_enable(&pdev->dev); 1389 1390 return 0; 1391 1392 err_unregister_dma: 1393 dma_async_device_unregister(&bdev->common); 1394 err_bam_channel_exit: 1395 for (i = 0; i < bdev->num_channels; i++) 1396 cancel_work_sync(&bdev->channels[i].vc.work); 1397 err_wq_kill: 1398 cancel_work_sync(&bdev->work); 1399 err_disable_clk: 1400 clk_disable_unprepare(bdev->bamclk); 1401 1402 return ret; 1403 } 1404 -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel