[drm-intel:drm-intel-gt-next 2/8] drivers/gpu/drm/i915/selftests/i915_buddy.c:777:5: error: no previous prototype for 'i915_buddy_mock_selftests'
by kernel test robot
tree: git://anongit.freedesktop.org/drm-intel drm-intel-gt-next
head: 13c2ceb6addb6b14468e09b75832c98909eed8e7
commit: 88be9a0a06b73ecd85a688a7c174c941e9692e92 [2/8] drm/i915/ttm: add ttm_buddy_man
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add drm-intel git://anongit.freedesktop.org/drm-intel
git fetch --no-tags drm-intel drm-intel-gt-next
git checkout 88be9a0a06b73ecd85a688a7c174c941e9692e92
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the drm-intel/drm-intel-gt-next HEAD bfde26df7af4e8ea894008dfda1d7d54a834dcd4 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
In file included from drivers/gpu/drm/i915/i915_buddy.c:411:
>> drivers/gpu/drm/i915/selftests/i915_buddy.c:777:5: error: no previous prototype for 'i915_buddy_mock_selftests' [-Werror=missing-prototypes]
777 | int i915_buddy_mock_selftests(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/i915_buddy_mock_selftests +777 drivers/gpu/drm/i915/selftests/i915_buddy.c
776
> 777 int i915_buddy_mock_selftests(void)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH 1/2] watchdog: iTCO_wdt: use pm_ptr()
by kernel test robot
Hi "Enrico,
I love your patch! Yet something to improve:
[auto build test ERROR on linux/master]
[also build test ERROR on hwmon/hwmon-next linus/master v5.13-rc6 next-20210618]
[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/Enrico-Weigelt-metux-IT-consult/...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git dd860052c99b1e088352bdd4fb7aef46f8d2ef47
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.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://github.com/0day-ci/linux/commit/670a790c3acfccf4b5405459048ba2a05...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Enrico-Weigelt-metux-IT-consult/watchdog-iTCO_wdt-use-pm_ptr/20210617-024441
git checkout 670a790c3acfccf4b5405459048ba2a05b912eef
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/device.h:25,
from include/linux/acpi.h:15,
from drivers/watchdog/iTCO_wdt.c:48:
>> drivers/watchdog/iTCO_wdt.c:645:21: error: 'iTCO_wdt_pm' undeclared here (not in a function); did you mean 'iTCO_wdt_ops'?
645 | .pm = pm_ptr(&iTCO_wdt_pm),
| ^~~~~~~~~~~
include/linux/pm.h:377:23: note: in definition of macro 'pm_ptr'
377 | #define pm_ptr(_ptr) (_ptr)
| ^~~~
vim +645 drivers/watchdog/iTCO_wdt.c
640
641 static struct platform_driver iTCO_wdt_driver = {
642 .probe = iTCO_wdt_probe,
643 .driver = {
644 .name = DRV_NAME,
> 645 .pm = pm_ptr(&iTCO_wdt_pm),
646 },
647 };
648
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[linux-next:master 11080/11253] igen6_edac.c:undefined reference to `mce_unregister_decode_chain'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: e71e3a48a7e89fa71fb70bf4602367528864d2ff
commit: 0b7338b27e821a61cfa695077aa352312c0ab2f6 [11080/11253] EDAC/igen6: Add Intel Tiger Lake SoC support
config: x86_64-randconfig-a013-20210620 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 0b7338b27e821a61cfa695077aa352312c0ab2f6
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld: drivers/edac/igen6_edac.o: in function `igen6_remove':
>> igen6_edac.c:(.text+0x555): undefined reference to `mce_unregister_decode_chain'
ld: igen6_edac.c:(.text+0x593): undefined reference to `gen_pool_destroy'
ld: drivers/edac/igen6_edac.o: in function `ecclog_gen_pool_add':
igen6_edac.c:(.text+0xa24): undefined reference to `gen_pool_alloc_algo_owner'
ld: drivers/edac/igen6_edac.o: in function `igen6_probe':
igen6_edac.c:(.text+0x2b06): undefined reference to `gen_pool_create'
ld: igen6_edac.c:(.text+0x2d7a): undefined reference to `gen_pool_add_owner'
ld: igen6_edac.c:(.text+0x2d8d): undefined reference to `gen_pool_destroy'
>> ld: igen6_edac.c:(.text+0x2e7b): undefined reference to `mce_register_decode_chain'
ld: igen6_edac.c:(.text+0x2f86): undefined reference to `gen_pool_destroy'
ld: drivers/edac/igen6_edac.o: in function `ecclog_work_cb':
igen6_edac.c:(.text+0x3578): undefined reference to `gen_pool_free_owner'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[kees:kspp/memcpy/next-20210618/v0 81/82] arch/arm/boot/compressed/string.c:29:7: error: redefinition of parameter '__builtin_object_size'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/memcpy/next-20210618/v0
head: fd2aa2a169de8bde9502e7a2fc48cd03d4bfd996
commit: 6d805912063804ea975440760b79392fc0c03948 [81/82] fortify: Work around Clang inlining bugs
config: arm-randconfig-r024-20210618 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d1baf2895467735ab14f4b3415fce204c0cc8e7f)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?id...
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees kspp/memcpy/next-20210618/v0
git checkout 6d805912063804ea975440760b79392fc0c03948
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
>> arch/arm/boot/compressed/string.c:29:7: error: expected parameter declarator
void *memcpy(void *__dest, __const void *__src, size_t __n)
^
include/linux/fortify-string.h:304:32: note: expanded from macro 'memcpy'
__builtin_object_size(p, 1), \
^
>> arch/arm/boot/compressed/string.c:29:7: error: expected ')'
include/linux/fortify-string.h:304:32: note: expanded from macro 'memcpy'
__builtin_object_size(p, 1), \
^
arch/arm/boot/compressed/string.c:29:7: note: to match this '('
include/linux/fortify-string.h:304:28: note: expanded from macro 'memcpy'
__builtin_object_size(p, 1), \
^
>> arch/arm/boot/compressed/string.c:29:7: warning: declaration specifier missing, defaulting to 'int'
void *memcpy(void *__dest, __const void *__src, size_t __n)
^
include/linux/fortify-string.h:304:7: note: expanded from macro 'memcpy'
__builtin_object_size(p, 1), \
^
>> arch/arm/boot/compressed/string.c:29:7: error: expected parameter declarator
include/linux/fortify-string.h:305:32: note: expanded from macro 'memcpy'
__builtin_object_size(q, 1))
^
>> arch/arm/boot/compressed/string.c:29:7: error: expected ')'
include/linux/fortify-string.h:305:32: note: expanded from macro 'memcpy'
__builtin_object_size(q, 1))
^
arch/arm/boot/compressed/string.c:29:7: note: to match this '('
include/linux/fortify-string.h:305:28: note: expanded from macro 'memcpy'
__builtin_object_size(q, 1))
^
>> arch/arm/boot/compressed/string.c:29:7: warning: declaration specifier missing, defaulting to 'int'
void *memcpy(void *__dest, __const void *__src, size_t __n)
^
include/linux/fortify-string.h:305:7: note: expanded from macro 'memcpy'
__builtin_object_size(q, 1))
^
>> arch/arm/boot/compressed/string.c:29:7: error: redefinition of parameter '__builtin_object_size'
include/linux/fortify-string.h:305:7: note: expanded from macro 'memcpy'
__builtin_object_size(q, 1))
^
arch/arm/boot/compressed/string.c:29:7: note: previous declaration is here
include/linux/fortify-string.h:304:7: note: expanded from macro 'memcpy'
__builtin_object_size(p, 1), \
^
>> arch/arm/boot/compressed/string.c:29:7: warning: omitting the parameter name in a function definition is a C2x extension [-Wc2x-extensions]
void *memcpy(void *__dest, __const void *__src, size_t __n)
^
include/linux/fortify-string.h:305:7: note: expanded from macro 'memcpy'
__builtin_object_size(q, 1))
^
arch/arm/boot/compressed/string.c:63:7: error: expected parameter declarator
void *memmove(void *__dest, __const void *__src, size_t count)
^
include/linux/fortify-string.h:316:34: note: expanded from macro 'memmove'
__builtin_object_size(p, 1), \
^
arch/arm/boot/compressed/string.c:63:7: error: expected ')'
include/linux/fortify-string.h:316:34: note: expanded from macro 'memmove'
__builtin_object_size(p, 1), \
^
arch/arm/boot/compressed/string.c:63:7: note: to match this '('
include/linux/fortify-string.h:316:30: note: expanded from macro 'memmove'
__builtin_object_size(p, 1), \
^
arch/arm/boot/compressed/string.c:63:7: warning: declaration specifier missing, defaulting to 'int'
void *memmove(void *__dest, __const void *__src, size_t count)
^
include/linux/fortify-string.h:316:9: note: expanded from macro 'memmove'
__builtin_object_size(p, 1), \
^
arch/arm/boot/compressed/string.c:63:7: error: expected parameter declarator
include/linux/fortify-string.h:317:34: note: expanded from macro 'memmove'
__builtin_object_size(q, 1))
^
arch/arm/boot/compressed/string.c:63:7: error: expected ')'
include/linux/fortify-string.h:317:34: note: expanded from macro 'memmove'
__builtin_object_size(q, 1))
^
arch/arm/boot/compressed/string.c:63:7: note: to match this '('
include/linux/fortify-string.h:317:30: note: expanded from macro 'memmove'
__builtin_object_size(q, 1))
^
arch/arm/boot/compressed/string.c:63:7: warning: declaration specifier missing, defaulting to 'int'
void *memmove(void *__dest, __const void *__src, size_t count)
^
include/linux/fortify-string.h:317:9: note: expanded from macro 'memmove'
__builtin_object_size(q, 1))
^
arch/arm/boot/compressed/string.c:63:7: error: redefinition of parameter '__builtin_object_size'
include/linux/fortify-string.h:317:9: note: expanded from macro 'memmove'
__builtin_object_size(q, 1))
^
arch/arm/boot/compressed/string.c:63:7: note: previous declaration is here
include/linux/fortify-string.h:316:9: note: expanded from macro 'memmove'
__builtin_object_size(p, 1), \
^
arch/arm/boot/compressed/string.c:63:7: warning: omitting the parameter name in a function definition is a C2x extension [-Wc2x-extensions]
void *memmove(void *__dest, __const void *__src, size_t count)
^
include/linux/fortify-string.h:317:9: note: expanded from macro 'memmove'
__builtin_object_size(q, 1))
^
>> arch/arm/boot/compressed/string.c:72:10: error: too many arguments to function call, expected 1, have 2
return memcpy(__dest, __src, count);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:304:32: note: expanded from macro 'memcpy'
__builtin_object_size(p, 1), \
~~~~~~~~~~~~~~~~~~~~~ ^
>> arch/arm/boot/compressed/string.c:72:10: error: too many arguments to function call, expected 1, have 2
return memcpy(__dest, __src, count);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:305:32: note: expanded from macro 'memcpy'
__builtin_object_size(q, 1))
~~~~~~~~~~~~~~~~~~~~~ ^
6 warnings and 12 errors generated.
vim +/__builtin_object_size +29 arch/arm/boot/compressed/string.c
d6d51a96c7d63b Linus Walleij 2020-10-25 28
df4879fa2603fb Nicolas Pitre 2011-09-13 @29 void *memcpy(void *__dest, __const void *__src, size_t __n)
df4879fa2603fb Nicolas Pitre 2011-09-13 30 {
df4879fa2603fb Nicolas Pitre 2011-09-13 31 int i = 0;
df4879fa2603fb Nicolas Pitre 2011-09-13 32 unsigned char *d = (unsigned char *)__dest, *s = (unsigned char *)__src;
df4879fa2603fb Nicolas Pitre 2011-09-13 33
df4879fa2603fb Nicolas Pitre 2011-09-13 34 for (i = __n >> 3; i > 0; i--) {
df4879fa2603fb Nicolas Pitre 2011-09-13 35 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 36 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 37 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 38 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 39 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 40 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 41 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 42 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 43 }
df4879fa2603fb Nicolas Pitre 2011-09-13 44
df4879fa2603fb Nicolas Pitre 2011-09-13 45 if (__n & 1 << 2) {
df4879fa2603fb Nicolas Pitre 2011-09-13 46 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 47 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 48 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 49 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 50 }
df4879fa2603fb Nicolas Pitre 2011-09-13 51
df4879fa2603fb Nicolas Pitre 2011-09-13 52 if (__n & 1 << 1) {
df4879fa2603fb Nicolas Pitre 2011-09-13 53 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 54 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 55 }
df4879fa2603fb Nicolas Pitre 2011-09-13 56
df4879fa2603fb Nicolas Pitre 2011-09-13 57 if (__n & 1)
df4879fa2603fb Nicolas Pitre 2011-09-13 58 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 59
df4879fa2603fb Nicolas Pitre 2011-09-13 60 return __dest;
df4879fa2603fb Nicolas Pitre 2011-09-13 61 }
df4879fa2603fb Nicolas Pitre 2011-09-13 62
df4879fa2603fb Nicolas Pitre 2011-09-13 63 void *memmove(void *__dest, __const void *__src, size_t count)
df4879fa2603fb Nicolas Pitre 2011-09-13 64 {
df4879fa2603fb Nicolas Pitre 2011-09-13 65 unsigned char *d = __dest;
df4879fa2603fb Nicolas Pitre 2011-09-13 66 const unsigned char *s = __src;
df4879fa2603fb Nicolas Pitre 2011-09-13 67
df4879fa2603fb Nicolas Pitre 2011-09-13 68 if (__dest == __src)
df4879fa2603fb Nicolas Pitre 2011-09-13 69 return __dest;
df4879fa2603fb Nicolas Pitre 2011-09-13 70
df4879fa2603fb Nicolas Pitre 2011-09-13 71 if (__dest < __src)
df4879fa2603fb Nicolas Pitre 2011-09-13 @72 return memcpy(__dest, __src, count);
df4879fa2603fb Nicolas Pitre 2011-09-13 73
df4879fa2603fb Nicolas Pitre 2011-09-13 74 while (count--)
df4879fa2603fb Nicolas Pitre 2011-09-13 75 d[count] = s[count];
df4879fa2603fb Nicolas Pitre 2011-09-13 76 return __dest;
df4879fa2603fb Nicolas Pitre 2011-09-13 77 }
df4879fa2603fb Nicolas Pitre 2011-09-13 78
:::::: The code at line 29 was first introduced by commit
:::::: df4879fa2603fbf0804a80f9f146ef9023dd621f ARM: zImage: gather some string functions into string.c
:::::: TO: Nicolas Pitre <nicolas.pitre(a)linaro.org>
:::::: CC: Nicolas Pitre <nico(a)fluxnic.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[omap-audio:peter/linux-next-wip 1/61] sound/soc/ti/davinci-mcasp.c:863:56: warning: implicit conversion from 'int' to 'u8' (aka 'unsigned char') changes value from 384 to 128
by kernel test robot
tree: https://github.com/omap-audio/linux-audio peter/linux-next-wip
head: 11957b267457cfe0db21fd62200be07b61477e2e
commit: f6b70a69b0764472cd0f5bb2503a3d3c639dc988 [1/61] ASoC: ti: davinci-mcasp: Fix DIT mode support
config: x86_64-randconfig-a006-20210620 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d1baf2895467735ab14f4b3415fce204c0cc8e7f)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/omap-audio/linux-audio/commit/f6b70a69b0764472cd0f5bb2...
git remote add omap-audio https://github.com/omap-audio/linux-audio
git fetch --no-tags omap-audio peter/linux-next-wip
git checkout f6b70a69b0764472cd0f5bb2503a3d3c639dc988
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> sound/soc/ti/davinci-mcasp.c:863:56: warning: implicit conversion from 'int' to 'u8' (aka 'unsigned char') changes value from 384 to 128 [-Wconstant-conversion]
u8 slots = mcasp->op_mode == DAVINCI_MCASP_DIT_MODE ? 384 : mcasp->tdm_slots;
~~~~~ ^~~
1 warning generated.
vim +863 sound/soc/ti/davinci-mcasp.c
855
856 static int mcasp_common_hw_param(struct davinci_mcasp *mcasp, int stream,
857 int period_words, int channels)
858 {
859 struct snd_dmaengine_dai_dma_data *dma_data = &mcasp->dma_data[stream];
860 int i;
861 u8 tx_ser = 0;
862 u8 rx_ser = 0;
> 863 u8 slots = mcasp->op_mode == DAVINCI_MCASP_DIT_MODE ? 384 : mcasp->tdm_slots;
864 u8 max_active_serializers = (channels + slots - 1) / slots;
865 u8 max_rx_serializers, max_tx_serializers;
866 int active_serializers, numevt;
867 u32 reg;
868 /* Default configuration */
869 if (mcasp->version < MCASP_VERSION_3)
870 mcasp_set_bits(mcasp, DAVINCI_MCASP_PWREMUMGT_REG, MCASP_SOFT);
871
872 if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
873 mcasp_set_reg(mcasp, DAVINCI_MCASP_TXSTAT_REG, 0xFFFFFFFF);
874 mcasp_clr_bits(mcasp, DAVINCI_MCASP_XEVTCTL_REG, TXDATADMADIS);
875 max_tx_serializers = max_active_serializers;
876 max_rx_serializers =
877 mcasp->active_serializers[SNDRV_PCM_STREAM_CAPTURE];
878 } else {
879 mcasp_set_reg(mcasp, DAVINCI_MCASP_RXSTAT_REG, 0xFFFFFFFF);
880 mcasp_clr_bits(mcasp, DAVINCI_MCASP_REVTCTL_REG, RXDATADMADIS);
881 max_tx_serializers =
882 mcasp->active_serializers[SNDRV_PCM_STREAM_PLAYBACK];
883 max_rx_serializers = max_active_serializers;
884 }
885
886 for (i = 0; i < mcasp->num_serializer; i++) {
887 mcasp_set_bits(mcasp, DAVINCI_MCASP_XRSRCTL_REG(i),
888 mcasp->serial_dir[i]);
889 if (mcasp->serial_dir[i] == TX_MODE &&
890 tx_ser < max_tx_serializers) {
891 mcasp_mod_bits(mcasp, DAVINCI_MCASP_XRSRCTL_REG(i),
892 mcasp->dismod, DISMOD_MASK);
893 set_bit(PIN_BIT_AXR(i), &mcasp->pdir);
894 tx_ser++;
895 } else if (mcasp->serial_dir[i] == RX_MODE &&
896 rx_ser < max_rx_serializers) {
897 clear_bit(PIN_BIT_AXR(i), &mcasp->pdir);
898 rx_ser++;
899 } else {
900 /* Inactive or unused pin, set it to inactive */
901 mcasp_mod_bits(mcasp, DAVINCI_MCASP_XRSRCTL_REG(i),
902 SRMOD_INACTIVE, SRMOD_MASK);
903 /* If unused, set DISMOD for the pin */
904 if (mcasp->serial_dir[i] != INACTIVE_MODE)
905 mcasp_mod_bits(mcasp,
906 DAVINCI_MCASP_XRSRCTL_REG(i),
907 mcasp->dismod, DISMOD_MASK);
908 clear_bit(PIN_BIT_AXR(i), &mcasp->pdir);
909 }
910 }
911
912 if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
913 active_serializers = tx_ser;
914 numevt = mcasp->txnumevt;
915 reg = mcasp->fifo_base + MCASP_WFIFOCTL_OFFSET;
916 } else {
917 active_serializers = rx_ser;
918 numevt = mcasp->rxnumevt;
919 reg = mcasp->fifo_base + MCASP_RFIFOCTL_OFFSET;
920 }
921
922 if (mcasp->op_mode == DAVINCI_MCASP_IIS_MODE) {
923 if (active_serializers < max_active_serializers) {
924 dev_warn(mcasp->dev, "stream has more channels (%d) than are "
925 "enabled in mcasp (%d)\n", channels,
926 active_serializers * slots);
927 return -EINVAL;
928 }
929 }
930
931 /* AFIFO is not in use */
932 if (!numevt) {
933 /* Configure the burst size for platform drivers */
934 if (active_serializers > 1) {
935 /*
936 * If more than one serializers are in use we have one
937 * DMA request to provide data for all serializers.
938 * For example if three serializers are enabled the DMA
939 * need to transfer three words per DMA request.
940 */
941 dma_data->maxburst = active_serializers;
942 } else {
943 dma_data->maxburst = 0;
944 }
945
946 goto out;
947 }
948
949 if (period_words % active_serializers) {
950 dev_err(mcasp->dev, "Invalid combination of period words and "
951 "active serializers: %d, %d\n", period_words,
952 active_serializers);
953 return -EINVAL;
954 }
955
956 /*
957 * Calculate the optimal AFIFO depth for platform side:
958 * The number of words for numevt need to be in steps of active
959 * serializers.
960 */
961 numevt = (numevt / active_serializers) * active_serializers;
962
963 while (period_words % numevt && numevt > 0)
964 numevt -= active_serializers;
965 if (numevt <= 0)
966 numevt = active_serializers;
967
968 mcasp_mod_bits(mcasp, reg, active_serializers, NUMDMA_MASK);
969 mcasp_mod_bits(mcasp, reg, NUMEVT(numevt), NUMEVT_MASK);
970
971 /* Configure the burst size for platform drivers */
972 if (numevt == 1)
973 numevt = 0;
974 dma_data->maxburst = numevt;
975
976 out:
977 mcasp->active_serializers[stream] = active_serializers;
978
979 return 0;
980 }
981
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
arch/mips/kernel/vpe-mt.c:178:7: warning: no previous prototype for function 'vpe_alloc'
by kernel test robot
Hi Bert,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d9403d307dba1a71ee6462b22300c2d3be773b1c
commit: 4042147a0cc6af5a400b5e12a7855e893dec01b4 MIPS: Add Realtek RTL838x/RTL839x support as generic MIPS system
date: 5 months ago
config: mips-randconfig-r014-20210620 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d1baf2895467735ab14f4b3415fce204c0cc8e7f)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 4042147a0cc6af5a400b5e12a7855e893dec01b4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> arch/mips/kernel/vpe-mt.c:178:7: warning: no previous prototype for function 'vpe_alloc' [-Wmissing-prototypes]
void *vpe_alloc(void)
^
arch/mips/kernel/vpe-mt.c:178:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void *vpe_alloc(void)
^
static
>> arch/mips/kernel/vpe-mt.c:196:5: warning: no previous prototype for function 'vpe_start' [-Wmissing-prototypes]
int vpe_start(void *vpe, unsigned long start)
^
arch/mips/kernel/vpe-mt.c:196:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int vpe_start(void *vpe, unsigned long start)
^
static
>> arch/mips/kernel/vpe-mt.c:206:5: warning: no previous prototype for function 'vpe_stop' [-Wmissing-prototypes]
int vpe_stop(void *vpe)
^
arch/mips/kernel/vpe-mt.c:206:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int vpe_stop(void *vpe)
^
static
>> arch/mips/kernel/vpe-mt.c:227:5: warning: no previous prototype for function 'vpe_free' [-Wmissing-prototypes]
int vpe_free(void *vpe)
^
arch/mips/kernel/vpe-mt.c:227:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int vpe_free(void *vpe)
^
static
4 warnings generated.
vim +/vpe_alloc +178 arch/mips/kernel/vpe-mt.c
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 175
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 176 /* module wrapper entry points */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 177 /* give me a vpe */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 @178 void *vpe_alloc(void)
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 179 {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 180 int i;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 181 struct vpe *v;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 182
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 183 /* find a vpe */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 184 for (i = 1; i < MAX_VPES; i++) {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 185 v = get_vpe(i);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 186 if (v != NULL) {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 187 v->state = VPE_STATE_INUSE;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 188 return v;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 189 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 190 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 191 return NULL;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 192 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 193 EXPORT_SYMBOL(vpe_alloc);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 194
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 195 /* start running from here */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 @196 int vpe_start(void *vpe, unsigned long start)
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 197 {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 198 struct vpe *v = vpe;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 199
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 200 v->__start = start;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 201 return vpe_run(v);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 202 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 203 EXPORT_SYMBOL(vpe_start);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 204
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 205 /* halt it for now */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 @206 int vpe_stop(void *vpe)
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 207 {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 208 struct vpe *v = vpe;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 209 struct tc *t;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 210 unsigned int evpe_flags;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 211
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 212 evpe_flags = dvpe();
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 213
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 214 t = list_entry(v->tc.next, struct tc, tc);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 215 if (t != NULL) {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 216 settc(t->index);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 217 write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() & ~VPECONF0_VPA);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 218 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 219
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 220 evpe(evpe_flags);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 221
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 222 return 0;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 223 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 224 EXPORT_SYMBOL(vpe_stop);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 225
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 226 /* I've done with it thank you */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 @227 int vpe_free(void *vpe)
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 228 {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 229 struct vpe *v = vpe;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 230 struct tc *t;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 231 unsigned int evpe_flags;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 232
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 233 t = list_entry(v->tc.next, struct tc, tc);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 234 if (t == NULL)
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 235 return -ENOEXEC;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 236
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 237 evpe_flags = dvpe();
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 238
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 239 /* Put MVPE's into 'configuration state' */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 240 set_c0_mvpcontrol(MVPCONTROL_VPC);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 241
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 242 settc(t->index);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 243 write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() & ~VPECONF0_VPA);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 244
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 245 /* halt the TC */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 246 write_tc_c0_tchalt(TCHALT_H);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 247 mips_ihb();
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 248
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 249 /* mark the TC unallocated */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 250 write_tc_c0_tcstatus(read_tc_c0_tcstatus() & ~TCSTATUS_A);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 251
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 252 v->state = VPE_STATE_UNUSED;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 253
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 254 clear_c0_mvpcontrol(MVPCONTROL_VPC);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 255 evpe(evpe_flags);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 256
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 257 return 0;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 258 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 259 EXPORT_SYMBOL(vpe_free);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 260
:::::: The code at line 178 was first introduced by commit
:::::: 1a2a6d7e8816ed2b2679a0c4f7ba4019cd31dd62 MIPS: APRP: Split VPE loader into separate files.
:::::: TO: Deng-Cheng Zhu <dengcheng.zhu(a)imgtec.com>
:::::: CC: Ralf Baechle <ralf(a)linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
drivers/edac/altera_edac.c:662:37: warning: unused variable 'altr_edac_a10_device_inject2_fops'
by kernel test robot
Hi Krzysztof,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d9403d307dba1a71ee6462b22300c2d3be773b1c
commit: 4a9a1a5602d82c079325bf37466af0b67d6c0b9e arm64: socfpga: merge Agilex and N5X into ARCH_INTEL_SOCFPGA
date: 3 months ago
config: arm64-randconfig-r036-20210620 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d1baf2895467735ab14f4b3415fce204c0cc8e7f)
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
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 4a9a1a5602d82c079325bf37466af0b67d6c0b9e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/edac/altera_edac.c:541:42: warning: unused variable 'ocramecc_data' [-Wunused-const-variable]
static const struct edac_device_prv_data ocramecc_data;
^
drivers/edac/altera_edac.c:542:42: warning: unused variable 'l2ecc_data' [-Wunused-const-variable]
static const struct edac_device_prv_data l2ecc_data;
^
drivers/edac/altera_edac.c:543:42: warning: unused variable 'a10_ocramecc_data' [-Wunused-const-variable]
static const struct edac_device_prv_data a10_ocramecc_data;
^
drivers/edac/altera_edac.c:544:42: warning: unused variable 'a10_l2ecc_data' [-Wunused-const-variable]
static const struct edac_device_prv_data a10_l2ecc_data;
^
drivers/edac/altera_edac.c:642:37: warning: unused variable 'altr_edac_device_inject_fops' [-Wunused-const-variable]
static const struct file_operations altr_edac_device_inject_fops = {
^
>> drivers/edac/altera_edac.c:662:37: warning: unused variable 'altr_edac_a10_device_inject2_fops' [-Wunused-const-variable]
static const struct file_operations altr_edac_a10_device_inject2_fops = {
^
6 warnings generated.
vim +/altr_edac_a10_device_inject2_fops +662 drivers/edac/altera_edac.c
c7b4be8db8bc33 Thor Thayer 2016-04-06 657
064acbd4f4ab50 Thor Thayer 2018-09-25 658 static ssize_t altr_edac_a10_device_trig2(struct file *file,
064acbd4f4ab50 Thor Thayer 2018-09-25 659 const char __user *user_buf,
064acbd4f4ab50 Thor Thayer 2018-09-25 660 size_t count, loff_t *ppos);
064acbd4f4ab50 Thor Thayer 2018-09-25 661
064acbd4f4ab50 Thor Thayer 2018-09-25 @662 static const struct file_operations altr_edac_a10_device_inject2_fops = {
064acbd4f4ab50 Thor Thayer 2018-09-25 663 .open = simple_open,
064acbd4f4ab50 Thor Thayer 2018-09-25 664 .write = altr_edac_a10_device_trig2,
064acbd4f4ab50 Thor Thayer 2018-09-25 665 .llseek = generic_file_llseek,
064acbd4f4ab50 Thor Thayer 2018-09-25 666 };
064acbd4f4ab50 Thor Thayer 2018-09-25 667
:::::: The code at line 662 was first introduced by commit
:::::: 064acbd4f4ab509dd3f31e1a2d1e04a43d5b1009 EDAC, altera: Add Stratix10 peripheral support
:::::: TO: Thor Thayer <thor.thayer(a)linux.intel.com>
:::::: CC: Borislav Petkov <bp(a)suse.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[intel-linux-intel-lts:5.4/yocto 40/1142] drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:993:47: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: eeb611e5394c56d45c5cc8f7dc484c9f19e93143
commit: 94e13c2880167751eb5cbbcb0e7be68ca83f0653 [40/1142] dmaengine: dw-axi-dma: support cyclic mode
config: x86_64-randconfig-s021-20210618 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://github.com/intel/linux-intel-lts/commit/94e13c2880167751eb5cbbcb0...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/yocto
git checkout 94e13c2880167751eb5cbbcb0e7be68ca83f0653
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:993:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] block_ts_lo @@ got unsigned long @@
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:993:47: sparse: expected restricted __le32 [usertype] block_ts_lo
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:993:47: sparse: got unsigned long
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1068:55: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] block_ts_lo @@ got unsigned long @@
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1068:55: sparse: expected restricted __le32 [usertype] block_ts_lo
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1068:55: sparse: got unsigned long
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1070:55: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] block_ts_lo @@ got unsigned long @@
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1070:55: sparse: expected restricted __le32 [usertype] block_ts_lo
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1070:55: sparse: got unsigned long
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1169:59: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned int [usertype] irq_mask @@ got restricted __le32 [usertype] status_lo @@
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1169:59: sparse: expected unsigned int [usertype] irq_mask
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1169:59: sparse: got restricted __le32 [usertype] status_lo
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1170:42: sparse: sparse: invalid assignment: |=
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1170:42: sparse: left side has type restricted __le32
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1170:42: sparse: right side has type unsigned long
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1111:22: sparse: sparse: context imbalance in 'axi_chan_handle_err' - different lock contexts for basic block
vim +993 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
912
913 static struct dma_async_tx_descriptor *
914 dw_chan_prep_dma_cyclic(struct dma_chan *dchan, dma_addr_t buf_addr,
915 size_t buf_len, size_t period_len,
916 enum dma_transfer_direction direction,
917 unsigned long flags)
918 {
919 struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
920 struct axi_dma_desc *first = NULL, *prev = NULL;
921 unsigned int reg_width;
922 unsigned int mem_width;
923 unsigned int data_width = BIT(chan->chip->dw->hdata->m_data_width);
924 dma_addr_t reg;
925 u32 reg_value = 0;
926 unsigned int i = 0;
927 u32 ctllo, ctlhi;
928 size_t total_len = 0;
929 size_t block_ts, max_block_ts;
930 u8 lms = 0; // Select AXI0 master for LLI fetching
931 u32 offset;
932
933 if (unlikely(!is_slave_direction(direction)))
934 return NULL;
935
936 chan->direction = direction;
937 chan->cyclic = 0x1;
938
939 max_block_ts = chan->chip->dw->hdata->block_size[chan->id];
940
941 axi_set_hw_channel(chan->chip, chan->hw_hs_num);
942
943 switch (direction) {
944 case DMA_MEM_TO_DEV:
945 reg_width = __ffs(chan->slave_config.dst_addr_width);
946
947 chan->reg_width = reg_width;
948 if (reg_width == DWAXIDMAC_TRANS_WIDTH_16) {
949 offset = DMAC_APB_HALFWORD_WR_CH_EN;
950 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
951 reg_value |= 0x1 << chan->id;
952 axi_dma_apb_iowrite32(chan->chip,
953 DMAC_APB_HALFWORD_WR_CH_EN, reg_value);
954 } else if (reg_width == DWAXIDMAC_TRANS_WIDTH_8) {
955 offset = DMAC_APB_BYTE_WR_CH_EN;
956 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
957 reg_value |= 0x1 << chan->id;
958 axi_dma_apb_iowrite32(chan->chip, offset, reg_value);
959 }
960 reg = chan->slave_config.dst_addr;
961
962 ctllo = axi_dma_prepare_ctllo(chan) |
963 reg_width << CH_CTL_L_DST_WIDTH_POS |
964 DWAXIDMAC_CH_CTL_L_NOINC << CH_CTL_L_DST_INC_POS |
965 DWAXIDMAC_CH_CTL_L_INC << CH_CTL_L_SRC_INC_POS;
966
967 for (i = 0; i < buf_len / period_len; i++) {
968 struct axi_dma_desc *desc;
969 size_t xfer_len;
970 u32 mem, len;
971
972 mem_width = __ffs(data_width | mem | len);
973 if (mem_width > DWAXIDMAC_TRANS_WIDTH_32)
974 mem_width = DWAXIDMAC_TRANS_WIDTH_32;
975
976 xfer_len = period_len;
977 block_ts = period_len;
978
979 desc = axi_desc_get(chan);
980 if (unlikely(!desc))
981 goto err_desc_get;
982
983 if (block_ts > max_block_ts) {
984 block_ts = max_block_ts;
985 xfer_len = max_block_ts << mem_width;
986 }
987
988 ctlhi = axi_dma_prepare_ctlhi(chan);
989
990 ctllo |= mem_width << CH_CTL_L_SRC_WIDTH_POS;
991 write_desc_sar(desc, buf_addr + i * period_len);
992 write_desc_dar(desc, reg);
> 993 desc->lli.block_ts_lo = period_len / 4;
994 desc->lli.ctl_hi = cpu_to_le32(ctlhi);
995 desc->lli.ctl_lo = cpu_to_le32(ctllo);
996
997 set_desc_src_master(desc);
998 set_desc_src_master(desc);
999
1000 // Manage transfer list (xfer_list)
1001 if (!first) {
1002 first = desc;
1003 } else {
1004 write_desc_llp(prev, desc->vd.tx.phys | lms);
1005 list_add_tail(&desc->xfer_list,
1006 &first->xfer_list);
1007 }
1008 prev = desc;
1009 if (i == ((buf_len / period_len) - 1))
1010 write_desc_llp(prev, first->vd.tx.phys | lms);
1011
1012 total_len += xfer_len;
1013
1014 set_desc_last(desc);
1015 }
1016 break;
1017 case DMA_DEV_TO_MEM:
1018 reg_width = __ffs(chan->slave_config.src_addr_width);
1019
1020 chan->reg_width = reg_width;
1021 if (reg_width == DWAXIDMAC_TRANS_WIDTH_16) {
1022 offset = DMAC_APB_HALFWORD_WR_CH_EN;
1023 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
1024 reg_value |= 0x1 << chan->id;
1025 axi_dma_apb_iowrite32(chan->chip, offset, reg_value);
1026 } else if (reg_width == DWAXIDMAC_TRANS_WIDTH_8) {
1027 offset = DMAC_APB_BYTE_WR_CH_EN;
1028 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
1029 reg_value |= 0x1 << chan->id;
1030 axi_dma_apb_iowrite32(chan->chip, offset, reg_value);
1031 }
1032 reg = chan->slave_config.src_addr;
1033 if (reg_width > DWAXIDMAC_TRANS_WIDTH_32)
1034 reg_width = DWAXIDMAC_TRANS_WIDTH_32;
1035 ctllo = axi_dma_prepare_ctllo(chan) |
1036 reg_width << CH_CTL_L_SRC_WIDTH_POS |
1037 DWAXIDMAC_CH_CTL_L_INC << CH_CTL_L_DST_INC_POS |
1038 // Workaround
1039 DWAXIDMAC_CH_CTL_L_NOINC << CH_CTL_L_SRC_INC_POS;
1040
1041 for (i = 0; i < buf_len / period_len; i++) {
1042 struct axi_dma_desc *desc;
1043 size_t xfer_len;
1044 u32 mem, len;
1045
1046 desc = axi_desc_get(chan);
1047 if (unlikely(!desc))
1048 goto err_desc_get;
1049
1050 xfer_len = len;
1051 block_ts = xfer_len >> reg_width;
1052 if (block_ts > max_block_ts) {
1053 block_ts = max_block_ts;
1054 xfer_len = max_block_ts << reg_width;
1055 }
1056 xfer_len = period_len;
1057 block_ts = period_len;
1058 mem_width = __ffs(data_width | mem | xfer_len);
1059 if (mem_width > DWAXIDMAC_TRANS_WIDTH_32)
1060 mem_width = DWAXIDMAC_TRANS_WIDTH_32;
1061
1062 ctlhi = axi_dma_prepare_ctlhi(chan);
1063 ctllo |= mem_width << CH_CTL_L_DST_WIDTH_POS;
1064
1065 write_desc_sar(desc, reg);
1066 write_desc_dar(desc, buf_addr + i * period_len);
1067 if (reg_width == DWAXIDMAC_TRANS_WIDTH_16)
1068 desc->lli.block_ts_lo = period_len / 2;
1069 else if (reg_width >= DWAXIDMAC_TRANS_WIDTH_32)
1070 desc->lli.block_ts_lo = period_len / 4;
1071 desc->lli.ctl_hi = cpu_to_le32(ctlhi);
1072 desc->lli.ctl_lo = cpu_to_le32(ctllo);
1073
1074 set_desc_src_master(desc);
1075 set_desc_src_master(desc);
1076
1077 // Manage transfer list (xfer_list)
1078 if (!first) {
1079 first = desc;
1080 } else {
1081 write_desc_llp(prev, desc->vd.tx.phys | lms);
1082 list_add_tail(&desc->xfer_list,
1083 &first->xfer_list);
1084 }
1085 prev = desc;
1086 if (i == ((buf_len / period_len) - 1))
1087 write_desc_llp(prev, first->vd.tx.phys | lms);
1088
1089 total_len += xfer_len;
1090
1091 // TODO: check if needed
1092 set_desc_last(desc);
1093 }
1094 break;
1095 default:
1096 return NULL;
1097 }
1098
1099 if (unlikely(!first))
1100 return NULL;
1101
1102 return vchan_tx_prep(&chan->vc, &first->vd, flags);
1103
1104 err_desc_get:
1105 if (first)
1106 axi_desc_put(first);
1107
1108 return NULL;
1109 }
1110
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
drivers/pci/controller/pci-xgene.c:626:34: warning: unused variable 'xgene_pcie_match_table'
by kernel test robot
Hi Arnd,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d9403d307dba1a71ee6462b22300c2d3be773b1c
commit: 6e5a1fff9096ecd259dedcbbdc812aa90986a40e PCI: Avoid building empty drivers
date: 3 months ago
config: x86_64-randconfig-a003-20210620 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d1baf2895467735ab14f4b3415fce204c0cc8e7f)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6e5a1fff9096ecd259dedcbbdc812aa90986a40e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/pci/controller/pci-xgene.c:626:34: warning: unused variable 'xgene_pcie_match_table' [-Wunused-const-variable]
static const struct of_device_id xgene_pcie_match_table[] = {
^
1 warning generated.
vim +/xgene_pcie_match_table +626 drivers/pci/controller/pci-xgene.c
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 625
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 @626 static const struct of_device_id xgene_pcie_match_table[] = {
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 627 {.compatible = "apm,xgene-pcie",},
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 628 {},
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 629 };
5f6b6ccdbe1cdf drivers/pci/host/pci-xgene.c Tanmay Inamdar 2014-10-01 630
:::::: The code at line 626 was first introduced by commit
:::::: 5f6b6ccdbe1cdfa5aa4347ec5412509b8995db27 PCI: xgene: Add APM X-Gene PCIe driver
:::::: TO: Tanmay Inamdar <tinamdar(a)apm.com>
:::::: CC: Bjorn Helgaas <bhelgaas(a)google.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months