Re: [PATCH v2] gpio: regmap: set gpio_chip of_node
by kernel test robot
Hi "Álvaro,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on gpio/for-next]
[also build test ERROR on v5.12-rc3 next-20210317]
[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/lvaro-Fern-ndez-Rojas/gpio-regma...
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next
config: x86_64-randconfig-a013-20210317 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8ef111222a3dd12a9175f69c3bff598c46e8bdf7)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/832a71aa1e741f0ef3b28952bf53627a8...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review lvaro-Fern-ndez-Rojas/gpio-regmap-set-gpio_chip-of_node/20210304-152016
git checkout 832a71aa1e741f0ef3b28952bf53627a820a7d68
# 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 >>):
>> drivers/gpio/gpio-regmap.c:252:8: error: no member named 'of_node' in 'struct gpio_chip'
chip->of_node = config->of_node ?: dev_of_node(config->parent);
~~~~ ^
1 error generated.
vim +252 drivers/gpio/gpio-regmap.c
192
193 /**
194 * gpio_regmap_register() - Register a generic regmap GPIO controller
195 * @config: configuration for gpio_regmap
196 *
197 * Return: A pointer to the registered gpio_regmap or ERR_PTR error value.
198 */
199 struct gpio_regmap *gpio_regmap_register(const struct gpio_regmap_config *config)
200 {
201 struct gpio_regmap *gpio;
202 struct gpio_chip *chip;
203 int ret;
204
205 if (!config->parent)
206 return ERR_PTR(-EINVAL);
207
208 if (!config->ngpio)
209 return ERR_PTR(-EINVAL);
210
211 /* we need at least one */
212 if (!config->reg_dat_base && !config->reg_set_base)
213 return ERR_PTR(-EINVAL);
214
215 /* if we have a direction register we need both input and output */
216 if ((config->reg_dir_out_base || config->reg_dir_in_base) &&
217 (!config->reg_dat_base || !config->reg_set_base))
218 return ERR_PTR(-EINVAL);
219
220 /* we don't support having both registers simultaneously for now */
221 if (config->reg_dir_out_base && config->reg_dir_in_base)
222 return ERR_PTR(-EINVAL);
223
224 gpio = kzalloc(sizeof(*gpio), GFP_KERNEL);
225 if (!gpio)
226 return ERR_PTR(-ENOMEM);
227
228 gpio->parent = config->parent;
229 gpio->regmap = config->regmap;
230 gpio->ngpio_per_reg = config->ngpio_per_reg;
231 gpio->reg_stride = config->reg_stride;
232 gpio->reg_mask_xlate = config->reg_mask_xlate;
233 gpio->reg_dat_base = config->reg_dat_base;
234 gpio->reg_set_base = config->reg_set_base;
235 gpio->reg_clr_base = config->reg_clr_base;
236 gpio->reg_dir_in_base = config->reg_dir_in_base;
237 gpio->reg_dir_out_base = config->reg_dir_out_base;
238
239 /* if not set, assume there is only one register */
240 if (!gpio->ngpio_per_reg)
241 gpio->ngpio_per_reg = config->ngpio;
242
243 /* if not set, assume they are consecutive */
244 if (!gpio->reg_stride)
245 gpio->reg_stride = 1;
246
247 if (!gpio->reg_mask_xlate)
248 gpio->reg_mask_xlate = gpio_regmap_simple_xlate;
249
250 chip = &gpio->gpio_chip;
251 chip->parent = config->parent;
> 252 chip->of_node = config->of_node ?: dev_of_node(config->parent);
253 chip->base = -1;
254 chip->ngpio = config->ngpio;
255 chip->names = config->names;
256 chip->label = config->label ?: dev_name(config->parent);
257
258 /*
259 * If our regmap is fast_io we should probably set can_sleep to false.
260 * Right now, the regmap doesn't save this property, nor is there any
261 * access function for it.
262 * The only regmap type which uses fast_io is regmap-mmio. For now,
263 * assume a safe default of true here.
264 */
265 chip->can_sleep = true;
266
267 chip->get = gpio_regmap_get;
268 if (gpio->reg_set_base && gpio->reg_clr_base)
269 chip->set = gpio_regmap_set_with_clear;
270 else if (gpio->reg_set_base)
271 chip->set = gpio_regmap_set;
272
273 if (gpio->reg_dir_in_base || gpio->reg_dir_out_base) {
274 chip->get_direction = gpio_regmap_get_direction;
275 chip->direction_input = gpio_regmap_direction_input;
276 chip->direction_output = gpio_regmap_direction_output;
277 }
278
279 ret = gpiochip_add_data(chip, gpio);
280 if (ret < 0)
281 goto err_free_gpio;
282
283 if (config->irq_domain) {
284 ret = gpiochip_irqchip_add_domain(chip, config->irq_domain);
285 if (ret)
286 goto err_remove_gpiochip;
287 }
288
289 return gpio;
290
291 err_remove_gpiochip:
292 gpiochip_remove(chip);
293 err_free_gpio:
294 kfree(gpio);
295 return ERR_PTR(ret);
296 }
297 EXPORT_SYMBOL_GPL(gpio_regmap_register);
298
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[ojeda-linux:rust-printk 72/140] kernel/trace/trace_events_hist.c:4729:12: warning: stack frame size of 1824 bytes in function 'hist_show'
by kernel test robot
tree: https://github.com/ojeda/linux.git rust-printk
head: eba4842a424c186b12e3e52d602738e503a30222
commit: 7c6155bc5ecf03cd24eb82ed6d2b6b5269cf750c [72/140] Use `rustc` directly instead of `cargo`
config: powerpc64-randconfig-r024-20210317 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8ef111222a3dd12a9175f69c3bff598c46e8bdf7)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://github.com/ojeda/linux/commit/7c6155bc5ecf03cd24eb82ed6d2b6b5269c...
git remote add ojeda-linux https://github.com/ojeda/linux.git
git fetch --no-tags ojeda-linux rust-printk
git checkout 7c6155bc5ecf03cd24eb82ed6d2b6b5269cf750c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
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/trace_events_hist.c:4729:12: warning: stack frame size of 1824 bytes in function 'hist_show' [-Wframe-larger-than=]
static int hist_show(struct seq_file *m, void *v)
^
1 warning generated.
vim +/hist_show +4729 kernel/trace/trace_events_hist.c
52a7f16dedff8f2 Tom Zanussi 2016-03-03 4728
52a7f16dedff8f2 Tom Zanussi 2016-03-03 @4729 static int hist_show(struct seq_file *m, void *v)
52a7f16dedff8f2 Tom Zanussi 2016-03-03 4730 {
52a7f16dedff8f2 Tom Zanussi 2016-03-03 4731 struct event_trigger_data *data;
52a7f16dedff8f2 Tom Zanussi 2016-03-03 4732 struct trace_event_file *event_file;
52a7f16dedff8f2 Tom Zanussi 2016-03-03 4733 int n = 0, ret = 0;
52a7f16dedff8f2 Tom Zanussi 2016-03-03 4734
52a7f16dedff8f2 Tom Zanussi 2016-03-03 4735 mutex_lock(&event_mutex);
52a7f16dedff8f2 Tom Zanussi 2016-03-03 4736
52a7f16dedff8f2 Tom Zanussi 2016-03-03 4737 event_file = event_file_data(m->private);
52a7f16dedff8f2 Tom Zanussi 2016-03-03 4738 if (unlikely(!event_file)) {
52a7f16dedff8f2 Tom Zanussi 2016-03-03 4739 ret = -ENODEV;
52a7f16dedff8f2 Tom Zanussi 2016-03-03 4740 goto out_unlock;
52a7f16dedff8f2 Tom Zanussi 2016-03-03 4741 }
52a7f16dedff8f2 Tom Zanussi 2016-03-03 4742
aeed8aa3874dc15 Masami Hiramatsu 2019-12-20 4743 list_for_each_entry(data, &event_file->triggers, list) {
52a7f16dedff8f2 Tom Zanussi 2016-03-03 4744 if (data->cmd_ops->trigger_type == ETT_EVENT_HIST)
52a7f16dedff8f2 Tom Zanussi 2016-03-03 4745 hist_trigger_show(m, data, n++);
52a7f16dedff8f2 Tom Zanussi 2016-03-03 4746 }
52a7f16dedff8f2 Tom Zanussi 2016-03-03 4747
7ef224d1d0e3a1a Tom Zanussi 2016-03-03 4748 out_unlock:
7ef224d1d0e3a1a Tom Zanussi 2016-03-03 4749 mutex_unlock(&event_mutex);
7ef224d1d0e3a1a Tom Zanussi 2016-03-03 4750
7ef224d1d0e3a1a Tom Zanussi 2016-03-03 4751 return ret;
7ef224d1d0e3a1a Tom Zanussi 2016-03-03 4752 }
7ef224d1d0e3a1a Tom Zanussi 2016-03-03 4753
:::::: The code at line 4729 was first introduced by commit
:::::: 52a7f16dedff8f23d03df3ea556dec95b92a5801 tracing: Add support for multiple hist triggers per event
:::::: TO: Tom Zanussi <tom.zanussi(a)linux.intel.com>
:::::: CC: Steven Rostedt <rostedt(a)goodmis.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH v2 3/4] kbuild: re-implement CONFIG_TRIM_UNUSED_KSYMS to make it work in one-pass
by kernel test robot
Hi Masahiro,
I love your patch! Perhaps something to improve:
[auto build test WARNING on powerpc/next]
[also build test WARNING on linus/master v5.12-rc3]
[cannot apply to kbuild/for-next asm-generic/master next-20210317]
[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/Masahiro-Yamada/kbuild-build-spe...
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: x86_64-randconfig-a015-20210317 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8ef111222a3dd12a9175f69c3bff598c46e8bdf7)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/331032950fb793dce926a30d68897756d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Masahiro-Yamada/kbuild-build-speed-improvement-of-CONFIG_TRIM_UNUSED_KSYMS/20210309-232117
git checkout 331032950fb793dce926a30d68897756d504c4a9
# 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/staging/comedi/drivers/cb_pcidas64.c:232:19: warning: unused function 'analog_trig_low_threshold_bits' [-Wunused-function]
static inline u16 analog_trig_low_threshold_bits(u16 threshold)
^
>> drivers/staging/comedi/drivers/cb_pcidas64.c:383:28: warning: unused function 'dma_chain_flag_bits' [-Wunused-function]
static inline unsigned int dma_chain_flag_bits(u16 prepost_bits)
^
2 warnings generated.
--
>> drivers/staging/rts5208/xd.c:34:19: warning: unused function 'xd_check_err_code' [-Wunused-function]
static inline int xd_check_err_code(struct rtsx_chip *chip, u8 err_code)
^
1 warning generated.
--
>> drivers/video/fbdev/tridentfb.c:1127:20: warning: unused function 'shadowmode_off' [-Wunused-function]
static inline void shadowmode_off(struct tridentfb_par *par)
^
1 warning generated.
--
>> drivers/video/fbdev/via/via-core.c:62:19: warning: unused function 'viafb_mmio_read' [-Wunused-function]
static inline int viafb_mmio_read(int reg)
^
1 warning generated.
--
mm/compaction.c:56:27: warning: unused variable 'HPAGE_FRAG_CHECK_INTERVAL_MSEC' [-Wunused-const-variable]
static const unsigned int HPAGE_FRAG_CHECK_INTERVAL_MSEC = 500;
^
>> mm/compaction.c:462:20: warning: unused function 'isolation_suitable' [-Wunused-function]
static inline bool isolation_suitable(struct compact_control *cc,
^
>> mm/compaction.c:468:20: warning: unused function 'pageblock_skip_persistent' [-Wunused-function]
static inline bool pageblock_skip_persistent(struct page *page)
^
>> mm/compaction.c:473:20: warning: unused function 'update_pageblock_skip' [-Wunused-function]
static inline void update_pageblock_skip(struct compact_control *cc,
^
4 warnings generated.
--
>> mm/z3fold.c:287:37: warning: unused function 'handle_to_z3fold_header' [-Wunused-function]
static inline struct z3fold_header *handle_to_z3fold_header(unsigned long h)
^
1 warning generated.
--
>> security/apparmor/file.c:150:20: warning: unused function 'is_deleted' [-Wunused-function]
static inline bool is_deleted(struct dentry *dentry)
^
1 warning generated.
--
>> security/apparmor/label.c:1258:20: warning: unused function 'label_is_visible' [-Wunused-function]
static inline bool label_is_visible(struct aa_profile *profile,
^
1 warning generated.
--
>> drivers/hwmon/sis5595.c:158:18: warning: unused function 'DIV_TO_REG' [-Wunused-function]
static inline u8 DIV_TO_REG(int val)
^
1 warning generated.
--
>> drivers/mfd/max8925-core.c:472:40: warning: unused function 'irq_to_max8925' [-Wunused-function]
static inline struct max8925_irq_data *irq_to_max8925(struct max8925_chip *chip,
^
1 warning generated.
--
>> drivers/misc/hpilo.c:395:19: warning: unused function 'is_device_reset' [-Wunused-function]
static inline int is_device_reset(struct ilo_hwinfo *hw)
^
1 warning generated.
..
vim +/is_deleted +150 security/apparmor/file.c
6380bd8ddf613b John Johansen 2010-07-29 143
aebd873e8d3e34 John Johansen 2017-06-09 144 /**
aebd873e8d3e34 John Johansen 2017-06-09 145 * is_deleted - test if a file has been completely unlinked
aebd873e8d3e34 John Johansen 2017-06-09 146 * @dentry: dentry of file to test for deletion (NOT NULL)
aebd873e8d3e34 John Johansen 2017-06-09 147 *
e37986097ba63c Zou Wei 2020-04-28 148 * Returns: true if deleted else false
aebd873e8d3e34 John Johansen 2017-06-09 149 */
aebd873e8d3e34 John Johansen 2017-06-09 @150 static inline bool is_deleted(struct dentry *dentry)
aebd873e8d3e34 John Johansen 2017-06-09 151 {
aebd873e8d3e34 John Johansen 2017-06-09 152 if (d_unlinked(dentry) && d_backing_inode(dentry)->i_nlink == 0)
e37986097ba63c Zou Wei 2020-04-28 153 return true;
e37986097ba63c Zou Wei 2020-04-28 154 return false;
aebd873e8d3e34 John Johansen 2017-06-09 155 }
aebd873e8d3e34 John Johansen 2017-06-09 156
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH 2/3] drivers/perf: convert sysfs scnprintf family to sysfs_emit_at
by kernel test robot
Hi Qi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.12-rc3 next-20210317]
[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/Qi-Liu/drivers-perf-convert-sysf...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 1df27313f50a57497c1faeb6a6ae4ca939c85a7d
config: arm-randconfig-r036-20210317 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8ef111222a3dd12a9175f69c3bff598c46e8bdf7)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/81a69a2f7fa73d0c41d699d6c6993c259...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Qi-Liu/drivers-perf-convert-sysfs-sprintf-snprintf-scnprintf-to-sysfs_emit/20210317-174750
git checkout 81a69a2f7fa73d0c41d699d6c6993c2594001241
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/perf/arm-ccn.c:345:32: warning: incompatible integer to pointer conversion passing 'ssize_t' (aka 'int') to parameter of type 'const char *' [-Wint-conversion]
res += sysfs_emit(buf + res, res, ",xp=?,vc=?");
^~~
include/linux/sysfs.h:335:39: note: passing argument to parameter 'fmt' here
int sysfs_emit(char *buf, const char *fmt, ...);
^
1 warning generated.
vim +345 drivers/perf/arm-ccn.c
274
275 #define CCN_EVENT_ATTR(_name) \
276 __ATTR(_name, S_IRUGO, arm_ccn_pmu_event_show, NULL)
277
278 /*
279 * Events defined in TRM for MN, HN-I and SBSX are actually watchpoints set on
280 * their ports in XP they are connected to. For the sake of usability they are
281 * explicitly defined here (and translated into a relevant watchpoint in
282 * arm_ccn_pmu_event_init()) so the user can easily request them without deep
283 * knowledge of the flit format.
284 */
285
286 #define CCN_EVENT_MN(_name, _def, _mask) { .attr = CCN_EVENT_ATTR(mn_##_name), \
287 .type = CCN_TYPE_MN, .event = CCN_EVENT_WATCHPOINT, \
288 .num_ports = CCN_NUM_XP_PORTS, .num_vcs = CCN_NUM_VCS, \
289 .def = _def, .mask = _mask, }
290
291 #define CCN_EVENT_HNI(_name, _def, _mask) { \
292 .attr = CCN_EVENT_ATTR(hni_##_name), .type = CCN_TYPE_HNI, \
293 .event = CCN_EVENT_WATCHPOINT, .num_ports = CCN_NUM_XP_PORTS, \
294 .num_vcs = CCN_NUM_VCS, .def = _def, .mask = _mask, }
295
296 #define CCN_EVENT_SBSX(_name, _def, _mask) { \
297 .attr = CCN_EVENT_ATTR(sbsx_##_name), .type = CCN_TYPE_SBSX, \
298 .event = CCN_EVENT_WATCHPOINT, .num_ports = CCN_NUM_XP_PORTS, \
299 .num_vcs = CCN_NUM_VCS, .def = _def, .mask = _mask, }
300
301 #define CCN_EVENT_HNF(_name, _event) { .attr = CCN_EVENT_ATTR(hnf_##_name), \
302 .type = CCN_TYPE_HNF, .event = _event, }
303
304 #define CCN_EVENT_XP(_name, _event) { .attr = CCN_EVENT_ATTR(xp_##_name), \
305 .type = CCN_TYPE_XP, .event = _event, \
306 .num_ports = CCN_NUM_XP_PORTS, .num_vcs = CCN_NUM_VCS, }
307
308 /*
309 * RN-I & RN-D (RN-D = RN-I + DVM) nodes have different type ID depending
310 * on configuration. One of them is picked to represent the whole group,
311 * as they all share the same event types.
312 */
313 #define CCN_EVENT_RNI(_name, _event) { .attr = CCN_EVENT_ATTR(rni_##_name), \
314 .type = CCN_TYPE_RNI_3P, .event = _event, }
315
316 #define CCN_EVENT_SBAS(_name, _event) { .attr = CCN_EVENT_ATTR(sbas_##_name), \
317 .type = CCN_TYPE_SBAS, .event = _event, }
318
319 #define CCN_EVENT_CYCLES(_name) { .attr = CCN_EVENT_ATTR(_name), \
320 .type = CCN_TYPE_CYCLES }
321
322
323 static ssize_t arm_ccn_pmu_event_show(struct device *dev,
324 struct device_attribute *attr, char *buf)
325 {
326 struct arm_ccn *ccn = pmu_to_arm_ccn(dev_get_drvdata(dev));
327 struct arm_ccn_pmu_event *event = container_of(attr,
328 struct arm_ccn_pmu_event, attr);
329 ssize_t res;
330
331 res = sysfs_emit(buf, "type=0x%x", event->type);
332 if (event->event)
333 res += sysfs_emit_at(buf + res, res, ",event=0x%x",
334 event->event);
335 if (event->def)
336 res += sysfs_emit_at(buf + res, res, ",%s", event->def);
337 if (event->mask)
338 res += sysfs_emit_at(buf + res, res, ",mask=0x%x", event->mask);
339
340 /* Arguments required by an event */
341 switch (event->type) {
342 case CCN_TYPE_CYCLES:
343 break;
344 case CCN_TYPE_XP:
> 345 res += sysfs_emit(buf + res, res, ",xp=?,vc=?");
346 if (event->event == CCN_EVENT_WATCHPOINT)
347 res += sysfs_emit_at(buf + res, res,
348 ",port=?,dir=?,cmp_l=?,cmp_h=?,mask=?");
349 else
350 res += sysfs_emit_at(buf + res, res, ",bus=?");
351
352 break;
353 case CCN_TYPE_MN:
354 res += sysfs_emit_at(buf + res, res, ",node=%d", ccn->mn_id);
355 break;
356 default:
357 res += sysfs_emit_at(buf + res, res, ",node=?");
358 break;
359 }
360
361 res += sysfs_emit_at(buf + res, res, "\n");
362
363 return res;
364 }
365
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[rcar:vsp1/v3u 13/23] drivers/media/v4l2-core/v4l2-async.c:777:5: warning: no previous prototype for 'v4l2_async_pending_devices'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git vsp1/v3u
head: 178de9aa2b539612048856e54a292efda80f41c1
commit: fb68cc895bd671aa7d0b1cf67f873edb9b2a3f2e [13/23] WIP: Add async notifier state debug
config: mips-randconfig-r013-20210317 (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git/commit/...
git remote add rcar https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git
git fetch --no-tags rcar vsp1/v3u
git checkout fb68cc895bd671aa7d0b1cf67f873edb9b2a3f2e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/media/v4l2-core/v4l2-async.c:777:5: warning: no previous prototype for 'v4l2_async_pending_devices' [-Wmissing-prototypes]
777 | int v4l2_async_pending_devices(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/v4l2-core/v4l2-async.c: In function 'v4l2_async_pending_devices':
drivers/media/v4l2-core/v4l2-async.c:788:29: warning: unused variable 'asd' [-Wunused-variable]
788 | struct v4l2_async_subdev *asd;
| ^~~
drivers/media/v4l2-core/v4l2-async.c:786:23: warning: unused variable 'v4l2_dev' [-Wunused-variable]
786 | struct v4l2_device *v4l2_dev =
| ^~~~~~~~
vim +/v4l2_async_pending_devices +777 drivers/media/v4l2-core/v4l2-async.c
775
776
> 777 int v4l2_async_pending_devices(void)
778 {
779 struct v4l2_async_notifier *notifier;
780 struct v4l2_subdev *sd;
781
782 mutex_lock(&list_lock);
783
784 /* Report on pending async subdevices. */
785 list_for_each_entry(notifier, ¬ifier_list, list) {
786 struct v4l2_device *v4l2_dev =
787 v4l2_async_notifier_find_v4l2_dev(notifier);
788 struct v4l2_async_subdev *asd;
789
790 if (list_empty(¬ifier->waiting)) {
791 printk("notifier is not waiting...");
792 continue;
793 }
794
795
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[rcar:vsp1/v3u 13/23] drivers/media/v4l2-core/v4l2-async.c:777:5: warning: no previous prototype for function 'v4l2_async_pending_devices'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git vsp1/v3u
head: 178de9aa2b539612048856e54a292efda80f41c1
commit: fb68cc895bd671aa7d0b1cf67f873edb9b2a3f2e [13/23] WIP: Add async notifier state debug
config: riscv-randconfig-r012-20210317 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8ef111222a3dd12a9175f69c3bff598c46e8bdf7)
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/kbingham/rcar.git/commit/...
git remote add rcar https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git
git fetch --no-tags rcar vsp1/v3u
git checkout fb68cc895bd671aa7d0b1cf67f873edb9b2a3f2e
# 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 warnings (new ones prefixed by >>):
drivers/media/v4l2-core/v4l2-async.c:786:23: warning: unused variable 'v4l2_dev' [-Wunused-variable]
struct v4l2_device *v4l2_dev =
^
drivers/media/v4l2-core/v4l2-async.c:788:29: warning: unused variable 'asd' [-Wunused-variable]
struct v4l2_async_subdev *asd;
^
>> drivers/media/v4l2-core/v4l2-async.c:777:5: warning: no previous prototype for function 'v4l2_async_pending_devices' [-Wmissing-prototypes]
int v4l2_async_pending_devices(void)
^
drivers/media/v4l2-core/v4l2-async.c:777:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int v4l2_async_pending_devices(void)
^
static
3 warnings generated.
vim +/v4l2_async_pending_devices +777 drivers/media/v4l2-core/v4l2-async.c
775
776
> 777 int v4l2_async_pending_devices(void)
778 {
779 struct v4l2_async_notifier *notifier;
780 struct v4l2_subdev *sd;
781
782 mutex_lock(&list_lock);
783
784 /* Report on pending async subdevices. */
785 list_for_each_entry(notifier, ¬ifier_list, list) {
786 struct v4l2_device *v4l2_dev =
787 v4l2_async_notifier_find_v4l2_dev(notifier);
788 struct v4l2_async_subdev *asd;
789
790 if (list_empty(¬ifier->waiting)) {
791 printk("notifier is not waiting...");
792 continue;
793 }
794
795
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[intel-linux-intel-lts:4.19/android_r 19120/22444] drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1068:13: sparse: sparse: incorrect type in initializer (different address spaces)
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 4.19/android_r
head: dbeb432ffcb6d39ce05d76a2e7d77c8656def48d
commit: b652a52d36a85d1b731921ba08e701d7150ce200 [19120/22444] Merge branch 'aosp/android-4.19-stable' into android_r
config: arm64-randconfig-s032-20210317 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-277-gc089cd2d-dirty
# https://github.com/intel/linux-intel-lts/commit/b652a52d36a85d1b731921ba0...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 4.19/android_r
git checkout b652a52d36a85d1b731921ba08e701d7150ce200
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64
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/media/v4l2-core/v4l2-compat-ioctl32.c:212:13: sparse: sparse: Using plain integer as NULL pointer
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:726:21: sparse: sparse: Using plain integer as NULL pointer
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:798:13: sparse: sparse: Using plain integer as NULL pointer
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:984:13: sparse: sparse: Using plain integer as NULL pointer
>> drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1068:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct v4l2_subdev_route *__pu_val @@ got void [noderef] <asn:1> * @@
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1068:13: sparse: expected struct v4l2_subdev_route *__pu_val
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1068:13: sparse: got void [noderef] <asn:1> *
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1138:13: sparse: sparse: Using plain integer as NULL pointer
vim +1068 drivers/media/v4l2-core/v4l2-compat-ioctl32.c
dcdab0d72b69b62 Meng Wei 2018-10-26 1059
dcdab0d72b69b62 Meng Wei 2018-10-26 1060 static int get_v4l2_subdev_routing(struct v4l2_subdev_routing __user *kp,
dcdab0d72b69b62 Meng Wei 2018-10-26 1061 struct v4l2_subdev_routing32 __user *up)
dcdab0d72b69b62 Meng Wei 2018-10-26 1062 {
dcdab0d72b69b62 Meng Wei 2018-10-26 1063 compat_caddr_t p;
dcdab0d72b69b62 Meng Wei 2018-10-26 1064 u32 num_routes;
dcdab0d72b69b62 Meng Wei 2018-10-26 1065
dcdab0d72b69b62 Meng Wei 2018-10-26 1066 if (!access_ok(VERIFY_READ, up, sizeof(*up)) ||
dcdab0d72b69b62 Meng Wei 2018-10-26 1067 get_user(p, &up->routes) ||
dcdab0d72b69b62 Meng Wei 2018-10-26 @1068 put_user(compat_ptr(p), &kp->routes) ||
dcdab0d72b69b62 Meng Wei 2018-10-26 1069 get_user(num_routes, &kp->num_routes) ||
dcdab0d72b69b62 Meng Wei 2018-10-26 1070 assign_in_user(&kp->num_routes, &up->num_routes) ||
dcdab0d72b69b62 Meng Wei 2018-10-26 1071 !access_ok(VERIFY_READ, up->reserved, sizeof(*up->reserved)) ||
dcdab0d72b69b62 Meng Wei 2018-10-26 1072 num_routes > U32_MAX / sizeof(*kp->routes))
dcdab0d72b69b62 Meng Wei 2018-10-26 1073 return -EFAULT;
dcdab0d72b69b62 Meng Wei 2018-10-26 1074
dcdab0d72b69b62 Meng Wei 2018-10-26 1075 if (!access_ok(VERIFY_READ, compat_ptr(p),
dcdab0d72b69b62 Meng Wei 2018-10-26 1076 num_routes * (u32)sizeof(*kp->routes)))
dcdab0d72b69b62 Meng Wei 2018-10-26 1077 return -EFAULT;
dcdab0d72b69b62 Meng Wei 2018-10-26 1078
dcdab0d72b69b62 Meng Wei 2018-10-26 1079 return 0;
dcdab0d72b69b62 Meng Wei 2018-10-26 1080 }
dcdab0d72b69b62 Meng Wei 2018-10-26 1081
:::::: The code at line 1068 was first introduced by commit
:::::: dcdab0d72b69b6291d08483c0baf62cf92e2a1bc v4l: subdev: Add [GS]_ROUTING subdev ioctls and operations
:::::: TO: Meng Wei <wei.meng(a)intel.com>
:::::: CC: Pan, Kris <kris.pan(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[linux-next:master 3781/5053] drivers/thermal/devfreq_cooling.c:433 of_devfreq_cooling_register_power() warn: passing zero to 'ERR_PTR'
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: fa903833ae344e4f4d798a8b85ba3ef0c5ce96c9
commit: f8d354e821b268c23a6cd548b7154e55c3954496 [3781/5053] thermal/drivers/devfreq_cooling: Use device name instead of auto-numbering
config: i386-randconfig-m021-20210317 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/thermal/devfreq_cooling.c:433 of_devfreq_cooling_register_power() warn: passing zero to 'ERR_PTR'
vim +/ERR_PTR +433 drivers/thermal/devfreq_cooling.c
3c99c2cef75eb5 Javi Merino 2015-11-02 354 struct thermal_cooling_device *
a76caf55e5b356 Ørjan Eide 2015-09-10 355 of_devfreq_cooling_register_power(struct device_node *np, struct devfreq *df,
a76caf55e5b356 Ørjan Eide 2015-09-10 356 struct devfreq_cooling_power *dfc_power)
a76caf55e5b356 Ørjan Eide 2015-09-10 357 {
a76caf55e5b356 Ørjan Eide 2015-09-10 358 struct thermal_cooling_device *cdev;
615510fe13bd24 Lukasz Luba 2020-12-10 359 struct device *dev = df->dev.parent;
a76caf55e5b356 Ørjan Eide 2015-09-10 360 struct devfreq_cooling_device *dfc;
f8d354e821b268 Daniel Lezcano 2021-03-14 361 char *name;
615510fe13bd24 Lukasz Luba 2020-12-10 362 int err, num_opps;
a76caf55e5b356 Ørjan Eide 2015-09-10 363
a76caf55e5b356 Ørjan Eide 2015-09-10 364 dfc = kzalloc(sizeof(*dfc), GFP_KERNEL);
a76caf55e5b356 Ørjan Eide 2015-09-10 365 if (!dfc)
a76caf55e5b356 Ørjan Eide 2015-09-10 366 return ERR_PTR(-ENOMEM);
a76caf55e5b356 Ørjan Eide 2015-09-10 367
a76caf55e5b356 Ørjan Eide 2015-09-10 368 dfc->devfreq = df;
a76caf55e5b356 Ørjan Eide 2015-09-10 369
4401117bf7fc11 Lukasz Luba 2020-12-15 370 dfc->em_pd = em_pd_get(dev);
4401117bf7fc11 Lukasz Luba 2020-12-15 371 if (dfc->em_pd) {
a76caf55e5b356 Ørjan Eide 2015-09-10 372 devfreq_cooling_ops.get_requested_power =
a76caf55e5b356 Ørjan Eide 2015-09-10 373 devfreq_cooling_get_requested_power;
a76caf55e5b356 Ørjan Eide 2015-09-10 374 devfreq_cooling_ops.state2power = devfreq_cooling_state2power;
a76caf55e5b356 Ørjan Eide 2015-09-10 375 devfreq_cooling_ops.power2state = devfreq_cooling_power2state;
a76caf55e5b356 Ørjan Eide 2015-09-10 376
615510fe13bd24 Lukasz Luba 2020-12-10 377 dfc->power_ops = dfc_power;
615510fe13bd24 Lukasz Luba 2020-12-10 378
4401117bf7fc11 Lukasz Luba 2020-12-15 379 num_opps = em_pd_nr_perf_states(dfc->em_pd);
615510fe13bd24 Lukasz Luba 2020-12-10 380 } else {
615510fe13bd24 Lukasz Luba 2020-12-10 381 /* Backward compatibility for drivers which do not use IPA */
615510fe13bd24 Lukasz Luba 2020-12-10 382 dev_dbg(dev, "missing EM for cooling device\n");
615510fe13bd24 Lukasz Luba 2020-12-10 383
615510fe13bd24 Lukasz Luba 2020-12-10 384 num_opps = dev_pm_opp_get_opp_count(dev);
615510fe13bd24 Lukasz Luba 2020-12-10 385
615510fe13bd24 Lukasz Luba 2020-12-10 386 err = devfreq_cooling_gen_tables(dfc, num_opps);
a76caf55e5b356 Ørjan Eide 2015-09-10 387 if (err)
a76caf55e5b356 Ørjan Eide 2015-09-10 388 goto free_dfc;
615510fe13bd24 Lukasz Luba 2020-12-10 389 }
615510fe13bd24 Lukasz Luba 2020-12-10 390
615510fe13bd24 Lukasz Luba 2020-12-10 391 if (num_opps <= 0) {
615510fe13bd24 Lukasz Luba 2020-12-10 392 err = -EINVAL;
615510fe13bd24 Lukasz Luba 2020-12-10 393 goto free_dfc;
615510fe13bd24 Lukasz Luba 2020-12-10 394 }
a76caf55e5b356 Ørjan Eide 2015-09-10 395
615510fe13bd24 Lukasz Luba 2020-12-10 396 /* max_state is an index, not a counter */
615510fe13bd24 Lukasz Luba 2020-12-10 397 dfc->max_state = num_opps - 1;
615510fe13bd24 Lukasz Luba 2020-12-10 398
615510fe13bd24 Lukasz Luba 2020-12-10 399 err = dev_pm_qos_add_request(dev, &dfc->req_max_freq,
04fa9c804b0ed5 Matthias Kaehlcke 2020-03-18 400 DEV_PM_QOS_MAX_FREQUENCY,
04fa9c804b0ed5 Matthias Kaehlcke 2020-03-18 401 PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE);
2f96c035fbd143 Matthew Wilcox 2016-12-21 402 if (err < 0)
615510fe13bd24 Lukasz Luba 2020-12-10 403 goto free_table;
04fa9c804b0ed5 Matthias Kaehlcke 2020-03-18 404
f8d354e821b268 Daniel Lezcano 2021-03-14 405 cdev = ERR_PTR(-ENOMEM);
This should be "err = -ENOMEM;"
f8d354e821b268 Daniel Lezcano 2021-03-14 406 name = kasprintf(GFP_KERNEL, "devfreq-%s", dev_name(dev));
f8d354e821b268 Daniel Lezcano 2021-03-14 407 if (!name)
04fa9c804b0ed5 Matthias Kaehlcke 2020-03-18 408 goto remove_qos_req;
615510fe13bd24 Lukasz Luba 2020-12-10 409
f8d354e821b268 Daniel Lezcano 2021-03-14 410 cdev = thermal_of_cooling_device_register(np, name, dfc,
a76caf55e5b356 Ørjan Eide 2015-09-10 411 &devfreq_cooling_ops);
f8d354e821b268 Daniel Lezcano 2021-03-14 412 kfree(name);
f8d354e821b268 Daniel Lezcano 2021-03-14 413
a76caf55e5b356 Ørjan Eide 2015-09-10 414 if (IS_ERR(cdev)) {
a76caf55e5b356 Ørjan Eide 2015-09-10 415 err = PTR_ERR(cdev);
615510fe13bd24 Lukasz Luba 2020-12-10 416 dev_err(dev,
a76caf55e5b356 Ørjan Eide 2015-09-10 417 "Failed to register devfreq cooling device (%d)\n",
a76caf55e5b356 Ørjan Eide 2015-09-10 418 err);
f8d354e821b268 Daniel Lezcano 2021-03-14 419 goto remove_qos_req;
a76caf55e5b356 Ørjan Eide 2015-09-10 420 }
a76caf55e5b356 Ørjan Eide 2015-09-10 421
a76caf55e5b356 Ørjan Eide 2015-09-10 422 dfc->cdev = cdev;
a76caf55e5b356 Ørjan Eide 2015-09-10 423
3c99c2cef75eb5 Javi Merino 2015-11-02 424 return cdev;
a76caf55e5b356 Ørjan Eide 2015-09-10 425
04fa9c804b0ed5 Matthias Kaehlcke 2020-03-18 426 remove_qos_req:
04fa9c804b0ed5 Matthias Kaehlcke 2020-03-18 427 dev_pm_qos_remove_request(&dfc->req_max_freq);
615510fe13bd24 Lukasz Luba 2020-12-10 428 free_table:
a76caf55e5b356 Ørjan Eide 2015-09-10 429 kfree(dfc->freq_table);
a76caf55e5b356 Ørjan Eide 2015-09-10 430 free_dfc:
a76caf55e5b356 Ørjan Eide 2015-09-10 431 kfree(dfc);
a76caf55e5b356 Ørjan Eide 2015-09-10 432
a76caf55e5b356 Ørjan Eide 2015-09-10 @433 return ERR_PTR(err);
a76caf55e5b356 Ørjan Eide 2015-09-10 434 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH 2/3] drivers/perf: convert sysfs scnprintf family to sysfs_emit_at
by kernel test robot
Hi Qi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.12-rc3 next-20210317]
[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/Qi-Liu/drivers-perf-convert-sysf...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 1df27313f50a57497c1faeb6a6ae4ca939c85a7d
config: arm64-randconfig-s031-20210317 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-277-gc089cd2d-dirty
# https://github.com/0day-ci/linux/commit/81a69a2f7fa73d0c41d699d6c6993c259...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Qi-Liu/drivers-perf-convert-sysfs-sprintf-snprintf-scnprintf-to-sysfs_emit/20210317-174750
git checkout 81a69a2f7fa73d0c41d699d6c6993c2594001241
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64
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/perf/arm-ccn.c:345:46: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected char const *fmt @@ got long [assigned] [usertype] res @@
drivers/perf/arm-ccn.c:345:46: sparse: expected char const *fmt
drivers/perf/arm-ccn.c:345:46: sparse: got long [assigned] [usertype] res
vim +345 drivers/perf/arm-ccn.c
274
275 #define CCN_EVENT_ATTR(_name) \
276 __ATTR(_name, S_IRUGO, arm_ccn_pmu_event_show, NULL)
277
278 /*
279 * Events defined in TRM for MN, HN-I and SBSX are actually watchpoints set on
280 * their ports in XP they are connected to. For the sake of usability they are
281 * explicitly defined here (and translated into a relevant watchpoint in
282 * arm_ccn_pmu_event_init()) so the user can easily request them without deep
283 * knowledge of the flit format.
284 */
285
286 #define CCN_EVENT_MN(_name, _def, _mask) { .attr = CCN_EVENT_ATTR(mn_##_name), \
287 .type = CCN_TYPE_MN, .event = CCN_EVENT_WATCHPOINT, \
288 .num_ports = CCN_NUM_XP_PORTS, .num_vcs = CCN_NUM_VCS, \
289 .def = _def, .mask = _mask, }
290
291 #define CCN_EVENT_HNI(_name, _def, _mask) { \
292 .attr = CCN_EVENT_ATTR(hni_##_name), .type = CCN_TYPE_HNI, \
293 .event = CCN_EVENT_WATCHPOINT, .num_ports = CCN_NUM_XP_PORTS, \
294 .num_vcs = CCN_NUM_VCS, .def = _def, .mask = _mask, }
295
296 #define CCN_EVENT_SBSX(_name, _def, _mask) { \
297 .attr = CCN_EVENT_ATTR(sbsx_##_name), .type = CCN_TYPE_SBSX, \
298 .event = CCN_EVENT_WATCHPOINT, .num_ports = CCN_NUM_XP_PORTS, \
299 .num_vcs = CCN_NUM_VCS, .def = _def, .mask = _mask, }
300
301 #define CCN_EVENT_HNF(_name, _event) { .attr = CCN_EVENT_ATTR(hnf_##_name), \
302 .type = CCN_TYPE_HNF, .event = _event, }
303
304 #define CCN_EVENT_XP(_name, _event) { .attr = CCN_EVENT_ATTR(xp_##_name), \
305 .type = CCN_TYPE_XP, .event = _event, \
306 .num_ports = CCN_NUM_XP_PORTS, .num_vcs = CCN_NUM_VCS, }
307
308 /*
309 * RN-I & RN-D (RN-D = RN-I + DVM) nodes have different type ID depending
310 * on configuration. One of them is picked to represent the whole group,
311 * as they all share the same event types.
312 */
313 #define CCN_EVENT_RNI(_name, _event) { .attr = CCN_EVENT_ATTR(rni_##_name), \
314 .type = CCN_TYPE_RNI_3P, .event = _event, }
315
316 #define CCN_EVENT_SBAS(_name, _event) { .attr = CCN_EVENT_ATTR(sbas_##_name), \
317 .type = CCN_TYPE_SBAS, .event = _event, }
318
319 #define CCN_EVENT_CYCLES(_name) { .attr = CCN_EVENT_ATTR(_name), \
320 .type = CCN_TYPE_CYCLES }
321
322
323 static ssize_t arm_ccn_pmu_event_show(struct device *dev,
324 struct device_attribute *attr, char *buf)
325 {
326 struct arm_ccn *ccn = pmu_to_arm_ccn(dev_get_drvdata(dev));
327 struct arm_ccn_pmu_event *event = container_of(attr,
328 struct arm_ccn_pmu_event, attr);
329 ssize_t res;
330
331 res = sysfs_emit(buf, "type=0x%x", event->type);
332 if (event->event)
333 res += sysfs_emit_at(buf + res, res, ",event=0x%x",
334 event->event);
335 if (event->def)
336 res += sysfs_emit_at(buf + res, res, ",%s", event->def);
337 if (event->mask)
338 res += sysfs_emit_at(buf + res, res, ",mask=0x%x", event->mask);
339
340 /* Arguments required by an event */
341 switch (event->type) {
342 case CCN_TYPE_CYCLES:
343 break;
344 case CCN_TYPE_XP:
> 345 res += sysfs_emit(buf + res, res, ",xp=?,vc=?");
346 if (event->event == CCN_EVENT_WATCHPOINT)
347 res += sysfs_emit_at(buf + res, res,
348 ",port=?,dir=?,cmp_l=?,cmp_h=?,mask=?");
349 else
350 res += sysfs_emit_at(buf + res, res, ",bus=?");
351
352 break;
353 case CCN_TYPE_MN:
354 res += sysfs_emit_at(buf + res, res, ",node=%d", ccn->mn_id);
355 break;
356 default:
357 res += sysfs_emit_at(buf + res, res, ",node=?");
358 break;
359 }
360
361 res += sysfs_emit_at(buf + res, res, "\n");
362
363 return res;
364 }
365
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months