plugins: use consistent parameter documentation for userdata
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-24-pierrick.bouvier@oss.qualcomm.com Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Pierrick Bouvier committed
Jun 15, 2026 at 12:35 UTC
13c6930028adf4ae15cdef98a960f0335dab8c5c
1 file changed
+17
-19
include/plugins/qemu-plugin.h
+17
-19
@@ -142,16 +142,14 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id,
142
143
/**
144
* typedef qemu_plugin_udata_cb_t - callback with user data
145
- * @userdata: a pointer to some user data supplied when the callback
146
- * was registered.
145
+ * @userdata: user data for callback
146
*/
147
typedef void (*qemu_plugin_udata_cb_t)(void *userdata);
148
149
/**
150
* typedef qemu_plugin_vcpu_udata_cb_t - vcpu callback
151
* @vcpu_index: the current vcpu context
153
- * @userdata: a pointer to some user data supplied when the callback
154
- * was registered.
152
+ * @userdata: user data for callback
153
*/
154
typedef void (*qemu_plugin_vcpu_udata_cb_t)(unsigned int vcpu_index,
155
void *userdata);
@@ -185,7 +183,7 @@ enum qemu_plugin_discon_type {
183
* @from_pc: the source of the discontinuity, e.g. the PC before the
184
* transition
185
* @to_pc: the PC pointing to the next instruction to be executed
188
- * @userdata: any plugin data to pass to the @cb
186
+ * @userdata: user data for callback
187
*
188
* The exact semantics of @from_pc depends on the @type of discontinuity. For
189
* interrupts, @from_pc will point to the next instruction which would have
@@ -204,7 +202,7 @@ typedef void (*qemu_plugin_vcpu_discon_cb_t)(unsigned int vcpu_index,
202
* qemu_plugin_uninstall() - Uninstall a plugin
203
* @id: this plugin's opaque ID
204
* @cb: callback to be called once the plugin has been removed
207
- * @userdata: any plugin data to pass to the @cb
205
+ * @userdata: user data for callback
206
*
207
* Do NOT assume that the plugin has been uninstalled once this function
208
* returns. Plugins are uninstalled asynchronously, and therefore the given
@@ -220,7 +218,7 @@ void qemu_plugin_uninstall(qemu_plugin_id_t id, qemu_plugin_udata_cb_t cb,
218
* qemu_plugin_reset() - Reset a plugin
219
* @id: this plugin's opaque ID
220
* @cb: callback to be called once the plugin has been reset
223
- * @userdata: any plugin data to pass to the @cb
221
+ * @userdata: user data for callback
222
*
223
* Unregisters all callbacks for the plugin given by @id.
224
*
@@ -236,7 +234,7 @@ void qemu_plugin_reset(qemu_plugin_id_t id, qemu_plugin_udata_cb_t cb,
234
* qemu_plugin_register_vcpu_init_cb() - register a vCPU initialization callback
235
* @id: plugin ID
236
* @cb: callback function
239
- * @userdata: any plugin data to pass to the @cb
237
+ * @userdata: user data for callback
238
*
239
* The @cb function is called every time a vCPU is initialized.
240
*
@@ -251,7 +249,7 @@ void qemu_plugin_register_vcpu_init_cb(qemu_plugin_id_t id,
249
* qemu_plugin_register_vcpu_exit_cb() - register a vCPU exit callback
250
* @id: plugin ID
251
* @cb: callback function
254
- * @userdata: any plugin data to pass to the @cb
252
+ * @userdata: user data for callback
253
*
254
* The @cb function is called every time a vCPU exits.
255
*
@@ -266,7 +264,7 @@ void qemu_plugin_register_vcpu_exit_cb(qemu_plugin_id_t id,
264
* qemu_plugin_register_vcpu_idle_cb() - register a vCPU idle callback
265
* @id: plugin ID
266
* @cb: callback function
269
- * @userdata: any plugin data to pass to the @cb
267
+ * @userdata: user data for callback
268
*
269
* The @cb function is called every time a vCPU idles.
270
*/
@@ -279,7 +277,7 @@ void qemu_plugin_register_vcpu_idle_cb(qemu_plugin_id_t id,
277
* qemu_plugin_register_vcpu_resume_cb() - register a vCPU resume callback
278
* @id: plugin ID
279
* @cb: callback function
282
- * @userdata: any plugin data to pass to the @cb
280
+ * @userdata: user data for callback
281
*
282
* The @cb function is called every time a vCPU resumes execution.
283
*/
@@ -293,7 +291,7 @@ void qemu_plugin_register_vcpu_resume_cb(qemu_plugin_id_t id,
291
* @id: plugin ID
292
* @type: types of discontinuities for which to call the callback
293
* @cb: callback function
296
- * @userdata: any plugin data to pass to the @cb
294
+ * @userdata: user data for callback
295
*
296
* The @cb function is called every time a vCPU receives a discontinuity event
297
* of the specified type(s), after the vCPU was prepared to handle the event.
@@ -427,7 +425,7 @@ typedef void (*qemu_plugin_vcpu_tb_trans_cb_t)(struct qemu_plugin_tb *tb,
425
* qemu_plugin_register_vcpu_tb_trans_cb() - register a translate cb
426
* @id: plugin ID
427
* @cb: callback function
430
- * @userdata: any plugin data to pass to the @cb
428
+ * @userdata: user data for callback
429
*
430
* The @cb function is called every time a translation occurs. The @cb
431
* function is passed an opaque qemu_plugin_type which it can query
@@ -446,7 +444,7 @@ void qemu_plugin_register_vcpu_tb_trans_cb(qemu_plugin_id_t id,
444
* @tb: the opaque qemu_plugin_tb handle for the translation
445
* @cb: callback function
446
* @flags: does the plugin read or write the CPU's registers?
449
- * @userdata: any plugin data to pass to the @cb?
447
+ * @userdata: user data for callback
448
*
449
* The @cb function is called every time a translated unit executes.
450
*/
@@ -464,7 +462,7 @@ void qemu_plugin_register_vcpu_tb_exec_cb(struct qemu_plugin_tb *tb,
462
* @entry: first operand for condition
463
* @imm: second operand for condition
464
* @flags: does the plugin read or write the CPU's registers?
467
- * @userdata: any plugin data to pass to the @cb?
465
+ * @userdata: user data for callback
466
*
467
* The @cb function is called when a translated unit executes if
468
* entry @cond imm is true.
@@ -514,7 +512,7 @@ void qemu_plugin_register_vcpu_tb_exec_inline_per_vcpu(
512
* @insn: the opaque qemu_plugin_insn handle for an instruction
513
* @cb: callback function
514
* @flags: does the plugin read or write the CPU's registers?
517
- * @userdata: any plugin data to pass to the @cb?
515
+ * @userdata: user data for callback
516
*
517
* The @cb function is called every time an instruction is executed
518
*/
@@ -532,7 +530,7 @@ void qemu_plugin_register_vcpu_insn_exec_cb(struct qemu_plugin_insn *insn,
530
* @cond: condition to enable callback
531
* @entry: first operand for condition
532
* @imm: second operand for condition
535
- * @userdata: any plugin data to pass to the @cb?
533
+ * @userdata: user data for callback
534
*
535
* The @cb function is called when an instruction executes if
536
* entry @cond imm is true.
@@ -748,7 +746,7 @@ const char *qemu_plugin_hwaddr_device_name(const struct qemu_plugin_hwaddr *h);
746
* @vcpu_index: the executing vCPU
747
* @info: an opaque handle for further queries about the memory
748
* @vaddr: the virtual address of the transaction
751
- * @userdata: any user data attached to the callback
749
+ * @userdata: user data for callback
750
*/
751
typedef void (*qemu_plugin_vcpu_mem_cb_t) (unsigned int vcpu_index,
752
qemu_plugin_meminfo_t info,
@@ -761,7 +759,7 @@ typedef void (*qemu_plugin_vcpu_mem_cb_t) (unsigned int vcpu_index,
759
* @cb: callback of type qemu_plugin_vcpu_mem_cb_t
760
* @flags: (currently unused) callback flags
761
* @rw: monitor reads, writes or both
764
- * @userdata: opaque pointer for userdata
762
+ * @userdata: user data for callback
763
*
764
* This registers a full callback for every memory access generated by
765
* an instruction. If the instruction doesn't access memory no