[net-next:master 7/16] drivers/net/ethernet/sfc/falcon/efx.c:2798:10: error: implicit declaration of function 'pci_vpd_find_ro_info_keyword'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 8d63ee602da381c437c0a4ef7ea882b71d829eb6
commit: 01dbe7129d9ccd5fe940897888645f06327b34ff [7/16] sfc: falcon: Search VPD with pci_vpd_find_ro_info_keyword()
config: riscv-randconfig-r014-20210822 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 79b55e5038324e61a3abf4e6a9a949c473edd858)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit...
git remote add net-next https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
git fetch --no-tags net-next master
git checkout 01dbe7129d9ccd5fe940897888645f06327b34ff
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
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 drivers/net/ethernet/sfc/falcon/efx.c:9:
In file included from include/linux/pci.h:38:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from drivers/net/ethernet/sfc/falcon/efx.c:9:
In file included from include/linux/pci.h:38:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from drivers/net/ethernet/sfc/falcon/efx.c:9:
In file included from include/linux/pci.h:38:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
drivers/net/ethernet/sfc/falcon/efx.c:2792:13: error: implicit declaration of function 'pci_vpd_alloc' [-Werror,-Wimplicit-function-declaration]
vpd_data = pci_vpd_alloc(dev, &vpd_size);
^
drivers/net/ethernet/sfc/falcon/efx.c:2792:11: warning: incompatible integer to pointer conversion assigning to 'u8 *' (aka 'unsigned char *') from 'int' [-Wint-conversion]
vpd_data = pci_vpd_alloc(dev, &vpd_size);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/sfc/falcon/efx.c:2798:10: error: implicit declaration of function 'pci_vpd_find_ro_info_keyword' [-Werror,-Wimplicit-function-declaration]
start = pci_vpd_find_ro_info_keyword(vpd_data, vpd_size,
^
drivers/net/ethernet/sfc/falcon/efx.c:2798:10: note: did you mean 'pci_vpd_find_info_keyword'?
include/linux/pci.h:2349:5: note: 'pci_vpd_find_info_keyword' declared here
int pci_vpd_find_info_keyword(const u8 *buf, unsigned int off,
^
8 warnings and 2 errors generated.
vim +/pci_vpd_find_ro_info_keyword +2798 drivers/net/ethernet/sfc/falcon/efx.c
2781
2782 /* NIC VPD information
2783 * Called during probe to display the part number of the installed NIC.
2784 */
2785 static void ef4_probe_vpd_strings(struct ef4_nic *efx)
2786 {
2787 struct pci_dev *dev = efx->pci_dev;
2788 unsigned int vpd_size, kw_len;
2789 u8 *vpd_data;
2790 int start;
2791
2792 vpd_data = pci_vpd_alloc(dev, &vpd_size);
2793 if (IS_ERR(vpd_data)) {
2794 pci_warn(dev, "Unable to read VPD\n");
2795 return;
2796 }
2797
> 2798 start = pci_vpd_find_ro_info_keyword(vpd_data, vpd_size,
2799 PCI_VPD_RO_KEYWORD_PARTNO, &kw_len);
2800 if (start < 0)
2801 pci_warn(dev, "Part number not found or incomplete\n");
2802 else
2803 pci_info(dev, "Part Number : %.*s\n", kw_len, vpd_data + start);
2804
2805 start = pci_vpd_find_ro_info_keyword(vpd_data, vpd_size,
2806 PCI_VPD_RO_KEYWORD_SERIALNO, &kw_len);
2807 if (start < 0)
2808 pci_warn(dev, "Serial number not found or incomplete\n");
2809 else
2810 efx->vpd_sn = kmemdup_nul(vpd_data + start, kw_len, GFP_KERNEL);
2811
2812 kfree(vpd_data);
2813 }
2814
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[net-next:master 6/16] drivers/net/ethernet/sfc/falcon/efx.c:2792:13: error: implicit declaration of function 'pci_vpd_alloc'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 8d63ee602da381c437c0a4ef7ea882b71d829eb6
commit: 3873a9a4d8a87d4a15ff0083cf3b173b190c9089 [6/16] sfc: falcon: Read VPD with pci_vpd_alloc()
config: riscv-randconfig-r014-20210822 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 79b55e5038324e61a3abf4e6a9a949c473edd858)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit...
git remote add net-next https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
git fetch --no-tags net-next master
git checkout 3873a9a4d8a87d4a15ff0083cf3b173b190c9089
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
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 >>):
In file included from drivers/net/ethernet/sfc/falcon/efx.c:9:
In file included from include/linux/pci.h:38:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from drivers/net/ethernet/sfc/falcon/efx.c:9:
In file included from include/linux/pci.h:38:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from drivers/net/ethernet/sfc/falcon/efx.c:9:
In file included from include/linux/pci.h:38:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> drivers/net/ethernet/sfc/falcon/efx.c:2792:13: error: implicit declaration of function 'pci_vpd_alloc' [-Werror,-Wimplicit-function-declaration]
vpd_data = pci_vpd_alloc(dev, &vpd_size);
^
>> drivers/net/ethernet/sfc/falcon/efx.c:2792:11: warning: incompatible integer to pointer conversion assigning to 'u8 *' (aka 'unsigned char *') from 'int' [-Wint-conversion]
vpd_data = pci_vpd_alloc(dev, &vpd_size);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8 warnings and 1 error generated.
vim +/pci_vpd_alloc +2792 drivers/net/ethernet/sfc/falcon/efx.c
2781
2782 /* NIC VPD information
2783 * Called during probe to display the part number of the installed NIC.
2784 */
2785 static void ef4_probe_vpd_strings(struct ef4_nic *efx)
2786 {
2787 struct pci_dev *dev = efx->pci_dev;
2788 int ro_start, ro_size, i, j;
2789 unsigned int vpd_size;
2790 u8 *vpd_data;
2791
> 2792 vpd_data = pci_vpd_alloc(dev, &vpd_size);
2793 if (IS_ERR(vpd_data)) {
2794 pci_warn(dev, "Unable to read VPD\n");
2795 return;
2796 }
2797
2798 /* Get the Read only section */
2799 ro_start = pci_vpd_find_tag(vpd_data, vpd_size, PCI_VPD_LRDT_RO_DATA);
2800 if (ro_start < 0) {
2801 netif_err(efx, drv, efx->net_dev, "VPD Read-only not found\n");
2802 goto out;
2803 }
2804
2805 ro_size = pci_vpd_lrdt_size(&vpd_data[ro_start]);
2806 j = ro_size;
2807 i = ro_start + PCI_VPD_LRDT_TAG_SIZE;
2808 if (i + j > vpd_size)
2809 j = vpd_size - i;
2810
2811 /* Get the Part number */
2812 i = pci_vpd_find_info_keyword(vpd_data, i, j, "PN");
2813 if (i < 0) {
2814 netif_err(efx, drv, efx->net_dev, "Part number not found\n");
2815 goto out;
2816 }
2817
2818 j = pci_vpd_info_field_size(&vpd_data[i]);
2819 i += PCI_VPD_INFO_FLD_HDR_SIZE;
2820 if (i + j > vpd_size) {
2821 netif_err(efx, drv, efx->net_dev, "Incomplete part number\n");
2822 goto out;
2823 }
2824
2825 netif_info(efx, drv, efx->net_dev,
2826 "Part Number : %.*s\n", j, &vpd_data[i]);
2827
2828 i = ro_start + PCI_VPD_LRDT_TAG_SIZE;
2829 j = ro_size;
2830 i = pci_vpd_find_info_keyword(vpd_data, i, j, "SN");
2831 if (i < 0) {
2832 netif_err(efx, drv, efx->net_dev, "Serial number not found\n");
2833 goto out;
2834 }
2835
2836 j = pci_vpd_info_field_size(&vpd_data[i]);
2837 i += PCI_VPD_INFO_FLD_HDR_SIZE;
2838 if (i + j > vpd_size) {
2839 netif_err(efx, drv, efx->net_dev, "Incomplete serial number\n");
2840 goto out;
2841 }
2842
2843 efx->vpd_sn = kmalloc(j + 1, GFP_KERNEL);
2844 if (!efx->vpd_sn)
2845 goto out;
2846
2847 snprintf(efx->vpd_sn, j + 1, "%s", &vpd_data[i]);
2848 out:
2849 kfree(vpd_data);
2850 }
2851
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [PATCH V5 1/2] gpio: Add virtio-gpio driver
by kernel test robot
Hi Viresh,
I love your patch! Yet something to improve:
[auto build test ERROR on soc/for-next]
[also build test ERROR on vhost/linux-next linus/master v5.14-rc5 next-20210810]
[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/Viresh-Kumar/gpio-Add-virtio-bas...
base: https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git for-next
config: riscv-randconfig-r042-20210810 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 614c7d03877fd99c2de47429b15be3f00306a3bd)
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/4fe66a15717a74f8f876f70595f050b4d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Viresh-Kumar/gpio-Add-virtio-based-driver/20210810-182659
git checkout 4fe66a15717a74f8f876f70595f050b4dffda7ae
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=riscv SHELL=/bin/bash drivers/gpio/
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 >>):
>> drivers/gpio/gpio-virtio.c:356:4: error: use of undeclared identifier 'VIRTIO_ID_GPIO'
{ VIRTIO_ID_GPIO, VIRTIO_DEV_ANY_ID },
^
1 error generated.
vim +/VIRTIO_ID_GPIO +356 drivers/gpio/gpio-virtio.c
354
355 static const struct virtio_device_id id_table[] = {
> 356 { VIRTIO_ID_GPIO, VIRTIO_DEV_ANY_ID },
357 {},
358 };
359 MODULE_DEVICE_TABLE(virtio, id_table);
360
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [PATCH v6 11/11] dyndbg: RFC add print-once and print-ratelimited features. RFC.
by kernel test robot
Hi Jim,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on linus/master v5.14-rc7 next-20210820]
[cannot apply to linux/master]
[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/Jim-Cromie/use-DYNAMIC_DEBUG-to-...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: m68k-randconfig-r025-20210822 (attached as .config)
compiler: m68k-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/2380f9e06628103fcc3a6359d7f86634b...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jim-Cromie/use-DYNAMIC_DEBUG-to-implement-DRM-debug/20210823-062136
git checkout 2380f9e06628103fcc3a6359d7f86634b3d30728
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash
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 >>):
| ^~~~~~~~~~~~~~~
include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL'
152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:667:1: note: in expansion of macro 'EXPORT_SYMBOL'
667 | EXPORT_SYMBOL(param_set_dyndbg);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:681:15: error: non-static declaration of 'param_get_dyndbg' follows static declaration
681 | EXPORT_SYMBOL(param_get_dyndbg);
| ^~~~~~~~~~~~~~~~
include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:681:1: note: in expansion of macro 'EXPORT_SYMBOL'
681 | EXPORT_SYMBOL(param_get_dyndbg);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:676:5: note: previous definition of 'param_get_dyndbg' with type 'int(char *, const struct kernel_param *)'
676 | int param_get_dyndbg(char *buffer, const struct kernel_param *kp)
| ^~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
include/linux/export.h:67:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL'
152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:681:1: note: in expansion of macro 'EXPORT_SYMBOL'
681 | EXPORT_SYMBOL(param_get_dyndbg);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:688:15: error: extern declaration of 'param_ops_dyndbg' follows declaration with no linkage
688 | EXPORT_SYMBOL(param_ops_dyndbg);
| ^~~~~~~~~~~~~~~~
include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:688:1: note: in expansion of macro 'EXPORT_SYMBOL'
688 | EXPORT_SYMBOL(param_ops_dyndbg);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:683:31: note: previous definition of 'param_ops_dyndbg' with type 'const struct kernel_param_ops'
683 | const struct kernel_param_ops param_ops_dyndbg = {
| ^~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
include/linux/export.h:67:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL'
152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:688:1: note: in expansion of macro 'EXPORT_SYMBOL'
688 | EXPORT_SYMBOL(param_ops_dyndbg);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:692:12: error: invalid storage class for function 'remaining'
692 | static int remaining(int wrote)
| ^~~~~~~~~
lib/dynamic_debug.c:699:14: error: invalid storage class for function '__dynamic_emit_prefix'
699 | static char *__dynamic_emit_prefix(const struct _ddebug *desc, char *buf)
| ^~~~~~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:729:21: error: invalid storage class for function 'dynamic_emit_prefix'
729 | static inline char *dynamic_emit_prefix(struct _ddebug *desc, char *buf)
| ^~~~~~~~~~~~~~~~~~~
>> lib/dynamic_debug.c:749:33: error: invalid storage class for function 'ddebug_rl_fetch'
749 | static struct ddebug_ratelimit *ddebug_rl_fetch(struct _ddebug *desc);
| ^~~~~~~~~~~~~~~
>> lib/dynamic_debug.c:751:20: error: invalid storage class for function 'is_onced_or_limited'
751 | static inline bool is_onced_or_limited(struct _ddebug *desc)
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/printk.h:10,
from include/linux/kernel.h:19,
from lib/dynamic_debug.c:16:
lib/dynamic_debug.c: In function 'is_onced_or_limited':
>> lib/dynamic_debug.c:767:43: error: implicit declaration of function 'ddebug_rl_fetch' [-Werror=implicit-function-declaration]
767 | bool state = __ratelimit(&ddebug_rl_fetch(desc)->rs);
| ^~~~~~~~~~~~~~~
include/linux/ratelimit_types.h:41:41: note: in definition of macro '__ratelimit'
41 | #define __ratelimit(state) ___ratelimit(state, __func__)
| ^~~~~
>> lib/dynamic_debug.c:767:64: error: invalid type argument of '->' (have 'int')
767 | bool state = __ratelimit(&ddebug_rl_fetch(desc)->rs);
| ^~
include/linux/ratelimit_types.h:41:41: note: in definition of macro '__ratelimit'
41 | #define __ratelimit(state) ___ratelimit(state, __func__)
| ^~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
lib/dynamic_debug.c: In function 'ddebug_exec_queries':
lib/dynamic_debug.c:812:15: error: non-static declaration of '__dynamic_pr_debug' follows static declaration
812 | EXPORT_SYMBOL(__dynamic_pr_debug);
| ^~~~~~~~~~~~~~~~~~
include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:812:1: note: in expansion of macro 'EXPORT_SYMBOL'
812 | EXPORT_SYMBOL(__dynamic_pr_debug);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:779:6: note: previous definition of '__dynamic_pr_debug' with type 'void(struct _ddebug *, const char *, ...)'
779 | void __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...)
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
include/linux/export.h:67:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL'
152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:812:1: note: in expansion of macro 'EXPORT_SYMBOL'
812 | EXPORT_SYMBOL(__dynamic_pr_debug);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:844:15: error: non-static declaration of '__dynamic_dev_dbg' follows static declaration
844 | EXPORT_SYMBOL(__dynamic_dev_dbg);
| ^~~~~~~~~~~~~~~~~
include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:844:1: note: in expansion of macro 'EXPORT_SYMBOL'
844 | EXPORT_SYMBOL(__dynamic_dev_dbg);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:814:6: note: previous definition of '__dynamic_dev_dbg' with type 'void(struct _ddebug *, const struct device *, const char *, ...)'
814 | void __dynamic_dev_dbg(struct _ddebug *descriptor,
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
include/linux/export.h:67:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL'
152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:844:1: note: in expansion of macro 'EXPORT_SYMBOL'
844 | EXPORT_SYMBOL(__dynamic_dev_dbg);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:929:19: error: invalid storage class for function 'ddebug_setup_query'
929 | static __init int ddebug_setup_query(char *str)
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/printk.h:6,
from include/linux/kernel.h:19,
from lib/dynamic_debug.c:16:
lib/dynamic_debug.c:939:26: error: initializer element is not constant
939 | __setup("ddebug_query=", ddebug_setup_query);
| ^~~~~~~~~~~~~~~~~~
include/linux/init.h:321:46: note: in definition of macro '__setup_param'
321 | = { __setup_str_##unique_id, fn, early }
| ^~
lib/dynamic_debug.c:939:1: note: in expansion of macro '__setup'
--
| ^~~~~~
include/linux/init.h:254:9: note: in expansion of macro '____define_initcall'
254 | ____define_initcall(fn, \
| ^~~~~~~~~~~~~~~~~~~
include/linux/init.h:260:9: note: in expansion of macro '__unique_initcall'
260 | __unique_initcall(fn, id, __sec, __initcall_id(fn))
| ^~~~~~~~~~~~~~~~~
include/linux/init.h:262:35: note: in expansion of macro '___define_initcall'
262 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
| ^~~~~~~~~~~~~~~~~~
include/linux/init.h:288:41: note: in expansion of macro '__define_initcall'
288 | #define fs_initcall(fn) __define_initcall(fn, 5)
| ^~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1333:1: note: in expansion of macro 'fs_initcall'
1333 | fs_initcall(dynamic_debug_init_control);
| ^~~~~~~~~~~
lib/dynamic_debug.c:1349:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
1349 | int dynamic_debug_register_tracer(const char *query, const char *modname,
| ^~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
lib/dynamic_debug.c:1354:15: error: non-static declaration of 'dynamic_debug_register_tracer' follows static declaration
1354 | EXPORT_SYMBOL(dynamic_debug_register_tracer);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:1354:1: note: in expansion of macro 'EXPORT_SYMBOL'
1354 | EXPORT_SYMBOL(dynamic_debug_register_tracer);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:1349:5: note: previous definition of 'dynamic_debug_register_tracer' with type 'int(const char *, const char *, int (*)(const char *, char *, char *, struct va_format *))'
1349 | int dynamic_debug_register_tracer(const char *query, const char *modname,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
include/linux/export.h:67:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL'
152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:1354:1: note: in expansion of macro 'EXPORT_SYMBOL'
1354 | EXPORT_SYMBOL(dynamic_debug_register_tracer);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:1372:15: error: non-static declaration of 'dynamic_debug_unregister_tracer' follows static declaration
1372 | EXPORT_SYMBOL(dynamic_debug_unregister_tracer);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:1372:1: note: in expansion of macro 'EXPORT_SYMBOL'
1372 | EXPORT_SYMBOL(dynamic_debug_unregister_tracer);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:1367:5: note: previous definition of 'dynamic_debug_unregister_tracer' with type 'int(const char *, const char *, int (*)(const char *, char *, char *, struct va_format *))'
1367 | int dynamic_debug_unregister_tracer(const char *query, const char *modname,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
include/linux/export.h:67:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL'
152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:1372:1: note: in expansion of macro 'EXPORT_SYMBOL'
1372 | EXPORT_SYMBOL(dynamic_debug_unregister_tracer);
| ^~~~~~~~~~~~~
>> lib/dynamic_debug.c:1387:33: error: invalid storage class for function 'ddebug_rl_find'
1387 | static struct ddebug_ratelimit *ddebug_rl_find(u64 key)
| ^~~~~~~~~~~~~~
>> lib/dynamic_debug.c:1399:33: error: invalid storage class for function 'ddebug_rl_add'
1399 | static struct ddebug_ratelimit *ddebug_rl_add(u64 key)
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:1422:33: error: invalid storage class for function 'ddebug_rl_fetch'
1422 | static struct ddebug_ratelimit *ddebug_rl_fetch(struct _ddebug *desc)
| ^~~~~~~~~~~~~~~
lib/dynamic_debug.c: In function 'ddebug_rl_fetch':
lib/dynamic_debug.c:1424:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1424 | u64 key = (u64)desc;
| ^
lib/dynamic_debug.c: In function 'ddebug_exec_queries':
>> lib/dynamic_debug.c:1432:1: error: expected declaration or statement at end of input
1432 | }
| ^
At top level:
lib/dynamic_debug.c:1422:33: warning: 'ddebug_rl_fetch' defined but not used [-Wunused-function]
1422 | static struct ddebug_ratelimit *ddebug_rl_fetch(struct _ddebug *desc)
| ^~~~~~~~~~~~~~~
lib/dynamic_debug.c:1203:5: warning: 'ddebug_remove_module' defined but not used [-Wunused-function]
1203 | int ddebug_remove_module(const char *mod_name)
| ^~~~~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1187:5: warning: 'ddebug_dyndbg_module_param_cb' defined but not used [-Wunused-function]
1187 | int ddebug_dyndbg_module_param_cb(char *param, char *val, const char *module)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/ddebug_rl_fetch +749 lib/dynamic_debug.c
741
742 /* test print-once or ratelimited conditions */
743 #define is_rated(desc) unlikely(desc->flags & _DPRINTK_FLAGS_RATELIMITED)
744 #define is_once(desc) unlikely(desc->flags & _DPRINTK_FLAGS_ONCE)
745 #define is_onced(desc) \
746 unlikely((desc->flags & _DPRINTK_FLAGS_ONCE) \
747 && (desc->flags & _DPRINTK_FLAGS_PRINTED))
748
> 749 static struct ddebug_ratelimit *ddebug_rl_fetch(struct _ddebug *desc);
750
> 751 static inline bool is_onced_or_limited(struct _ddebug *desc)
752 {
753 if (unlikely(desc->flags & _DPRINTK_FLAGS_ONCE &&
754 desc->flags & _DPRINTK_FLAGS_RATELIMITED))
755 pr_info(" ONCE & RATELIMITED together is nonsense\n");
756
757 if (is_once(desc)) {
758 if (is_onced(desc)) {
759 v4pr_info("already printed once\n");
760 return true;
761 }
762 desc->flags |= _DPRINTK_FLAGS_PRINTED;
763 return false;
764
765 } else if (is_rated(desc)) {
766 /* test rate-limits */
> 767 bool state = __ratelimit(&ddebug_rl_fetch(desc)->rs);
768
769 v4pr_info("RLstate{%s}=%d on %s.%s.%d\n",
770 (desc->flags & _DPRINTK_FLAGS_GROUPED
771 ? "grouped" : "solo"), state,
772 desc->modname, desc->function, desc->lineno);
773
774 return state;
775 }
776 return false;
777 }
778
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [PATCH v4 1/6] iio: Add output buffer support
by kernel test robot
Hi Mihail,
I love your patch! Perhaps something to improve:
[auto build test WARNING on 94a853eca720ac9e385e59f27e859b4a01123f58]
url: https://github.com/0day-ci/linux/commits/Mihail-Chindris/iio-Add-output-b...
base: 94a853eca720ac9e385e59f27e859b4a01123f58
config: i386-randconfig-p002-20210821 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/b4f124803ed8bfe5936c756ed4c7aa912...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mihail-Chindris/iio-Add-output-buffer-support-and-DAC-example/20210821-010349
git checkout b4f124803ed8bfe5936c756ed4c7aa9124a1468a
# save the attached .config to linux build tree
make W=1 ARCH=i386
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/iio/industrialio-buffer.c:1415: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* When adding new attributes here, put the at the end, at least until
vim +1415 drivers/iio/industrialio-buffer.c
1413
1414 /**
> 1415 * When adding new attributes here, put the at the end, at least until
1416 * the code that handles the lengh/length_ro & watermark/watermark_ro
1417 * assignments gets cleaned up. Otherwise these can create some weird
1418 * duplicate attributes errors under some setups.
1419 */
1420 static struct attribute *iio_buffer_attrs[] = {
1421 &dev_attr_length.attr,
1422 &dev_attr_enable.attr,
1423 &dev_attr_watermark.attr,
1424 &dev_attr_data_available.attr,
1425 &dev_attr_direction.attr,
1426 };
1427
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [PATCH v6 24/24] rtw89: add Kconfig and Makefile
by kernel test robot
Hi Ping-Ke,
I love your patch! Perhaps something to improve:
[auto build test WARNING on wireless-drivers-next/master]
[also build test WARNING on wireless-drivers/master v5.14-rc6 next-20210820]
[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/Ping-Ke-Shih/rtw89-add-Realtek-8...
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-ne... master
config: i386-randconfig-a015-20210822 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9e9d70591e72fc6762b4b9a226b68ed1307419bf)
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/6c4e6c23950c253389ad130ffe0367bbc...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ping-Ke-Shih/rtw89-add-Realtek-802-11ax-driver/20210820-124025
git checkout 6c4e6c23950c253389ad130ffe0367bbca3af99e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
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/net/wireless/realtek/rtw89/phy.c:1522:6: warning: variable 'active_entry' set but not used [-Wunused-but-set-variable]
u64 active_entry = 0;
^
1 warning generated.
vim +/active_entry +1522 drivers/net/wireless/realtek/rtw89/phy.c
32d97af0af9324 Ping-Ke Shih 2021-08-20 1507
32d97af0af9324 Ping-Ke Shih 2021-08-20 1508 static s32 rtw89_phy_multi_sta_cfo_calc(struct rtw89_dev *rtwdev)
32d97af0af9324 Ping-Ke Shih 2021-08-20 1509 {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1510 struct rtw89_cfo_tracking_info *cfo = &rtwdev->cfo_tracking;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1511 struct rtw89_traffic_stats *stats = &rtwdev->stats;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1512 s32 target_cfo = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1513 s32 cfo_khz_all = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1514 s32 cfo_khz_all_tp_wgt = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1515 s32 cfo_avg = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1516 s32 max_cfo_lb = BIT(31);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1517 s32 min_cfo_ub = GENMASK(30, 0);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1518 u16 cfo_cnt_all = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1519 u8 active_entry_cnt = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1520 u8 sta_cnt = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1521 u32 tp_all = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 @1522 u64 active_entry = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1523 u8 i;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1524 u8 cfo_tol = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1525
32d97af0af9324 Ping-Ke Shih 2021-08-20 1526 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Multi entry cfo_trk\n");
32d97af0af9324 Ping-Ke Shih 2021-08-20 1527 if (cfo->rtw89_multi_cfo_mode == RTW89_PKT_BASED_AVG_MODE) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1528 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Pkt based avg mode\n");
32d97af0af9324 Ping-Ke Shih 2021-08-20 1529 for (i = 0; i < CFO_TRACK_MAX_USER; i++) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1530 if (cfo->cfo_cnt[i] == 0)
32d97af0af9324 Ping-Ke Shih 2021-08-20 1531 continue;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1532 cfo_khz_all += cfo->cfo_tail[i];
32d97af0af9324 Ping-Ke Shih 2021-08-20 1533 cfo_cnt_all += cfo->cfo_cnt[i];
32d97af0af9324 Ping-Ke Shih 2021-08-20 1534 cfo_avg = phy_div(cfo_khz_all, (s32)cfo_cnt_all);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1535 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1536 "Msta cfo=%d, pkt_cnt=%d, avg_cfo=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1537 cfo_khz_all, cfo_cnt_all, cfo_avg);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1538 target_cfo = cfo_avg;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1539 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1540 } else if (cfo->rtw89_multi_cfo_mode == RTW89_ENTRY_BASED_AVG_MODE) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1541 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Entry based avg mode\n");
32d97af0af9324 Ping-Ke Shih 2021-08-20 1542 for (i = 0; i < CFO_TRACK_MAX_USER; i++) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1543 if (cfo->cfo_cnt[i] == 0)
32d97af0af9324 Ping-Ke Shih 2021-08-20 1544 continue;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1545 active_entry |= BIT_ULL(i);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1546 cfo->cfo_avg[i] = phy_div(cfo->cfo_tail[i],
32d97af0af9324 Ping-Ke Shih 2021-08-20 1547 (s32)cfo->cfo_cnt[i]);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1548 cfo_khz_all += cfo->cfo_avg[i];
32d97af0af9324 Ping-Ke Shih 2021-08-20 1549 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1550 "Macid=%d, cfo_avg=%d\n", i,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1551 cfo->cfo_avg[i]);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1552 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1553 sta_cnt = rtwdev->total_sta_assoc;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1554 cfo_avg = phy_div(cfo_khz_all, (s32)sta_cnt);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1555 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1556 "Msta cfo_acc=%d, ent_cnt=%d, avg_cfo=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1557 cfo_khz_all, sta_cnt, cfo_avg);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1558 target_cfo = cfo_avg;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1559 } else if (cfo->rtw89_multi_cfo_mode == RTW89_TP_BASED_AVG_MODE) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1560 rtw89_debug(rtwdev, RTW89_DBG_CFO, "TP based avg mode\n");
32d97af0af9324 Ping-Ke Shih 2021-08-20 1561 cfo_tol = cfo->sta_cfo_tolerance;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1562 for (i = 0; i < CFO_TRACK_MAX_USER; i++) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1563 sta_cnt++;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1564 if (cfo->cfo_cnt[i] != 0) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1565 cfo->cfo_avg[i] = phy_div(cfo->cfo_tail[i],
32d97af0af9324 Ping-Ke Shih 2021-08-20 1566 (s32)cfo->cfo_cnt[i]);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1567 active_entry_cnt++;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1568 } else {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1569 cfo->cfo_avg[i] = cfo->pre_cfo_avg[i];
32d97af0af9324 Ping-Ke Shih 2021-08-20 1570 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1571 max_cfo_lb = max(cfo->cfo_avg[i] - cfo_tol, max_cfo_lb);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1572 min_cfo_ub = min(cfo->cfo_avg[i] + cfo_tol, min_cfo_ub);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1573 cfo_khz_all += cfo->cfo_avg[i];
32d97af0af9324 Ping-Ke Shih 2021-08-20 1574 /* need tp for each entry */
32d97af0af9324 Ping-Ke Shih 2021-08-20 1575 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1576 "[%d] cfo_avg=%d, tp=tbd\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1577 i, cfo->cfo_avg[i]);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1578 if (sta_cnt >= rtwdev->total_sta_assoc)
32d97af0af9324 Ping-Ke Shih 2021-08-20 1579 break;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1580 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1581 tp_all = stats->rx_throughput; /* need tp for each entry */
32d97af0af9324 Ping-Ke Shih 2021-08-20 1582 cfo_avg = phy_div(cfo_khz_all_tp_wgt, (s32)tp_all);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1583
32d97af0af9324 Ping-Ke Shih 2021-08-20 1584 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Assoc sta cnt=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1585 sta_cnt);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1586 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Active sta cnt=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1587 active_entry_cnt);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1588 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1589 "Msta cfo with tp_wgt=%d, avg_cfo=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1590 cfo_khz_all_tp_wgt, cfo_avg);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1591 rtw89_debug(rtwdev, RTW89_DBG_CFO, "cfo_lb=%d,cfo_ub=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1592 max_cfo_lb, min_cfo_ub);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1593 if (max_cfo_lb <= min_cfo_ub) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1594 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1595 "cfo win_size=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1596 min_cfo_ub - max_cfo_lb);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1597 target_cfo = clamp(cfo_avg, max_cfo_lb, min_cfo_ub);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1598 } else {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1599 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1600 "No intersection of cfo torlence windows\n");
32d97af0af9324 Ping-Ke Shih 2021-08-20 1601 target_cfo = phy_div(cfo_khz_all, (s32)sta_cnt);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1602 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1603 for (i = 0; i < CFO_TRACK_MAX_USER; i++)
32d97af0af9324 Ping-Ke Shih 2021-08-20 1604 cfo->pre_cfo_avg[i] = cfo->cfo_avg[i];
32d97af0af9324 Ping-Ke Shih 2021-08-20 1605 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1606 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Target cfo=%d\n", target_cfo);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1607 return target_cfo;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1608 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1609
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [PATCH v6 10/11] dyndbg: RFC add debug-trace callback, selftest with it. RFC
by kernel test robot
Hi Jim,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on linus/master v5.14-rc7 next-20210820]
[cannot apply to linux/master]
[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/Jim-Cromie/use-DYNAMIC_DEBUG-to-...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: powerpc64-buildonly-randconfig-r002-20210822 (attached as .config)
compiler: powerpc64le-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/4d886cec521fe5747753921aab07fa15d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jim-Cromie/use-DYNAMIC_DEBUG-to-implement-DRM-debug/20210823-062136
git checkout 4d886cec521fe5747753921aab07fa15dad79b3c
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash
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 >>):
lib/dynamic_debug.c: In function 'ddebug_exec_queries':
>> lib/dynamic_debug.c:593:9: error: 'query' undeclared (first use in this function); did you mean 'query_in'?
593 | query = kstrndup(query_in, PAGE_SIZE, GFP_KERNEL);
| ^~~~~
| query_in
lib/dynamic_debug.c:593:9: note: each undeclared identifier is reported only once for each function it appears in
lib/dynamic_debug.c: In function 'dynamic_debug_exec_queries':
>> lib/dynamic_debug.c:613:36: error: 'qry' undeclared (first use in this function); did you mean 'query'?
613 | return ddebug_exec_queries(qry, modname, NULL);
| ^~~
| query
lib/dynamic_debug.c: In function 'ddebug_exec_queries':
>> lib/dynamic_debug.c:611:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
611 | int dynamic_debug_exec_queries(const char *query, const char *modname)
| ^~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
>> lib/dynamic_debug.c:615:19: error: non-static declaration of 'dynamic_debug_exec_queries' follows static declaration
615 | EXPORT_SYMBOL_GPL(dynamic_debug_exec_queries);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:164:41: note: in expansion of macro '_EXPORT_SYMBOL'
164 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:615:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
615 | EXPORT_SYMBOL_GPL(dynamic_debug_exec_queries);
| ^~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:611:5: note: previous definition of 'dynamic_debug_exec_queries' with type 'int(const char *, const char *)'
611 | int dynamic_debug_exec_queries(const char *query, const char *modname)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
>> include/linux/export.h:67:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL'
152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:164:41: note: in expansion of macro '_EXPORT_SYMBOL'
164 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:615:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
615 | EXPORT_SYMBOL_GPL(dynamic_debug_exec_queries);
| ^~~~~~~~~~~~~~~~~
>> lib/dynamic_debug.c:659:15: error: non-static declaration of 'param_set_dyndbg' follows static declaration
659 | EXPORT_SYMBOL(param_set_dyndbg);
| ^~~~~~~~~~~~~~~~
include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:659:1: note: in expansion of macro 'EXPORT_SYMBOL'
659 | EXPORT_SYMBOL(param_set_dyndbg);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:629:5: note: previous definition of 'param_set_dyndbg' with type 'int(const char *, const struct kernel_param *)'
629 | int param_set_dyndbg(const char *instr, const struct kernel_param *kp)
| ^~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
>> include/linux/export.h:67:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL'
152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:659:1: note: in expansion of macro 'EXPORT_SYMBOL'
659 | EXPORT_SYMBOL(param_set_dyndbg);
| ^~~~~~~~~~~~~
>> lib/dynamic_debug.c:673:15: error: non-static declaration of 'param_get_dyndbg' follows static declaration
673 | EXPORT_SYMBOL(param_get_dyndbg);
| ^~~~~~~~~~~~~~~~
include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:673:1: note: in expansion of macro 'EXPORT_SYMBOL'
673 | EXPORT_SYMBOL(param_get_dyndbg);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:668:5: note: previous definition of 'param_get_dyndbg' with type 'int(char *, const struct kernel_param *)'
668 | int param_get_dyndbg(char *buffer, const struct kernel_param *kp)
| ^~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
>> include/linux/export.h:67:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL'
152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:673:1: note: in expansion of macro 'EXPORT_SYMBOL'
673 | EXPORT_SYMBOL(param_get_dyndbg);
| ^~~~~~~~~~~~~
>> lib/dynamic_debug.c:680:15: error: extern declaration of 'param_ops_dyndbg' follows declaration with no linkage
680 | EXPORT_SYMBOL(param_ops_dyndbg);
| ^~~~~~~~~~~~~~~~
include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:680:1: note: in expansion of macro 'EXPORT_SYMBOL'
680 | EXPORT_SYMBOL(param_ops_dyndbg);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:675:31: note: previous definition of 'param_ops_dyndbg' with type 'const struct kernel_param_ops'
675 | const struct kernel_param_ops param_ops_dyndbg = {
| ^~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
>> include/linux/export.h:67:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL'
152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:680:1: note: in expansion of macro 'EXPORT_SYMBOL'
680 | EXPORT_SYMBOL(param_ops_dyndbg);
| ^~~~~~~~~~~~~
>> lib/dynamic_debug.c:684:12: error: invalid storage class for function 'remaining'
684 | static int remaining(int wrote)
| ^~~~~~~~~
>> lib/dynamic_debug.c:691:14: error: invalid storage class for function '__dynamic_emit_prefix'
691 | static char *__dynamic_emit_prefix(const struct _ddebug *desc, char *buf)
| ^~~~~~~~~~~~~~~~~~~~~
>> lib/dynamic_debug.c:721:21: error: invalid storage class for function 'dynamic_emit_prefix'
721 | static inline char *dynamic_emit_prefix(struct _ddebug *desc, char *buf)
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
>> lib/dynamic_debug.c:758:15: error: non-static declaration of '__dynamic_pr_debug' follows static declaration
758 | EXPORT_SYMBOL(__dynamic_pr_debug);
| ^~~~~~~~~~~~~~~~~~
include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:758:1: note: in expansion of macro 'EXPORT_SYMBOL'
758 | EXPORT_SYMBOL(__dynamic_pr_debug);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:728:6: note: previous definition of '__dynamic_pr_debug' with type 'void(struct _ddebug *, const char *, ...)'
728 | void __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...)
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
>> include/linux/export.h:67:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL'
152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:758:1: note: in expansion of macro 'EXPORT_SYMBOL'
758 | EXPORT_SYMBOL(__dynamic_pr_debug);
| ^~~~~~~~~~~~~
>> lib/dynamic_debug.c:787:15: error: non-static declaration of '__dynamic_dev_dbg' follows static declaration
787 | EXPORT_SYMBOL(__dynamic_dev_dbg);
| ^~~~~~~~~~~~~~~~~
include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:787:1: note: in expansion of macro 'EXPORT_SYMBOL'
787 | EXPORT_SYMBOL(__dynamic_dev_dbg);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:760:6: note: previous definition of '__dynamic_dev_dbg' with type 'void(struct _ddebug *, const struct device *, const char *, ...)'
760 | void __dynamic_dev_dbg(struct _ddebug *descriptor,
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
>> include/linux/export.h:67:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL'
152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:787:1: note: in expansion of macro 'EXPORT_SYMBOL'
787 | EXPORT_SYMBOL(__dynamic_dev_dbg);
| ^~~~~~~~~~~~~
>> lib/dynamic_debug.c:866:19: error: invalid storage class for function 'ddebug_setup_query'
866 | static __init int ddebug_setup_query(char *str)
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/printk.h:6,
from include/linux/kernel.h:19,
from lib/dynamic_debug.c:16:
>> lib/dynamic_debug.c:876:26: error: initializer element is not constant
876 | __setup("ddebug_query=", ddebug_setup_query);
| ^~~~~~~~~~~~~~~~~~
include/linux/init.h:321:46: note: in definition of macro '__setup_param'
321 | = { __setup_str_##unique_id, fn, early }
| ^~
lib/dynamic_debug.c:876:1: note: in expansion of macro '__setup'
876 | __setup("ddebug_query=", ddebug_setup_query);
| ^~~~~~~
lib/dynamic_debug.c:876:26: note: (near initialization for '__setup_ddebug_setup_query.setup_func')
876 | __setup("ddebug_query=", ddebug_setup_query);
| ^~~~~~~~~~~~~~~~~~
include/linux/init.h:321:46: note: in definition of macro '__setup_param'
321 | = { __setup_str_##unique_id, fn, early }
| ^~
lib/dynamic_debug.c:876:1: note: in expansion of macro '__setup'
876 | __setup("ddebug_query=", ddebug_setup_query);
| ^~~~~~~
lib/dynamic_debug.c:883:16: error: invalid storage class for function 'ddebug_proc_write'
883 | static ssize_t ddebug_proc_write(struct file *file, const char __user *ubuf,
| ^~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:914:24: error: invalid storage class for function 'ddebug_iter_first'
914 | static struct _ddebug *ddebug_iter_first(struct ddebug_iter *iter)
| ^~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:933:24: error: invalid storage class for function 'ddebug_iter_next'
933 | static struct _ddebug *ddebug_iter_next(struct ddebug_iter *iter)
| ^~~~~~~~~~~~~~~~
lib/dynamic_debug.c:955:14: error: invalid storage class for function 'ddebug_proc_start'
955 | static void *ddebug_proc_start(struct seq_file *m, loff_t *pos)
| ^~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:978:14: error: invalid storage class for function 'ddebug_proc_next'
978 | static void *ddebug_proc_next(struct seq_file *m, void *p, loff_t *pos)
| ^~~~~~~~~~~~~~~~
lib/dynamic_debug.c:997:12: error: invalid storage class for function 'ddebug_proc_show'
997 | static int ddebug_proc_show(struct seq_file *m, void *p)
| ^~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1023:13: error: invalid storage class for function 'ddebug_proc_stop'
1023 | static void ddebug_proc_stop(struct seq_file *m, void *p)
| ^~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1029:18: error: initializer element is not constant
1029 | .start = ddebug_proc_start,
| ^~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1029:18: note: (near initialization for 'ddebug_proc_seqops.start')
lib/dynamic_debug.c:1030:17: error: initializer element is not constant
1030 | .next = ddebug_proc_next,
| ^~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1030:17: note: (near initialization for 'ddebug_proc_seqops.next')
lib/dynamic_debug.c:1031:17: error: initializer element is not constant
1031 | .show = ddebug_proc_show,
| ^~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1031:17: note: (near initialization for 'ddebug_proc_seqops.show')
lib/dynamic_debug.c:1032:17: error: initializer element is not constant
1032 | .stop = ddebug_proc_stop
| ^~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1032:17: note: (near initialization for 'ddebug_proc_seqops.stop')
lib/dynamic_debug.c:1035:12: error: invalid storage class for function 'ddebug_proc_open'
1035 | static int ddebug_proc_open(struct inode *inode, struct file *file)
| ^~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1043:17: error: initializer element is not constant
1043 | .open = ddebug_proc_open,
| ^~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1043:17: note: (near initialization for 'ddebug_proc_fops.open')
lib/dynamic_debug.c:1047:18: error: initializer element is not constant
1047 | .write = ddebug_proc_write
| ^~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1047:18: note: (near initialization for 'ddebug_proc_fops.write')
lib/dynamic_debug.c:1051:22: error: initializer element is not constant
1051 | .proc_open = ddebug_proc_open,
| ^~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1051:22: note: (near initialization for 'proc_fops.proc_open')
lib/dynamic_debug.c:1055:23: error: initializer element is not constant
1055 | .proc_write = ddebug_proc_write
| ^~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1055:23: note: (near initialization for 'proc_fops.proc_write')
lib/dynamic_debug.c:1091:12: error: invalid storage class for function 'ddebug_dyndbg_param_cb'
1091 | static int ddebug_dyndbg_param_cb(char *param, char *val,
| ^~~~~~~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1112:12: error: invalid storage class for function 'ddebug_dyndbg_boot_param_cb'
1112 | static int ddebug_dyndbg_boot_param_cb(char *param, char *val,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1130:13: error: invalid storage class for function 'ddebug_table_free'
1130 | static void ddebug_table_free(struct ddebug_table *dt)
| ^~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1159:13: error: invalid storage class for function 'ddebug_remove_all_tables'
1159 | static void ddebug_remove_all_tables(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1173:19: error: invalid storage class for function 'dynamic_debug_init_control'
1173 | static int __init dynamic_debug_init_control(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1196:19: error: invalid storage class for function 'dynamic_debug_init'
1196 | static int __init dynamic_debug_init(void)
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/printk.h:6,
from include/linux/kernel.h:19,
from lib/dynamic_debug.c:16:
lib/dynamic_debug.c:1267:16: error: initializer element is not constant
1267 | early_initcall(dynamic_debug_init);
| ^~~~~~~~~~~~~~~~~~
include/linux/init.h:250:55: note: in definition of macro '____define_initcall'
250 | __attribute__((__section__(__sec))) = fn;
| ^~
vim +593 lib/dynamic_debug.c
584
585 static int ddebug_exec_queries(const char *query_in, const char *modname, void *tracer)
586 {
587 int rc;
588
589 if (!query_in) {
590 pr_err("non-null query/command string expected\n");
591 return -EINVAL;
592 }
> 593 query = kstrndup(query_in, PAGE_SIZE, GFP_KERNEL);
594 if (!query)
595 return -ENOMEM;
596
597 rc = __ddebug_exec_queries(query, modname, tracer);
598 kfree(query);
599 return rc;
600
601 /**
602 * dynamic_debug_exec_queries - select and change dynamic-debug prints
603 * @query: query-string described in admin-guide/dynamic-debug-howto
604 * @modname: string containing module name, usually &module.mod_name
605 *
606 * This uses the >/proc/dynamic_debug/control reader, allowing module
607 * authors to modify their dynamic-debug callsites. The modname is
608 * canonically struct module.name, but can also be null or a
609 * module-wildcard, for example: "drm*".
610 */
> 611 int dynamic_debug_exec_queries(const char *query, const char *modname)
612 {
> 613 return ddebug_exec_queries(qry, modname, NULL);
614 }
> 615 EXPORT_SYMBOL_GPL(dynamic_debug_exec_queries);
616
617 #ifdef MODULES
618 #define KP_MOD_NAME kp->mod->name
619 #else
620 #define KP_MOD_NAME NULL /* wildcard */
621 #endif
622 #define FMT_QUERY_SIZE 128 /* typically need <40 */
623 /**
624 * param_set_dyndbg() - drm.debug style bits=>categories setter
625 * @instr: string echo>d to sysfs
626 * @kp: struct kernel_param* ->data has bitmap
627 * Exported to support DEFINE_DYNAMIC_DEBUG_CATEGORIES
628 */
629 int param_set_dyndbg(const char *instr, const struct kernel_param *kp)
630 {
631 unsigned long inbits;
632 int rc, i, matches = 0, totct = 0;
633 char query[FMT_QUERY_SIZE];
634 const struct dyndbg_bitdesc *bitmap = kp->data;
635
636 if (!bitmap) {
637 pr_err("set_dyndbg: no bits=>queries map\n");
638 return -EINVAL;
639 }
640 rc = kstrtoul(instr, 0, &inbits);
641 if (rc) {
642 pr_err("set_dyndbg: bad input: %s\n", instr);
643 return rc;
644 }
645 vpr_info("set_dyndbg: input 0x%lx\n", inbits);
646
647 for (i = 0; bitmap->prefix; i++, bitmap++) {
648 snprintf(query, FMT_QUERY_SIZE, "format '^%s' %cp", bitmap->prefix,
649 test_bit(i, &inbits) ? '+' : '-');
650
651 matches = __ddebug_exec_queries(query, KP_MOD_NAME, NULL);
652
653 v2pr_info("bit-%d: %d matches on '%s'\n", i, matches, query);
654 totct += matches;
655 }
656 vpr_info("total matches: %d\n", totct);
657 return 0;
658 }
> 659 EXPORT_SYMBOL(param_set_dyndbg);
660
661 /**
662 * param_get_dyndbg() - drm.debug style bitmap to format-prefix categories
663 * @buffer: string returned to user via sysfs
664 * @kp: struct kernel_param*
665 * Exported to provide required .get interface, not useful.
666 * pr_debugs may be altered after .set via `echo $foo >control`
667 */
668 int param_get_dyndbg(char *buffer, const struct kernel_param *kp)
669 {
670 return scnprintf(buffer, PAGE_SIZE, "%u\n",
671 *((unsigned int *)kp->arg));
672 }
> 673 EXPORT_SYMBOL(param_get_dyndbg);
674
675 const struct kernel_param_ops param_ops_dyndbg = {
676 .set = param_set_dyndbg,
677 .get = param_get_dyndbg,
678 };
679 /* support DEFINE_DYNAMIC_DEBUG_CATEGORIES users */
> 680 EXPORT_SYMBOL(param_ops_dyndbg);
681
682 #define PREFIX_SIZE 64
683
> 684 static int remaining(int wrote)
685 {
686 if (PREFIX_SIZE - wrote > 0)
687 return PREFIX_SIZE - wrote;
688 return 0;
689 }
690
> 691 static char *__dynamic_emit_prefix(const struct _ddebug *desc, char *buf)
692 {
693 int pos_after_tid;
694 int pos = 0;
695
696 if (desc->flags & _DPRINTK_FLAGS_INCL_TID) {
697 if (in_interrupt())
698 pos += snprintf(buf + pos, remaining(pos), "<intr> ");
699 else
700 pos += snprintf(buf + pos, remaining(pos), "[%d] ",
701 task_pid_vnr(current));
702 }
703 pos_after_tid = pos;
704 if (desc->flags & _DPRINTK_FLAGS_INCL_MODNAME)
705 pos += snprintf(buf + pos, remaining(pos), "%s:",
706 desc->modname);
707 if (desc->flags & _DPRINTK_FLAGS_INCL_FUNCNAME)
708 pos += snprintf(buf + pos, remaining(pos), "%s:",
709 desc->function);
710 if (desc->flags & _DPRINTK_FLAGS_INCL_LINENO)
711 pos += snprintf(buf + pos, remaining(pos), "%d:",
712 desc->lineno);
713 if (pos - pos_after_tid)
714 pos += snprintf(buf + pos, remaining(pos), " ");
715 if (pos >= PREFIX_SIZE)
716 buf[PREFIX_SIZE - 1] = '\0';
717
718 return buf;
719 }
720
> 721 static inline char *dynamic_emit_prefix(struct _ddebug *desc, char *buf)
722 {
723 if (unlikely(desc->flags & _DPRINTK_FLAGS_INCL_ANY))
724 return __dynamic_emit_prefix(desc, buf);
725 return buf;
726 }
727
728 void __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...)
729 {
730 va_list args;
731 struct va_format vaf;
732 char buf[PREFIX_SIZE] = "";
733
734 BUG_ON(!descriptor);
735 BUG_ON(!fmt);
736
737 va_start(args, fmt);
738
739 vaf.fmt = fmt;
740 vaf.va = &args;
741
742 if (descriptor->flags & _DPRINTK_ENABLED)
743 dynamic_emit_prefix(descriptor, buf);
744
745 if (descriptor->flags & _DPRINTK_FLAGS_PRINT)
746 printk(KERN_DEBUG "%s%pV", buf, &vaf);
747
748 if (descriptor->flags & _DPRINTK_FLAGS_PRINT_TRACE) {
749
750 if (descriptor->tracer) {
751 (*descriptor->tracer)("%s:%ps %pV", buf,
752 __builtin_return_address(0), &vaf);
753 }
754 /* else shouldn't matter, but maybe for consistency */
755 }
756 va_end(args);
757 }
> 758 EXPORT_SYMBOL(__dynamic_pr_debug);
759
760 void __dynamic_dev_dbg(struct _ddebug *descriptor,
761 const struct device *dev, const char *fmt, ...)
762 {
763 struct va_format vaf;
764 va_list args;
765
766 BUG_ON(!descriptor);
767 BUG_ON(!fmt);
768
769 va_start(args, fmt);
770
771 vaf.fmt = fmt;
772 vaf.va = &args;
773
774 if (!dev) {
775 printk(KERN_DEBUG "(NULL device *): %pV", &vaf);
776 } else {
777 char buf[PREFIX_SIZE] = "";
778
779 dev_printk_emit(LOGLEVEL_DEBUG, dev, "%s%s %s: %pV",
780 dynamic_emit_prefix(descriptor, buf),
781 dev_driver_string(dev), dev_name(dev),
782 &vaf);
783 }
784
785 va_end(args);
786 }
> 787 EXPORT_SYMBOL(__dynamic_dev_dbg);
788
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [PATCH v6 10/11] dyndbg: RFC add debug-trace callback, selftest with it. RFC
by kernel test robot
Hi Jim,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on linus/master v5.14-rc7 next-20210820]
[cannot apply to linux/master]
[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/Jim-Cromie/use-DYNAMIC_DEBUG-to-...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: m68k-randconfig-r025-20210822 (attached as .config)
compiler: m68k-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/4d886cec521fe5747753921aab07fa15d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jim-Cromie/use-DYNAMIC_DEBUG-to-implement-DRM-debug/20210823-062136
git checkout 4d886cec521fe5747753921aab07fa15dad79b3c
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash
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 >>):
lib/dynamic_debug.c: In function 'ddebug_exec_queries':
>> lib/dynamic_debug.c:593:9: error: 'query' undeclared (first use in this function); did you mean 'query_in'?
593 | query = kstrndup(query_in, PAGE_SIZE, GFP_KERNEL);
| ^~~~~
| query_in
lib/dynamic_debug.c:593:9: note: each undeclared identifier is reported only once for each function it appears in
lib/dynamic_debug.c: In function 'dynamic_debug_exec_queries':
>> lib/dynamic_debug.c:613:36: error: 'qry' undeclared (first use in this function); did you mean 'query'?
613 | return ddebug_exec_queries(qry, modname, NULL);
| ^~~
| query
lib/dynamic_debug.c: In function 'ddebug_exec_queries':
>> lib/dynamic_debug.c:611:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
611 | int dynamic_debug_exec_queries(const char *query, const char *modname)
| ^~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
>> lib/dynamic_debug.c:615:19: error: non-static declaration of 'dynamic_debug_exec_queries' follows static declaration
615 | EXPORT_SYMBOL_GPL(dynamic_debug_exec_queries);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:164:41: note: in expansion of macro '_EXPORT_SYMBOL'
164 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:615:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
615 | EXPORT_SYMBOL_GPL(dynamic_debug_exec_queries);
| ^~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:611:5: note: previous definition of 'dynamic_debug_exec_queries' with type 'int(const char *, const char *)'
611 | int dynamic_debug_exec_queries(const char *query, const char *modname)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
>> include/linux/export.h:67:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL'
152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:164:41: note: in expansion of macro '_EXPORT_SYMBOL'
164 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:615:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
615 | EXPORT_SYMBOL_GPL(dynamic_debug_exec_queries);
| ^~~~~~~~~~~~~~~~~
>> lib/dynamic_debug.c:659:15: error: non-static declaration of 'param_set_dyndbg' follows static declaration
659 | EXPORT_SYMBOL(param_set_dyndbg);
| ^~~~~~~~~~~~~~~~
include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:659:1: note: in expansion of macro 'EXPORT_SYMBOL'
659 | EXPORT_SYMBOL(param_set_dyndbg);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:629:5: note: previous definition of 'param_set_dyndbg' with type 'int(const char *, const struct kernel_param *)'
629 | int param_set_dyndbg(const char *instr, const struct kernel_param *kp)
| ^~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
>> include/linux/export.h:67:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL'
152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:659:1: note: in expansion of macro 'EXPORT_SYMBOL'
659 | EXPORT_SYMBOL(param_set_dyndbg);
| ^~~~~~~~~~~~~
>> lib/dynamic_debug.c:673:15: error: non-static declaration of 'param_get_dyndbg' follows static declaration
673 | EXPORT_SYMBOL(param_get_dyndbg);
| ^~~~~~~~~~~~~~~~
include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:673:1: note: in expansion of macro 'EXPORT_SYMBOL'
673 | EXPORT_SYMBOL(param_get_dyndbg);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:668:5: note: previous definition of 'param_get_dyndbg' with type 'int(char *, const struct kernel_param *)'
668 | int param_get_dyndbg(char *buffer, const struct kernel_param *kp)
| ^~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
>> include/linux/export.h:67:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL'
152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:673:1: note: in expansion of macro 'EXPORT_SYMBOL'
673 | EXPORT_SYMBOL(param_get_dyndbg);
| ^~~~~~~~~~~~~
>> lib/dynamic_debug.c:680:15: error: extern declaration of 'param_ops_dyndbg' follows declaration with no linkage
680 | EXPORT_SYMBOL(param_ops_dyndbg);
| ^~~~~~~~~~~~~~~~
include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:680:1: note: in expansion of macro 'EXPORT_SYMBOL'
680 | EXPORT_SYMBOL(param_ops_dyndbg);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:675:31: note: previous definition of 'param_ops_dyndbg' with type 'const struct kernel_param_ops'
675 | const struct kernel_param_ops param_ops_dyndbg = {
| ^~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
>> include/linux/export.h:67:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL'
152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:680:1: note: in expansion of macro 'EXPORT_SYMBOL'
680 | EXPORT_SYMBOL(param_ops_dyndbg);
| ^~~~~~~~~~~~~
>> lib/dynamic_debug.c:684:12: error: invalid storage class for function 'remaining'
684 | static int remaining(int wrote)
| ^~~~~~~~~
>> lib/dynamic_debug.c:691:14: error: invalid storage class for function '__dynamic_emit_prefix'
691 | static char *__dynamic_emit_prefix(const struct _ddebug *desc, char *buf)
| ^~~~~~~~~~~~~~~~~~~~~
>> lib/dynamic_debug.c:721:21: error: invalid storage class for function 'dynamic_emit_prefix'
721 | static inline char *dynamic_emit_prefix(struct _ddebug *desc, char *buf)
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
>> lib/dynamic_debug.c:758:15: error: non-static declaration of '__dynamic_pr_debug' follows static declaration
758 | EXPORT_SYMBOL(__dynamic_pr_debug);
| ^~~~~~~~~~~~~~~~~~
include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:758:1: note: in expansion of macro 'EXPORT_SYMBOL'
758 | EXPORT_SYMBOL(__dynamic_pr_debug);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:728:6: note: previous definition of '__dynamic_pr_debug' with type 'void(struct _ddebug *, const char *, ...)'
728 | void __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...)
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
>> include/linux/export.h:67:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL'
152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:758:1: note: in expansion of macro 'EXPORT_SYMBOL'
758 | EXPORT_SYMBOL(__dynamic_pr_debug);
| ^~~~~~~~~~~~~
>> lib/dynamic_debug.c:787:15: error: non-static declaration of '__dynamic_dev_dbg' follows static declaration
787 | EXPORT_SYMBOL(__dynamic_dev_dbg);
| ^~~~~~~~~~~~~~~~~
include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:787:1: note: in expansion of macro 'EXPORT_SYMBOL'
787 | EXPORT_SYMBOL(__dynamic_dev_dbg);
| ^~~~~~~~~~~~~
lib/dynamic_debug.c:760:6: note: previous definition of '__dynamic_dev_dbg' with type 'void(struct _ddebug *, const struct device *, const char *, ...)'
760 | void __dynamic_dev_dbg(struct _ddebug *descriptor,
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from lib/dynamic_debug.c:16:
>> include/linux/export.h:67:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:9: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL'
152 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
163 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
lib/dynamic_debug.c:787:1: note: in expansion of macro 'EXPORT_SYMBOL'
787 | EXPORT_SYMBOL(__dynamic_dev_dbg);
| ^~~~~~~~~~~~~
>> lib/dynamic_debug.c:866:19: error: invalid storage class for function 'ddebug_setup_query'
866 | static __init int ddebug_setup_query(char *str)
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/printk.h:6,
from include/linux/kernel.h:19,
from lib/dynamic_debug.c:16:
>> lib/dynamic_debug.c:876:26: error: initializer element is not constant
876 | __setup("ddebug_query=", ddebug_setup_query);
| ^~~~~~~~~~~~~~~~~~
include/linux/init.h:321:46: note: in definition of macro '__setup_param'
321 | = { __setup_str_##unique_id, fn, early }
| ^~
lib/dynamic_debug.c:876:1: note: in expansion of macro '__setup'
876 | __setup("ddebug_query=", ddebug_setup_query);
| ^~~~~~~
lib/dynamic_debug.c:876:26: note: (near initialization for '__setup_ddebug_setup_query.setup_func')
876 | __setup("ddebug_query=", ddebug_setup_query);
| ^~~~~~~~~~~~~~~~~~
include/linux/init.h:321:46: note: in definition of macro '__setup_param'
321 | = { __setup_str_##unique_id, fn, early }
| ^~
lib/dynamic_debug.c:876:1: note: in expansion of macro '__setup'
876 | __setup("ddebug_query=", ddebug_setup_query);
| ^~~~~~~
lib/dynamic_debug.c:883:16: error: invalid storage class for function 'ddebug_proc_write'
883 | static ssize_t ddebug_proc_write(struct file *file, const char __user *ubuf,
| ^~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:914:24: error: invalid storage class for function 'ddebug_iter_first'
914 | static struct _ddebug *ddebug_iter_first(struct ddebug_iter *iter)
| ^~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:933:24: error: invalid storage class for function 'ddebug_iter_next'
933 | static struct _ddebug *ddebug_iter_next(struct ddebug_iter *iter)
| ^~~~~~~~~~~~~~~~
lib/dynamic_debug.c:955:14: error: invalid storage class for function 'ddebug_proc_start'
955 | static void *ddebug_proc_start(struct seq_file *m, loff_t *pos)
| ^~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:978:14: error: invalid storage class for function 'ddebug_proc_next'
978 | static void *ddebug_proc_next(struct seq_file *m, void *p, loff_t *pos)
| ^~~~~~~~~~~~~~~~
lib/dynamic_debug.c:997:12: error: invalid storage class for function 'ddebug_proc_show'
997 | static int ddebug_proc_show(struct seq_file *m, void *p)
| ^~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1023:13: error: invalid storage class for function 'ddebug_proc_stop'
1023 | static void ddebug_proc_stop(struct seq_file *m, void *p)
| ^~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1029:18: error: initializer element is not constant
1029 | .start = ddebug_proc_start,
| ^~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1029:18: note: (near initialization for 'ddebug_proc_seqops.start')
lib/dynamic_debug.c:1030:17: error: initializer element is not constant
1030 | .next = ddebug_proc_next,
| ^~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1030:17: note: (near initialization for 'ddebug_proc_seqops.next')
lib/dynamic_debug.c:1031:17: error: initializer element is not constant
1031 | .show = ddebug_proc_show,
| ^~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1031:17: note: (near initialization for 'ddebug_proc_seqops.show')
lib/dynamic_debug.c:1032:17: error: initializer element is not constant
1032 | .stop = ddebug_proc_stop
| ^~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1032:17: note: (near initialization for 'ddebug_proc_seqops.stop')
lib/dynamic_debug.c:1035:12: error: invalid storage class for function 'ddebug_proc_open'
1035 | static int ddebug_proc_open(struct inode *inode, struct file *file)
| ^~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1043:17: error: initializer element is not constant
1043 | .open = ddebug_proc_open,
| ^~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1043:17: note: (near initialization for 'ddebug_proc_fops.open')
lib/dynamic_debug.c:1047:18: error: initializer element is not constant
1047 | .write = ddebug_proc_write
| ^~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1047:18: note: (near initialization for 'ddebug_proc_fops.write')
lib/dynamic_debug.c:1051:22: error: initializer element is not constant
1051 | .proc_open = ddebug_proc_open,
| ^~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1051:22: note: (near initialization for 'proc_fops.proc_open')
lib/dynamic_debug.c:1055:23: error: initializer element is not constant
1055 | .proc_write = ddebug_proc_write
| ^~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1055:23: note: (near initialization for 'proc_fops.proc_write')
lib/dynamic_debug.c:1091:12: error: invalid storage class for function 'ddebug_dyndbg_param_cb'
1091 | static int ddebug_dyndbg_param_cb(char *param, char *val,
| ^~~~~~~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1112:12: error: invalid storage class for function 'ddebug_dyndbg_boot_param_cb'
1112 | static int ddebug_dyndbg_boot_param_cb(char *param, char *val,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1130:13: error: invalid storage class for function 'ddebug_table_free'
1130 | static void ddebug_table_free(struct ddebug_table *dt)
| ^~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1159:13: error: invalid storage class for function 'ddebug_remove_all_tables'
1159 | static void ddebug_remove_all_tables(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1173:19: error: invalid storage class for function 'dynamic_debug_init_control'
1173 | static int __init dynamic_debug_init_control(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dynamic_debug.c:1196:19: error: invalid storage class for function 'dynamic_debug_init'
1196 | static int __init dynamic_debug_init(void)
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/printk.h:6,
from include/linux/kernel.h:19,
from lib/dynamic_debug.c:16:
lib/dynamic_debug.c:1267:16: error: initializer element is not constant
1267 | early_initcall(dynamic_debug_init);
| ^~~~~~~~~~~~~~~~~~
include/linux/init.h:250:55: note: in definition of macro '____define_initcall'
250 | __attribute__((__section__(__sec))) = fn;
| ^~
vim +593 lib/dynamic_debug.c
584
585 static int ddebug_exec_queries(const char *query_in, const char *modname, void *tracer)
586 {
587 int rc;
588
589 if (!query_in) {
590 pr_err("non-null query/command string expected\n");
591 return -EINVAL;
592 }
> 593 query = kstrndup(query_in, PAGE_SIZE, GFP_KERNEL);
594 if (!query)
595 return -ENOMEM;
596
597 rc = __ddebug_exec_queries(query, modname, tracer);
598 kfree(query);
599 return rc;
600
601 /**
602 * dynamic_debug_exec_queries - select and change dynamic-debug prints
603 * @query: query-string described in admin-guide/dynamic-debug-howto
604 * @modname: string containing module name, usually &module.mod_name
605 *
606 * This uses the >/proc/dynamic_debug/control reader, allowing module
607 * authors to modify their dynamic-debug callsites. The modname is
608 * canonically struct module.name, but can also be null or a
609 * module-wildcard, for example: "drm*".
610 */
> 611 int dynamic_debug_exec_queries(const char *query, const char *modname)
612 {
> 613 return ddebug_exec_queries(qry, modname, NULL);
614 }
> 615 EXPORT_SYMBOL_GPL(dynamic_debug_exec_queries);
616
617 #ifdef MODULES
618 #define KP_MOD_NAME kp->mod->name
619 #else
620 #define KP_MOD_NAME NULL /* wildcard */
621 #endif
622 #define FMT_QUERY_SIZE 128 /* typically need <40 */
623 /**
624 * param_set_dyndbg() - drm.debug style bits=>categories setter
625 * @instr: string echo>d to sysfs
626 * @kp: struct kernel_param* ->data has bitmap
627 * Exported to support DEFINE_DYNAMIC_DEBUG_CATEGORIES
628 */
629 int param_set_dyndbg(const char *instr, const struct kernel_param *kp)
630 {
631 unsigned long inbits;
632 int rc, i, matches = 0, totct = 0;
633 char query[FMT_QUERY_SIZE];
634 const struct dyndbg_bitdesc *bitmap = kp->data;
635
636 if (!bitmap) {
637 pr_err("set_dyndbg: no bits=>queries map\n");
638 return -EINVAL;
639 }
640 rc = kstrtoul(instr, 0, &inbits);
641 if (rc) {
642 pr_err("set_dyndbg: bad input: %s\n", instr);
643 return rc;
644 }
645 vpr_info("set_dyndbg: input 0x%lx\n", inbits);
646
647 for (i = 0; bitmap->prefix; i++, bitmap++) {
648 snprintf(query, FMT_QUERY_SIZE, "format '^%s' %cp", bitmap->prefix,
649 test_bit(i, &inbits) ? '+' : '-');
650
651 matches = __ddebug_exec_queries(query, KP_MOD_NAME, NULL);
652
653 v2pr_info("bit-%d: %d matches on '%s'\n", i, matches, query);
654 totct += matches;
655 }
656 vpr_info("total matches: %d\n", totct);
657 return 0;
658 }
> 659 EXPORT_SYMBOL(param_set_dyndbg);
660
661 /**
662 * param_get_dyndbg() - drm.debug style bitmap to format-prefix categories
663 * @buffer: string returned to user via sysfs
664 * @kp: struct kernel_param*
665 * Exported to provide required .get interface, not useful.
666 * pr_debugs may be altered after .set via `echo $foo >control`
667 */
668 int param_get_dyndbg(char *buffer, const struct kernel_param *kp)
669 {
670 return scnprintf(buffer, PAGE_SIZE, "%u\n",
671 *((unsigned int *)kp->arg));
672 }
> 673 EXPORT_SYMBOL(param_get_dyndbg);
674
675 const struct kernel_param_ops param_ops_dyndbg = {
676 .set = param_set_dyndbg,
677 .get = param_get_dyndbg,
678 };
679 /* support DEFINE_DYNAMIC_DEBUG_CATEGORIES users */
> 680 EXPORT_SYMBOL(param_ops_dyndbg);
681
682 #define PREFIX_SIZE 64
683
> 684 static int remaining(int wrote)
685 {
686 if (PREFIX_SIZE - wrote > 0)
687 return PREFIX_SIZE - wrote;
688 return 0;
689 }
690
> 691 static char *__dynamic_emit_prefix(const struct _ddebug *desc, char *buf)
692 {
693 int pos_after_tid;
694 int pos = 0;
695
696 if (desc->flags & _DPRINTK_FLAGS_INCL_TID) {
697 if (in_interrupt())
698 pos += snprintf(buf + pos, remaining(pos), "<intr> ");
699 else
700 pos += snprintf(buf + pos, remaining(pos), "[%d] ",
701 task_pid_vnr(current));
702 }
703 pos_after_tid = pos;
704 if (desc->flags & _DPRINTK_FLAGS_INCL_MODNAME)
705 pos += snprintf(buf + pos, remaining(pos), "%s:",
706 desc->modname);
707 if (desc->flags & _DPRINTK_FLAGS_INCL_FUNCNAME)
708 pos += snprintf(buf + pos, remaining(pos), "%s:",
709 desc->function);
710 if (desc->flags & _DPRINTK_FLAGS_INCL_LINENO)
711 pos += snprintf(buf + pos, remaining(pos), "%d:",
712 desc->lineno);
713 if (pos - pos_after_tid)
714 pos += snprintf(buf + pos, remaining(pos), " ");
715 if (pos >= PREFIX_SIZE)
716 buf[PREFIX_SIZE - 1] = '\0';
717
718 return buf;
719 }
720
> 721 static inline char *dynamic_emit_prefix(struct _ddebug *desc, char *buf)
722 {
723 if (unlikely(desc->flags & _DPRINTK_FLAGS_INCL_ANY))
724 return __dynamic_emit_prefix(desc, buf);
725 return buf;
726 }
727
728 void __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...)
729 {
730 va_list args;
731 struct va_format vaf;
732 char buf[PREFIX_SIZE] = "";
733
734 BUG_ON(!descriptor);
735 BUG_ON(!fmt);
736
737 va_start(args, fmt);
738
739 vaf.fmt = fmt;
740 vaf.va = &args;
741
742 if (descriptor->flags & _DPRINTK_ENABLED)
743 dynamic_emit_prefix(descriptor, buf);
744
745 if (descriptor->flags & _DPRINTK_FLAGS_PRINT)
746 printk(KERN_DEBUG "%s%pV", buf, &vaf);
747
748 if (descriptor->flags & _DPRINTK_FLAGS_PRINT_TRACE) {
749
750 if (descriptor->tracer) {
751 (*descriptor->tracer)("%s:%ps %pV", buf,
752 __builtin_return_address(0), &vaf);
753 }
754 /* else shouldn't matter, but maybe for consistency */
755 }
756 va_end(args);
757 }
> 758 EXPORT_SYMBOL(__dynamic_pr_debug);
759
760 void __dynamic_dev_dbg(struct _ddebug *descriptor,
761 const struct device *dev, const char *fmt, ...)
762 {
763 struct va_format vaf;
764 va_list args;
765
766 BUG_ON(!descriptor);
767 BUG_ON(!fmt);
768
769 va_start(args, fmt);
770
771 vaf.fmt = fmt;
772 vaf.va = &args;
773
774 if (!dev) {
775 printk(KERN_DEBUG "(NULL device *): %pV", &vaf);
776 } else {
777 char buf[PREFIX_SIZE] = "";
778
779 dev_printk_emit(LOGLEVEL_DEBUG, dev, "%s%s %s: %pV",
780 dynamic_emit_prefix(descriptor, buf),
781 dev_driver_string(dev), dev_name(dev),
782 &vaf);
783 }
784
785 va_end(args);
786 }
> 787 EXPORT_SYMBOL(__dynamic_dev_dbg);
788
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [RFC PATCH net-next 4/5] net: dsa: realtek-smi: add rtl8365mb subdriver for RTL8365MB-VC
by kernel test robot
Hi "Alvin,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Alvin-ipraga/net-dsa-add-support...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 9b60ac54ab7cf92af76240cdad549e8fde605eee
config: x86_64-randconfig-a014-20210822 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a83d99c55ebb14532c414066a5aa3bdb65389965)
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/678769f73446be05b2f03f10fe1ccbe16...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alvin-ipraga/net-dsa-add-support-for-RTL8365MB-VC/20210823-033419
git checkout 678769f73446be05b2f03f10fe1ccbe161a35019
# 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/net/dsa/rtl8365mb.c:1188:5: warning: no previous prototype for function 'rtl8365mb_port_vlan_filtering' [-Wmissing-prototypes]
int rtl8365mb_port_vlan_filtering(struct dsa_switch *ds, int port,
^
drivers/net/dsa/rtl8365mb.c:1188:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int rtl8365mb_port_vlan_filtering(struct dsa_switch *ds, int port,
^
static
>> drivers/net/dsa/rtl8365mb.c:1755:24: warning: variable 'irq' is uninitialized when used here [-Wuninitialized]
irq_set_parent(virq, irq);
^~~
drivers/net/dsa/rtl8365mb.c:1727:9: note: initialize the variable 'irq' to silence this warning
int irq;
^
= 0
>> drivers/net/dsa/rtl8365mb.c:1943:20: warning: variable 'mb' set but not used [-Wunused-but-set-variable]
struct rtl8365mb *mb;
^
3 warnings generated.
vim +/rtl8365mb_port_vlan_filtering +1188 drivers/net/dsa/rtl8365mb.c
1187
> 1188 int rtl8365mb_port_vlan_filtering(struct dsa_switch *ds, int port,
1189 bool vlan_filtering,
1190 struct netlink_ext_ack *extack)
1191 {
1192 struct realtek_smi *smi = ds->priv;
1193 u32 phys_port = PORT_NUM_L2P(port);
1194 int ret;
1195
1196 dev_info(smi->dev, "%s filtering on port %d\n",
1197 vlan_filtering ? "enable" : "disable", port);
1198
1199 /* vlan_filtering on: Discard VLAN tagged frames if the port is not a
1200 * member of the VLAN with which the packet is associated. Untagged
1201 * packets should also be discarded unless the port has a PVID
1202 * programmed.
1203 *
1204 * vlan_filtering off: Accept all VLAN tagged frames, including
1205 * untagged.
1206 */
1207 ret = regmap_update_bits(
1208 smi->map, RTL8365MB_VLAN_INGRESS_REG,
1209 RTL8365MB_VLAN_INGRESS_FILTER_PORT_EN_MASK(phys_port),
1210 (vlan_filtering ? 1 : 0)
1211 << RTL8365MB_VLAN_INGRESS_FILTER_PORT_EN_OFFSET(
1212 phys_port));
1213 if (ret)
1214 return ret;
1215
1216 return 0;
1217 }
1218
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year