linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Gustavo Pimentel <Gustavo.Pimentel@synopsys.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	dmaengine@vger.kernel.org, Vinod Koul <vkoul@kernel.org>,
	Dan Williams <dan.j.williams@intel.com>,
	Bjorn Helgaas <helgaas@kernel.org>
Cc: kbuild-all@lists.01.org
Subject: Re: [PATCH v4 01/15] dmaengine: dw-edma: Add writeq() and readq() for 64 bits architectures
Date: Tue, 9 Feb 2021 14:29:20 +0800	[thread overview]
Message-ID: <202102091428.hyQcO8AC-lkp@intel.com> (raw)
In-Reply-To: <c4a34dbf58d747ce138e9cb07676b089c383f39f.1612389406.git.gustavo.pimentel@synopsys.com>

[-- Attachment #1: Type: text/plain, Size: 4821 bytes --]

Hi Gustavo,

I love your patch! Perhaps something to improve:

[auto build test WARNING on vkoul-dmaengine/next]
[also build test WARNING on pci/next linux/master linus/master v5.11-rc6 next-20210125]
[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/Gustavo-Pimentel/dmaengine-dw-edma-HDMA-support/20210204-061341
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
config: i386-randconfig-m021-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

New smatch warnings:
drivers/dma/dw-edma/dw-edma-v0-core.c:328 dw_edma_v0_core_write_chunk() warn: inconsistent indenting
drivers/dma/dw-edma/dw-edma-v0-core.c:385 dw_edma_v0_core_start() warn: inconsistent indenting

Old smatch warnings:
drivers/dma/dw-edma/dw-edma-v0-core.c:352 dw_edma_v0_core_write_chunk() warn: inconsistent indenting

vim +328 drivers/dma/dw-edma/dw-edma-v0-core.c

   300	
   301	static void dw_edma_v0_core_write_chunk(struct dw_edma_chunk *chunk)
   302	{
   303		struct dw_edma_burst *child;
   304		struct dw_edma_v0_lli __iomem *lli;
   305		struct dw_edma_v0_llp __iomem *llp;
   306		u32 control = 0, i = 0;
   307		int j;
   308	
   309		lli = chunk->ll_region.vaddr;
   310	
   311		if (chunk->cb)
   312			control = DW_EDMA_V0_CB;
   313	
   314		j = chunk->bursts_alloc;
   315		list_for_each_entry(child, &chunk->burst->list, list) {
   316			j--;
   317			if (!j)
   318				control |= (DW_EDMA_V0_LIE | DW_EDMA_V0_RIE);
   319	
   320			/* Channel control */
   321			SET_LL_32(&lli[i].control, control);
   322			/* Transfer size */
   323			SET_LL_32(&lli[i].transfer_size, child->sz);
   324			/* SAR */
   325			#ifdef CONFIG_64BIT
   326				SET_LL_64(&lli[i].sar.reg, child->sar);
   327			#else /* CONFIG_64BIT */
 > 328				SET_LL_32(&lli[i].sar.lsb, lower_32_bits(child->sar));
   329				SET_LL_32(&lli[i].sar.msb, upper_32_bits(child->sar));
   330			#endif /* CONFIG_64BIT */
   331			/* DAR */
   332			#ifdef CONFIG_64BIT
   333				SET_LL_64(&lli[i].dar.reg, child->dar);
   334			#else /* CONFIG_64BIT */
   335				SET_LL_32(&lli[i].dar.lsb, lower_32_bits(child->dar));
   336				SET_LL_32(&lli[i].dar.msb, upper_32_bits(child->dar));
   337			#endif /* CONFIG_64BIT */
   338			i++;
   339		}
   340	
   341		llp = (void __iomem *)&lli[i];
   342		control = DW_EDMA_V0_LLP | DW_EDMA_V0_TCB;
   343		if (!chunk->cb)
   344			control |= DW_EDMA_V0_CB;
   345	
   346		/* Channel control */
   347		SET_LL_32(&llp->control, control);
   348		/* Linked list */
   349		#ifdef CONFIG_64BIT
   350			SET_LL_64(&llp->llp.reg, chunk->ll_region.paddr);
   351		#else /* CONFIG_64BIT */
   352			SET_LL_32(&llp->llp.lsb, lower_32_bits(chunk->ll_region.paddr));
   353			SET_LL_32(&llp->llp.msb, upper_32_bits(chunk->ll_region.paddr));
   354		#endif /* CONFIG_64BIT */
   355	}
   356	
   357	void dw_edma_v0_core_start(struct dw_edma_chunk *chunk, bool first)
   358	{
   359		struct dw_edma_chan *chan = chunk->chan;
   360		struct dw_edma *dw = chan->chip->dw;
   361		u32 tmp;
   362	
   363		dw_edma_v0_core_write_chunk(chunk);
   364	
   365		if (first) {
   366			/* Enable engine */
   367			SET_RW_32(dw, chan->dir, engine_en, BIT(0));
   368			/* Interrupt unmask - done, abort */
   369			tmp = GET_RW_32(dw, chan->dir, int_mask);
   370			tmp &= ~FIELD_PREP(EDMA_V0_DONE_INT_MASK, BIT(chan->id));
   371			tmp &= ~FIELD_PREP(EDMA_V0_ABORT_INT_MASK, BIT(chan->id));
   372			SET_RW_32(dw, chan->dir, int_mask, tmp);
   373			/* Linked list error */
   374			tmp = GET_RW_32(dw, chan->dir, linked_list_err_en);
   375			tmp |= FIELD_PREP(EDMA_V0_LINKED_LIST_ERR_MASK, BIT(chan->id));
   376			SET_RW_32(dw, chan->dir, linked_list_err_en, tmp);
   377			/* Channel control */
   378			SET_CH_32(dw, chan->dir, chan->id, ch_control1,
   379				  (DW_EDMA_V0_CCS | DW_EDMA_V0_LLE));
   380			/* Linked list */
   381			#ifdef CONFIG_64BIT
   382				SET_CH_64(dw, chan->dir, chan->id, llp.reg,
   383					  chunk->ll_region.paddr);
   384			#else /* CONFIG_64BIT */
 > 385				SET_CH_32(dw, chan->dir, chan->id, llp.lsb,
   386					  lower_32_bits(chunk->ll_region.paddr));
   387				SET_CH_32(dw, chan->dir, chan->id, llp.msb,
   388					  upper_32_bits(chunk->ll_region.paddr));
   389			#endif /* CONFIG_64BIT */
   390		}
   391		/* Doorbell */
   392		SET_RW_32(dw, chan->dir, doorbell,
   393			  FIELD_PREP(EDMA_V0_DOORBELL_CH_MASK, chan->id));
   394	}
   395	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37160 bytes --]

  reply	other threads:[~2021-02-09  6:31 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03 21:57 [PATCH v4 00/15] dmaengine: dw-edma: HDMA support Gustavo Pimentel
2021-02-03 21:57 ` [PATCH v4 01/15] dmaengine: dw-edma: Add writeq() and readq() for 64 bits architectures Gustavo Pimentel
2021-02-09  6:29   ` kernel test robot [this message]
2021-02-03 21:57 ` [PATCH v4 02/15] dmaengine: dw-edma: Fix comments offset characters' alignment Gustavo Pimentel
2021-02-03 21:57 ` [PATCH v4 03/15] dmaengine: dw-edma: Add support for the HDMA feature Gustavo Pimentel
2021-02-03 21:57 ` [PATCH v4 04/15] PCI: Add pci_find_vsec_capability() to find a specific VSEC Gustavo Pimentel
2021-02-03 21:57 ` [PATCH v4 05/15] dmaengine: dw-edma: Add PCIe VSEC data retrieval support Gustavo Pimentel
2021-02-03 21:57 ` [PATCH v4 06/15] dmaengine: dw-edma: Add device_prep_interleave_dma() support Gustavo Pimentel
2021-02-03 21:57 ` [PATCH v4 07/15] dmaengine: dw-edma: Improve number of channels check Gustavo Pimentel
2021-02-03 21:57 ` [PATCH v4 08/15] dmaengine: dw-edma: Reorder variables to keep consistency Gustavo Pimentel
2021-02-03 21:58 ` [PATCH v4 09/15] dmaengine: dw-edma: Improve the linked list and data blocks definition Gustavo Pimentel
2021-02-03 21:58 ` [PATCH v4 10/15] dmaengine: dw-edma: Change linked list and data blocks offset and sizes Gustavo Pimentel
2021-02-03 21:58 ` [PATCH v4 11/15] dmaengine: dw-edma: Move struct dentry variable from static definition into dw_edma struct Gustavo Pimentel
2021-02-03 21:58 ` [PATCH v4 12/15] dmaengine: dw-edma: Fix crash on loading/unloading driver Gustavo Pimentel
2021-02-03 21:58 ` [PATCH v4 13/15] dmaengine: dw-edma: Change DMA abreviation from lower into upper case Gustavo Pimentel
2021-02-03 21:58 ` [PATCH v4 14/15] dmaengine: dw-edma: Revert fix scatter-gather address calculation Gustavo Pimentel
2021-02-03 21:58 ` [PATCH v4 15/15] dmaengine: dw-edma: Add pcim_iomap_table return checker Gustavo Pimentel
2021-02-08 19:35   ` Bjorn Helgaas
2021-02-09 15:35     ` Gustavo Pimentel
2021-02-09 18:18       ` Krzysztof Wilczyński
2021-02-09 19:40         ` Krzysztof Wilczyński

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202102091428.hyQcO8AC-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Gustavo.Pimentel@synopsys.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=helgaas@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).