From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D28151865EF for ; Mon, 9 Dec 2024 04:41:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733719292; cv=none; b=uRmI26QNEYE64gGguAUhqN8kKndqm3mGltgt9IVy1Eijz1LREqKAhge4hzNHGnLFGS2v/aEYCh6aEAHbGQrTpvExww4C+4pKKdv1bQn24dDCVswXqq9ApGuiJTvyT+7InrepJGYkATrRF+JWAuOywCdp+fDcCc9IL+K0R6Q4+eM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733719292; c=relaxed/simple; bh=nVqSNpnNxZWmr71CmaiNMKRYCBDZGMRfV+vefiCrhqY=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=hCvqBpAtFh7jyv+obBT3kUF3AvjtsHNwXB3G2Ja6CBYs70j7jwR/S6NZmTs9dyYRb86haRiGp4FRH0tZVQUf0uuVgx+92ABZzeLzeERqLSElWLxWGiZ+kAGkB0RkIuhcHomTH580PqocE+T5e3P38LQwdgSuC6IyhyEnfsh65YY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=cUhEHvS8; arc=none smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="cUhEHvS8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733719291; x=1765255291; h=date:from:to:cc:subject:message-id:mime-version; bh=nVqSNpnNxZWmr71CmaiNMKRYCBDZGMRfV+vefiCrhqY=; b=cUhEHvS8PgRViZQ2zGJVDqBc4QF4ke9s3HIcUXxxWkWk+ks5Jd8FerRF vMRlbW0gzgBfkSq9ZD/c1xZI8uZlvf3SH76zR42xMj82aj6yRyA2pA61l rtvGrGATKd7RIJiEiZkppvIR6wmNk1XINrh5lz9ReJtJmNXBXiUP3DR3a ENv6U/9vIjAhUbyPOkfmuIacj7yiEjjk7x42asVrd2kyTh5LE6oQdK4jt VZ61o4Y8emwGanKqBD1Owa/25wN5QGjqjN+/9GS66PbNywGRwj7Xuwvhc e//oBypdtU2qye4ONtjagn9oTbBBRDozHrt2TQaEWIEQAk8cJccxvGfWi A==; X-CSE-ConnectionGUID: IjsSVyuARrasR7VtdGuKbA== X-CSE-MsgGUID: A+GnSUvFRKWL1KzC/2cCJw== X-IronPort-AV: E=McAfee;i="6700,10204,11280"; a="51416017" X-IronPort-AV: E=Sophos;i="6.12,218,1728975600"; d="scan'208";a="51416017" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2024 20:41:30 -0800 X-CSE-ConnectionGUID: GTh5+yauRCGwKnCt+Ea8bw== X-CSE-MsgGUID: Sf3m/zP+RHOaWAhCBWsd/Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,218,1728975600"; d="scan'208";a="94653965" Received: from lkp-server01.sh.intel.com (HELO 82a3f569d0cb) ([10.239.97.150]) by fmviesa006.fm.intel.com with ESMTP; 08 Dec 2024 20:41:29 -0800 Received: from kbuild by 82a3f569d0cb with local (Exim 4.96) (envelope-from ) id 1tKVaI-0003tj-1X; Mon, 09 Dec 2024 04:41:26 +0000 Date: Mon, 9 Dec 2024 12:40:15 +0800 From: kernel test robot To: oe-kbuild@lists.linux.dev Cc: lkp@intel.com, Dan Carpenter Subject: drivers/dma/mcf-edma-main.c:205 mcf_edma_probe() warn: statement has no effect 31 Message-ID: <202412081249.oZCsocVC-lkp@intel.com> Precedence: bulk X-Mailing-List: oe-kbuild@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline BCC: lkp@intel.com CC: oe-kbuild-all@lists.linux.dev CC: linux-kernel@vger.kernel.org TO: Frank Li CC: Vinod Koul tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 7503345ac5f5e82fd9a36d6e6b447c016376403a commit: 3f2282931f00c4c9c5057bb02f46778ba64ff625 dmaengine: fsl-edma: use _Generic to handle difference type date: 7 months ago :::::: branch date: 10 hours ago :::::: commit date: 7 months ago config: s390-randconfig-r071-20241208 (https://download.01.org/0day-ci/archive/20241208/202412081249.oZCsocVC-lkp@intel.com/config) compiler: s390-linux-gcc (GCC) 14.2.0 If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202412081249.oZCsocVC-lkp@intel.com/ New smatch warnings: drivers/dma/mcf-edma-main.c:205 mcf_edma_probe() warn: statement has no effect 31 drivers/dma/mcf-edma-main.c:205 mcf_edma_probe() warn: statement has no effect 31 Old smatch warnings: drivers/dma/mcf-edma-main.c:116 mcf_edma_irq_init() warn: 'i' from request_irq() not released on lines: 88,93,98,105,113. drivers/dma/mcf-edma-main.c:116 mcf_edma_irq_init() warn: 'i' from request_irq() not released on lines: 98,105,113. drivers/dma/mcf-edma-main.c:116 mcf_edma_irq_init() warn: 'ret' from request_irq() not released on lines: 113. vim +205 drivers/dma/mcf-edma-main.c af802728e4ab07 drivers/dma/mcf-edma.c Robin Gong 2019-06-25 152 e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 153 static int mcf_edma_probe(struct platform_device *pdev) e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 154 { e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 155 struct mcf_edma_platform_data *pdata; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 156 struct fsl_edma_engine *mcf_edma; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 157 struct edma_regs *regs; 923b138388928a drivers/dma/mcf-edma.c Christophe JAILLET 2023-05-06 158 int ret, i, chans; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 159 e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 160 pdata = dev_get_platdata(&pdev->dev); e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 161 if (!pdata) { e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 162 dev_err(&pdev->dev, "no platform data supplied\n"); e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 163 return -EINVAL; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 164 } e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 165 0a46781c89dece drivers/dma/mcf-edma.c Christophe JAILLET 2023-07-12 166 if (!pdata->dma_channels) { 0a46781c89dece drivers/dma/mcf-edma.c Christophe JAILLET 2023-07-12 167 dev_info(&pdev->dev, "setting default channel number to 64"); 0a46781c89dece drivers/dma/mcf-edma.c Christophe JAILLET 2023-07-12 168 chans = 64; 0a46781c89dece drivers/dma/mcf-edma.c Christophe JAILLET 2023-07-12 169 } else { e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 170 chans = pdata->dma_channels; 0a46781c89dece drivers/dma/mcf-edma.c Christophe JAILLET 2023-07-12 171 } 0a46781c89dece drivers/dma/mcf-edma.c Christophe JAILLET 2023-07-12 172 923b138388928a drivers/dma/mcf-edma.c Christophe JAILLET 2023-05-06 173 mcf_edma = devm_kzalloc(&pdev->dev, struct_size(mcf_edma, chans, chans), 923b138388928a drivers/dma/mcf-edma.c Christophe JAILLET 2023-05-06 174 GFP_KERNEL); e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 175 if (!mcf_edma) e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 176 return -ENOMEM; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 177 e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 178 mcf_edma->n_chans = chans; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 179 af802728e4ab07 drivers/dma/mcf-edma.c Robin Gong 2019-06-25 180 /* Set up drvdata for ColdFire edma */ af802728e4ab07 drivers/dma/mcf-edma.c Robin Gong 2019-06-25 181 mcf_edma->drvdata = &mcf_data; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 182 mcf_edma->big_endian = 1; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 183 e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 184 mutex_init(&mcf_edma->fsl_edma_mutex); e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 185 4b23603a251d24 drivers/dma/mcf-edma.c Tudor Ambarus 2022-11-10 186 mcf_edma->membase = devm_platform_ioremap_resource(pdev, 0); e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 187 if (IS_ERR(mcf_edma->membase)) e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 188 return PTR_ERR(mcf_edma->membase); e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 189 e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 190 fsl_edma_setup_regs(mcf_edma); e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 191 regs = &mcf_edma->regs; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 192 e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 193 INIT_LIST_HEAD(&mcf_edma->dma_dev.channels); e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 194 for (i = 0; i < mcf_edma->n_chans; i++) { e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 195 struct fsl_edma_chan *mcf_chan = &mcf_edma->chans[i]; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 196 e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 197 mcf_chan->edma = mcf_edma; cee8cbfc7be8ff drivers/dma/mcf-edma-main.c Frank Li 2024-03-23 198 mcf_chan->srcid = i; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 199 mcf_chan->idle = true; 0fa89f972da607 drivers/dma/mcf-edma.c Laurentiu Tudor 2019-01-18 200 mcf_chan->dma_dir = DMA_NONE; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 201 mcf_chan->vchan.desc_free = fsl_edma_free_desc; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 202 vchan_init(&mcf_chan->vchan, &mcf_edma->dma_dev); 7536f8b371adcc drivers/dma/mcf-edma-main.c Frank Li 2023-08-21 203 mcf_chan->tcd = mcf_edma->membase + EDMA_TCD 7536f8b371adcc drivers/dma/mcf-edma-main.c Frank Li 2023-08-21 204 + i * sizeof(struct fsl_edma_hw_tcd); b51dd7c8aac292 drivers/dma/mcf-edma-main.c Frank Li 2023-12-21 @205 edma_write_tcdreg(mcf_chan, cpu_to_le32(0), csr); e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 206 } e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 207 e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 208 iowrite32(~0, regs->inth); e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 209 iowrite32(~0, regs->intl); e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 210 af802728e4ab07 drivers/dma/mcf-edma.c Robin Gong 2019-06-25 211 ret = mcf_edma->drvdata->setup_irq(pdev, mcf_edma); e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 212 if (ret) e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 213 return ret; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 214 e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 215 dma_cap_set(DMA_PRIVATE, mcf_edma->dma_dev.cap_mask); e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 216 dma_cap_set(DMA_SLAVE, mcf_edma->dma_dev.cap_mask); e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 217 dma_cap_set(DMA_CYCLIC, mcf_edma->dma_dev.cap_mask); e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 218 e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 219 mcf_edma->dma_dev.dev = &pdev->dev; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 220 mcf_edma->dma_dev.device_alloc_chan_resources = e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 221 fsl_edma_alloc_chan_resources; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 222 mcf_edma->dma_dev.device_free_chan_resources = e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 223 fsl_edma_free_chan_resources; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 224 mcf_edma->dma_dev.device_config = fsl_edma_slave_config; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 225 mcf_edma->dma_dev.device_prep_dma_cyclic = e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 226 fsl_edma_prep_dma_cyclic; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 227 mcf_edma->dma_dev.device_prep_slave_sg = fsl_edma_prep_slave_sg; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 228 mcf_edma->dma_dev.device_tx_status = fsl_edma_tx_status; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 229 mcf_edma->dma_dev.device_pause = fsl_edma_pause; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 230 mcf_edma->dma_dev.device_resume = fsl_edma_resume; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 231 mcf_edma->dma_dev.device_terminate_all = fsl_edma_terminate_all; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 232 mcf_edma->dma_dev.device_issue_pending = fsl_edma_issue_pending; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 233 e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 234 mcf_edma->dma_dev.src_addr_widths = FSL_EDMA_BUSWIDTHS; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 235 mcf_edma->dma_dev.dst_addr_widths = FSL_EDMA_BUSWIDTHS; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 236 mcf_edma->dma_dev.directions = e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 237 BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 238 e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 239 mcf_edma->dma_dev.filter.fn = mcf_edma_filter_fn; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 240 mcf_edma->dma_dev.filter.map = pdata->slave_map; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 241 mcf_edma->dma_dev.filter.mapcnt = pdata->slavecnt; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 242 e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 243 platform_set_drvdata(pdev, mcf_edma); e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 244 e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 245 ret = dma_async_device_register(&mcf_edma->dma_dev); e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 246 if (ret) { e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 247 dev_err(&pdev->dev, e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 248 "Can't register Freescale eDMA engine. (%d)\n", ret); e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 249 return ret; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 250 } e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 251 e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 252 /* Enable round robin arbitration */ e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 253 iowrite32(EDMA_CR_ERGA | EDMA_CR_ERCA, regs->cr); e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 254 e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 255 return 0; e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 256 } e7a3ff92eaf19e drivers/dma/mcf-edma.c Angelo Dureghello 2018-08-19 257 :::::: The code at line 205 was first introduced by commit :::::: b51dd7c8aac292396d038d0a9fb9c1589addb515 dmaengine: mcf-edma: utilize edma_write_tcdreg() macro for TCD Access :::::: TO: Frank Li :::::: CC: Vinod Koul -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki