Skip to contentSkip to conversation

Docs: this_cpu_ops: remove redundant add forms

PATCH Applied Mark Rutland 3 participants 3 messages Sep 24, 2014 – Sep 25, 2014 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Docs: this_cpu_ops: remove redundant add forms

Hi,

I spotted the below while trying to figure out how to use this_cpu ops, and it left me confused for a short while.

I guess that this is a refactoring fallout rather than there being a special this_cpu_add variant?

Mark.

---->8----
Commit ac490f4dca94 (Documentation: this_cpu_ops.txt: Update description of this_cpu_ops) added lists of {__,}this_cpu operations, but these have duplicate, parameter-less entries for {__,}this_cpu_add which don't correspond to any implementation. No other operations have such duplicate entries.

Given both are also listed with their full complement of arguments, the empty forms are redundant and can be removed. This patch performs said removal.

Cc Pranith Kumar <[email protected]>
Cc Christoph Lameter <[email protected]>
Cc Randy Dunlap <[email protected]>
---
 Documentation/this_cpu_ops.txt | 2 --
 1 file changed, 2 deletions(-)
Documentation/this_cpu_ops.txt +0 -2
index 0ec9957..2cbf719 100644
@@ -41,7 +41,6 @@ The following this_cpu() operations with implied preemption protection
 are defined. These operations can be used without worrying about
 preemption and interrupts.
 
-	this_cpu_add()
 	this_cpu_read(pcp)
 	this_cpu_write(pcp, val)
 	this_cpu_add(pcp, val)
@@ -225,7 +224,6 @@ still occur while an operation is in progress and if the interrupt too
 modifies the variable, then RMW actions can not be guaranteed to be
 safe.
 
-	__this_cpu_add()
 	__this_cpu_read(pcp)
 	__this_cpu_write(pcp, val)
 	__this_cpu_add(pcp, val)
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Mark Rutland

I spotted the below while trying to figure out how to use this_cpu ops, and it left me confused for a short while.

I guess that this is a refactoring fallout rather than there being a special this_cpu_add variant?

Thanks for fixing it.

reviewer Applied
#2 lore raw
In reply to Mark Rutland
Quoted 21 lines · Mark Rutland

Hi,

I spotted the below while trying to figure out how to use this_cpu ops, and it left me confused for a short while.

I guess that this is a refactoring fallout rather than there being a special this_cpu_add variant?

Mark.

---->8----
Commit ac490f4dca94 (Documentation: this_cpu_ops.txt: Update description of this_cpu_ops) added lists of {__,}this_cpu operations, but these have duplicate, parameter-less entries for {__,}this_cpu_add which don't correspond to any implementation. No other operations have such duplicate entries.

Given both are also listed with their full complement of arguments, the empty forms are redundant and can be removed. This patch performs said removal.

Quoted 7 lines
Cc Pranith Kumar <[email protected]>
Cc Christoph Lameter <[email protected]>
Cc Randy Dunlap <[email protected]>
---
 Documentation/this_cpu_ops.txt | 2 --
 1 file changed, 2 deletions(-)

Applied, thanks.

Quoted 21 lines
Documentation/this_cpu_ops.txt +0 -2
index 0ec9957..2cbf719 100644
@@ -41,7 +41,6 @@ The following this_cpu() operations with implied preemption protection
 are defined. These operations can be used without worrying about
 preemption and interrupts.
 
-	this_cpu_add()
 	this_cpu_read(pcp)
 	this_cpu_write(pcp, val)
 	this_cpu_add(pcp, val)
@@ -225,7 +224,6 @@ still occur while an operation is in progress and if the interrupt too
 modifies the variable, then RMW actions can not be guaranteed to be
 safe.
 
-	__this_cpu_add()
 	__this_cpu_read(pcp)
 	__this_cpu_write(pcp, val)
 	__this_cpu_add(pcp, val)
Signature · 1 line
~Randy