Author: Himangi Saraogi <himangi774@gmail.com> The functions time_before, time_before_eq, time_after, and time_after_eq are more robust for comparing jiffies against other values. A simplified version of the Coccinelle semantic patch making this change is as follows: @change@ expression E1,E2; @@ – jiffies – E1 < E2 + time_before(jiffies, E1+E2) Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall Signed-off-by: David …
Category: Linux
Aug 20 2014
dn_dev: Use time_before
Author: Himangi Saraogi <himangi774@gmail.com> The functions time_before, time_before_eq, time_after, and time_after_eq are more robust for comparing jiffies against other values. A simplified version of the Coccinelle semantic patch making this change is as follows: @change@ expression E1,E2; @@ ( – (jiffies – E1) < E2 + time_before(jiffies, E1+E2) ) Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall …
Aug 18 2014
libfc: Replace rcu_assign_pointer() with RCU_INIT_POINTER()
Author: Andreea-Cristina Bernat <bernat.ada@gmail.com> The uses of “rcu_assign_pointer()” are NULLing out the pointers. According to RCU_INIT_POINTER()’s block comment: “1. This use of RCU_INIT_POINTER() is NULLing out the pointer” it is better to use it instead of rcu_assign_pointer() because it has a smaller overhead. The following Coccinelle semantic patch was used: @@ @@ – rcu_assign_pointer + …
Aug 18 2014
nvme: Replace rcu_assign_pointer() with RCU_INIT_POINTER()
Author: Andreea-Cristina Bernat <bernat.ada@gmail.com> The use of “rcu_assign_pointer()” is NULLing out the pointer. According to RCU_INIT_POINTER()’s block comment: “1. This use of RCU_INIT_POINTER() is NULLing out the pointer” it is better to use it instead of rcu_assign_pointer() because it has a smaller overhead. The following Coccinelle semantic patch was used: @@ @@ – rcu_assign_pointer + …
Aug 18 2014
iommu: Replace rcu_assign_pointer() with RCU_INIT_POINTER()
Author: Andreea-Cristina Bernat <bernat.ada@gmail.com> The use of “rcu_assign_pointer()” is NULLing out the pointer. According to RCU_INIT_POINTER()’s block comment: “1. This use of RCU_INIT_POINTER() is NULLing out the pointer” it is better to use it instead of rcu_assign_pointer() because it has a smaller overhead. The following Coccinelle semantic patch was used: @@ @@ – rcu_assign_pointer + …
Aug 18 2014
tcm_fc: Replace rcu_assign_pointer() with RCU_INIT_POINTER()
Author: Andreea-Cristina Bernat <bernat.ada@gmail.com> The use of “rcu_assign_pointer()” is NULLing out the pointer. According to RCU_INIT_POINTER()’s block comment: “1. This use of RCU_INIT_POINTER() is NULLing out the pointer” it is better to use it instead of rcu_assign_pointer() because it has a smaller overhead. The following Coccinelle semantic patch was used: @@ @@ – rcu_assign_pointer + …
Aug 17 2014
net/openvswitch/flow.c: Replace rcu_dereference() with rcu_access_pointer()
Author: Andreea-Cristina Bernat <bernat.ada@gmail.com> The “rcu_dereference()” call is used directly in a condition. Since its return value is never dereferenced it is recommended to use “rcu_access_pointer()” instead of “rcu_dereference()”. Therefore, this patch makes the replacement. The following Coccinelle semantic patch was used: @@ @@ ( if( ()) {…} | while( ()) {…} ) Signed-off-by: Andreea-Cristina …
Aug 17 2014
mac80211: Replace rcu_dereference() with rcu_access_pointer()
Author: Andreea-Cristina Bernat <bernat.ada@gmail.com> The “rcu_dereference()” calls are used directly in conditions. Since their return values are never dereferenced it is recommended to use “rcu_access_pointer()” instead of “rcu_dereference()”. Therefore, this patch makes the replacements. The following Coccinelle semantic patch was used: @@ @@ ( if( ()) {…} | while( ()) {…} ) Signed-off-by: Andreea-Cristina Bernat …
Aug 17 2014
net/ipv4/igmp.c: Replace rcu_dereference() with rcu_access_pointer()
Author: Andreea-Cristina Bernat <bernat.ada@gmail.com> The “rcu_dereference()” call is used directly in a condition. Since its return value is never dereferenced it is recommended to use “rcu_access_pointer()” instead of “rcu_dereference()”. Therefore, this patch makes the replacement. The following Coccinelle semantic patch was used: @@ @@ ( if( ()) {…} | while( ()) {…} ) Signed-off-by: Andreea-Cristina …
Aug 17 2014
bonding: Replace rcu_dereference() with rcu_access_pointer()
Author: Andreea-Cristina Bernat <bernat.ada@gmail.com> This “rcu_dereference()” call is used directly in a condition. Since its return value is never dereferenced it is recommended to use “rcu_access_pointer()” instead of “rcu_dereference()”. Therefore, this patch makes this replacement. The following Coccinelle semantic patch was used for solving it: @@ @@ ( if( ()) {…} | while( ()) {…} …