[PATCH v4 1/2] tests/intel/xe_fault_injection: Make pci_slot const
K V P, Satyanarayana
satyanarayana.k.v.p at intel.com
Mon Jun 9 08:29:31 UTC 2025
> -----Original Message-----
> From: Cavitt, Jonathan <jonathan.cavitt at intel.com>
> Sent: Saturday, June 7, 2025 12:05 AM
> To: igt-dev at lists.freedesktop.org
> Cc: Cavitt, Jonathan <jonathan.cavitt at intel.com>; K V P, Satyanarayana
> <satyanarayana.k.v.p at intel.com>; Wajdeczko, Michal
> <Michal.Wajdeczko at intel.com>; Ceraolo Spurio, Daniele
> <daniele.ceraolospurio at intel.com>; De Marchi, Lucas
> <lucas.demarchi at intel.com>; Dugast, Francois <francois.dugast at intel.com>;
> Vivi, Rodrigo <rodrigo.vivi at intel.com>; Harrison, John C
> <john.c.harrison at intel.com>; kamil.konieczny at linux.intel.com
> Subject: [PATCH v4 1/2] tests/intel/xe_fault_injection: Make pci_slot const
>
> The pci_slot string is passed to multiple functions in
> xe_fault_injection. It is also unmodified in those functions, so should
> be passed as a const.
>
> Signed-off-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
> Suggested-by: John Harrison <john.c.harrison at intel.com>
> ---
> tests/intel/xe_fault_injection.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/intel/xe_fault_injection.c b/tests/intel/xe_fault_injection.c
> index 9fe6bfe351..7a14ad1729 100644
> --- a/tests/intel/xe_fault_injection.c
> +++ b/tests/intel/xe_fault_injection.c
> @@ -228,7 +228,7 @@ static void set_retval(const char function_name[],
> long long retval)
> * @xe_wopcm_init: xe_wopcm_init
> */
> static int
> -inject_fault_probe(int fd, char pci_slot[], const char function_name[])
> +inject_fault_probe(int fd, const char pci_slot[], const char function_name[])
> {
> int err = 0;
> igt_info("Injecting error \"%s\" (%d) in function \"%s\"\n",
> @@ -255,7 +255,7 @@ inject_fault_probe(int fd, char pci_slot[], const char
> function_name[])
> * @xe_guc_mmio_send_recv: Inject an error when calling
> xe_guc_mmio_send_recv
> * @xe_guc_ct_send_recv: Inject an error when calling
> xe_guc_ct_send_recv
> */
> -static void probe_fail_guc(int fd, char pci_slot[], const char function_name[],
> +static void probe_fail_guc(int fd, const char pci_slot[], const char
> function_name[],
> struct fault_injection_params *fault_params)
> {
> int iter_start = 0, iter_end = 0, iter = 0;
> --
Why to create a separate commit for this?
Can't we add these changes in the other commit? I see pci_slot is added for many functions in other commit
"tests/intel/xe_fault_injection: Ignore all errors while injecting fault" and this is also related to the same.
Any specific reason to create this new commit?
-Satya.
> 2.43.0
More information about the igt-dev
mailing list