Prefer core helper if available.
Signed-off-by: Andrzej Hajda
---
drivers/gpu/drm/i915/gt/intel_engine_cs.c| 2 +-
drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c | 4 ++--
drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 4 ++--
drivers/gpu/drm/i915/gt/intel_ggtt.c
Recently introduced helper simplifies the code.
Signed-off-by: Andrzej Hajda
---
include/linux/qed/qed_chain.h | 19 +++
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/include/linux/qed/qed_chain.h b/include/linux/qed/qed_chain.h
index a84063492c71ae..6355d558cf01
Recently introduced helper simplifies the code.
Signed-off-by: Andrzej Hajda
---
io_uring/io_uring.c | 7 ++-
io_uring/slist.h| 6 ++
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 2ac1cd8d23ea62..2b46a692d69022 100644
-
llist_del_all uses xchg, let's use __xchg here.
Signed-off-by: Andrzej Hajda
---
include/linux/llist.h | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/linux/llist.h b/include/linux/llist.h
index 85bda2d02d65be..4dc1d185ea98ab 100644
--- a/include/linux/llist.h
+
In all architectures, except x86, arch_uretprobe_hijack_return_addr
is just __xchg.
Signed-off-by: Andrzej Hajda
---
arch/arm/probes/uprobes/core.c | 8 ++--
arch/arm64/kernel/probes/uprobes.c | 9 ++---
arch/csky/kernel/probes/uprobes.c | 9 ++---
arch/mips/kernel/uprobes.c
The pattern of setting variable with new value and returning old
one is very common in kernel. Usually atomicity of the operation
is not required, so xchg seems to be suboptimal and confusing in
such cases.
Signed-off-by: Andrzej Hajda
Reviewed-by: Andy Shevchenko
---
include/linux/non-atomic/x
__xchg will be used for non-atomic xchg macro.
Signed-off-by: Andrzej Hajda
Reviewed-by: Arnd Bergmann
Acked-by: Geert Uytterhoeven [m68k]
Acked-by: Palmer Dabbelt [riscv]
---
v2: squashed all arch patches into one
v3: fixed alpha/xchg_local, thx to l...@intel.com
v4: adjusted indentation (Hei
Hi all,
The helper is tiny and there are advices we can live without it, so
I want to present few arguments why it would be good to have it:
1. Code readability/simplification/number of lines:
- decreases number of lines,
- it often eliminates local variables,
- for real examples see patche