On Wednesday, 20 May 2020 10:41:40 CEST Antonio Quartulli wrote:
In a63fc6b7 ("rcu: Upgrade rcu_swap_protected() to rcu_replace_pointer()") a new helper macro named rcu_replace_pointer() was introduced to simplify code requiring to switch an rcu pointer to a new value while extracting the old one.
Please use the reference style 'commit a63fc6b75cca ("rcu: Upgrade rcu_swap_protected() to rcu_replace_pointer()")' in the future [1]. checkpatch will also report something like this when it detects a short commit id:
ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit a63fc6b75cca ("rcu: Upgrade rcu_swap_protected() to rcu_replace_pointer()")'
I will change this for you.
[...]
+#if LINUX_VERSION_IS_LESS(5, 5, 0)
+#define rcu_replace_pointer(rcu_ptr, ptr, c) \ +({ \
- typeof(ptr) __tmp = rcu_dereference_protected((rcu_ptr), (c)); \
- rcu_assign_pointer((rcu_ptr), (ptr)); \
- __tmp; \
+})
+#endif /* LINUX_VERSION_IS_LESS(5, 5, 0) */
To avoid problems with a (potentially) backported patch in the stable kernels - please #undef rcu_replace_pointer first. I will do this for you.
Applied.
Thanks, Sven
[1] https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html#descri...