All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v18 2/4] dmaengine: tegra: Add tegra gpcdma driver
Date: Thu, 03 Feb 2022 08:18:19 +0800	[thread overview]
Message-ID: <202202030717.azJOwFpH-lkp@intel.com> (raw)
In-Reply-To: <1643729199-19161-3-git-send-email-akhilrajeev@nvidia.com>

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

Hi Akhil,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on vkoul-dmaengine/next]
[also build test WARNING on robh/for-next arm64/for-next/core v5.17-rc2 next-20220202]
[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/Akhil-R/Add-NVIDIA-Tegra-GPC-DMA-driver/20220201-232959
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
config: nds32-allyesconfig (https://download.01.org/0day-ci/archive/20220203/202202030717.azJOwFpH-lkp(a)intel.com/config)
compiler: nds32le-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/fb896830918f8dc1c138094bb4c5cc5e19d149c9
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Akhil-R/Add-NVIDIA-Tegra-GPC-DMA-driver/20220201-232959
        git checkout fb896830918f8dc1c138094bb4c5cc5e19d149c9
        # 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=nds32 SHELL=/bin/bash drivers/dma/ drivers/iommu/ drivers/mfd/

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

All warnings (new ones prefixed by >>):

   In file included from <command-line>:
   drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_prep_dma_memset':
>> drivers/dma/tegra186-gpc-dma.c:896:74: warning: right shift count >= width of type [-Wshift-count-overflow]
     896 |                         FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >> 32));
         |                                                                          ^~
   include/linux/compiler_types.h:315:23: note: in definition of macro '__compiletime_assert'
     315 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:335:9: note: in expansion of macro '_compiletime_assert'
     335 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/bitfield.h:49:17: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      49 |                 BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ?           \
         |                 ^~~~~~~~~~~~~~~~
   include/linux/bitfield.h:94:17: note: in expansion of macro '__BF_FIELD_CHECK'
      94 |                 __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");    \
         |                 ^~~~~~~~~~~~~~~~
   drivers/dma/tegra186-gpc-dma.c:896:25: note: in expansion of macro 'FIELD_PREP'
     896 |                         FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >> 32));
         |                         ^~~~~~~~~~
>> drivers/dma/tegra186-gpc-dma.c:896:74: warning: right shift count >= width of type [-Wshift-count-overflow]
     896 |                         FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >> 32));
         |                                                                          ^~
   include/linux/compiler_types.h:315:23: note: in definition of macro '__compiletime_assert'
     315 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:335:9: note: in expansion of macro '_compiletime_assert'
     335 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/bitfield.h:49:17: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      49 |                 BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ?           \
         |                 ^~~~~~~~~~~~~~~~
   include/linux/bitfield.h:94:17: note: in expansion of macro '__BF_FIELD_CHECK'
      94 |                 __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");    \
         |                 ^~~~~~~~~~~~~~~~
   drivers/dma/tegra186-gpc-dma.c:896:25: note: in expansion of macro 'FIELD_PREP'
     896 |                         FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >> 32));
         |                         ^~~~~~~~~~
   In file included from drivers/dma/tegra186-gpc-dma.c:8:
>> drivers/dma/tegra186-gpc-dma.c:896:74: warning: right shift count >= width of type [-Wshift-count-overflow]
     896 |                         FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >> 32));
         |                                                                          ^~
   include/linux/bitfield.h:95:34: note: in definition of macro 'FIELD_PREP'
      95 |                 ((typeof(_mask))(_val) << __bf_shf(_mask)) & (_mask);   \
         |                                  ^~~~
   In file included from <command-line>:
   drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_prep_dma_memcpy':
   drivers/dma/tegra186-gpc-dma.c:964:65: warning: right shift count >= width of type [-Wshift-count-overflow]
     964 |                 FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_SRC_PTR, (src >> 32));
         |                                                                 ^~
   include/linux/compiler_types.h:315:23: note: in definition of macro '__compiletime_assert'
     315 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:335:9: note: in expansion of macro '_compiletime_assert'
     335 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/bitfield.h:49:17: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      49 |                 BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ?           \
         |                 ^~~~~~~~~~~~~~~~
   include/linux/bitfield.h:94:17: note: in expansion of macro '__BF_FIELD_CHECK'
      94 |                 __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");    \
         |                 ^~~~~~~~~~~~~~~~
   drivers/dma/tegra186-gpc-dma.c:964:17: note: in expansion of macro 'FIELD_PREP'
     964 |                 FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_SRC_PTR, (src >> 32));
         |                 ^~~~~~~~~~
   drivers/dma/tegra186-gpc-dma.c:964:65: warning: right shift count >= width of type [-Wshift-count-overflow]
     964 |                 FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_SRC_PTR, (src >> 32));
         |                                                                 ^~
   include/linux/compiler_types.h:315:23: note: in definition of macro '__compiletime_assert'
     315 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:335:9: note: in expansion of macro '_compiletime_assert'
     335 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/bitfield.h:49:17: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      49 |                 BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ?           \
         |                 ^~~~~~~~~~~~~~~~
   include/linux/bitfield.h:94:17: note: in expansion of macro '__BF_FIELD_CHECK'
      94 |                 __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");    \
         |                 ^~~~~~~~~~~~~~~~
   drivers/dma/tegra186-gpc-dma.c:964:17: note: in expansion of macro 'FIELD_PREP'
     964 |                 FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_SRC_PTR, (src >> 32));
         |                 ^~~~~~~~~~
   In file included from drivers/dma/tegra186-gpc-dma.c:8:
   drivers/dma/tegra186-gpc-dma.c:964:65: warning: right shift count >= width of type [-Wshift-count-overflow]
     964 |                 FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_SRC_PTR, (src >> 32));
         |                                                                 ^~
   include/linux/bitfield.h:95:34: note: in definition of macro 'FIELD_PREP'
      95 |                 ((typeof(_mask))(_val) << __bf_shf(_mask)) & (_mask);   \
         |                                  ^~~~
   In file included from <command-line>:
   drivers/dma/tegra186-gpc-dma.c:966:66: warning: right shift count >= width of type [-Wshift-count-overflow]
     966 |                 FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >> 32));
         |                                                                  ^~
   include/linux/compiler_types.h:315:23: note: in definition of macro '__compiletime_assert'
     315 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:335:9: note: in expansion of macro '_compiletime_assert'
     335 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/bitfield.h:49:17: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      49 |                 BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ?           \
         |                 ^~~~~~~~~~~~~~~~
   include/linux/bitfield.h:94:17: note: in expansion of macro '__BF_FIELD_CHECK'
      94 |                 __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");    \
         |                 ^~~~~~~~~~~~~~~~
   drivers/dma/tegra186-gpc-dma.c:966:17: note: in expansion of macro 'FIELD_PREP'
     966 |                 FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >> 32));
         |                 ^~~~~~~~~~
   drivers/dma/tegra186-gpc-dma.c:966:66: warning: right shift count >= width of type [-Wshift-count-overflow]
     966 |                 FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >> 32));
         |                                                                  ^~
   include/linux/compiler_types.h:315:23: note: in definition of macro '__compiletime_assert'
     315 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:335:9: note: in expansion of macro '_compiletime_assert'
     335 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/bitfield.h:49:17: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      49 |                 BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ?           \
         |                 ^~~~~~~~~~~~~~~~
   include/linux/bitfield.h:94:17: note: in expansion of macro '__BF_FIELD_CHECK'
      94 |                 __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");    \
         |                 ^~~~~~~~~~~~~~~~
   drivers/dma/tegra186-gpc-dma.c:966:17: note: in expansion of macro 'FIELD_PREP'
     966 |                 FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >> 32));
         |                 ^~~~~~~~~~
   In file included from drivers/dma/tegra186-gpc-dma.c:8:


vim +896 drivers/dma/tegra186-gpc-dma.c

   841	
   842	static struct dma_async_tx_descriptor *
   843	tegra_dma_prep_dma_memset(struct dma_chan *dc, dma_addr_t dest, int value,
   844				  size_t len, unsigned long flags)
   845	{
   846		struct tegra_dma_channel *tdc = to_tegra_dma_chan(dc);
   847		unsigned int max_dma_count = tdc->tdma->chip_data->max_dma_count;
   848		struct tegra_dma_sg_req *sg_req;
   849		struct tegra_dma_desc *dma_desc;
   850		unsigned long csr, mc_seq;
   851	
   852		if ((len & 3) || (dest & 3) || len > max_dma_count) {
   853			dev_err(tdc2dev(tdc),
   854				"DMA length/memory address is not supported\n");
   855			return NULL;
   856		}
   857	
   858		/* Set dma mode to fixed pattern */
   859		csr = TEGRA_GPCDMA_CSR_DMA_FIXED_PAT;
   860		/* Enable once or continuous mode */
   861		csr |= TEGRA_GPCDMA_CSR_ONCE;
   862		/* Enable IRQ mask */
   863		csr |= TEGRA_GPCDMA_CSR_IRQ_MASK;
   864		/* Enable the dma interrupt */
   865		if (flags & DMA_PREP_INTERRUPT)
   866			csr |= TEGRA_GPCDMA_CSR_IE_EOC;
   867		/* Configure default priority weight for the channel */
   868		csr |= FIELD_PREP(TEGRA_GPCDMA_CSR_WEIGHT, 1);
   869	
   870		mc_seq =  tdc_read(tdc, TEGRA_GPCDMA_CHAN_MCSEQ);
   871		/* retain stream-id and clean rest */
   872		mc_seq &= TEGRA_GPCDMA_MCSEQ_STREAM_ID0_MASK;
   873	
   874		/* Set the address wrapping */
   875		mc_seq |= FIELD_PREP(TEGRA_GPCDMA_MCSEQ_WRAP0,
   876							TEGRA_GPCDMA_MCSEQ_WRAP_NONE);
   877		mc_seq |= FIELD_PREP(TEGRA_GPCDMA_MCSEQ_WRAP1,
   878							TEGRA_GPCDMA_MCSEQ_WRAP_NONE);
   879	
   880		/* Program outstanding MC requests */
   881		mc_seq |= FIELD_PREP(TEGRA_GPCDMA_MCSEQ_REQ_COUNT, 1);
   882		/* Set burst size */
   883		mc_seq |= TEGRA_GPCDMA_MCSEQ_BURST_16;
   884	
   885		dma_desc = kzalloc(struct_size(dma_desc, sg_req, 1), GFP_NOWAIT);
   886		if (!dma_desc)
   887			return NULL;
   888	
   889		dma_desc->bytes_req = len;
   890		dma_desc->sg_count = 1;
   891		sg_req = dma_desc->sg_req;
   892	
   893		sg_req[0].ch_regs.src_ptr = 0;
   894		sg_req[0].ch_regs.dst_ptr = dest;
   895		sg_req[0].ch_regs.high_addr_ptr =
 > 896				FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >> 32));
   897		sg_req[0].ch_regs.fixed_pattern = value;
   898		/* Word count reg takes value as (N +1) words */
   899		sg_req[0].ch_regs.wcount = ((len - 4) >> 2);
   900		sg_req[0].ch_regs.csr = csr;
   901		sg_req[0].ch_regs.mmio_seq = 0;
   902		sg_req[0].ch_regs.mc_seq = mc_seq;
   903		sg_req[0].len = len;
   904	
   905		dma_desc->cyclic = false;
   906		return vchan_tx_prep(&tdc->vc, &dma_desc->vd, flags);
   907	}
   908	

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

  parent reply	other threads:[~2022-02-03  0:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 15:26 [PATCH v18 0/4] Add NVIDIA Tegra GPC-DMA driver Akhil R
2022-02-01 15:26 ` [PATCH v18 1/4] dt-bindings: dmaengine: Add doc for tegra gpcdma Akhil R
2022-02-01 15:26 ` [PATCH v18 2/4] dmaengine: tegra: Add tegra gpcdma driver Akhil R
2022-02-02 15:45   ` Dmitry Osipenko
2022-02-03  3:44     ` Akhil R
2022-02-03 18:22       ` Dmitry Osipenko
2022-02-04  6:47         ` Akhil R
2022-02-04 12:15           ` Dmitry Osipenko
2022-02-04 12:28             ` Dmitry Osipenko
2022-02-03  0:18   ` kernel test robot [this message]
2022-02-01 15:26 ` [PATCH v18 3/4] arm64: defconfig: tegra: Enable GPCDMA Akhil R
2022-02-01 15:26 ` [PATCH v18 4/4] arm64: tegra: Add GPCDMA node for tegra186 and tegra194 Akhil R

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=202202030717.azJOwFpH-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.