Skip to contentSkip to conversation

Documentation: RCU: adopt new coding style of type-aware kmalloc-family - part 2/2

PATCH Applied Manuel Ebner 2 participants 2 messages Jun 27 – Jun 28

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

PATCH 1/1 Documentation: RCU: adopt new coding style of type-aware kmalloc-family - part 2/2

Update Documentation/RCU/* to reflect new type-aware kmalloc-family as suggested in commit 2932ba8d9c99 ("slab: Introduce kmalloc_obj() and family")

p = kmalloc(...);
-> p = kmalloc_obj(...);

---
A similar patch sent by me has been applied. Back then I wasn't familiar enough to convert all *alloc(*. That's why this is " - part 2/2". Part 1: f61bf5fdf77d ("Documentation: RCU: adopt new coding style of
type-aware kmalloc-family")

---
 Documentation/RCU/rcu_dereference.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/RCU/rcu_dereference.rst +2 -2
index 2524dcdadde2..5bc3785ebfc2 100644
@@ -236,7 +236,7 @@ precautions.  To see this, consider the following code fragment::
 	{
 		struct foo *p;
 
-		p = kmalloc(...);
+		p = kmalloc_obj(*p);
 		if (p == NULL)
 			deal_with_it();
 		p->a = 42;  /* Each field in its own cache line. */
@@ -293,7 +293,7 @@ Then one approach is to use locking, for example, as follows::
 	{
 		struct foo *p;
 
-		p = kmalloc(...);
+		p = kmalloc_obj(*p);
 		if (p == NULL)
 			deal_with_it();
 		spin_lock(&p->lock);
Signature · 1 line
2.54.0
maintainer Applied
#1 lore raw
Quoted 8 lines · Manuel Ebner

Update Documentation/RCU/* to reflect new type-aware kmalloc-family as suggested in commit 2932ba8d9c99 ("slab: Introduce kmalloc_obj() and family")

p = kmalloc(...);
-> p = kmalloc_obj(...);

Queued for further review, thank you!!!

Thanx, Paul

Quoted 34 lines

---
A similar patch sent by me has been applied. Back then I wasn't familiar enough to convert all *alloc(*. That's why this is " - part 2/2". Part 1: f61bf5fdf77d ("Documentation: RCU: adopt new coding style of
type-aware kmalloc-family")

---
 Documentation/RCU/rcu_dereference.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/RCU/rcu_dereference.rst +2 -2
index 2524dcdadde2..5bc3785ebfc2 100644
@@ -236,7 +236,7 @@ precautions.  To see this, consider the following code fragment::
 	{
 		struct foo *p;
 
-		p = kmalloc(...);
+		p = kmalloc_obj(*p);
 		if (p == NULL)
 			deal_with_it();
 		p->a = 42;  /* Each field in its own cache line. */
@@ -293,7 +293,7 @@ Then one approach is to use locking, for example, as follows::
 	{
 		struct foo *p;
 
-		p = kmalloc(...);
+		p = kmalloc_obj(*p);
 		if (p == NULL)
 			deal_with_it();
 		spin_lock(&p->lock);
Signature · 1 line
2.54.0