Skip to contentSkip to conversation

lib: make sg_pool tristate instead of bool

PATCH In review Paul Gortmaker 4 participants 5 messages Apr 24, 2016 – Apr 30, 2016 Library code

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 lib: make sg_pool tristate instead of bool

The recently added Kconfig controlling compilation of this code is:

lib/Kconfig:config SG_POOL
lib/Kconfig: def_bool n

...meaning that it currently is not being built as a module by anyone, and that tripped my audit looking for modular code that is essentially orphaned (i.e. module_exit, and .remove fcns in non-modular drivers.)

In the following discussion, Ming Lin indicated that the original intention was to have it tristate, so here we convert it accordingly.

Also fix up a couple spelling issues that appear in the surrounding patch context.

Cc Christoph Hellwig <[email protected]>
Cc Ming Lin <[email protected]>
Cc Sagi Grimberg <[email protected]>
Cc Martin K. Petersen <[email protected]>

---

[v2: drop modular code removal patch in favour of supporting a modular
build via a one line Kconfig patch as per Ming's comments. Build tested
for allmodconfig on ARM and x86-64 on linux-next. ]

 lib/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
lib/Kconfig +3 -3
index e04f168f8f42..8de5868804b5 100644
@@ -528,13 +528,13 @@ config SG_SPLIT
 	help
 	 Provides a helper to split scatterlists into chunks, each chunk being
 	 a scatterlist. This should be selected by a driver or an API which
-	 whishes to split a scatterlist amongst multiple DMA channels.
+	 wishes to split a scatterlist amongst multiple DMA channels.
 
 config SG_POOL
-	def_bool n
+	def_tristate n
 	help
 	 Provides a helper to allocate chained scatterlists. This should be
-	 selected by a driver or an API which whishes to allocate chained
+	 selected by a driver or an API which wishes to allocate chained
 	 scatterlist.
 
 #
Signature · 1 line
2.8.0
Acked-by on v2 1/1
#1 lore raw
Quoted 40 lines · Paul Gortmaker

The recently added Kconfig controlling compilation of this code is:

lib/Kconfig:config SG_POOL
lib/Kconfig: def_bool n

...meaning that it currently is not being built as a module by anyone, and that tripped my audit looking for modular code that is essentially orphaned (i.e. module_exit, and .remove fcns in non-modular drivers.)

In the following discussion, Ming Lin indicated that the original intention was to have it tristate, so here we convert it accordingly.

Also fix up a couple spelling issues that appear in the surrounding patch context.

Cc Christoph Hellwig <[email protected]>
Cc Ming Lin <[email protected]>
Cc Sagi Grimberg <[email protected]>
Cc Martin K. Petersen <[email protected]>

---

[v2: drop modular code removal patch in favour of supporting a modular
build via a one line Kconfig patch as per Ming's comments. Build tested
for allmodconfig on ARM and x86-64 on linux-next. ]

 lib/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
lib/Kconfig +1 -1
index e04f168f8f42..8de5868804b5 100644
@@ -528,13 +528,13 @@ config SG_SPLIT
        help
         Provides a helper to split scatterlists into chunks, each chunk being
         a scatterlist. This should be selected by a driver or an API which
-        whishes to split a scatterlist amongst multiple DMA channels.
+        wishes to split a scatterlist amongst multiple DMA channels.
 

lib/Kconfig config SG_SPLIT · line 540

Quoted 10 lines
lib/Kconfig +2 -2
 config SG_POOL
-       def_bool n
+       def_tristate n
        help
         Provides a helper to allocate chained scatterlists. This should be
-        selected by a driver or an API which whishes to allocate chained
+        selected by a driver or an API which wishes to allocate chained
         scatterlist.
 
 #

Looks good.

Thanks.

#2 lore raw
In reply to Paul Gortmaker
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Paul" == Paul Gortmaker <[email protected]> writes:

Paul> The recently added Kconfig controlling compilation of this code Paul> is: lib/Kconfig:config SG_POOL lib/Kconfig: def_bool n

Paul> ...meaning that it currently is not being built as a module by Paul> anyone, and that tripped my audit looking for modular code that is Paul> essentially orphaned (i.e. module_exit, and .remove fcns in Paul> non-modular drivers.)

Paul> In the following discussion, Ming Lin indicated that the original Paul> intention was to have it tristate, so here we convert it Paul> accordingly.

Paul> Also fix up a couple spelling issues that appear in the Paul> surrounding patch context.

Somebody please review...

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#3 lore raw
Quoted 1 line · Martin K. Petersen

Somebody please review...

The patch is useless, we should just ignore it.

#4 lore raw
Quoted 4 lines · [Re: [PATCH v2] lib: make sg_pool tristate instead of bool] On 28/04/2016 (Thu…
Quoted 1 line · Martin K. Petersen

Somebody please review...

The patch is useless, we should just ignore it.

I'll be the 1st to admit the patch isn't rocket science, but I'm missing why it warrants a blanket "ignore" status. If we have dead code or a disconnect between Kconfig and source, to me that seems worth fixing.

Not looking to start a debate; just hoping to understand what I missed.

Thanks,
Paul.
--