[kbuild] Re: [PATCH 2/5] Huawei BMA: Adding Huawei BMA driver: host_cdev_drv
by Dan Carpenter
Hi,
url: https://github.com/0day-ci/linux/commits/yunaixin03610-163-com/Adding-Hua...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a5dc8300df75e8b8384b4c82225f1e4a0b4d9b55
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/huawei/bma/edma_drv/bma_pci.c:149:3: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
REGION_DIR_INPUT + (region & REGION_INDEX_MASK));
^
drivers/net/ethernet/huawei/bma/edma_drv/bma_pci.c:158:55: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
(void)pci_write_config_dword(pdev, ATU_REGION_CTRL2, REGION_ENABLE);
^
--
>> drivers/net/ethernet/huawei/bma/edma_drv/edma_host.c:63:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
len += sprintf(buf + len, "lost_count :%dn",
^
drivers/net/ethernet/huawei/bma/edma_drv/edma_host.c:65:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
len += sprintf(buf + len, "b2h_int :%dn",
^
drivers/net/ethernet/huawei/bma/edma_drv/edma_host.c:67:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
len += sprintf(buf + len, "h2b_int :%dn",
^
drivers/net/ethernet/huawei/bma/edma_drv/edma_host.c:69:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
len += sprintf(buf + len, "dma_count :%dn",
^
drivers/net/ethernet/huawei/bma/edma_drv/edma_host.c:71:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
len += sprintf(buf + len, "recv_bytes :%dn",
^
drivers/net/ethernet/huawei/bma/edma_drv/edma_host.c:73:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
len += sprintf(buf + len, "send_bytes :%dn",
^
drivers/net/ethernet/huawei/bma/edma_drv/edma_host.c:75:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
len += sprintf(buf + len, "recv_pkgs :%dn",
^
drivers/net/ethernet/huawei/bma/edma_drv/edma_host.c:77:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
len += sprintf(buf + len, "send_pkgs :%dn",
^
drivers/net/ethernet/huawei/bma/edma_drv/edma_host.c:79:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
len += sprintf(buf + len, "drop_pkgs :%dn",
^
drivers/net/ethernet/huawei/bma/edma_drv/edma_host.c:81:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
len += sprintf(buf + len, "fail_count :%dn",
^
>> drivers/net/ethernet/huawei/bma/cdev_drv/bma_cdev.c:326:21: warning: Checking if unsigned variable 'count' is less than zero. [unsignedLessThanZero]
if (!data || count <= 0)
^
drivers/net/ethernet/huawei/bma/cdev_drv/bma_cdev.c:346:21: warning: Checking if unsigned variable 'count' is less than zero. [unsignedLessThanZero]
if (!data || count <= 0)
# https://github.com/0day-ci/linux/commit/d0965c4179b69ddd204c1f795f0d6ac08...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout d0965c4179b69ddd204c1f795f0d6ac080c657af
vim +122 drivers/net/ethernet/huawei/bma/cdev_drv/bma_cdev.c
d0965c4179b69d yunaixin 2020-06-15 93 static int cdev_param_get_statics(char *buf, const struct kernel_param *kp)
d0965c4179b69d yunaixin 2020-06-15 94 {
d0965c4179b69d yunaixin 2020-06-15 95 int len = 0;
d0965c4179b69d yunaixin 2020-06-15 96 int i = 0;
d0965c4179b69d yunaixin 2020-06-15 97 __kernel_time_t running_time = 0;
d0965c4179b69d yunaixin 2020-06-15 98
d0965c4179b69d yunaixin 2020-06-15 99 if (!buf)
d0965c4179b69d yunaixin 2020-06-15 100 return 0;
buf is a PAGE_SIZE buffer. It can't be NULL.
d0965c4179b69d yunaixin 2020-06-15 101
d0965c4179b69d yunaixin 2020-06-15 102 GET_SYS_SECONDS(running_time);
d0965c4179b69d yunaixin 2020-06-15 103 running_time -= g_cdev_set.init_time;
d0965c4179b69d yunaixin 2020-06-15 104 len += sprintf(buf + len,
d0965c4179b69d yunaixin 2020-06-15 105 "============================CDEV_DRIVER_INFO=======================\n");
d0965c4179b69d yunaixin 2020-06-15 106 len += sprintf(buf + len, "version :%s\n", CDEV_VERSION);
d0965c4179b69d yunaixin 2020-06-15 107
d0965c4179b69d yunaixin 2020-06-15 108 len += sprintf(buf + len, "running_time :%luD %02lu:%02lu:%02lu\n",
d0965c4179b69d yunaixin 2020-06-15 109 running_time / (SECONDS_PER_DAY),
d0965c4179b69d yunaixin 2020-06-15 110 running_time % (SECONDS_PER_DAY) / SECONDS_PER_HOUR,
d0965c4179b69d yunaixin 2020-06-15 111 running_time % SECONDS_PER_HOUR / SECONDS_PER_MINUTE,
d0965c4179b69d yunaixin 2020-06-15 112 running_time % SECONDS_PER_MINUTE);
d0965c4179b69d yunaixin 2020-06-15 113
d0965c4179b69d yunaixin 2020-06-15 114 for (i = 0; i < g_cdev_set.dev_num; i++) {
d0965c4179b69d yunaixin 2020-06-15 115 len += sprintf(buf + len,
d0965c4179b69d yunaixin 2020-06-15 116 "===================================================\n");
I'm very worried that the sprintf loop can overflow the PAGE_SIZE.
Please replace all the sprintf() calls with scnprintf().
len += scnprintf(PAGE_SIZE - len, buf + len, "blah blah");
d0965c4179b69d yunaixin 2020-06-15 117 len += sprintf(buf + len, "name :%s\n",
d0965c4179b69d yunaixin 2020-06-15 118 g_cdev_set.dev_list[i].dev_name);
d0965c4179b69d yunaixin 2020-06-15 119 len +=
d0965c4179b69d yunaixin 2020-06-15 120 sprintf(buf + len, "dev_id :%08x\n",
d0965c4179b69d yunaixin 2020-06-15 121 g_cdev_set.dev_list[i].dev_id);
d0965c4179b69d yunaixin 2020-06-15 @122 len += sprintf(buf + len, "type :%u\n",
d0965c4179b69d yunaixin 2020-06-15 123 g_cdev_set.dev_list[i].type);
d0965c4179b69d yunaixin 2020-06-15 124 len += sprintf(buf + len, "status :%s\n",
d0965c4179b69d yunaixin 2020-06-15 125 g_cdev_set.dev_list[i].s.open_status ==
d0965c4179b69d yunaixin 2020-06-15 126 1 ? "open" : "close");
d0965c4179b69d yunaixin 2020-06-15 127 len += sprintf(buf + len, "send_pkgs :%u\n",
d0965c4179b69d yunaixin 2020-06-15 128 g_cdev_set.dev_list[i].s.send_pkgs);
d0965c4179b69d yunaixin 2020-06-15 129 len +=
d0965c4179b69d yunaixin 2020-06-15 130 sprintf(buf + len, "send_bytes:%u\n",
d0965c4179b69d yunaixin 2020-06-15 131 g_cdev_set.dev_list[i].s.send_bytes);
d0965c4179b69d yunaixin 2020-06-15 132 len += sprintf(buf + len, "send_failed_count:%u\n",
d0965c4179b69d yunaixin 2020-06-15 133 g_cdev_set.dev_list[i].s.send_failed_count);
d0965c4179b69d yunaixin 2020-06-15 134 len += sprintf(buf + len, "recv_pkgs :%u\n",
d0965c4179b69d yunaixin 2020-06-15 135 g_cdev_set.dev_list[i].s.recv_pkgs);
d0965c4179b69d yunaixin 2020-06-15 136 len += sprintf(buf + len, "recv_bytes:%u\n",
d0965c4179b69d yunaixin 2020-06-15 137 g_cdev_set.dev_list[i].s.recv_bytes);
d0965c4179b69d yunaixin 2020-06-15 138 len += sprintf(buf + len, "recv_failed_count:%u\n",
d0965c4179b69d yunaixin 2020-06-15 139 g_cdev_set.dev_list[i].s.recv_failed_count);
d0965c4179b69d yunaixin 2020-06-15 140 }
d0965c4179b69d yunaixin 2020-06-15 141
d0965c4179b69d yunaixin 2020-06-15 142 return len;
d0965c4179b69d yunaixin 2020-06-15 143 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
2 years, 3 months
Re: [PATCH] tracing: Use linker magic instead of recasting ftrace_ops_list_func()
by kernel test robot
Hi Steven,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on tip/perf/core linus/master v5.8-rc1 next-20200618]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Steven-Rostedt/tracing-Use-linke...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a5dc8300df75e8b8384b4c82225f1e4a0b4d9b55
config: x86_64-randconfig-a015-20200618 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# 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 >>, old ones prefixed by <<):
kernel/trace/ftrace.c:300:5: warning: no previous prototype for function '__register_ftrace_function' [-Wmissing-prototypes]
int __register_ftrace_function(struct ftrace_ops *ops)
^
kernel/trace/ftrace.c:300:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __register_ftrace_function(struct ftrace_ops *ops)
^
static
kernel/trace/ftrace.c:343:5: warning: no previous prototype for function '__unregister_ftrace_function' [-Wmissing-prototypes]
int __unregister_ftrace_function(struct ftrace_ops *ops)
^
kernel/trace/ftrace.c:343:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __unregister_ftrace_function(struct ftrace_ops *ops)
^
static
kernel/trace/ftrace.c:582:5: warning: no previous prototype for function 'ftrace_profile_pages_init' [-Wmissing-prototypes]
int ftrace_profile_pages_init(struct ftrace_profile_stat *stat)
^
kernel/trace/ftrace.c:582:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int ftrace_profile_pages_init(struct ftrace_profile_stat *stat)
^
static
kernel/trace/ftrace.c:3796:15: warning: no previous prototype for function 'arch_ftrace_match_adjust' [-Wmissing-prototypes]
char * __weak arch_ftrace_match_adjust(char *str, const char *search)
^
kernel/trace/ftrace.c:3796:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
char * __weak arch_ftrace_match_adjust(char *str, const char *search)
^
static
>> kernel/trace/ftrace.c:6854:6: warning: no previous prototype for function 'arch_ftrace_ops_list_func' [-Wmissing-prototypes]
void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
^
kernel/trace/ftrace.c:6854:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
^
static
5 warnings generated.
vim +/arch_ftrace_ops_list_func +6854 kernel/trace/ftrace.c
6836
6837 /*
6838 * Some archs only support passing ip and parent_ip. Even though
6839 * the list function ignores the op parameter, we do not want any
6840 * C side effects, where a function is called without the caller
6841 * sending a third parameter.
6842 * Archs are to support both the regs and ftrace_ops at the same time.
6843 * If they support ftrace_ops, it is assumed they support regs.
6844 * If call backs want to use regs, they must either check for regs
6845 * being NULL, or CONFIG_DYNAMIC_FTRACE_WITH_REGS.
6846 * Note, CONFIG_DYNAMIC_FTRACE_WITH_REGS expects a full regs to be saved.
6847 * An architecture can pass partial regs with ftrace_ops and still
6848 * set the ARCH_SUPPORTS_FTRACE_OPS.
6849 *
6850 * In vmlinux.lds.h, ftrace_ops_list_func() is defined to be
6851 * arch_ftrace_ops_list_func.
6852 */
6853 #if ARCH_SUPPORTS_FTRACE_OPS
> 6854 void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
6855 struct ftrace_ops *op, struct pt_regs *regs)
6856 {
6857 __ftrace_ops_list_func(ip, parent_ip, NULL, regs);
6858 }
6859 #else
6860 void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip)
6861 {
6862 __ftrace_ops_list_func(ip, parent_ip, NULL, NULL);
6863 }
6864 #endif
6865 NOKPROBE_SYMBOL(arch_ftrace_ops_list_func);
6866
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[jkirsher-next-queue:100GbE 15/15] drivers/net/ethernet/intel/idpf/idpf_main.c:46:5: warning: no previous prototype for function 'idpf_probe'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git 100GbE
head: 2c89ef0b849b5d1bdba9bcc93a70f52c4752bc23
commit: 2c89ef0b849b5d1bdba9bcc93a70f52c4752bc23 [15/15] idpf: Introduce idpf driver
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 2c89ef0b849b5d1bdba9bcc93a70f52c4752bc23
# 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 >>, old ones prefixed by <<):
>> drivers/net/ethernet/intel/idpf/idpf_main.c:46:5: warning: no previous prototype for function 'idpf_probe' [-Wmissing-prototypes]
int idpf_probe(struct pci_dev *pdev,
^
drivers/net/ethernet/intel/idpf/idpf_main.c:46:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int idpf_probe(struct pci_dev *pdev,
^
static
1 warning generated.
vim +/idpf_probe +46 drivers/net/ethernet/intel/idpf/idpf_main.c
38
39 /**
40 * idpf_probe - Device initialization routine
41 * @pdev: PCI device information struct
42 * @ent: entry in idpf_pci_tbl
43 *
44 * Returns 0 on success, negative on failure
45 */
> 46 int idpf_probe(struct pci_dev *pdev,
47 const struct pci_device_id __always_unused *ent)
48 {
49 struct iecm_adapter *adapter = NULL;
50 int err;
51
52 err = pcim_enable_device(pdev);
53 if (err)
54 return err;
55
56 adapter = kzalloc(sizeof(*adapter), GFP_KERNEL);
57 if (!adapter)
58 return -ENOMEM;
59
60 adapter->dev_ops.reg_ops_init = idpf_reg_ops_init;
61
62 err = iecm_probe(pdev, ent, adapter);
63 if (err)
64 kfree(adapter);
65
66 return err;
67 }
68
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH] tracing: Use linker magic instead of recasting ftrace_ops_list_func()
by kernel test robot
Hi Steven,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on tip/perf/core linus/master v5.8-rc1 next-20200618]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Steven-Rostedt/tracing-Use-linke...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a5dc8300df75e8b8384b4c82225f1e4a0b4d9b55
config: parisc-randconfig-r011-20200618 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
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 >>, old ones prefixed by <<):
kernel/trace/ftrace.c:300:5: warning: no previous prototype for '__register_ftrace_function' [-Wmissing-prototypes]
300 | int __register_ftrace_function(struct ftrace_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:343:5: warning: no previous prototype for '__unregister_ftrace_function' [-Wmissing-prototypes]
343 | int __unregister_ftrace_function(struct ftrace_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:582:5: warning: no previous prototype for 'ftrace_profile_pages_init' [-Wmissing-prototypes]
582 | int ftrace_profile_pages_init(struct ftrace_profile_stat *stat)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:3796:15: warning: no previous prototype for 'arch_ftrace_match_adjust' [-Wmissing-prototypes]
3796 | char * __weak arch_ftrace_match_adjust(char *str, const char *search)
| ^~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c: In function 'process_mod_list':
kernel/trace/ftrace.c:4107:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
4107 | int ret;
| ^~~
kernel/trace/ftrace.c: In function 'ftrace_regex_release':
kernel/trace/ftrace.c:5512:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
5512 | int ret;
| ^~~
kernel/trace/ftrace.c: At top level:
>> kernel/trace/ftrace.c:6854:6: warning: no previous prototype for 'arch_ftrace_ops_list_func' [-Wmissing-prototypes]
6854 | void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/arch_ftrace_ops_list_func +6854 kernel/trace/ftrace.c
6836
6837 /*
6838 * Some archs only support passing ip and parent_ip. Even though
6839 * the list function ignores the op parameter, we do not want any
6840 * C side effects, where a function is called without the caller
6841 * sending a third parameter.
6842 * Archs are to support both the regs and ftrace_ops at the same time.
6843 * If they support ftrace_ops, it is assumed they support regs.
6844 * If call backs want to use regs, they must either check for regs
6845 * being NULL, or CONFIG_DYNAMIC_FTRACE_WITH_REGS.
6846 * Note, CONFIG_DYNAMIC_FTRACE_WITH_REGS expects a full regs to be saved.
6847 * An architecture can pass partial regs with ftrace_ops and still
6848 * set the ARCH_SUPPORTS_FTRACE_OPS.
6849 *
6850 * In vmlinux.lds.h, ftrace_ops_list_func() is defined to be
6851 * arch_ftrace_ops_list_func.
6852 */
6853 #if ARCH_SUPPORTS_FTRACE_OPS
> 6854 void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
6855 struct ftrace_ops *op, struct pt_regs *regs)
6856 {
6857 __ftrace_ops_list_func(ip, parent_ip, NULL, regs);
6858 }
6859 #else
6860 void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip)
6861 {
6862 __ftrace_ops_list_func(ip, parent_ip, NULL, NULL);
6863 }
6864 #endif
6865 NOKPROBE_SYMBOL(arch_ftrace_ops_list_func);
6866
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
include/linux/genalloc.h:104: undefined reference to `gen_pool_add_owner'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1b5044021070efa3259f3e9548dc35d1eb6aa844
commit: dbed452a078d56bc7f1abecc3edd6a75e8e4484e dma-pool: decouple DMA_REMAP from DMA_COHERENT_POOL
date: 3 days ago
config: x86_64-randconfig-s031-20200618 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-rc1-10-gc17b1b06-dirty
git checkout dbed452a078d56bc7f1abecc3edd6a75e8e4484e
# save the attached .config to linux build tree
make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
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 >>):
vim +104 include/linux/genalloc.h
b26981c8f743d3 Zhao Qiang 2015-11-30 95
929f97276bcf7f Dean Nelson 2006-06-23 96 extern struct gen_pool *gen_pool_create(int, int);
3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 97 extern phys_addr_t gen_pool_virt_to_phys(struct gen_pool *pool, unsigned long);
795ee30648c708 Dan Williams 2019-06-13 98 extern int gen_pool_add_owner(struct gen_pool *, unsigned long, phys_addr_t,
795ee30648c708 Dan Williams 2019-06-13 99 size_t, int, void *);
795ee30648c708 Dan Williams 2019-06-13 100
795ee30648c708 Dan Williams 2019-06-13 101 static inline int gen_pool_add_virt(struct gen_pool *pool, unsigned long addr,
795ee30648c708 Dan Williams 2019-06-13 102 phys_addr_t phys, size_t size, int nid)
795ee30648c708 Dan Williams 2019-06-13 103 {
795ee30648c708 Dan Williams 2019-06-13 @104 return gen_pool_add_owner(pool, addr, phys, size, nid, NULL);
795ee30648c708 Dan Williams 2019-06-13 105 }
795ee30648c708 Dan Williams 2019-06-13 106
3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 107 /**
3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 108 * gen_pool_add - add a new chunk of special memory to the pool
3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 109 * @pool: pool to add new memory chunk to
3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 110 * @addr: starting address of memory chunk to add to pool
3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 111 * @size: size in bytes of the memory chunk to add to pool
3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 112 * @nid: node id of the node the chunk structure and bitmap should be
3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 113 * allocated on, or -1
3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 114 *
3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 115 * Add a new chunk of special memory to the specified pool.
3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 116 *
3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 117 * Returns 0 on success or a -ve errno on failure.
3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 118 */
3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 119 static inline int gen_pool_add(struct gen_pool *pool, unsigned long addr,
3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 120 size_t size, int nid)
3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 121 {
3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 122 return gen_pool_add_virt(pool, addr, -1, size, nid);
3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 123 }
322acc96d4bd3d Steve Wise 2006-10-02 124 extern void gen_pool_destroy(struct gen_pool *);
795ee30648c708 Dan Williams 2019-06-13 125 unsigned long gen_pool_alloc_algo_owner(struct gen_pool *pool, size_t size,
795ee30648c708 Dan Williams 2019-06-13 126 genpool_algo_t algo, void *data, void **owner);
795ee30648c708 Dan Williams 2019-06-13 127
795ee30648c708 Dan Williams 2019-06-13 128 static inline unsigned long gen_pool_alloc_owner(struct gen_pool *pool,
795ee30648c708 Dan Williams 2019-06-13 129 size_t size, void **owner)
795ee30648c708 Dan Williams 2019-06-13 130 {
795ee30648c708 Dan Williams 2019-06-13 131 return gen_pool_alloc_algo_owner(pool, size, pool->algo, pool->data,
795ee30648c708 Dan Williams 2019-06-13 132 owner);
795ee30648c708 Dan Williams 2019-06-13 133 }
795ee30648c708 Dan Williams 2019-06-13 134
795ee30648c708 Dan Williams 2019-06-13 135 static inline unsigned long gen_pool_alloc_algo(struct gen_pool *pool,
795ee30648c708 Dan Williams 2019-06-13 136 size_t size, genpool_algo_t algo, void *data)
795ee30648c708 Dan Williams 2019-06-13 137 {
795ee30648c708 Dan Williams 2019-06-13 @138 return gen_pool_alloc_algo_owner(pool, size, algo, data, NULL);
795ee30648c708 Dan Williams 2019-06-13 139 }
795ee30648c708 Dan Williams 2019-06-13 140
795ee30648c708 Dan Williams 2019-06-13 141 /**
795ee30648c708 Dan Williams 2019-06-13 142 * gen_pool_alloc - allocate special memory from the pool
795ee30648c708 Dan Williams 2019-06-13 143 * @pool: pool to allocate from
795ee30648c708 Dan Williams 2019-06-13 144 * @size: number of bytes to allocate from the pool
795ee30648c708 Dan Williams 2019-06-13 145 *
795ee30648c708 Dan Williams 2019-06-13 146 * Allocate the requested number of bytes from the specified pool.
795ee30648c708 Dan Williams 2019-06-13 147 * Uses the pool allocation function (with first-fit algorithm by default).
795ee30648c708 Dan Williams 2019-06-13 148 * Can not be used in NMI handler on architectures without
795ee30648c708 Dan Williams 2019-06-13 149 * NMI-safe cmpxchg implementation.
795ee30648c708 Dan Williams 2019-06-13 150 */
795ee30648c708 Dan Williams 2019-06-13 151 static inline unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size)
795ee30648c708 Dan Williams 2019-06-13 152 {
795ee30648c708 Dan Williams 2019-06-13 153 return gen_pool_alloc_algo(pool, size, pool->algo, pool->data);
795ee30648c708 Dan Williams 2019-06-13 154 }
795ee30648c708 Dan Williams 2019-06-13 155
684f0d3d14f274 Nicolin Chen 2013-11-12 156 extern void *gen_pool_dma_alloc(struct gen_pool *pool, size_t size,
684f0d3d14f274 Nicolin Chen 2013-11-12 157 dma_addr_t *dma);
cf394fc5f7155c Fredrik Noring 2019-06-25 158 extern void *gen_pool_dma_alloc_algo(struct gen_pool *pool, size_t size,
cf394fc5f7155c Fredrik Noring 2019-06-25 159 dma_addr_t *dma, genpool_algo_t algo, void *data);
cf394fc5f7155c Fredrik Noring 2019-06-25 160 extern void *gen_pool_dma_alloc_align(struct gen_pool *pool, size_t size,
cf394fc5f7155c Fredrik Noring 2019-06-25 161 dma_addr_t *dma, int align);
cf394fc5f7155c Fredrik Noring 2019-06-25 162 extern void *gen_pool_dma_zalloc(struct gen_pool *pool, size_t size, dma_addr_t *dma);
cf394fc5f7155c Fredrik Noring 2019-06-25 163 extern void *gen_pool_dma_zalloc_algo(struct gen_pool *pool, size_t size,
cf394fc5f7155c Fredrik Noring 2019-06-25 164 dma_addr_t *dma, genpool_algo_t algo, void *data);
cf394fc5f7155c Fredrik Noring 2019-06-25 165 extern void *gen_pool_dma_zalloc_align(struct gen_pool *pool, size_t size,
cf394fc5f7155c Fredrik Noring 2019-06-25 166 dma_addr_t *dma, int align);
795ee30648c708 Dan Williams 2019-06-13 167 extern void gen_pool_free_owner(struct gen_pool *pool, unsigned long addr,
795ee30648c708 Dan Williams 2019-06-13 168 size_t size, void **owner);
795ee30648c708 Dan Williams 2019-06-13 169 static inline void gen_pool_free(struct gen_pool *pool, unsigned long addr,
795ee30648c708 Dan Williams 2019-06-13 170 size_t size)
795ee30648c708 Dan Williams 2019-06-13 171 {
795ee30648c708 Dan Williams 2019-06-13 @172 gen_pool_free_owner(pool, addr, size, NULL);
795ee30648c708 Dan Williams 2019-06-13 173 }
795ee30648c708 Dan Williams 2019-06-13 174
:::::: The code at line 104 was first introduced by commit
:::::: 795ee30648c708502da9df637f83c33361d68dcc lib/genalloc: introduce chunk owners
:::::: TO: Dan Williams <dan.j.williams(a)intel.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH v3 3/3] media: v4l: xilinx: Add Xilinx UHD-SDI Rx Subsystem driver
by kernel test robot
Hi Vishal,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on robh/for-next v5.8-rc1 next-20200618]
[cannot apply to xlnx/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Vishal-Sagar/Add-support-for-Xil...
base: git://linuxtv.org/media_tree.git master
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# 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 errors (new ones prefixed by >>):
vim +/irqreturn_t +1113 drivers/media/platform/xilinx/xilinx-sdirxss.c
1103
1104 /**
1105 * xsdirxss_irq_handler - Interrupt handler for SDI Rx
1106 * @irq: IRQ number
1107 * @dev_id: Pointer to device state
1108 *
1109 * The SDI Rx interrupts are cleared by writing 1 to corresponding bit.
1110 *
1111 * Return: IRQ_HANDLED after handling interrupts
1112 */
> 1113 static irqreturn_t xsdirxss_irq_handler(int irq, void *dev_id)
1114 {
1115 struct xsdirxss_state *state = (struct xsdirxss_state *)dev_id;
1116 struct device *dev = state->dev;
1117 u32 status;
1118
1119 status = xsdirxss_read(state, XSDIRX_ISR_REG);
1120 xsdirxss_write(state, XSDIRX_ISR_REG, status);
1121 dev_dbg(dev, "interrupt status = 0x%08x\n", status);
1122
1123 if (!status)
> 1124 return IRQ_NONE;
1125
1126 if (status & XSDIRX_INTR_VIDLOCK_MASK ||
1127 status & XSDIRX_INTR_VIDUNLOCK_MASK) {
1128 u32 val1, val2;
1129 struct v4l2_event event = { 0 };
1130 unsigned long flags;
1131
1132 dev_dbg(dev, "video lock/unlock interrupt\n");
1133
1134 spin_lock_irqsave(&state->slock, flags);
1135 xsdirx_streamflow_control(state, false);
1136
1137 val1 = xsdirxss_read(state, XSDIRX_MODE_DET_STAT_REG);
1138 val2 = xsdirxss_read(state, XSDIRX_TS_DET_STAT_REG);
1139
1140 if ((val1 & XSDIRX_MODE_DET_STAT_MODE_LOCK_MASK) &&
1141 (val2 & XSDIRX_TS_DET_STAT_LOCKED_MASK)) {
1142 u32 mask = XSDIRX_RST_CTRL_RST_CRC_ERRCNT_MASK |
1143 XSDIRX_RST_CTRL_RST_EDH_ERRCNT_MASK;
1144
1145 dev_dbg(dev, "video lock interrupt\n");
1146
1147 xsdirxss_set(state, XSDIRX_RST_CTRL_REG, mask);
1148 xsdirxss_clr(state, XSDIRX_RST_CTRL_REG, mask);
1149
1150 val1 = xsdirxss_read(state, XSDIRX_ST352_VALID_REG);
1151 val2 = xsdirxss_read(state, XSDIRX_ST352_DS1_REG);
1152
1153 dev_dbg(dev, "valid st352 mask = 0x%08x\n", val1);
1154 dev_dbg(dev, "st352 payload = 0x%08x\n", val2);
1155
1156 if (!xsdirx_get_stream_properties(state)) {
1157 state->vidlocked = true;
1158 xsdirxss_set_gtclk(state);
1159 } else {
1160 dev_err(dev, "Unable to get stream properties!\n");
1161 state->vidlocked = false;
1162 }
1163 } else {
1164 dev_dbg(dev, "video unlock interrupt\n");
1165 state->vidlocked = false;
1166 }
1167 spin_unlock_irqrestore(&state->slock, flags);
1168
1169 event.type = V4L2_EVENT_SOURCE_CHANGE;
1170 event.u.src_change.changes = V4L2_EVENT_SRC_CH_RESOLUTION;
1171 v4l2_subdev_notify_event(&state->subdev, &event);
1172 }
1173
1174 if (status & (XSDIRX_INTR_UNDERFLOW_MASK | XSDIRX_INTR_OVERFLOW_MASK)) {
1175 struct v4l2_event event = { 0 };
1176
1177 dev_dbg(dev, "Video in to AXI4 Stream core under/overflow interrupt\n");
1178
1179 event.type = V4L2_EVENT_XILINX_SDIRX_UND_OVR_FLOW;
1180 if (status & XSDIRX_INTR_UNDERFLOW_MASK)
1181 event.u.data[0] = XILINX_SDIRX_UNDERFLOW_EVENT;
1182 if (status & XSDIRX_INTR_OVERFLOW_MASK)
1183 event.u.data[0] = XILINX_SDIRX_OVERFLOW_EVENT;
1184
1185 v4l2_subdev_notify_event(&state->subdev, &event);
1186 }
> 1187 return IRQ_HANDLED;
1188 }
1189
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months