Re: [PATCH v11 2/4] dmaengine: tegra: Add tegra gpcdma driver

From: kernel test robot
Date: Thu Oct 28 2021 - 22:01:42 EST


Hi Akhil,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on vkoul-dmaengine/next arm64/for-next/core v5.15-rc7 next-20211028]
[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/20211028-212920
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm64-defconfig (attached as .config)
compiler: aarch64-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/020f86b695432467db8b697540871173f6d751c8
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/20211028-212920
git checkout 020f86b695432467db8b697540871173f6d751c8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm64

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

All warnings (new ones prefixed by >>):

drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_sid_reserve':
>> drivers/dma/tegra186-gpc-dma.c:299:9: warning: enumeration value 'DMA_MEM_TO_MEM' not handled in switch [-Wswitch]
299 | switch (direction) {
| ^~~~~~
>> drivers/dma/tegra186-gpc-dma.c:299:9: warning: enumeration value 'DMA_DEV_TO_DEV' not handled in switch [-Wswitch]
>> drivers/dma/tegra186-gpc-dma.c:299:9: warning: enumeration value 'DMA_TRANS_NONE' not handled in switch [-Wswitch]
drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_sid_free':
drivers/dma/tegra186-gpc-dma.c:324:9: warning: enumeration value 'DMA_MEM_TO_MEM' not handled in switch [-Wswitch]
324 | switch (tdc->sid_dir) {
| ^~~~~~
drivers/dma/tegra186-gpc-dma.c:324:9: warning: enumeration value 'DMA_DEV_TO_DEV' not handled in switch [-Wswitch]
drivers/dma/tegra186-gpc-dma.c:324:9: warning: enumeration value 'DMA_TRANS_NONE' not handled in switch [-Wswitch]
In file included from drivers/dma/tegra186-gpc-dma.c:8:
drivers/dma/tegra186-gpc-dma.c: In function 'get_burst_size':
include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
20 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^~
include/linux/minmax.h:26:18: note: in expansion of macro '__typecheck'
26 | (__typecheck(x, y) && __no_side_effects(x, y))
| ^~~~~~~~~~~
include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
36 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/minmax.h:45:25: note: in expansion of macro '__careful_cmp'
45 | #define min(x, y) __careful_cmp(x, y, <)
| ^~~~~~~~~~~~~
include/linux/minmax.h:89:28: note: in expansion of macro 'min'
89 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
| ^~~
include/linux/minmax.h:26:18: note: in expansion of macro '__typecheck'
26 | (__typecheck(x, y) && __no_side_effects(x, y))
| ^~~~~~~~~~~
include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
36 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/minmax.h:52:25: note: in expansion of macro '__careful_cmp'
52 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
include/linux/minmax.h:89:45: note: in expansion of macro 'max'
89 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
| ^~~
drivers/dma/tegra186-gpc-dma.c:692:9: note: in expansion of macro 'clamp'
692 | clamp(burst_mmio_width, TEGRA_GPCDMA_MMIOSEQ_BURST_MIN,
| ^~~~~
include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
20 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^~
include/linux/minmax.h:26:18: note: in expansion of macro '__typecheck'
26 | (__typecheck(x, y) && __no_side_effects(x, y))
| ^~~~~~~~~~~
include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
36 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/minmax.h:45:25: note: in expansion of macro '__careful_cmp'
45 | #define min(x, y) __careful_cmp(x, y, <)
| ^~~~~~~~~~~~~
include/linux/minmax.h:89:28: note: in expansion of macro 'min'
89 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
| ^~~
drivers/dma/tegra186-gpc-dma.c:692:9: note: in expansion of macro 'clamp'
692 | clamp(burst_mmio_width, TEGRA_GPCDMA_MMIOSEQ_BURST_MIN,
| ^~~~~
In file included from include/linux/minmax.h:5,
from drivers/dma/tegra186-gpc-dma.c:8:
include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
20 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^~
include/linux/const.h:12:55: note: in definition of macro '__is_constexpr'
12 | (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
| ^
include/linux/minmax.h:26:39: note: in expansion of macro '__no_side_effects'
26 | (__typecheck(x, y) && __no_side_effects(x, y))
| ^~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
36 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/minmax.h:45:25: note: in expansion of macro '__careful_cmp'
45 | #define min(x, y) __careful_cmp(x, y, <)
| ^~~~~~~~~~~~~
include/linux/minmax.h:89:28: note: in expansion of macro 'min'
89 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
| ^~~
include/linux/minmax.h:26:18: note: in expansion of macro '__typecheck'
26 | (__typecheck(x, y) && __no_side_effects(x, y))
| ^~~~~~~~~~~
include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
36 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/minmax.h:52:25: note: in expansion of macro '__careful_cmp'
52 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
include/linux/minmax.h:89:45: note: in expansion of macro 'max'
89 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
| ^~~
drivers/dma/tegra186-gpc-dma.c:692:9: note: in expansion of macro 'clamp'
692 | clamp(burst_mmio_width, TEGRA_GPCDMA_MMIOSEQ_BURST_MIN,
| ^~~~~
In file included from drivers/dma/tegra186-gpc-dma.c:8:
include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
20 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^~
include/linux/minmax.h:28:27: note: in definition of macro '__cmp'
28 | #define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
| ^
include/linux/minmax.h:45:25: note: in expansion of macro '__careful_cmp'
45 | #define min(x, y) __careful_cmp(x, y, <)


vim +/DMA_MEM_TO_MEM +299 drivers/dma/tegra186-gpc-dma.c

289
290 static int tegra_dma_sid_reserve(struct tegra_dma_channel *tdc,
291 enum dma_transfer_direction direction)
292 {
293 struct tegra_dma *tdma = tdc->tdma;
294 unsigned int sid = tdc->slave_id;
295
296 if (!is_slave_direction(direction))
297 return 0;
298
> 299 switch (direction) {
300 case DMA_MEM_TO_DEV:
301 if (test_and_set_bit(sid, &tdma->sid_m2d_reserved)) {
302 dev_err(tdma->dev, "slave id already in use\n");
303 return -EINVAL;
304 }
305 break;
306 case DMA_DEV_TO_MEM:
307 if (test_and_set_bit(sid, &tdma->sid_d2m_reserved)) {
308 dev_err(tdma->dev, "slave id already in use\n");
309 return -EINVAL;
310 }
311 break;
312 }
313
314 tdc->sid_dir = direction;
315
316 return 0;
317 }
318

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

Attachment: .config.gz
Description: application/gzip