Skip to contentSkip to conversation

perf tests workload: Formatting for code_with_type.rs

PATCH In review Dmitrii Dolgov 5 participants 5 messages Feb 9 – Feb 10

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf tests workload: Formatting for code_with_type.rs

One part of the rust code for code_with_type workload wasn't properly formatted. Pass it through rustfmt to fix that.

---
 tools/perf/tests/workloads/code_with_type.rs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
tools/perf/tests/workloads/code_with_type.rs +5 -1
index 3b91e51919d..3dab39b22dd 100644
@@ -10,7 +10,11 @@ struct Buf {
 
 #[no_mangle]
 pub extern "C" fn test_rs(count: u32) {
-    let mut b =  Buf { data1: 0, data2: String::from("data"), data3: 0};
+    let mut b = Buf {
+        data1: 0,
+        data2: String::from("data"),
+        data3: 0,
+    };
 
     for _ in 1..count {
         b.data1 += 1;

base-commit: 335047109d7d488bf5ad32a4076e1a011994cd0e

Signature · 1 line
2.52.0
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Dmitrii Dolgov

One part of the rust code for code_with_type workload wasn't properly formatted. Pass it through rustfmt to fix that.

Thanks,
Ian

Quoted 26 lines
---
 tools/perf/tests/workloads/code_with_type.rs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
tools/perf/tests/workloads/code_with_type.rs +5 -1
index 3b91e51919d..3dab39b22dd 100644
@@ -10,7 +10,11 @@ struct Buf {
 
 #[no_mangle]
 pub extern "C" fn test_rs(count: u32) {
-    let mut b =  Buf { data1: 0, data2: String::from("data"), data3: 0};
+    let mut b = Buf {
+        data1: 0,
+        data2: String::from("data"),
+        data3: 0,
+    };
 
     for _ in 1..count {
         b.data1 += 1;

base-commit: 335047109d7d488bf5ad32a4076e1a011994cd0e --
2.52.0

#2 lore raw
In reply to Dmitrii Dolgov
Quoted 7 lines · Dmitrii Dolgov

One part of the rust code for code_with_type workload wasn't properly formatted. Pass it through rustfmt to fix that.

Could this please be applied (or fixed in-place)?

It is now in next-20260209, and we check this in different CIs. It also makes LKP give spurious reports, e.g.:

https://lore.kernel.org/all/[email protected]/

Thanks!

Fixes 2e05bb52a12d ("perf test workload: Add code_with_type test workload")

Cc'ing Mark since I think the plan is to check in linux-next.

Cheers,
Miguel

maintainer
#3 lore raw
Quoted 1 line · Miguel Ojeda

Cc'ing Mark since I think the plan is to check in linux-next.

Yes, I was going to revisit this after the merge window - hopefully all the fixes will have landed by then (clippy was the main thing IIRC).

#4 lore raw
In reply to Miguel Ojeda
Quoted 10 lines · Miguel Ojeda
Quoted 7 lines · Dmitrii Dolgov

One part of the rust code for code_with_type workload wasn't properly formatted. Pass it through rustfmt to fix that.

Could this please be applied (or fixed in-place)?

Its merged and pushed out, should be clean now,

- Arnaldo

Quoted 13 lines

It is now in next-20260209, and we check this in different CIs. It also makes LKP give spurious reports, e.g.:

https://lore.kernel.org/all/[email protected]/

Thanks!

Fixes 2e05bb52a12d ("perf test workload: Add code_with_type test workload")

Cc'ing Mark since I think the plan is to check in linux-next.

Cheers,
Miguel