|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86: Name parameters in function declarations
commit eb518632cdbc5dc8811075ac08ec0b5341528efa
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Fri Dec 5 18:34:47 2025 +0000
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Fri Dec 12 03:04:48 2025 +0000
x86: Name parameters in function declarations
With the wider testing, some more violations have been spotted. This
addresses violations of Rule 8.2 (parameters must be named).
livepatch_op() has a further problem. The other declaration (the stub for
!LIVEPATCH builds) has a parameter named op, but the definition has the
parameter named livepatch. Rename it to op which is more concise and better
in line with it's type name.
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
---
xen/arch/x86/mm/shadow/common.c | 8 ++++----
xen/arch/x86/pv/emul-priv-op.c | 4 ++--
xen/common/livepatch.c | 16 ++++++++--------
xen/include/xen/livepatch.h | 2 +-
4 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index 423764a326..f2aee5be46 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -69,11 +69,11 @@ const uint8_t sh_type_to_size[] = {
DEFINE_PER_CPU(uint32_t,trace_shadow_path_flags);
-static int cf_check sh_enable_log_dirty(struct domain *);
-static int cf_check sh_disable_log_dirty(struct domain *);
-static void cf_check sh_clean_dirty_bitmap(struct domain *);
+static int cf_check sh_enable_log_dirty(struct domain *d);
+static int cf_check sh_disable_log_dirty(struct domain *d);
+static void cf_check sh_clean_dirty_bitmap(struct domain *d);
-static void cf_check shadow_update_paging_modes(struct vcpu *);
+static void cf_check shadow_update_paging_modes(struct vcpu *v);
/* Set up the shadow-specific parts of a domain struct at start of day.
* Called for every domain from arch_domain_create() */
diff --git a/xen/arch/x86/pv/emul-priv-op.c b/xen/arch/x86/pv/emul-priv-op.c
index 225d4cff03..f1e8f4e014 100644
--- a/xen/arch/x86/pv/emul-priv-op.c
+++ b/xen/arch/x86/pv/emul-priv-op.c
@@ -40,10 +40,10 @@ struct priv_op_ctxt {
};
/* I/O emulation helpers. Use non-standard calling conventions. */
-void nocall load_guest_gprs(struct cpu_user_regs *);
+void nocall load_guest_gprs(struct cpu_user_regs *regs);
void nocall save_guest_gprs(void);
-typedef void io_emul_stub_t(struct cpu_user_regs *);
+typedef void io_emul_stub_t(struct cpu_user_regs *regs);
static io_emul_stub_t *io_emul_stub_setup(struct priv_op_ctxt *ctxt, u8 opcode,
unsigned int port, unsigned int
bytes)
diff --git a/xen/common/livepatch.c b/xen/common/livepatch.c
index 9285f88644..9357c1b77a 100644
--- a/xen/common/livepatch.c
+++ b/xen/common/livepatch.c
@@ -2196,30 +2196,30 @@ static int livepatch_action(struct
xen_sysctl_livepatch_action *action)
return rc;
}
-int livepatch_op(struct xen_sysctl_livepatch_op *livepatch)
+int livepatch_op(struct xen_sysctl_livepatch_op *op)
{
int rc;
- if ( (livepatch->flags & ~LIVEPATCH_FLAGS_MASK) &&
- !(livepatch->flags & LIVEPATCH_FLAG_FORCE) )
+ if ( (op->flags & ~LIVEPATCH_FLAGS_MASK) &&
+ !(op->flags & LIVEPATCH_FLAG_FORCE) )
return -EINVAL;
- switch ( livepatch->cmd )
+ switch ( op->cmd )
{
case XEN_SYSCTL_LIVEPATCH_UPLOAD:
- rc = livepatch_upload(&livepatch->u.upload);
+ rc = livepatch_upload(&op->u.upload);
break;
case XEN_SYSCTL_LIVEPATCH_GET:
- rc = livepatch_get(&livepatch->u.get);
+ rc = livepatch_get(&op->u.get);
break;
case XEN_SYSCTL_LIVEPATCH_LIST:
- rc = livepatch_list(&livepatch->u.list);
+ rc = livepatch_list(&op->u.list);
break;
case XEN_SYSCTL_LIVEPATCH_ACTION:
- rc = livepatch_action(&livepatch->u.action);
+ rc = livepatch_action(&op->u.action);
break;
default:
diff --git a/xen/include/xen/livepatch.h b/xen/include/xen/livepatch.h
index d074a5bebe..3f5ad01f1b 100644
--- a/xen/include/xen/livepatch.h
+++ b/xen/include/xen/livepatch.h
@@ -62,7 +62,7 @@ struct livepatch_fstate {
uint8_t insn_buffer[LIVEPATCH_OPAQUE_SIZE];
};
-int livepatch_op(struct xen_sysctl_livepatch_op *);
+int livepatch_op(struct xen_sysctl_livepatch_op *op);
void check_for_livepatch_work(void);
unsigned long livepatch_symbols_lookup_by_name(const char *symname);
bool is_patch(const void *addr);
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |