Re: [RFC V2 09/21] rv/monitor: wip instrumentation and Makefile/Kconfig entries
by kernel test robot
Hi Daniel,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on rostedt-trace/for-next]
[also build test WARNING on lwn/docs-next linus/master v5.17-rc4 next-20220214]
[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/Daniel-Bristot-de-Oliveira/The-R...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git for-next
config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20220215/202202150429.Rn1Sp6Xo-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
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/d19976adc824ba2162ba4c5690e0a2f2a...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Daniel-Bristot-de-Oliveira/The-Runtime-Verification-RV-interface/20220214-193144
git checkout d19976adc824ba2162ba4c5690e0a2f2aba219a6
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash kernel/trace/rv/
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 >>):
>> kernel/trace/rv/monitor_wip/wip.c:23:1: warning: no previous prototype for function 'model_get_state_name_wip' [-Wmissing-prototypes]
DECLARE_DA_MON_PER_CPU(wip, char);
^
include/rv/da_monitor.h:374:11: note: expanded from macro 'DECLARE_DA_MON_PER_CPU'
\
^
include/rv/automata.h:18:7: note: expanded from macro '\
DECLARE_AUTOMATA_HELPERS'
char *model_get_state_name_##name(enum states_##name state) \
^
<scratch space>:86:1: note: expanded from here
model_get_state_name_wip
^
kernel/trace/rv/monitor_wip/wip.c:23:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
include/rv/da_monitor.h:374:11: note: expanded from macro 'DECLARE_DA_MON_PER_CPU'
\
^
include/rv/automata.h:17:11: note: expanded from macro '\
DECLARE_AUTOMATA_HELPERS'
\
^
>> kernel/trace/rv/monitor_wip/wip.c:23:1: warning: no previous prototype for function 'model_get_event_name_wip' [-Wmissing-prototypes]
DECLARE_DA_MON_PER_CPU(wip, char);
^
include/rv/da_monitor.h:374:11: note: expanded from macro 'DECLARE_DA_MON_PER_CPU'
\
^
include/rv/automata.h:23:7: note: expanded from macro '\
DECLARE_AUTOMATA_HELPERS'
char *model_get_event_name_##name(enum events_##name event) \
^
<scratch space>:89:1: note: expanded from here
model_get_event_name_wip
^
kernel/trace/rv/monitor_wip/wip.c:23:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
include/rv/da_monitor.h:374:11: note: expanded from macro 'DECLARE_DA_MON_PER_CPU'
\
^
include/rv/automata.h:22:11: note: expanded from macro '\
DECLARE_AUTOMATA_HELPERS'
\
^
>> kernel/trace/rv/monitor_wip/wip.c:23:1: warning: no previous prototype for function 'da_get_monitor_wip' [-Wmissing-prototypes]
DECLARE_DA_MON_PER_CPU(wip, char);
^
include/rv/da_monitor.h:380:11: note: expanded from macro 'DECLARE_DA_MON_PER_CPU'
\
^
include/rv/da_monitor.h:172:20: note: expanded from macro '\
DECLARE_DA_MON_INIT_PER_CPU'
struct da_monitor *da_get_monitor_##name(void) \
^
<scratch space>:126:1: note: expanded from here
da_get_monitor_wip
^
kernel/trace/rv/monitor_wip/wip.c:23:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
include/rv/da_monitor.h:380:11: note: expanded from macro 'DECLARE_DA_MON_PER_CPU'
\
^
include/rv/da_monitor.h:171:11: note: expanded from macro '\
DECLARE_DA_MON_INIT_PER_CPU'
\
^
>> kernel/trace/rv/monitor_wip/wip.c:23:1: warning: no previous prototype for function 'da_monitor_reset_all_wip' [-Wmissing-prototypes]
DECLARE_DA_MON_PER_CPU(wip, char);
^
include/rv/da_monitor.h:380:11: note: expanded from macro 'DECLARE_DA_MON_PER_CPU'
\
^
include/rv/da_monitor.h:177:6: note: expanded from macro '\
DECLARE_DA_MON_INIT_PER_CPU'
void da_monitor_reset_all_##name(void) \
^
<scratch space>:128:1: note: expanded from here
da_monitor_reset_all_wip
^
kernel/trace/rv/monitor_wip/wip.c:23:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
include/rv/da_monitor.h:380:11: note: expanded from macro 'DECLARE_DA_MON_PER_CPU'
\
^
include/rv/da_monitor.h:176:11: note: expanded from macro '\
DECLARE_DA_MON_INIT_PER_CPU'
\
^
>> kernel/trace/rv/monitor_wip/wip.c:36:6: warning: no previous prototype for function 'handle_preempt_disable' [-Wmissing-prototypes]
void handle_preempt_disable(void *data, unsigned long ip, unsigned long parent_ip)
^
kernel/trace/rv/monitor_wip/wip.c:36:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void handle_preempt_disable(void *data, unsigned long ip, unsigned long parent_ip)
^
static
>> kernel/trace/rv/monitor_wip/wip.c:41:6: warning: no previous prototype for function 'handle_preempt_enable' [-Wmissing-prototypes]
void handle_preempt_enable(void *data, unsigned long ip, unsigned long parent_ip)
^
kernel/trace/rv/monitor_wip/wip.c:41:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void handle_preempt_enable(void *data, unsigned long ip, unsigned long parent_ip)
^
static
>> kernel/trace/rv/monitor_wip/wip.c:46:6: warning: no previous prototype for function 'handle_sched_waking' [-Wmissing-prototypes]
void handle_sched_waking(void *data, struct task_struct *task)
^
kernel/trace/rv/monitor_wip/wip.c:46:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void handle_sched_waking(void *data, struct task_struct *task)
^
static
>> kernel/trace/rv/monitor_wip/wip.c:105:5: warning: no previous prototype for function 'register_wip' [-Wmissing-prototypes]
int register_wip(void)
^
kernel/trace/rv/monitor_wip/wip.c:105:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int register_wip(void)
^
static
>> kernel/trace/rv/monitor_wip/wip.c:111:6: warning: no previous prototype for function 'unregister_wip' [-Wmissing-prototypes]
void unregister_wip(void)
^
kernel/trace/rv/monitor_wip/wip.c:111:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void unregister_wip(void)
^
static
kernel/trace/rv/monitor_wip/wip.c:23:1: warning: unused function 'da_handle_init_run_event_wip' [-Wunused-function]
DECLARE_DA_MON_PER_CPU(wip, char);
^
include/rv/da_monitor.h:382:11: note: expanded from macro 'DECLARE_DA_MON_PER_CPU'
\
^
include/rv/da_monitor.h:285:20: note: expanded from macro '\
DECLARE_DA_MON_MONITOR_HANDLER_IMPLICIT'
static inline bool da_handle_init_run_event_##name(enum events_##name event) \
^
<scratch space>:152:1: note: expanded from here
da_handle_init_run_event_wip
^
10 warnings generated.
vim +/model_get_state_name_wip +23 kernel/trace/rv/monitor_wip/wip.c
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 16
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 17 /*
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 18 * Declare the deterministic automata monitor.
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 19 *
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 20 * The rv monitor reference is needed for the monitor declaration.
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 21 */
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 22 struct rv_monitor rv_wip;
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 @23 DECLARE_DA_MON_PER_CPU(wip, char);
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 24
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 25 #define CREATE_TRACE_POINTS
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 26 #include "wip.h"
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 27
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 28 /*
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 29 * This is the instrumentation part of the monitor.
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 30 *
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 31 * This is the section where manual work is required. Here the kernel events
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 32 * are translated into model's event.
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 33 *
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 34 */
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 35
d19976adc824ba Daniel Bristot de Oliveira 2022-02-14 @36 void handle_preempt_disable(void *data, unsigned long ip, unsigned long parent_ip)
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 37 {
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 38 da_handle_event_wip(preempt_disable);
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 39 }
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 40
d19976adc824ba Daniel Bristot de Oliveira 2022-02-14 @41 void handle_preempt_enable(void *data, unsigned long ip, unsigned long parent_ip)
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 42 {
d19976adc824ba Daniel Bristot de Oliveira 2022-02-14 43 da_handle_init_event_wip(preempt_enable);
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 44 }
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 45
d19976adc824ba Daniel Bristot de Oliveira 2022-02-14 @46 void handle_sched_waking(void *data, struct task_struct *task)
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 47 {
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 48 da_handle_event_wip(sched_waking);
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 49 }
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 50
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 51 #define NR_TP 3
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 52 static struct tracepoint_hook_helper tracepoints_to_hook[NR_TP] = {
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 53 {
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 54 .probe = handle_preempt_disable,
d19976adc824ba Daniel Bristot de Oliveira 2022-02-14 55 .name = "preempt_disable",
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 56 .registered = 0
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 57 },
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 58 {
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 59 .probe = handle_preempt_enable,
d19976adc824ba Daniel Bristot de Oliveira 2022-02-14 60 .name = "preempt_enable",
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 61 .registered = 0
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 62 },
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 63 {
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 64 .probe = handle_sched_waking,
d19976adc824ba Daniel Bristot de Oliveira 2022-02-14 65 .name = "sched_wakeup",
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 66 .registered = 0
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 67 },
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 68 };
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 69
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 70 static int start_wip(void)
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 71 {
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 72 int retval;
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 73
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 74 da_monitor_init_wip();
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 75
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 76 retval = thh_hook_probes(tracepoints_to_hook, NR_TP);
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 77 if (retval)
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 78 goto out_err;
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 79
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 80 return 0;
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 81
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 82 out_err:
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 83 return -EINVAL;
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 84 }
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 85
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 86 static void stop_wip(void)
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 87 {
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 88 rv_wip.enabled = 0;
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 89 thh_unhook_probes(tracepoints_to_hook, NR_TP);
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 90 return;
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 91 }
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 92
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 93 /*
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 94 * This is the monitor register section.
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 95 */
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 96 struct rv_monitor rv_wip = {
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 97 .name = "wip",
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 98 .description = "auto-generated wip",
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 99 .start = start_wip,
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 100 .stop = stop_wip,
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 101 .reset = da_monitor_reset_all_wip,
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 102 .enabled = 0,
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 103 };
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 104
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 @105 int register_wip(void)
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 106 {
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 107 rv_register_monitor(&rv_wip);
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 108 return 0;
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 109 }
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 110
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 @111 void unregister_wip(void)
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 112 {
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 113 if (rv_wip.enabled)
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 114 stop_wip();
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 115
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 116 rv_unregister_monitor(&rv_wip);
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 117 }
66e3ae1a584a3c Daniel Bristot de Oliveira 2022-02-14 118
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
drivers/thermal/intel/int340x_thermal/processor_thermal_rapl.c:96:50: sparse: sparse: cast removes address space '__iomem' of expression
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 754e0b0e35608ed5206d6a67a791563c631cec07
commit: a5923b6c3137b9d4fc2ea1c997f6e4d51ac5d774 thermal: int340x: processor_thermal: Refactor MMIO interface
date: 1 year, 2 months ago
config: x86_64-randconfig-s022-20220214 (https://download.01.org/0day-ci/archive/20220215/202202150359.0tDKN8pA-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a5923b6c3137b9d4fc2ea1c997f6e4d51ac5d774
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/platform/pvh/ drivers/gpio/ drivers/mailbox/ drivers/media/cec/platform/meson/ drivers/media/cec/platform/tegra/ drivers/media/rc/ drivers/pwm/ drivers/regulator/ drivers/spi/ drivers/thermal/intel/int340x_thermal/ drivers/usb/gadget/udc/ kernel/sched/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/thermal/intel/int340x_thermal/processor_thermal_rapl.c:96:50: sparse: sparse: cast removes address space '__iomem' of expression
drivers/thermal/intel/int340x_thermal/processor_thermal_rapl.c:100:36: sparse: sparse: cast removes address space '__iomem' of expression
vim +/__iomem +96 drivers/thermal/intel/int340x_thermal/processor_thermal_rapl.c
81
82 int proc_thermal_rapl_add(struct pci_dev *pdev, struct proc_thermal_device *proc_priv)
83 {
84 const struct rapl_mmio_regs *rapl_regs = &rapl_mmio_default;
85 enum rapl_domain_reg_id reg;
86 enum rapl_domain_type domain;
87 int ret;
88
89 if (!rapl_regs)
90 return 0;
91
92 for (domain = RAPL_DOMAIN_PACKAGE; domain < RAPL_DOMAIN_MAX; domain++) {
93 for (reg = RAPL_DOMAIN_REG_LIMIT; reg < RAPL_DOMAIN_REG_MAX; reg++)
94 if (rapl_regs->regs[domain][reg])
95 rapl_mmio_priv.regs[domain][reg] =
> 96 (u64)proc_priv->mmio_base +
97 rapl_regs->regs[domain][reg];
98 rapl_mmio_priv.limits[domain] = rapl_regs->limits[domain];
99 }
100 rapl_mmio_priv.reg_unit = (u64)proc_priv->mmio_base + rapl_regs->reg_unit;
101
102 rapl_mmio_priv.read_raw = rapl_mmio_read_raw;
103 rapl_mmio_priv.write_raw = rapl_mmio_write_raw;
104
105 rapl_mmio_priv.control_type = powercap_register_control_type(NULL, "intel-rapl-mmio", NULL);
106 if (IS_ERR(rapl_mmio_priv.control_type)) {
107 pr_debug("failed to register powercap control_type.\n");
108 return PTR_ERR(rapl_mmio_priv.control_type);
109 }
110
111 ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "powercap/rapl:online",
112 rapl_mmio_cpu_online, rapl_mmio_cpu_down_prep);
113 if (ret < 0) {
114 powercap_unregister_control_type(rapl_mmio_priv.control_type);
115 rapl_mmio_priv.control_type = NULL;
116 return ret;
117 }
118 rapl_mmio_priv.pcap_rapl_online = ret;
119
120 return 0;
121 }
122 EXPORT_SYMBOL_GPL(proc_thermal_rapl_add);
123
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
Re: [PATCH V6] panic: Move panic_print before kmsg dumpers
by kernel test robot
Hi "Guilherme,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on next-20220214]
[cannot apply to linux/master linus/master v5.17-rc4 v5.17-rc3 v5.17-rc2 v5.17-rc4]
[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/Guilherme-G-Piccoli/panic-Move-p...
base: 259cbfc98c55ba3b6ef6e61fb7cfc3751dfded1e
config: ia64-defconfig (https://download.01.org/0day-ci/archive/20220215/202202150334.b9k0EXqB-lk...)
compiler: ia64-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/b27c506d04cb0a186f4719397e43e3755...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Guilherme-G-Piccoli/panic-Move-panic_print-before-kmsg-dumpers/20220214-221740
git checkout b27c506d04cb0a186f4719397e43e3755e3dbe90
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=ia64 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 >>):
kernel/panic.c: In function 'panic':
>> kernel/panic.c:265:17: error: too few arguments to function 'panic_print_sys_info'
265 | panic_print_sys_info();
| ^~~~~~~~~~~~~~~~~~~~
kernel/panic.c:151:13: note: declared here
151 | static void panic_print_sys_info(bool console_flush)
| ^~~~~~~~~~~~~~~~~~~~
kernel/panic.c: In function '__warn':
kernel/panic.c:598:17: warning: function '__warn' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
598 | vprintk(args->fmt, args->args);
| ^~~~~~~
vim +/panic_print_sys_info +265 kernel/panic.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 252
7d92bda271ddcb Douglas Anderson 2019-09-25 253 /*
7d92bda271ddcb Douglas Anderson 2019-09-25 254 * If kgdb is enabled, give it a chance to run before we stop all
7d92bda271ddcb Douglas Anderson 2019-09-25 255 * the other CPUs or else we won't be able to debug processes left
7d92bda271ddcb Douglas Anderson 2019-09-25 256 * running on them.
7d92bda271ddcb Douglas Anderson 2019-09-25 257 */
7d92bda271ddcb Douglas Anderson 2019-09-25 258 kgdb_panic(buf);
7d92bda271ddcb Douglas Anderson 2019-09-25 259
a681283c7052f3 Guilherme G. Piccoli 2022-02-12 260 /*
a681283c7052f3 Guilherme G. Piccoli 2022-02-12 261 * If we have a kdump kernel loaded, give a chance to panic_print
a681283c7052f3 Guilherme G. Piccoli 2022-02-12 262 * show some extra information on kernel log if it was set...
a681283c7052f3 Guilherme G. Piccoli 2022-02-12 263 */
a681283c7052f3 Guilherme G. Piccoli 2022-02-12 264 if (kexec_crash_loaded())
a681283c7052f3 Guilherme G. Piccoli 2022-02-12 @265 panic_print_sys_info();
a681283c7052f3 Guilherme G. Piccoli 2022-02-12 266
dc009d92435f99 Eric W. Biederman 2005-06-25 267 /*
dc009d92435f99 Eric W. Biederman 2005-06-25 268 * If we have crashed and we have a crash kernel loaded let it handle
dc009d92435f99 Eric W. Biederman 2005-06-25 269 * everything else.
f06e5153f4ae2e Masami Hiramatsu 2014-06-06 270 * If we want to run this after calling panic_notifiers, pass
f06e5153f4ae2e Masami Hiramatsu 2014-06-06 271 * the "crash_kexec_post_notifiers" option to the kernel.
7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 272 *
7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 273 * Bypass the panic_cpu check and call __crash_kexec directly.
dc009d92435f99 Eric W. Biederman 2005-06-25 274 */
b26e27ddfd2a98 Hidehiro Kawai 2016-08-02 275 if (!_crash_kexec_post_notifiers) {
7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 276 __crash_kexec(NULL);
dc009d92435f99 Eric W. Biederman 2005-06-25 277
dc009d92435f99 Eric W. Biederman 2005-06-25 278 /*
dc009d92435f99 Eric W. Biederman 2005-06-25 279 * Note smp_send_stop is the usual smp shutdown function, which
0ee59413c967c3 Hidehiro Kawai 2016-10-11 280 * unfortunately means it may not be hardened to work in a
0ee59413c967c3 Hidehiro Kawai 2016-10-11 281 * panic situation.
dc009d92435f99 Eric W. Biederman 2005-06-25 282 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 283 smp_send_stop();
0ee59413c967c3 Hidehiro Kawai 2016-10-11 284 } else {
0ee59413c967c3 Hidehiro Kawai 2016-10-11 285 /*
0ee59413c967c3 Hidehiro Kawai 2016-10-11 286 * If we want to do crash dump after notifier calls and
0ee59413c967c3 Hidehiro Kawai 2016-10-11 287 * kmsg_dump, we will need architecture dependent extra
0ee59413c967c3 Hidehiro Kawai 2016-10-11 288 * works in addition to stopping other CPUs.
0ee59413c967c3 Hidehiro Kawai 2016-10-11 289 */
0ee59413c967c3 Hidehiro Kawai 2016-10-11 290 crash_smp_send_stop();
0ee59413c967c3 Hidehiro Kawai 2016-10-11 291 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 292
6723734cdff152 Kees Cook 2013-09-11 293 /*
6723734cdff152 Kees Cook 2013-09-11 294 * Run any panic handlers, including those that might need to
6723734cdff152 Kees Cook 2013-09-11 295 * add information to the kmsg dump output.
6723734cdff152 Kees Cook 2013-09-11 296 */
e041c683412d5b Alan Stern 2006-03-27 297 atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
^1da177e4c3f41 Linus Torvalds 2005-04-16 298
b27c506d04cb0a Guilherme G. Piccoli 2022-02-14 299 panic_print_sys_info(false);
b27c506d04cb0a Guilherme G. Piccoli 2022-02-14 300
6723734cdff152 Kees Cook 2013-09-11 301 kmsg_dump(KMSG_DUMP_PANIC);
6723734cdff152 Kees Cook 2013-09-11 302
f06e5153f4ae2e Masami Hiramatsu 2014-06-06 303 /*
f06e5153f4ae2e Masami Hiramatsu 2014-06-06 304 * If you doubt kdump always works fine in any situation,
f06e5153f4ae2e Masami Hiramatsu 2014-06-06 305 * "crash_kexec_post_notifiers" offers you a chance to run
f06e5153f4ae2e Masami Hiramatsu 2014-06-06 306 * panic_notifiers and dumping kmsg before kdump.
f06e5153f4ae2e Masami Hiramatsu 2014-06-06 307 * Note: since some panic_notifiers can make crashed kernel
f06e5153f4ae2e Masami Hiramatsu 2014-06-06 308 * more unstable, it can increase risks of the kdump failure too.
7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 309 *
7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 310 * Bypass the panic_cpu check and call __crash_kexec directly.
f06e5153f4ae2e Masami Hiramatsu 2014-06-06 311 */
b26e27ddfd2a98 Hidehiro Kawai 2016-08-02 312 if (_crash_kexec_post_notifiers)
7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 313 __crash_kexec(NULL);
f06e5153f4ae2e Masami Hiramatsu 2014-06-06 314
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
Re: [PATCH] fpga: microsemi-spi: add Microsemi FPGA manager
by kernel test robot
Hi Ivan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.17-rc4 next-20220214]
[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/Ivan-Bornyakov/fpga-microsemi-sp...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 754e0b0e35608ed5206d6a67a791563c631cec07
config: h8300-allyesconfig (https://download.01.org/0day-ci/archive/20220215/202202150337.lVXXx685-lk...)
compiler: h8300-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/19d9c174f03a9b8387ba654d558351cac...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ivan-Bornyakov/fpga-microsemi-spi-add-Microsemi-FPGA-manager/20220214-222923
git checkout 19d9c174f03a9b8387ba654d558351cac9d63d24
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=h8300 SHELL=/bin/bash drivers/fpga/
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 >>):
In file included from include/linux/build_bug.h:5,
from include/linux/container_of.h:5,
from include/linux/list.h:5,
from include/linux/module.h:12,
from drivers/fpga/microsemi-spi.c:6:
include/linux/scatterlist.h: In function 'sg_set_buf':
include/asm-generic/page.h:89:51: warning: ordered comparison of pointer with null pointer [-Wextra]
89 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
| ^~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:160:9: note: in expansion of macro 'BUG_ON'
160 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:160:17: note: in expansion of macro 'virt_addr_valid'
160 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from include/linux/device.h:15,
from include/linux/spi/spi.h:10,
from drivers/fpga/microsemi-spi.c:7:
drivers/fpga/microsemi-spi.c: In function 'microsemi_fpga_ops_write':
drivers/fpga/microsemi-spi.c:244:30: warning: format '%d' expects argument of type 'int', but argument 3 has type 'ssize_t' {aka 'long int'} [-Wformat=]
244 | dev_err(dev, "Failed to find bitstream start %d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/fpga/microsemi-spi.c:244:17: note: in expansion of macro 'dev_err'
244 | dev_err(dev, "Failed to find bitstream start %d\n",
| ^~~~~~~
drivers/fpga/microsemi-spi.c:244:63: note: format string is defined here
244 | dev_err(dev, "Failed to find bitstream start %d\n",
| ~^
| |
| int
| %ld
In file included from include/linux/device.h:15,
from include/linux/spi/spi.h:10,
from drivers/fpga/microsemi-spi.c:7:
drivers/fpga/microsemi-spi.c:252:30: warning: format '%d' expects argument of type 'int', but argument 3 has type 'ssize_t' {aka 'long int'} [-Wformat=]
252 | dev_err(dev, "Failed to parse bitstream size %d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/fpga/microsemi-spi.c:252:17: note: in expansion of macro 'dev_err'
252 | dev_err(dev, "Failed to parse bitstream size %d\n",
| ^~~~~~~
drivers/fpga/microsemi-spi.c:252:63: note: format string is defined here
252 | dev_err(dev, "Failed to parse bitstream size %d\n",
| ~^
| |
| int
| %ld
In file included from include/linux/device.h:15,
from include/linux/spi/spi.h:10,
from drivers/fpga/microsemi-spi.c:7:
drivers/fpga/microsemi-spi.c:260:25: warning: format '%d' expects argument of type 'int', but argument 3 has type 'ssize_t' {aka 'long int'} [-Wformat=]
260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/fpga/microsemi-spi.c:259:17: note: in expansion of macro 'dev_err'
259 | dev_err(dev,
| ^~~~~~~
drivers/fpga/microsemi-spi.c:260:70: note: format string is defined here
260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n",
| ~^
| |
| int
| %ld
In file included from include/linux/device.h:15,
from include/linux/spi/spi.h:10,
from drivers/fpga/microsemi-spi.c:7:
>> drivers/fpga/microsemi-spi.c:260:25: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat=]
260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/fpga/microsemi-spi.c:259:17: note: in expansion of macro 'dev_err'
259 | dev_err(dev,
| ^~~~~~~
drivers/fpga/microsemi-spi.c:260:89: note: format string is defined here
260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n",
| ~^
| |
| int
| %ld
In file included from include/linux/device.h:15,
from include/linux/spi/spi.h:10,
from drivers/fpga/microsemi-spi.c:7:
drivers/fpga/microsemi-spi.c:260:25: warning: format '%d' expects argument of type 'int', but argument 5 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/fpga/microsemi-spi.c:259:17: note: in expansion of macro 'dev_err'
259 | dev_err(dev,
| ^~~~~~~
drivers/fpga/microsemi-spi.c:260:107: note: format string is defined here
260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n",
| ~^
| |
| int
| %ld
In file included from include/linux/device.h:15,
from include/linux/spi/spi.h:10,
from drivers/fpga/microsemi-spi.c:7:
drivers/fpga/microsemi-spi.c:274:33: warning: format '%d' expects argument of type 'int', but argument 4 has type 'ssize_t' {aka 'long int'} [-Wformat=]
274 | "Failed to write bitstream frame number %d of %d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/fpga/microsemi-spi.c:273:25: note: in expansion of macro 'dev_err'
273 | dev_err(dev,
| ^~~~~~~
drivers/fpga/microsemi-spi.c:274:80: note: format string is defined here
274 | "Failed to write bitstream frame number %d of %d\n",
| ~^
| |
| int
| %ld
vim +260 drivers/fpga/microsemi-spi.c
225
226 static int microsemi_fpga_ops_write(struct fpga_manager *mgr, const char *buf,
227 size_t count)
228 {
229 ssize_t bitstream_start = 0, bitstream_size;
230 struct microsemi_fpga_priv *priv = mgr->priv;
231 struct spi_device *spi = priv->spi;
232 struct device *dev = &mgr->dev;
233 u8 tmp_buf[SPI_FRAME_SIZE + 1];
234 int ret, i;
235
236 if (crc_ccitt(0, buf, count)) {
237 dev_err(dev, "CRC error\n");
238
239 return -EINVAL;
240 }
241
242 bitstream_start = lookup_block_start(BITSTREAM_ID, buf, count);
243 if (bitstream_start < 0) {
244 dev_err(dev, "Failed to find bitstream start %d\n",
245 bitstream_start);
246
247 return bitstream_start;
248 }
249
250 bitstream_size = parse_bitstream_size(buf, count);
251 if (bitstream_size < 0) {
252 dev_err(dev, "Failed to parse bitstream size %d\n",
253 bitstream_size);
254
255 return bitstream_size;
256 }
257
258 if (bitstream_start + bitstream_size * SPI_FRAME_SIZE > count) {
259 dev_err(dev,
> 260 "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n",
261 bitstream_start, bitstream_size * SPI_FRAME_SIZE, count);
262
263 return -EFAULT;
264 }
265
266 for (i = 0; i < bitstream_size; i++) {
267 tmp_buf[0] = SPI_FRAME;
268 memcpy(tmp_buf + 1, buf + bitstream_start + i * SPI_FRAME_SIZE,
269 SPI_FRAME_SIZE);
270
271 ret = microsemi_spi_write(spi, tmp_buf, sizeof(tmp_buf));
272 if (ret) {
273 dev_err(dev,
274 "Failed to write bitstream frame number %d of %d\n",
275 i, bitstream_size);
276
277 return ret;
278 }
279 }
280
281 return 0;
282 }
283
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
Re: [PATCH v1 2/2] serial: sh-sci: Switch to use dev_err_probe_ptr()
by kernel test robot
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on tty/tty-testing]
[also build test ERROR on usb/usb-testing linux/master linus/master v5.17-rc4 next-20220214]
[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/Andy-Shevchenko/driver-core-add-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: hexagon-buildonly-randconfig-r001-20220214 (https://download.01.org/0day-ci/archive/20220215/202202150314.3Ybl4jns-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
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/810910d324cc80b092207d043651de696...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/driver-core-add-a-wrapper-to-device-probe-log-helper-to-return-pointer/20220214-223425
git checkout 810910d324cc80b092207d043651de696d293cbd
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/tty/serial/
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/tty/serial/sh-sci.c:3205:83: error: too few arguments to function call, expected 4, have 3
return dev_err_probe_ptr(&pdev->dev, PTR_ERR(rstc), "failed to get reset ctrl\n");
~~~~~~~~~~~~~~~~~ ^
include/linux/device.h:988:7: note: 'dev_err_probe_ptr' declared here
void *dev_err_probe_ptr(const struct device *dev, int err, const char *fmt, va_list args)
^
1 error generated.
vim +3205 drivers/tty/serial/sh-sci.c
3187
3188 static struct plat_sci_port *sci_parse_dt(struct platform_device *pdev,
3189 unsigned int *dev_id)
3190 {
3191 struct device_node *np = pdev->dev.of_node;
3192 struct reset_control *rstc;
3193 struct plat_sci_port *p;
3194 struct sci_port *sp;
3195 const void *data;
3196 int id, ret;
3197
3198 if (!IS_ENABLED(CONFIG_OF) || !np)
3199 return ERR_PTR(-EINVAL);
3200
3201 data = of_device_get_match_data(&pdev->dev);
3202
3203 rstc = devm_reset_control_get_optional_exclusive(&pdev->dev, NULL);
3204 if (IS_ERR(rstc))
> 3205 return dev_err_probe_ptr(&pdev->dev, PTR_ERR(rstc), "failed to get reset ctrl\n");
3206
3207 ret = reset_control_deassert(rstc);
3208 if (ret) {
3209 dev_err(&pdev->dev, "failed to deassert reset %d\n", ret);
3210 return ERR_PTR(ret);
3211 }
3212
3213 ret = devm_add_action_or_reset(&pdev->dev, sci_reset_control_assert, rstc);
3214 if (ret) {
3215 dev_err(&pdev->dev, "failed to register assert devm action, %d\n",
3216 ret);
3217 return ERR_PTR(ret);
3218 }
3219
3220 p = devm_kzalloc(&pdev->dev, sizeof(struct plat_sci_port), GFP_KERNEL);
3221 if (!p)
3222 return ERR_PTR(-ENOMEM);
3223
3224 /* Get the line number from the aliases node. */
3225 id = of_alias_get_id(np, "serial");
3226 if (id < 0 && ~sci_ports_in_use)
3227 id = ffz(sci_ports_in_use);
3228 if (id < 0) {
3229 dev_err(&pdev->dev, "failed to get alias id (%d)\n", id);
3230 return ERR_PTR(-EINVAL);
3231 }
3232 if (id >= ARRAY_SIZE(sci_ports)) {
3233 dev_err(&pdev->dev, "serial%d out of range\n", id);
3234 return ERR_PTR(-EINVAL);
3235 }
3236
3237 sp = &sci_ports[id];
3238 *dev_id = id;
3239
3240 p->type = SCI_OF_TYPE(data);
3241 p->regtype = SCI_OF_REGTYPE(data);
3242
3243 sp->has_rtscts = of_property_read_bool(np, "uart-has-rtscts");
3244
3245 return p;
3246 }
3247
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[nbd168-wireless:mtk-flow-offload 9/9] drivers/net/wireless/mediatek/mt76/dma.c:145:17: warning: variable 'ring' set but not used
by kernel test robot
tree: https://github.com/nbd168/wireless mtk-flow-offload
head: 6dbc6b1e07e9f4face597784cf4069cff9f3a043
commit: 6dbc6b1e07e9f4face597784cf4069cff9f3a043 [9/9] mt76: mt7915: add Wireless Ethernet Dispatch support
config: x86_64-randconfig-a005-20220214 (https://download.01.org/0day-ci/archive/20220215/202202150257.O7iGQocg-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
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/nbd168/wireless/commit/6dbc6b1e07e9f4face597784cf4069c...
git remote add nbd168-wireless https://github.com/nbd168/wireless
git fetch --no-tags nbd168-wireless mtk-flow-offload
git checkout 6dbc6b1e07e9f4face597784cf4069cff9f3a043
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/wireless/mediatek/mt76/
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/mediatek/mt76/dma.c:145:17: warning: variable 'ring' set but not used [-Wunused-but-set-variable]
int ret, type, ring;
^
>> drivers/net/wireless/mediatek/mt76/dma.c:165:7: warning: variable 'ret' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
case MT76_WED_Q_TXFREE:
^~~~~~~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/dma.c:182:9: note: uninitialized use occurs here
return ret;
^~~
drivers/net/wireless/mediatek/mt76/dma.c:158:7: warning: variable 'ret' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
case MT76_WED_Q_TX:
^~~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/dma.c:182:9: note: uninitialized use occurs here
return ret;
^~~
drivers/net/wireless/mediatek/mt76/dma.c:145:9: note: initialize the variable 'ret' to silence this warning
int ret, type, ring;
^
= 0
3 warnings generated.
vim +/ring +145 drivers/net/wireless/mediatek/mt76/dma.c
140
141 static int
142 mt76_dma_wed_setup(struct mt76_dev *dev, struct mt76_queue *q)
143 {
144 struct mtk_wed_device *wed = &dev->mmio.wed;
> 145 int ret, type, ring;
146 u8 flags = q->flags;
147
148 if (!mtk_wed_device_active(wed))
149 q->flags &= ~MT_QFLAG_WED;
150
151 if (!(q->flags & MT_QFLAG_WED))
152 return 0;
153
154 type = FIELD_GET(MT_QFLAG_WED_TYPE, q->flags);
155 ring = FIELD_GET(MT_QFLAG_WED_RING, q->flags);
156
157 switch (type) {
158 case MT76_WED_Q_TX:
159 #ifdef CONFIG_NET_MEDIATEK_SOC_WED
160 ret = mtk_wed_device_tx_ring_setup(wed, ring, q->regs);
161 if (!ret)
162 q->wed_regs = wed->tx_ring[ring].reg_base;
163 #endif
164 break;
> 165 case MT76_WED_Q_TXFREE:
166 /* WED txfree queue needs ring to be initialized before setup */
167 q->flags = 0;
168 mt76_dma_queue_reset(dev, q);
169 mt76_dma_rx_fill(dev, q);
170 q->flags = flags;
171
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week