From: kernel test robot <lkp@intel.com>
To: Eugen Hristev <eugen.hristev@linaro.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC][PATCH 02/14] kmemdump: introduce kmemdump
Date: Wed, 23 Apr 2025 23:10:48 +0800 [thread overview]
Message-ID: <202504232203.1QaVbTYy-lkp@intel.com> (raw)
In-Reply-To: <20250422113156.575971-3-eugen.hristev@linaro.org>
Hi Eugen,
[This is a private test report for your RFC patch.]
kernel test robot noticed the following build errors:
[auto build test ERROR on tip/irq/core]
[also build test ERROR on tip/sched/core lwn/docs-next linus/master v6.15-rc3 next-20250423]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Eugen-Hristev/Documentation-add-kmemdump/20250422-193638
base: tip/irq/core
patch link: https://lore.kernel.org/r/20250422113156.575971-3-eugen.hristev%40linaro.org
patch subject: [RFC][PATCH 02/14] kmemdump: introduce kmemdump
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20250423/202504232203.1QaVbTYy-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250423/202504232203.1QaVbTYy-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504232203.1QaVbTYy-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/debug/kmemdump.c: In function 'kmemdump_register':
>> drivers/debug/kmemdump.c:28:35: error: implicit declaration of function 'kzalloc' [-Wimplicit-function-declaration]
28 | struct kmemdump_zone *z = kzalloc(sizeof(*z), GFP_KERNEL);
| ^~~~~~~
>> drivers/debug/kmemdump.c:28:35: error: initialization of 'struct kmemdump_zone *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
drivers/debug/kmemdump.c: In function 'kmemdump_unregister':
>> drivers/debug/kmemdump.c:88:9: error: implicit declaration of function 'kfree' [-Wimplicit-function-declaration]
88 | kfree(z);
| ^~~~~
vim +/kzalloc +28 drivers/debug/kmemdump.c
15
16 /**
17 * kmemdump_register() - Register region into kmemdump.
18 * @handle: string of maximum 8 chars that identifies this region
19 * @zone: pointer to the zone of memory
20 * @size: region size
21 *
22 * Return: On success, it returns an allocated unique id that can be used
23 * at a later point to identify the region. On failure, it returns
24 * negative error value.
25 */
26 int kmemdump_register(char *handle, void *zone, size_t size)
27 {
> 28 struct kmemdump_zone *z = kzalloc(sizeof(*z), GFP_KERNEL);
29 int id;
30
31 if (!z)
32 return -ENOMEM;
33
34 mutex_lock(&kmemdump_lock);
35
36 id = idr_alloc_cyclic(&kmemdump_idr, z, 0, MAX_ZONES, GFP_KERNEL);
37 if (id < 0) {
38 mutex_unlock(&kmemdump_lock);
39 return id;
40 }
41
42 if (!backend)
43 pr_debug("kmemdump backend not available yet, waiting...\n");
44
45 z->zone = zone;
46 z->size = size;
47 z->id = id;
48
49 if (handle)
50 strscpy(z->handle, handle, 8);
51
52 if (backend) {
53 int ret;
54
55 ret = backend->register_region(id, handle, zone, size);
56 if (ret) {
57 mutex_unlock(&kmemdump_lock);
58 return ret;
59 }
60 z->registered = true;
61 }
62
63 mutex_unlock(&kmemdump_lock);
64 return id;
65 }
66 EXPORT_SYMBOL_GPL(kmemdump_register);
67
68 /**
69 * kmemdump_unregister() - Unregister region from kmemdump.
70 * @id: unique id that was returned when this region was successfully
71 * registered initially.
72 *
73 * Return: None
74 */
75 void kmemdump_unregister(int id)
76 {
77 struct kmemdump_zone *z;
78
79 mutex_lock(&kmemdump_lock);
80
81 z = idr_find(&kmemdump_idr, id);
82 if (!z)
83 return;
84 if (z->registered && backend)
85 backend->unregister_region(z->id);
86
87 idr_remove(&kmemdump_idr, id);
> 88 kfree(z);
89
90 mutex_unlock(&kmemdump_lock);
91 }
92 EXPORT_SYMBOL_GPL(kmemdump_unregister);
93
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-04-23 15:11 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 11:31 [RFC][PATCH 00/14] introduce kmemdump Eugen Hristev
2025-04-22 11:31 ` [RFC][PATCH 01/14] Documentation: add kmemdump Eugen Hristev
2025-05-09 17:31 ` Trilok Soni
2025-04-22 11:31 ` [RFC][PATCH 02/14] kmemdump: introduce kmemdump Eugen Hristev
2025-04-23 14:29 ` kernel test robot
2025-04-23 15:10 ` kernel test robot [this message]
2025-04-23 16:43 ` kernel test robot
2025-05-09 22:38 ` Bjorn Andersson
2025-04-22 11:31 ` [RFC][PATCH 03/14] kmemdump: introduce qcom-md backend driver Eugen Hristev
2025-05-09 23:21 ` Bjorn Andersson
2025-04-22 11:31 ` [RFC][PATCH 04/14] soc: qcom: smem: add minidump device Eugen Hristev
2025-05-07 16:56 ` Bjorn Andersson
2025-04-22 11:31 ` [RFC][PATCH 05/14] Documentation: kmemdump: add section for coreimage ELF Eugen Hristev
2025-04-22 11:31 ` [RFC][PATCH 06/14] kmemdump: add coreimage ELF layer Eugen Hristev
2025-04-22 11:31 ` [RFC][PATCH 07/14] printk: add kmsg_kmemdump_register Eugen Hristev
2025-05-05 15:25 ` Petr Mladek
2025-05-05 15:51 ` Eugen Hristev
2025-05-06 7:24 ` Petr Mladek
2025-04-22 11:31 ` [RFC][PATCH 08/14] kmemdump: coreimage: add kmsg registration Eugen Hristev
2025-04-22 11:31 ` [RFC][PATCH 09/14] genirq: add irq_kmemdump_register Eugen Hristev
2025-05-07 10:18 ` Thomas Gleixner
2025-05-07 10:27 ` Eugen Hristev
2025-06-13 14:33 ` Eugen Hristev
2025-06-13 21:10 ` Thomas Gleixner
2025-06-16 10:12 ` Eugen Hristev
2025-06-17 8:33 ` Thomas Gleixner
2025-04-22 11:31 ` [RFC][PATCH 10/14] kmemdump: coreimage: add irq registration Eugen Hristev
2025-04-22 11:31 ` [RFC][PATCH 11/14] panic: add panic_kmemdump_register Eugen Hristev
2025-04-22 11:31 ` [RFC][PATCH 12/14] kmemdump: coreimage: add panic registration Eugen Hristev
2025-04-22 11:31 ` [RFC][PATCH 13/14] sched: add sched_kmemdump_register Eugen Hristev
2025-04-22 11:31 ` [RFC][PATCH 14/14] kmemdump: coreimage: add sched registration Eugen Hristev
2025-04-23 7:04 ` [RFC][PATCH 00/14] introduce kmemdump Trilok Soni
2025-05-07 16:54 ` Bjorn Andersson
2025-05-09 15:19 ` Eugen Hristev
2025-06-02 8:46 ` Eugen Hristev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202504232203.1QaVbTYy-lkp@intel.com \
--to=lkp@intel.com \
--cc=eugen.hristev@linaro.org \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.