Skip to contentSkip to conversation

iio:dummy: Fix coding style in Kconfig

PATCH In review Rodrigo Siqueira 2 participants 5 messages Feb 20, 2018 – Feb 24, 2018

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

PATCH 1/1 iio:dummy: Fix coding style in Kconfig

This patch fixes the checkpatch.pl warning:

drivers/iio/dummy/Kconfig:21: WARNING: please write a paragraph that describes the config symbol fully drivers/iio/dummy/Kconfig:29: WARNING: please write a paragraph that describes the config symbol fully

This patch expands the explanation about IIO_DUMMY_EVGEN by using the code documentation found in iio/dummy/iio_dummy_evgen.c. In the same way, the information related to IIO_SIMPLE_DUMMY_BUFFER was extracted from file iio_simple_dummy_buffer.c. Finally, this patch apply the coding-style for Kconfig files (Documentation/process/coding-style.rst)

---
 drivers/iio/dummy/Kconfig | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)
drivers/iio/dummy/Kconfig +16 -10
index 5a29fbd3c531..4a7127fb2979 100644
@@ -9,20 +9,24 @@ config IIO_DUMMY_EVGEN
 	tristate
 
 config IIO_SIMPLE_DUMMY
-       tristate "An example driver with no hardware requirements"
-       depends on IIO_SW_DEVICE
-       help
-	 Driver intended mainly as documentation for how to write
-	 a driver. May also be useful for testing userspace code
-	 without hardware.
+	tristate "An example driver with no hardware requirements"
+	depends on IIO_SW_DEVICE
+	help
+	  Driver intended mainly as documentation for how to write
+	  a driver. May also be useful for testing userspace code
+	  without hardware.
 
 if IIO_SIMPLE_DUMMY
 
 config IIO_SIMPLE_DUMMY_EVENTS
-       bool "Event generation support"
-       select IIO_DUMMY_EVGEN
-       help
-         Add some dummy events to the simple dummy driver.
+	bool "Event generation support"
+	select IIO_DUMMY_EVGEN
+	help
+	  Add some dummy events to the simple dummy driver.
+
+	  The purpose of this is to generate 'fake' event interrupts thus
+	  allowing that driver's code to be as close as possible to that
+	  a normal driver talking to hardware.
 
 config IIO_SIMPLE_DUMMY_BUFFER
 	bool "Buffered capture support"
@@ -32,6 +36,8 @@ config IIO_SIMPLE_DUMMY_BUFFER
 	help
 	  Add buffered data capture to the simple dummy driver.
 
+	  Buffer handling elements of industrial I/O reference driver.
+	  Uses the kfifo buffer.
 endif # IIO_SIMPLE_DUMMY
 
 endmenu
Signature · 1 line
2.16.1
maintainer
#1 lore raw
Quoted 7 lines · On Tue, 20 Feb 2018 10:28:04 -0300 Rodrigo Siqueira…

This patch fixes the checkpatch.pl warning:

drivers/iio/dummy/Kconfig:21: WARNING: please write a paragraph that describes the config symbol fully drivers/iio/dummy/Kconfig:29: WARNING: please write a paragraph that describes the config symbol fully

Quoted 7 lines

This patch expands the explanation about IIO_DUMMY_EVGEN by using the code documentation found in iio/dummy/iio_dummy_evgen.c. In the same way, the information related to IIO_SIMPLE_DUMMY_BUFFER was extracted from file iio_simple_dummy_buffer.c. Finally, this patch apply the coding-style for Kconfig files (Documentation/process/coding-style.rst)

Several different things going on in the one patch, please do it as a short series with one thing per patch.

Certainly do the coding style separately from the additional documentation.

Thanks,

Jonathan

Quoted 52 lines
---
 drivers/iio/dummy/Kconfig | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)
drivers/iio/dummy/Kconfig +16 -10
index 5a29fbd3c531..4a7127fb2979 100644
@@ -9,20 +9,24 @@ config IIO_DUMMY_EVGEN
 	tristate
 
 config IIO_SIMPLE_DUMMY
-       tristate "An example driver with no hardware requirements"
-       depends on IIO_SW_DEVICE
-       help
-	 Driver intended mainly as documentation for how to write
-	 a driver. May also be useful for testing userspace code
-	 without hardware.
+	tristate "An example driver with no hardware requirements"
+	depends on IIO_SW_DEVICE
+	help
+	  Driver intended mainly as documentation for how to write
+	  a driver. May also be useful for testing userspace code
+	  without hardware.
 
 if IIO_SIMPLE_DUMMY
 
 config IIO_SIMPLE_DUMMY_EVENTS
-       bool "Event generation support"
-       select IIO_DUMMY_EVGEN
-       help
-         Add some dummy events to the simple dummy driver.
+	bool "Event generation support"
+	select IIO_DUMMY_EVGEN
+	help
+	  Add some dummy events to the simple dummy driver.
+
+	  The purpose of this is to generate 'fake' event interrupts thus
+	  allowing that driver's code to be as close as possible to that
+	  a normal driver talking to hardware.
 
 config IIO_SIMPLE_DUMMY_BUFFER
 	bool "Buffered capture support"
@@ -32,6 +36,8 @@ config IIO_SIMPLE_DUMMY_BUFFER
 	help
 	  Add buffered data capture to the simple dummy driver.
 
+	  Buffer handling elements of industrial I/O reference driver.
+	  Uses the kfifo buffer.
 endif # IIO_SIMPLE_DUMMY
 
 endmenu
#2 lore raw
Quoted 18 lines · Jonathan Cameron
Quoted 7 lines · On Tue, 20 Feb 2018 10:28:04 -0300 Rodrigo Siqueira…

This patch fixes the checkpatch.pl warning:

drivers/iio/dummy/Kconfig:21: WARNING: please write a paragraph that describes the config symbol fully drivers/iio/dummy/Kconfig:29: WARNING: please write a paragraph that describes the config symbol fully

Quoted 7 lines

This patch expands the explanation about IIO_DUMMY_EVGEN by using the code documentation found in iio/dummy/iio_dummy_evgen.c. In the same way, the information related to IIO_SIMPLE_DUMMY_BUFFER was extracted from file iio_simple_dummy_buffer.c. Finally, this patch apply the coding-style for Kconfig files (Documentation/process/coding-style.rst)

Quoted 8 lines

Several different things going on in the one patch, please do it as a short series with one thing per patch.

Certainly do the coding style separately from the additional documentation.

Thanks,

Jonathan

So, should I split it into two different patches? One patch for the fix and other for the extra documentation?

Finally, in the two warnings related to "please write a paragraph that describes the config symbol fully" the extra documentation that fixes it. Other fixes, are related to the coding-style.rst however checkpatch does not complain about them.

Quoted 54 lines
Quoted 53 lines
---
 drivers/iio/dummy/Kconfig | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)
drivers/iio/dummy/Kconfig +16 -10
index 5a29fbd3c531..4a7127fb2979 100644
@@ -9,20 +9,24 @@ config IIO_DUMMY_EVGEN
 	tristate
 
 config IIO_SIMPLE_DUMMY
-       tristate "An example driver with no hardware requirements"
-       depends on IIO_SW_DEVICE
-       help
-	 Driver intended mainly as documentation for how to write
-	 a driver. May also be useful for testing userspace code
-	 without hardware.
+	tristate "An example driver with no hardware requirements"
+	depends on IIO_SW_DEVICE
+	help
+	  Driver intended mainly as documentation for how to write
+	  a driver. May also be useful for testing userspace code
+	  without hardware.
 
 if IIO_SIMPLE_DUMMY
 
 config IIO_SIMPLE_DUMMY_EVENTS
-       bool "Event generation support"
-       select IIO_DUMMY_EVGEN
-       help
-         Add some dummy events to the simple dummy driver.
+	bool "Event generation support"
+	select IIO_DUMMY_EVGEN
+	help
+	  Add some dummy events to the simple dummy driver.
+
+	  The purpose of this is to generate 'fake' event interrupts thus
+	  allowing that driver's code to be as close as possible to that
+	  a normal driver talking to hardware.
 
 config IIO_SIMPLE_DUMMY_BUFFER
 	bool "Buffered capture support"
@@ -32,6 +36,8 @@ config IIO_SIMPLE_DUMMY_BUFFER
 	help
 	  Add buffered data capture to the simple dummy driver.
 
+	  Buffer handling elements of industrial I/O reference driver.
+	  Uses the kfifo buffer.
 endif # IIO_SIMPLE_DUMMY
 
 endmenu
maintainer
#3 lore raw
Quoted 22 lines · On Sat, 24 Feb 2018 09:36:09 -0300 Rodrigo Siqueira…
Quoted 21 lines · Jonathan Cameron
Quoted 7 lines · On Tue, 20 Feb 2018 10:28:04 -0300 Rodrigo Siqueira…

This patch fixes the checkpatch.pl warning:

drivers/iio/dummy/Kconfig:21: WARNING: please write a paragraph that describes the config symbol fully drivers/iio/dummy/Kconfig:29: WARNING: please write a paragraph that describes the config symbol fully

Quoted 7 lines

This patch expands the explanation about IIO_DUMMY_EVGEN by using the code documentation found in iio/dummy/iio_dummy_evgen.c. In the same way, the information related to IIO_SIMPLE_DUMMY_BUFFER was extracted from file iio_simple_dummy_buffer.c. Finally, this patch apply the coding-style for Kconfig files (Documentation/process/coding-style.rst)

Several different things going on in the one patch, please do it as a short series with one thing per patch.

Quoted 8 lines
Quoted 5 lines

Certainly do the coding style separately from the additional documentation.

Thanks,

Jonathan

So, should I split it into two different patches? One patch for the fix and other for the extra documentation?

Yes that would be perfect.

Quoted 5 lines

Finally, in the two warnings related to "please write a paragraph that describes the config symbol fully" the extra documentation that fixes it. Other fixes, are related to the coding-style.rst however checkpatch does not complain about them.

Sure, checkpatch doesn't get everything.

Jonathan

Quoted 55 lines
Quoted 55 lines
Quoted 54 lines
 
  
---
 drivers/iio/dummy/Kconfig | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)
drivers/iio/dummy/Kconfig +16 -10
index 5a29fbd3c531..4a7127fb2979 100644
@@ -9,20 +9,24 @@ config IIO_DUMMY_EVGEN
 	tristate
 
 config IIO_SIMPLE_DUMMY
-       tristate "An example driver with no hardware requirements"
-       depends on IIO_SW_DEVICE
-       help
-	 Driver intended mainly as documentation for how to write
-	 a driver. May also be useful for testing userspace code
-	 without hardware.
+	tristate "An example driver with no hardware requirements"
+	depends on IIO_SW_DEVICE
+	help
+	  Driver intended mainly as documentation for how to write
+	  a driver. May also be useful for testing userspace code
+	  without hardware.
 
 if IIO_SIMPLE_DUMMY
 
 config IIO_SIMPLE_DUMMY_EVENTS
-       bool "Event generation support"
-       select IIO_DUMMY_EVGEN
-       help
-         Add some dummy events to the simple dummy driver.
+	bool "Event generation support"
+	select IIO_DUMMY_EVGEN
+	help
+	  Add some dummy events to the simple dummy driver.
+
+	  The purpose of this is to generate 'fake' event interrupts thus
+	  allowing that driver's code to be as close as possible to that
+	  a normal driver talking to hardware.
 
 config IIO_SIMPLE_DUMMY_BUFFER
 	bool "Buffered capture support"
@@ -32,6 +36,8 @@ config IIO_SIMPLE_DUMMY_BUFFER
 	help
 	  Add buffered data capture to the simple dummy driver.
 
+	  Buffer handling elements of industrial I/O reference driver.
+	  Uses the kfifo buffer.
 endif # IIO_SIMPLE_DUMMY
 
 endmenu  
#4 lore raw
Quoted 27 lines · Jonathan Cameron
Quoted 24 lines · On Sat, 24 Feb 2018 09:36:09 -0300 Rodrigo Siqueira…
Quoted 23 lines · Jonathan Cameron
Quoted 7 lines · On Tue, 20 Feb 2018 10:28:04 -0300 Rodrigo Siqueira…

This patch fixes the checkpatch.pl warning:

drivers/iio/dummy/Kconfig:21: WARNING: please write a paragraph that describes the config symbol fully drivers/iio/dummy/Kconfig:29: WARNING: please write a paragraph that describes the config symbol fully

Quoted 7 lines

This patch expands the explanation about IIO_DUMMY_EVGEN by using the code documentation found in iio/dummy/iio_dummy_evgen.c. In the same way, the information related to IIO_SIMPLE_DUMMY_BUFFER was extracted from file iio_simple_dummy_buffer.c. Finally, this patch apply the coding-style for Kconfig files (Documentation/process/coding-style.rst)

Several different things going on in the one patch, please do it as a short series with one thing per patch.

Certainly do the coding style separately from the additional documentation.

Quoted 7 lines
Quoted 6 lines
Quoted 3 lines

Thanks,

Jonathan

So, should I split it into two different patches? One patch for the fix and other for the extra documentation?

Yes that would be perfect.

Ok, I will send a v2 with two patches.

Thanks

Quoted 65 lines
Quoted 5 lines

Finally, in the two warnings related to "please write a paragraph that describes the config symbol fully" the extra documentation that fixes it. Other fixes, are related to the coding-style.rst however checkpatch does not complain about them.

Sure, checkpatch doesn't get everything.

Jonathan

Quoted 55 lines
Quoted 55 lines
Quoted 54 lines
 
  
---
 drivers/iio/dummy/Kconfig | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)
drivers/iio/dummy/Kconfig +16 -10
index 5a29fbd3c531..4a7127fb2979 100644
@@ -9,20 +9,24 @@ config IIO_DUMMY_EVGEN
 	tristate
 
 config IIO_SIMPLE_DUMMY
-       tristate "An example driver with no hardware requirements"
-       depends on IIO_SW_DEVICE
-       help
-	 Driver intended mainly as documentation for how to write
-	 a driver. May also be useful for testing userspace code
-	 without hardware.
+	tristate "An example driver with no hardware requirements"
+	depends on IIO_SW_DEVICE
+	help
+	  Driver intended mainly as documentation for how to write
+	  a driver. May also be useful for testing userspace code
+	  without hardware.
 
 if IIO_SIMPLE_DUMMY
 
 config IIO_SIMPLE_DUMMY_EVENTS
-       bool "Event generation support"
-       select IIO_DUMMY_EVGEN
-       help
-         Add some dummy events to the simple dummy driver.
+	bool "Event generation support"
+	select IIO_DUMMY_EVGEN
+	help
+	  Add some dummy events to the simple dummy driver.
+
+	  The purpose of this is to generate 'fake' event interrupts thus
+	  allowing that driver's code to be as close as possible to that
+	  a normal driver talking to hardware.
 
 config IIO_SIMPLE_DUMMY_BUFFER
 	bool "Buffered capture support"
@@ -32,6 +36,8 @@ config IIO_SIMPLE_DUMMY_BUFFER
 	help
 	  Add buffered data capture to the simple dummy driver.
 
+	  Buffer handling elements of industrial I/O reference driver.
+	  Uses the kfifo buffer.
 endif # IIO_SIMPLE_DUMMY
 
 endmenu