linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/14] Rid W=1 warnings in SPI
@ 2020-07-15 15:06 Lee Jones
  2020-07-15 15:06 ` [PATCH 01/14] spi: spi-loopback-test: Fix formatting issues in function header blocks Lee Jones
                   ` (14 more replies)
  0 siblings, 15 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-15 15:06 UTC (permalink / raw)
  To: broonie; +Cc: linux-arm-kernel, linux-kernel, linux-spi, Lee Jones

This set is part of a larger effort attempting to clean-up W=1
kernel builds, which are currently overwhelmingly riddled with
niggly little warnings.

After these patches are applied, the build system no longer
complains about any W=0 nor W=1 level warnings in drivers/spi.

Hurrah!

Lee Jones (14):
  spi: spi-loopback-test: Fix formatting issues in function header
    blocks
  spi: spi-bitbang: Demote obvious misuse of kerneldoc to standard
    comment blocks
  spi: spi-davinci: Fix a few kerneldoc misspellings and API slippages
  spi: spi-ep93xx: Fix API slippage
  spi: spi-meson-spifc: Fix misdocumenting of 'dev' in 'struct
    meson_spifc'
  spi: spi-meson-spicc: Remove set but never used variable 'data' from
    meson_spicc_reset_fifo()
  spi: spi-s3c64xx: Add missing entries for structs
    's3c64xx_spi_dma_data' and 's3c64xx_spi_dma_data'
  spi: spi-pl022: Provide missing struct attribute/function param docs
  spi: spi-zynq-qspi: Add description for 2 missing
    attributes/parameters
  spi: spi-zynqmp-gqspi: Correct a couple of misspellings in kerneldoc
  spi: spi-topcliff-pch: Add missing descriptions to 'struct
    pch_spi_data'
  spi: spi-at91-usart: Make use of the defined 'struct of_device_id'
  spi: spi-pxa2xx: Do not define 'struct acpi_device_id' when
  spi: spi-amd: Do not define 'struct acpi_device_id' when

 drivers/spi/spi-amd.c           |  2 ++
 drivers/spi/spi-at91-usart.c    |  1 +
 drivers/spi/spi-bitbang.c       |  6 +++---
 drivers/spi/spi-davinci.c       |  7 ++++---
 drivers/spi/spi-ep93xx.c        |  2 +-
 drivers/spi/spi-loopback-test.c | 16 ++++++++--------
 drivers/spi/spi-meson-spicc.c   |  4 +---
 drivers/spi/spi-meson-spifc.c   |  2 +-
 drivers/spi/spi-pl022.c         | 14 ++++++++++----
 drivers/spi/spi-pxa2xx.c        |  2 ++
 drivers/spi/spi-s3c64xx.c       |  9 ++++++++-
 drivers/spi/spi-topcliff-pch.c  |  8 ++++++--
 drivers/spi/spi-zynq-qspi.c     |  3 ++-
 drivers/spi/spi-zynqmp-gqspi.c  |  6 +++---
 14 files changed, 52 insertions(+), 30 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 01/14] spi: spi-loopback-test: Fix formatting issues in function header blocks
  2020-07-15 15:06 [PATCH 00/14] Rid W=1 warnings in SPI Lee Jones
@ 2020-07-15 15:06 ` Lee Jones
  2020-07-15 15:06 ` [PATCH 02/14] spi: spi-bitbang: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-15 15:06 UTC (permalink / raw)
  To: broonie
  Cc: linux-arm-kernel, linux-kernel, linux-spi, Lee Jones, Martin Sperl

Kerneldoc function parameter descriptions must be in '@.*: ' format.

Fixes the following W=1 kernel build warning(s):

 drivers/spi/spi-loopback-test.c:897: warning: Function parameter or member 'spi' not described in 'spi_test_execute_msg'
 drivers/spi/spi-loopback-test.c:897: warning: Function parameter or member 'test' not described in 'spi_test_execute_msg'
 drivers/spi/spi-loopback-test.c:897: warning: Function parameter or member 'tx' not described in 'spi_test_execute_msg'
 drivers/spi/spi-loopback-test.c:897: warning: Function parameter or member 'rx' not described in 'spi_test_execute_msg'
 drivers/spi/spi-loopback-test.c:970: warning: Function parameter or member 'spi' not described in 'spi_test_run_test'
 drivers/spi/spi-loopback-test.c:970: warning: Function parameter or member 'test' not described in 'spi_test_run_test'
 drivers/spi/spi-loopback-test.c:970: warning: Function parameter or member 'tx' not described in 'spi_test_run_test'
 drivers/spi/spi-loopback-test.c:970: warning: Function parameter or member 'rx' not described in 'spi_test_run_test'

Cc: Mark Brown <broonie@kernel.org>
Cc: Martin Sperl <kernel@martin.sperl.org>
Cc: linux-spi@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/spi/spi-loopback-test.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/spi/spi-loopback-test.c b/drivers/spi/spi-loopback-test.c
index b6d79cd156fb5..9522d1b5786d5 100644
--- a/drivers/spi/spi-loopback-test.c
+++ b/drivers/spi/spi-loopback-test.c
@@ -885,10 +885,10 @@ static int spi_test_run_iter(struct spi_device *spi,
 /**
  * spi_test_execute_msg - default implementation to run a test
  *
- * spi: @spi_device on which to run the @spi_message
- * test: the test to execute, which already contains @msg
- * tx:   the tx buffer allocated for the test sequence
- * rx:   the rx buffer allocated for the test sequence
+ * @spi: @spi_device on which to run the @spi_message
+ * @test: the test to execute, which already contains @msg
+ * @tx:   the tx buffer allocated for the test sequence
+ * @rx:   the rx buffer allocated for the test sequence
  *
  * Returns: error code of spi_sync as well as basic error checking
  */
@@ -957,10 +957,10 @@ EXPORT_SYMBOL_GPL(spi_test_execute_msg);
  *                     including all the relevant iterations on:
  *                     length and buffer alignment
  *
- * spi:  the spi_device to send the messages to
- * test: the test which we need to execute
- * tx:   the tx buffer allocated for the test sequence
- * rx:   the rx buffer allocated for the test sequence
+ * @spi:  the spi_device to send the messages to
+ * @test: the test which we need to execute
+ * @tx:   the tx buffer allocated for the test sequence
+ * @rx:   the rx buffer allocated for the test sequence
  *
  * Returns: status code of spi_sync or other failures
  */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 02/14] spi: spi-bitbang: Demote obvious misuse of kerneldoc to standard comment blocks
  2020-07-15 15:06 [PATCH 00/14] Rid W=1 warnings in SPI Lee Jones
  2020-07-15 15:06 ` [PATCH 01/14] spi: spi-loopback-test: Fix formatting issues in function header blocks Lee Jones
@ 2020-07-15 15:06 ` Lee Jones
  2020-07-15 15:06 ` [PATCH 03/14] spi: spi-davinci: Fix a few kerneldoc misspellings and API slippages Lee Jones
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-15 15:06 UTC (permalink / raw)
  To: broonie; +Cc: linux-arm-kernel, linux-kernel, linux-spi, Lee Jones

No attempt has been made to document any of the demoted functions here.

Fixes the following W=1 kernel build warning(s):

 drivers/spi/spi-bitbang.c:181: warning: Function parameter or member 'spi' not described in 'spi_bitbang_setup'
 drivers/spi/spi-bitbang.c:215: warning: Function parameter or member 'spi' not described in 'spi_bitbang_cleanup'
 drivers/spi/spi-bitbang.c:434: warning: Function parameter or member 'bitbang' not described in 'spi_bitbang_stop'

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/spi/spi-bitbang.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-bitbang.c b/drivers/spi/spi-bitbang.c
index 68491a8bf7b5b..1a7352abd8786 100644
--- a/drivers/spi/spi-bitbang.c
+++ b/drivers/spi/spi-bitbang.c
@@ -174,7 +174,7 @@ int spi_bitbang_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
 }
 EXPORT_SYMBOL_GPL(spi_bitbang_setup_transfer);
 
-/**
+/*
  * spi_bitbang_setup - default setup for per-word I/O loops
  */
 int spi_bitbang_setup(struct spi_device *spi)
@@ -208,7 +208,7 @@ int spi_bitbang_setup(struct spi_device *spi)
 }
 EXPORT_SYMBOL_GPL(spi_bitbang_setup);
 
-/**
+/*
  * spi_bitbang_cleanup - default cleanup for per-word I/O loops
  */
 void spi_bitbang_cleanup(struct spi_device *spi)
@@ -427,7 +427,7 @@ int spi_bitbang_start(struct spi_bitbang *bitbang)
 }
 EXPORT_SYMBOL_GPL(spi_bitbang_start);
 
-/**
+/*
  * spi_bitbang_stop - stops the task providing spi communication
  */
 void spi_bitbang_stop(struct spi_bitbang *bitbang)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 03/14] spi: spi-davinci: Fix a few kerneldoc misspellings and API slippages
  2020-07-15 15:06 [PATCH 00/14] Rid W=1 warnings in SPI Lee Jones
  2020-07-15 15:06 ` [PATCH 01/14] spi: spi-loopback-test: Fix formatting issues in function header blocks Lee Jones
  2020-07-15 15:06 ` [PATCH 02/14] spi: spi-bitbang: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
@ 2020-07-15 15:06 ` Lee Jones
  2020-07-15 15:06 ` [PATCH 04/14] spi: spi-ep93xx: Fix API slippage Lee Jones
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-15 15:06 UTC (permalink / raw)
  To: broonie; +Cc: linux-arm-kernel, linux-kernel, linux-spi, Lee Jones

Fixes the following W=1 kernel build warning(s):

 drivers/spi/spi-davinci.c:249: warning: Function parameter or member 'dspi' not described in 'davinci_spi_get_prescale'
 drivers/spi/spi-davinci.c:249: warning: Function parameter or member 'max_speed_hz' not described in 'davinci_spi_get_prescale'
 drivers/spi/spi-davinci.c:249: warning: Excess function parameter 'maxspeed_hz' description in 'davinci_spi_get_prescale'
 drivers/spi/spi-davinci.c:719: warning: Function parameter or member 'data' not described in 'dummy_thread_fn'
 drivers/spi/spi-davinci.c:719: warning: Excess function parameter 'context_data' description in 'dummy_thread_fn'
 drivers/spi/spi-davinci.c:735: warning: Function parameter or member 'data' not described in 'davinci_spi_irq'
 drivers/spi/spi-davinci.c:735: warning: Excess function parameter 'context_data' description in 'davinci_spi_irq'

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/spi/spi-davinci.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c
index f50c0c79cbdfa..818f2b22875d2 100644
--- a/drivers/spi/spi-davinci.c
+++ b/drivers/spi/spi-davinci.c
@@ -236,7 +236,8 @@ static void davinci_spi_chipselect(struct spi_device *spi, int value)
 
 /**
  * davinci_spi_get_prescale - Calculates the correct prescale value
- * @maxspeed_hz: the maximum rate the SPI clock can run at
+ * @dspi: the controller data
+ * @max_speed_hz: the maximum rate the SPI clock can run at
  *
  * This function calculates the prescale value that generates a clock rate
  * less than or equal to the specified maximum.
@@ -710,7 +711,7 @@ static int davinci_spi_bufs(struct spi_device *spi, struct spi_transfer *t)
 /**
  * dummy_thread_fn - dummy thread function
  * @irq: IRQ number for this SPI Master
- * @context_data: structure for SPI Master controller davinci_spi
+ * @data: structure for SPI Master controller davinci_spi
  *
  * This is to satisfy the request_threaded_irq() API so that the irq
  * handler is called in interrupt context.
@@ -723,7 +724,7 @@ static irqreturn_t dummy_thread_fn(s32 irq, void *data)
 /**
  * davinci_spi_irq - Interrupt handler for SPI Master Controller
  * @irq: IRQ number for this SPI Master
- * @context_data: structure for SPI Master controller davinci_spi
+ * @data: structure for SPI Master controller davinci_spi
  *
  * ISR will determine that interrupt arrives either for READ or WRITE command.
  * According to command it will do the appropriate action. It will check
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 04/14] spi: spi-ep93xx: Fix API slippage
  2020-07-15 15:06 [PATCH 00/14] Rid W=1 warnings in SPI Lee Jones
                   ` (2 preceding siblings ...)
  2020-07-15 15:06 ` [PATCH 03/14] spi: spi-davinci: Fix a few kerneldoc misspellings and API slippages Lee Jones
@ 2020-07-15 15:06 ` Lee Jones
  2020-07-15 15:06 ` [PATCH 05/14] spi: spi-meson-spifc: Fix misdocumenting of 'dev' in 'struct meson_spifc' Lee Jones
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-15 15:06 UTC (permalink / raw)
  To: broonie
  Cc: linux-arm-kernel, linux-kernel, linux-spi, Lee Jones, Mika Westerberg

ep93xx_spi_read_write() changed is parameters, but the function
documentation was left unchanged.  Let's realign.

Fixes the following W=1 kernel build warning(s):

 drivers/spi/spi-ep93xx.c:227: warning: Function parameter or member 'master' not described in 'ep93xx_spi_read_write'
 drivers/spi/spi-ep93xx.c:227: warning: Excess function parameter 'espi' description in 'ep93xx_spi_read_write'

Cc: Mika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/spi/spi-ep93xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c
index ae7c79a062084..aa676559d2738 100644
--- a/drivers/spi/spi-ep93xx.c
+++ b/drivers/spi/spi-ep93xx.c
@@ -214,7 +214,7 @@ static void ep93xx_do_read(struct spi_master *master)
 
 /**
  * ep93xx_spi_read_write() - perform next RX/TX transfer
- * @espi: ep93xx SPI controller struct
+ * @master: SPI master
  *
  * This function transfers next bytes (or half-words) to/from RX/TX FIFOs. If
  * called several times, the whole transfer will be completed. Returns
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 05/14] spi: spi-meson-spifc: Fix misdocumenting of 'dev' in 'struct meson_spifc'
  2020-07-15 15:06 [PATCH 00/14] Rid W=1 warnings in SPI Lee Jones
                   ` (3 preceding siblings ...)
  2020-07-15 15:06 ` [PATCH 04/14] spi: spi-ep93xx: Fix API slippage Lee Jones
@ 2020-07-15 15:06 ` Lee Jones
  2020-07-15 15:06 ` [PATCH 06/14] spi: spi-meson-spicc: Remove set but never used variable 'data' from meson_spicc_reset_fifo() Lee Jones
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-15 15:06 UTC (permalink / raw)
  To: broonie
  Cc: linux-arm-kernel, linux-kernel, linux-spi, Lee Jones,
	Kevin Hilman, Beniamino Galvani, linux-amlogic

Fixes the following W=1 kernel build warning(s):

 drivers/spi/spi-meson-spifc.c:80: warning: Function parameter or member 'dev' not described in 'meson_spifc'

Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Beniamino Galvani <b.galvani@gmail.com>
Cc: linux-amlogic@lists.infradead.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/spi/spi-meson-spifc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-meson-spifc.c b/drivers/spi/spi-meson-spifc.c
index c7b0399802913..8eca6f24cb799 100644
--- a/drivers/spi/spi-meson-spifc.c
+++ b/drivers/spi/spi-meson-spifc.c
@@ -70,7 +70,7 @@
  * @master:	the SPI master
  * @regmap:	regmap for device registers
  * @clk:	input clock of the built-in baud rate generator
- * @device:	the device structure
+ * @dev:	the device structure
  */
 struct meson_spifc {
 	struct spi_master *master;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 06/14] spi: spi-meson-spicc: Remove set but never used variable 'data' from meson_spicc_reset_fifo()
  2020-07-15 15:06 [PATCH 00/14] Rid W=1 warnings in SPI Lee Jones
                   ` (4 preceding siblings ...)
  2020-07-15 15:06 ` [PATCH 05/14] spi: spi-meson-spifc: Fix misdocumenting of 'dev' in 'struct meson_spifc' Lee Jones
@ 2020-07-15 15:06 ` Lee Jones
  2020-07-15 15:06 ` [PATCH 07/14] spi: spi-s3c64xx: Add missing entries for structs 's3c64xx_spi_dma_data' and 's3c64xx_spi_dma_data' Lee Jones
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-15 15:06 UTC (permalink / raw)
  To: broonie
  Cc: linux-arm-kernel, linux-kernel, linux-spi, Lee Jones,
	Kevin Hilman, Neil Armstrong, linux-amlogic

Looks like it hasn't ever been checked.

Fixes the following W=1 kernel build warning(s):

 drivers/spi/spi-meson-spicc.c: In function ‘meson_spicc_reset_fifo’:
 drivers/spi/spi-meson-spicc.c:365:6: warning: variable ‘data’ set but not used [-Wunused-but-set-variable]
 365 | u32 data;
 | ^~~~

Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: linux-amlogic@lists.infradead.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/spi/spi-meson-spicc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-meson-spicc.c b/drivers/spi/spi-meson-spicc.c
index 77f7d0e0e46ad..ecba6b4a5d85d 100644
--- a/drivers/spi/spi-meson-spicc.c
+++ b/drivers/spi/spi-meson-spicc.c
@@ -362,8 +362,6 @@ static void meson_spicc_setup_xfer(struct meson_spicc_device *spicc,
 
 static void meson_spicc_reset_fifo(struct meson_spicc_device *spicc)
 {
-	u32 data;
-
 	if (spicc->data->has_oen)
 		writel_bits_relaxed(SPICC_ENH_MAIN_CLK_AO,
 				    SPICC_ENH_MAIN_CLK_AO,
@@ -373,7 +371,7 @@ static void meson_spicc_reset_fifo(struct meson_spicc_device *spicc)
 			    spicc->base + SPICC_TESTREG);
 
 	while (meson_spicc_rxready(spicc))
-		data = readl_relaxed(spicc->base + SPICC_RXDATA);
+		readl_relaxed(spicc->base + SPICC_RXDATA);
 
 	if (spicc->data->has_oen)
 		writel_bits_relaxed(SPICC_ENH_MAIN_CLK_AO, 0,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 07/14] spi: spi-s3c64xx: Add missing entries for structs 's3c64xx_spi_dma_data' and 's3c64xx_spi_dma_data'
  2020-07-15 15:06 [PATCH 00/14] Rid W=1 warnings in SPI Lee Jones
                   ` (5 preceding siblings ...)
  2020-07-15 15:06 ` [PATCH 06/14] spi: spi-meson-spicc: Remove set but never used variable 'data' from meson_spicc_reset_fifo() Lee Jones
@ 2020-07-15 15:06 ` Lee Jones
  2020-07-15 15:06 ` [PATCH 08/14] spi: spi-pl022: Provide missing struct attribute/function param docs Lee Jones
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-15 15:06 UTC (permalink / raw)
  To: broonie
  Cc: linux-arm-kernel, linux-kernel, linux-spi, Lee Jones, Kukjin Kim,
	Krzysztof Kozlowski, Andi Shyti, Jaswinder Singh,
	linux-samsung-soc

Fixes the following W=1 kernel build warning(s):

 drivers/spi/spi-s3c64xx.c:150: warning: Function parameter or member 'quirks' not described in 's3c64xx_spi_port_config'
 drivers/spi/spi-s3c64xx.c:150: warning: Function parameter or member 'clk_ioclk' not described in 's3c64xx_spi_port_config'
 drivers/spi/spi-s3c64xx.c:189: warning: Function parameter or member 'pdev' not described in 's3c64xx_spi_driver_data'
 drivers/spi/spi-s3c64xx.c:189: warning: Function parameter or member 'rx_dma' not described in 's3c64xx_spi_driver_data'
 drivers/spi/spi-s3c64xx.c:189: warning: Function parameter or member 'tx_dma' not described in 's3c64xx_spi_driver_data'
 drivers/spi/spi-s3c64xx.c:189: warning: Function parameter or member 'port_conf' not described in 's3c64xx_spi_driver_data'
 drivers/spi/spi-s3c64xx.c:189: warning: Function parameter or member 'port_id' not described in 's3c64xx_spi_driver_data'

Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Andi Shyti <andi@etezian.org>
Cc: Jaswinder Singh <jassi.brar@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/spi/spi-s3c64xx.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index cf67ea60dc0ed..924b24441789a 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -130,9 +130,11 @@ struct s3c64xx_spi_dma_data {
  * @fifo_lvl_mask: Bit-mask for {TX|RX}_FIFO_LVL bits in SPI_STATUS register.
  * @rx_lvl_offset: Bit offset of RX_FIFO_LVL bits in SPI_STATUS regiter.
  * @tx_st_done: Bit offset of TX_DONE bit in SPI_STATUS regiter.
+ * @quirks: Bitmask of known quirks
  * @high_speed: True, if the controller supports HIGH_SPEED_EN bit.
  * @clk_from_cmu: True, if the controller does not include a clock mux and
  *	prescaler unit.
+ * @clk_ioclk: True if clock is present on this device
  *
  * The Samsung s3c64xx SPI controller are used on various Samsung SoC's but
  * differ in some aspects such as the size of the fifo and spi bus clock
@@ -154,6 +156,7 @@ struct s3c64xx_spi_port_config {
  * @clk: Pointer to the spi clock.
  * @src_clk: Pointer to the clock used to generate SPI signals.
  * @ioclk: Pointer to the i/o clock between master and slave
+ * @pdev: Pointer to device's platform device data
  * @master: Pointer to the SPI Protocol master.
  * @cntrlr_info: Platform specific data for the controller this driver manages.
  * @lock: Controller specific lock.
@@ -166,7 +169,11 @@ struct s3c64xx_spi_port_config {
  * @xfer_completion: To indicate completion of xfer task.
  * @cur_mode: Stores the active configuration of the controller.
  * @cur_bpw: Stores the active bits per word settings.
- * @cur_speed: Stores the active xfer clock speed.
+ * @cur_speed: Current clock speed
+ * @rx_dma: Local receive DMA data (e.g. chan and direction)
+ * @tx_dma: Local transmit DMA data (e.g. chan and direction)
+ * @port_conf: Local SPI port configuartion data
+ * @port_id: Port identification number
  */
 struct s3c64xx_spi_driver_data {
 	void __iomem                    *regs;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 08/14] spi: spi-pl022: Provide missing struct attribute/function param docs
  2020-07-15 15:06 [PATCH 00/14] Rid W=1 warnings in SPI Lee Jones
                   ` (6 preceding siblings ...)
  2020-07-15 15:06 ` [PATCH 07/14] spi: spi-s3c64xx: Add missing entries for structs 's3c64xx_spi_dma_data' and 's3c64xx_spi_dma_data' Lee Jones
@ 2020-07-15 15:06 ` Lee Jones
  2020-07-16 13:59   ` Linus Walleij
  2020-07-15 15:06 ` [PATCH 09/14] spi: spi-zynq-qspi: Add description for 2 missing attributes/parameters Lee Jones
                   ` (6 subsequent siblings)
  14 siblings, 1 reply; 22+ messages in thread
From: Lee Jones @ 2020-07-15 15:06 UTC (permalink / raw)
  To: broonie
  Cc: linux-arm-kernel, linux-kernel, linux-spi, Lee Jones,
	Linus Walleij, Sachin Verma

Also demote non-worthy kerneldoc headers to standard comment blocks.

Fixes the following W=1 kernel build warning(s):

 drivers/spi/spi-pl022.c:304: warning: cannot understand function prototype: 'enum ssp_writing '
 drivers/spi/spi-pl022.c:330: warning: Function parameter or member 'loopback' not described in 'vendor_data'
 drivers/spi/spi-pl022.c:398: warning: Function parameter or member 'rx_lev_trig' not described in 'pl022'
 drivers/spi/spi-pl022.c:398: warning: Function parameter or member 'tx_lev_trig' not described in 'pl022'
 drivers/spi/spi-pl022.c:398: warning: Function parameter or member 'dma_running' not described in 'pl022'
 drivers/spi/spi-pl022.c:670: warning: Function parameter or member 'pl022' not described in 'readwriter'
 drivers/spi/spi-pl022.c:1250: warning: Function parameter or member 'irq' not described in 'pl022_interrupt_handler'
 drivers/spi/spi-pl022.c:1250: warning: Function parameter or member 'dev_id' not described in 'pl022_interrupt_handler'
 drivers/spi/spi-pl022.c:1343: warning: Function parameter or member 'pl022' not described in 'set_up_next_transfer'
 drivers/spi/spi-pl022.c:1343: warning: Function parameter or member 'transfer' not described in 'set_up_next_transfer'

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Sachin Verma <sachin.verma@st.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/spi/spi-pl022.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index 66028ebbc336d..d1776fea287e5 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -298,7 +298,7 @@ enum ssp_reading {
 	READING_U32
 };
 
-/**
+/*
  * The type of writing going on on this chip
  */
 enum ssp_writing {
@@ -317,6 +317,7 @@ enum ssp_writing {
  * @extended_cr: 32 bit wide control register 0 with extra
  * features and extra features in CR1 as found in the ST variants
  * @pl023: supports a subset of the ST extensions called "PL023"
+ * @loopback: supports loopback mode
  * @internal_cs_ctrl: supports chip select control register
  */
 struct vendor_data {
@@ -353,11 +354,14 @@ struct vendor_data {
  * @read: the type of read currently going on
  * @write: the type of write currently going on
  * @exp_fifo_level: expected FIFO level
+ * @rx_lev_trig: receive FIFO watermark level which triggers IRQ
+ * @tx_lev_trig: transmit FIFO watermark level which triggers IRQ
  * @dma_rx_channel: optional channel for RX DMA
  * @dma_tx_channel: optional channel for TX DMA
  * @sgt_rx: scattertable for the RX transfer
  * @sgt_tx: scattertable for the TX transfer
  * @dummypage: a dummy page used for driving data on the bus with DMA
+ * @dma_running: indicates whether DMA is in operation
  * @cur_cs: current chip select (gpio)
  * @chipselects: list of chipselects (gpios)
  */
@@ -662,7 +666,7 @@ static void load_ssp_default_config(struct pl022 *pl022)
 	writew(CLEAR_ALL_INTERRUPTS, SSP_ICR(pl022->virtbase));
 }
 
-/**
+/*
  * This will write to TX and read from RX according to the parameters
  * set in pl022.
  */
@@ -1237,6 +1241,8 @@ static inline void pl022_dma_remove(struct pl022 *pl022)
 
 /**
  * pl022_interrupt_handler - Interrupt handler for SSP controller
+ * @irq: IRQ number
+ * @dev_id: Local device data
  *
  * This function handles interrupts generated for an interrupt based transfer.
  * If a receive overrun (ROR) interrupt is there then we disable SSP, flag the
@@ -1334,7 +1340,7 @@ static irqreturn_t pl022_interrupt_handler(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-/**
+/*
  * This sets up the pointers to memory for the next message to
  * send out on the SPI bus.
  */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 09/14] spi: spi-zynq-qspi: Add description for 2 missing attributes/parameters
  2020-07-15 15:06 [PATCH 00/14] Rid W=1 warnings in SPI Lee Jones
                   ` (7 preceding siblings ...)
  2020-07-15 15:06 ` [PATCH 08/14] spi: spi-pl022: Provide missing struct attribute/function param docs Lee Jones
@ 2020-07-15 15:06 ` Lee Jones
  2020-07-16  7:19   ` Michal Simek
  2020-07-15 15:06 ` [PATCH 10/14] spi: spi-zynqmp-gqspi: Correct a couple of misspellings in kerneldoc Lee Jones
                   ` (5 subsequent siblings)
  14 siblings, 1 reply; 22+ messages in thread
From: Lee Jones @ 2020-07-15 15:06 UTC (permalink / raw)
  To: broonie
  Cc: linux-arm-kernel, linux-kernel, linux-spi, Lee Jones,
	Michal Simek, Sureshkumar Relli

Fixes the following W=1 kernel build warning(s):

 drivers/spi/spi-zynq-qspi.c:143: warning: Function parameter or member 'dev' not described in 'zynq_qspi'
 drivers/spi/spi-zynq-qspi.c:334: warning: Function parameter or member 'spi' not described in 'zynq_qspi_config_op'
 drivers/spi/spi-zynq-qspi.c:334: warning: Excess function parameter 'qspi' description in 'zynq_qspi_config_op'

Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Sureshkumar Relli <nagasure@xilinx.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/spi/spi-zynq-qspi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-zynq-qspi.c b/drivers/spi/spi-zynq-qspi.c
index bbf3d90561f54..5d8a5ee62fa23 100644
--- a/drivers/spi/spi-zynq-qspi.c
+++ b/drivers/spi/spi-zynq-qspi.c
@@ -119,6 +119,7 @@
 
 /**
  * struct zynq_qspi - Defines qspi driver instance
+ * @dev:		Pointer to the this device's information
  * @regs:		Virtual address of the QSPI controller registers
  * @refclk:		Pointer to the peripheral clock
  * @pclk:		Pointer to the APB clock
@@ -316,7 +317,7 @@ static void zynq_qspi_chipselect(struct spi_device *spi, bool assert)
 /**
  * zynq_qspi_config_op - Configure QSPI controller for specified transfer
  * @xqspi:	Pointer to the zynq_qspi structure
- * @qspi:	Pointer to the spi_device structure
+ * @spi:	Pointer to the spi_device structure
  *
  * Sets the operational mode of QSPI controller for the next QSPI transfer and
  * sets the requested clock frequency.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 10/14] spi: spi-zynqmp-gqspi: Correct a couple of misspellings in kerneldoc
  2020-07-15 15:06 [PATCH 00/14] Rid W=1 warnings in SPI Lee Jones
                   ` (8 preceding siblings ...)
  2020-07-15 15:06 ` [PATCH 09/14] spi: spi-zynq-qspi: Add description for 2 missing attributes/parameters Lee Jones
@ 2020-07-15 15:06 ` Lee Jones
  2020-07-16  7:20   ` Michal Simek
  2020-07-15 15:06 ` [PATCH 11/14] spi: spi-topcliff-pch: Add missing descriptions to 'struct pch_spi_data' Lee Jones
                   ` (4 subsequent siblings)
  14 siblings, 1 reply; 22+ messages in thread
From: Lee Jones @ 2020-07-15 15:06 UTC (permalink / raw)
  To: broonie
  Cc: linux-arm-kernel, linux-kernel, linux-spi, Lee Jones, Michal Simek

Fixes the following W=1 kernel build warning(s):

 drivers/spi/spi-zynqmp-gqspi.c:205: warning: Function parameter or member 'slavecs' not described in 'zynqmp_gqspi_selectslave'
 drivers/spi/spi-zynqmp-gqspi.c:205: warning: Function parameter or member 'slavebus' not described in 'zynqmp_gqspi_selectslave'
 drivers/spi/spi-zynqmp-gqspi.c:205: warning: Excess function parameter 'flashcs' description in 'zynqmp_gqspi_selectslave'
 drivers/spi/spi-zynqmp-gqspi.c:205: warning: Excess function parameter 'flashbus' description in 'zynqmp_gqspi_selectslave'
 drivers/spi/spi-zynqmp-gqspi.c:902: warning: Function parameter or member 'dev' not described in 'zynqmp_qspi_suspend'
 drivers/spi/spi-zynqmp-gqspi.c:902: warning: Excess function parameter '_dev' description in 'zynqmp_qspi_suspend'

Cc: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/spi/spi-zynqmp-gqspi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c
index 811c97a7c8589..e17a201252557 100644
--- a/drivers/spi/spi-zynqmp-gqspi.c
+++ b/drivers/spi/spi-zynqmp-gqspi.c
@@ -197,8 +197,8 @@ static inline void zynqmp_gqspi_write(struct zynqmp_qspi *xqspi, u32 offset,
 /**
  * zynqmp_gqspi_selectslave:	For selection of slave device
  * @instanceptr:	Pointer to the zynqmp_qspi structure
- * @flashcs:	For chip select
- * @flashbus:	To check which bus is selected- upper or lower
+ * @slavecs:	For chip select
+ * @slavebus:	To check which bus is selected- upper or lower
  */
 static void zynqmp_gqspi_selectslave(struct zynqmp_qspi *instanceptr,
 				     u8 slavecs, u8 slavebus)
@@ -892,7 +892,7 @@ static int zynqmp_qspi_start_transfer(struct spi_master *master,
 
 /**
  * zynqmp_qspi_suspend:	Suspend method for the QSPI driver
- * @_dev:	Address of the platform_device structure
+ * @dev:	Address of the platform_device structure
  *
  * This function stops the QSPI driver queue and disables the QSPI controller
  *
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 11/14] spi: spi-topcliff-pch: Add missing descriptions to 'struct pch_spi_data'
  2020-07-15 15:06 [PATCH 00/14] Rid W=1 warnings in SPI Lee Jones
                   ` (9 preceding siblings ...)
  2020-07-15 15:06 ` [PATCH 10/14] spi: spi-zynqmp-gqspi: Correct a couple of misspellings in kerneldoc Lee Jones
@ 2020-07-15 15:06 ` Lee Jones
  2020-07-15 15:06 ` [PATCH 12/14] spi: spi-at91-usart: Make use of the defined 'struct of_device_id' Lee Jones
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-15 15:06 UTC (permalink / raw)
  To: broonie; +Cc: linux-arm-kernel, linux-kernel, linux-spi, Lee Jones

Fixes the following W=1 kernel build warning(s):

 drivers/spi/spi-topcliff-pch.c:184: warning: Function parameter or member 'io_base_addr' not described in 'pch_spi_data'
 drivers/spi/spi-topcliff-pch.c:184: warning: Function parameter or member 'pkt_tx_buff' not described in 'pch_spi_data'
 drivers/spi/spi-topcliff-pch.c:184: warning: Function parameter or member 'pkt_rx_buff' not described in 'pch_spi_data'
 drivers/spi/spi-topcliff-pch.c:184: warning: Function parameter or member 'dma' not described in 'pch_spi_data'
 drivers/spi/spi-topcliff-pch.c:184: warning: Function parameter or member 'use_dma' not described in 'pch_spi_data'
 drivers/spi/spi-topcliff-pch.c:184: warning: Function parameter or member 'save_total_len' not described in 'pch_spi_data'

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/spi/spi-topcliff-pch.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
index d7ea6af74743e..baadd380cb297 100644
--- a/drivers/spi/spi-topcliff-pch.c
+++ b/drivers/spi/spi-topcliff-pch.c
@@ -122,6 +122,7 @@ struct pch_spi_dma_ctrl {
 /**
  * struct pch_spi_data - Holds the SPI channel specific details
  * @io_remap_addr:		The remapped PCI base address
+ * @io_base_addr:		Base address
  * @master:			Pointer to the SPI master structure
  * @work:			Reference to work queue handler
  * @wait:			Wait queue for waking up upon receiving an
@@ -138,8 +139,8 @@ struct pch_spi_dma_ctrl {
  *				transfer
  * @rx_index:			Receive data count; for bookkeeping during
  *				transfer
- * @tx_buff:			Buffer for data to be transmitted
- * @rx_index:			Buffer for Received data
+ * @pkt_tx_buff:		Buffer for data to be transmitted
+ * @pkt_rx_buff:		Buffer for received data
  * @n_curnt_chip:		The chip number that this SPI driver currently
  *				operates on
  * @current_chip:		Reference to the current chip that this SPI
@@ -151,7 +152,10 @@ struct pch_spi_dma_ctrl {
  * @board_dat:			Reference to the SPI device data structure
  * @plat_dev:			platform_device structure
  * @ch:				SPI channel number
+ * @dma:			Local DMA information
+ * @use_dma:			True if DMA is to be used
  * @irq_reg_sts:		Status of IRQ registration
+ * @save_total_len:		Save length while data is being transferred
  */
 struct pch_spi_data {
 	void __iomem *io_remap_addr;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 12/14] spi: spi-at91-usart: Make use of the defined 'struct of_device_id'
  2020-07-15 15:06 [PATCH 00/14] Rid W=1 warnings in SPI Lee Jones
                   ` (10 preceding siblings ...)
  2020-07-15 15:06 ` [PATCH 11/14] spi: spi-topcliff-pch: Add missing descriptions to 'struct pch_spi_data' Lee Jones
@ 2020-07-15 15:06 ` Lee Jones
  2020-07-15 21:24   ` Alexandre Belloni
  2020-07-15 15:06 ` [PATCH 13/14] spi: spi-pxa2xx: Do not define 'struct acpi_device_id' when Lee Jones
                   ` (2 subsequent siblings)
  14 siblings, 1 reply; 22+ messages in thread
From: Lee Jones @ 2020-07-15 15:06 UTC (permalink / raw)
  To: broonie
  Cc: linux-arm-kernel, linux-kernel, linux-spi, Lee Jones, Radu Pirea,
	Nicolas Ferre, Alexandre Belloni, Ludovic Desroches

It's there so why not use it.

Fixes the following W=1 kernel build warning(s):

 drivers/spi/spi-at91-usart.c:684:34: warning: ‘at91_usart_spi_dt_ids’ defined but not used [-Wunused-const-variable=]
 684 | static const struct of_device_id at91_usart_spi_dt_ids[] = {
 | ^~~~~~~~~~~~~~~~~~~~~

Cc: Radu Pirea <radu_nicolae.pirea@upb.ro>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/spi/spi-at91-usart.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/spi-at91-usart.c b/drivers/spi/spi-at91-usart.c
index 88033422a42ae..d47a20be43ccd 100644
--- a/drivers/spi/spi-at91-usart.c
+++ b/drivers/spi/spi-at91-usart.c
@@ -692,6 +692,7 @@ static struct platform_driver at91_usart_spi_driver = {
 	.driver = {
 		.name = "at91_usart_spi",
 		.pm = &at91_usart_spi_pm_ops,
+		.of_match_table = at91_usart_spi_dt_ids,
 	},
 	.probe = at91_usart_spi_probe,
 	.remove = at91_usart_spi_remove,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 13/14] spi: spi-pxa2xx: Do not define 'struct acpi_device_id' when
  2020-07-15 15:06 [PATCH 00/14] Rid W=1 warnings in SPI Lee Jones
                   ` (11 preceding siblings ...)
  2020-07-15 15:06 ` [PATCH 12/14] spi: spi-at91-usart: Make use of the defined 'struct of_device_id' Lee Jones
@ 2020-07-15 15:06 ` Lee Jones
  2020-07-15 15:06 ` [PATCH 14/14] spi: spi-amd: " Lee Jones
  2020-07-20 11:12 ` [PATCH 00/14] Rid W=1 warnings in SPI Mark Brown
  14 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-15 15:06 UTC (permalink / raw)
  To: broonie
  Cc: linux-arm-kernel, linux-kernel, linux-spi, Lee Jones,
	Daniel Mack, Haojian Zhuang, Robert Jarzmik

Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI,
struct 'pxa2xx_spi_acpi_match' becomes defined but unused.

Fixes the following W=1 kernel build warning(s):

 drivers/spi/spi-pxa2xx.c:1435:36: warning: ‘pxa2xx_spi_acpi_match’ defined but not used [-Wunused-const-variable=]
 1435 | static const struct acpi_device_id pxa2xx_spi_acpi_match[] = {
 | ^~~~~~~~~~~~~~~~~~~~~

Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/spi/spi-pxa2xx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 0040362b71622..814268405ab0b 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1432,6 +1432,7 @@ static void cleanup(struct spi_device *spi)
 	kfree(chip);
 }
 
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id pxa2xx_spi_acpi_match[] = {
 	{ "INT33C0", LPSS_LPT_SSP },
 	{ "INT33C1", LPSS_LPT_SSP },
@@ -1442,6 +1443,7 @@ static const struct acpi_device_id pxa2xx_spi_acpi_match[] = {
 	{ },
 };
 MODULE_DEVICE_TABLE(acpi, pxa2xx_spi_acpi_match);
+#endif
 
 /*
  * PCI IDs of compound devices that integrate both host controller and private
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 14/14] spi: spi-amd: Do not define 'struct acpi_device_id' when
  2020-07-15 15:06 [PATCH 00/14] Rid W=1 warnings in SPI Lee Jones
                   ` (12 preceding siblings ...)
  2020-07-15 15:06 ` [PATCH 13/14] spi: spi-pxa2xx: Do not define 'struct acpi_device_id' when Lee Jones
@ 2020-07-15 15:06 ` Lee Jones
  2020-07-20 11:12 ` [PATCH 00/14] Rid W=1 warnings in SPI Mark Brown
  14 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-07-15 15:06 UTC (permalink / raw)
  To: broonie
  Cc: linux-arm-kernel, linux-kernel, linux-spi, Lee Jones, Sanjay R Mehta

Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI,
struct 'spi_acpi_match' becomes defined but unused.

Fixes the following W=1 kernel build warning(s):

 drivers/spi/spi-amd.c:297:36: warning: ‘spi_acpi_match’ defined but not used [-Wunused-const-variable=]
 297 | static const struct acpi_device_id spi_acpi_match[] = {
 | ^~~~~~~~~~~~~~

Cc: Sanjay R Mehta <sanju.mehta@amd.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/spi/spi-amd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/spi/spi-amd.c b/drivers/spi/spi-amd.c
index d0aacd4de1b9e..7f629544060db 100644
--- a/drivers/spi/spi-amd.c
+++ b/drivers/spi/spi-amd.c
@@ -294,11 +294,13 @@ static int amd_spi_probe(struct platform_device *pdev)
 	return err;
 }
 
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id spi_acpi_match[] = {
 	{ "AMDI0061", 0 },
 	{},
 };
 MODULE_DEVICE_TABLE(acpi, spi_acpi_match);
+#endif
 
 static struct platform_driver amd_spi_driver = {
 	.driver = {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH 12/14] spi: spi-at91-usart: Make use of the defined 'struct of_device_id'
  2020-07-15 15:06 ` [PATCH 12/14] spi: spi-at91-usart: Make use of the defined 'struct of_device_id' Lee Jones
@ 2020-07-15 21:24   ` Alexandre Belloni
  2020-07-16  7:56     ` Lee Jones
  0 siblings, 1 reply; 22+ messages in thread
From: Alexandre Belloni @ 2020-07-15 21:24 UTC (permalink / raw)
  To: Lee Jones
  Cc: broonie, linux-arm-kernel, linux-kernel, linux-spi, Radu Pirea,
	Nicolas Ferre, Ludovic Desroches

Hi Lee,

On 15/07/2020 16:06:30+0100, Lee Jones wrote:
> It's there so why not use it.
> 

Is that the correct resolution? Isn't the proper thing to do simply
removing at91_usart_spi_dt_ids as the only way it will ever be probed is
through drivers/mfd/at91-usart.c and I would think matching the driver
name is enough.

> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/spi/spi-at91-usart.c:684:34: warning: ‘at91_usart_spi_dt_ids’ defined but not used [-Wunused-const-variable=]
>  684 | static const struct of_device_id at91_usart_spi_dt_ids[] = {
>  | ^~~~~~~~~~~~~~~~~~~~~
> 
> Cc: Radu Pirea <radu_nicolae.pirea@upb.ro>
> Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/spi/spi-at91-usart.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/spi/spi-at91-usart.c b/drivers/spi/spi-at91-usart.c
> index 88033422a42ae..d47a20be43ccd 100644
> --- a/drivers/spi/spi-at91-usart.c
> +++ b/drivers/spi/spi-at91-usart.c
> @@ -692,6 +692,7 @@ static struct platform_driver at91_usart_spi_driver = {
>  	.driver = {
>  		.name = "at91_usart_spi",
>  		.pm = &at91_usart_spi_pm_ops,
> +		.of_match_table = at91_usart_spi_dt_ids,
>  	},
>  	.probe = at91_usart_spi_probe,
>  	.remove = at91_usart_spi_remove,
> -- 
> 2.25.1
> 

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 09/14] spi: spi-zynq-qspi: Add description for 2 missing attributes/parameters
  2020-07-15 15:06 ` [PATCH 09/14] spi: spi-zynq-qspi: Add description for 2 missing attributes/parameters Lee Jones
@ 2020-07-16  7:19   ` Michal Simek
  0 siblings, 0 replies; 22+ messages in thread
From: Michal Simek @ 2020-07-16  7:19 UTC (permalink / raw)
  To: Lee Jones, broonie
  Cc: linux-arm-kernel, linux-kernel, linux-spi, Michal Simek,
	Sureshkumar Relli



On 15. 07. 20 17:06, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/spi/spi-zynq-qspi.c:143: warning: Function parameter or member 'dev' not described in 'zynq_qspi'
>  drivers/spi/spi-zynq-qspi.c:334: warning: Function parameter or member 'spi' not described in 'zynq_qspi_config_op'
>  drivers/spi/spi-zynq-qspi.c:334: warning: Excess function parameter 'qspi' description in 'zynq_qspi_config_op'
> 
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: Sureshkumar Relli <nagasure@xilinx.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/spi/spi-zynq-qspi.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-zynq-qspi.c b/drivers/spi/spi-zynq-qspi.c
> index bbf3d90561f54..5d8a5ee62fa23 100644
> --- a/drivers/spi/spi-zynq-qspi.c
> +++ b/drivers/spi/spi-zynq-qspi.c
> @@ -119,6 +119,7 @@
>  
>  /**
>   * struct zynq_qspi - Defines qspi driver instance
> + * @dev:		Pointer to the this device's information
>   * @regs:		Virtual address of the QSPI controller registers
>   * @refclk:		Pointer to the peripheral clock
>   * @pclk:		Pointer to the APB clock
> @@ -316,7 +317,7 @@ static void zynq_qspi_chipselect(struct spi_device *spi, bool assert)
>  /**
>   * zynq_qspi_config_op - Configure QSPI controller for specified transfer
>   * @xqspi:	Pointer to the zynq_qspi structure
> - * @qspi:	Pointer to the spi_device structure
> + * @spi:	Pointer to the spi_device structure
>   *
>   * Sets the operational mode of QSPI controller for the next QSPI transfer and
>   * sets the requested clock frequency.
> 

Acked-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 10/14] spi: spi-zynqmp-gqspi: Correct a couple of misspellings in kerneldoc
  2020-07-15 15:06 ` [PATCH 10/14] spi: spi-zynqmp-gqspi: Correct a couple of misspellings in kerneldoc Lee Jones
@ 2020-07-16  7:20   ` Michal Simek
  0 siblings, 0 replies; 22+ messages in thread
From: Michal Simek @ 2020-07-16  7:20 UTC (permalink / raw)
  To: Lee Jones, broonie
  Cc: linux-arm-kernel, linux-kernel, linux-spi, Michal Simek



On 15. 07. 20 17:06, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/spi/spi-zynqmp-gqspi.c:205: warning: Function parameter or member 'slavecs' not described in 'zynqmp_gqspi_selectslave'
>  drivers/spi/spi-zynqmp-gqspi.c:205: warning: Function parameter or member 'slavebus' not described in 'zynqmp_gqspi_selectslave'
>  drivers/spi/spi-zynqmp-gqspi.c:205: warning: Excess function parameter 'flashcs' description in 'zynqmp_gqspi_selectslave'
>  drivers/spi/spi-zynqmp-gqspi.c:205: warning: Excess function parameter 'flashbus' description in 'zynqmp_gqspi_selectslave'
>  drivers/spi/spi-zynqmp-gqspi.c:902: warning: Function parameter or member 'dev' not described in 'zynqmp_qspi_suspend'
>  drivers/spi/spi-zynqmp-gqspi.c:902: warning: Excess function parameter '_dev' description in 'zynqmp_qspi_suspend'
> 
> Cc: Michal Simek <michal.simek@xilinx.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/spi/spi-zynqmp-gqspi.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c
> index 811c97a7c8589..e17a201252557 100644
> --- a/drivers/spi/spi-zynqmp-gqspi.c
> +++ b/drivers/spi/spi-zynqmp-gqspi.c
> @@ -197,8 +197,8 @@ static inline void zynqmp_gqspi_write(struct zynqmp_qspi *xqspi, u32 offset,
>  /**
>   * zynqmp_gqspi_selectslave:	For selection of slave device
>   * @instanceptr:	Pointer to the zynqmp_qspi structure
> - * @flashcs:	For chip select
> - * @flashbus:	To check which bus is selected- upper or lower
> + * @slavecs:	For chip select
> + * @slavebus:	To check which bus is selected- upper or lower
>   */
>  static void zynqmp_gqspi_selectslave(struct zynqmp_qspi *instanceptr,
>  				     u8 slavecs, u8 slavebus)
> @@ -892,7 +892,7 @@ static int zynqmp_qspi_start_transfer(struct spi_master *master,
>  
>  /**
>   * zynqmp_qspi_suspend:	Suspend method for the QSPI driver
> - * @_dev:	Address of the platform_device structure
> + * @dev:	Address of the platform_device structure
>   *
>   * This function stops the QSPI driver queue and disables the QSPI controller
>   *
> 

Reviewed-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 12/14] spi: spi-at91-usart: Make use of the defined 'struct of_device_id'
  2020-07-15 21:24   ` Alexandre Belloni
@ 2020-07-16  7:56     ` Lee Jones
  2020-07-16  8:50       ` Alexandre Belloni
  0 siblings, 1 reply; 22+ messages in thread
From: Lee Jones @ 2020-07-16  7:56 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: broonie, linux-arm-kernel, linux-kernel, linux-spi, Radu Pirea,
	Nicolas Ferre, Ludovic Desroches

On Wed, 15 Jul 2020, Alexandre Belloni wrote:

> Hi Lee,
> 
> On 15/07/2020 16:06:30+0100, Lee Jones wrote:
> > It's there so why not use it.
> > 
> 
> Is that the correct resolution? Isn't the proper thing to do simply
> removing at91_usart_spi_dt_ids as the only way it will ever be probed is
> through drivers/mfd/at91-usart.c and I would think matching the driver
> name is enough.

I'm 50/50 on this.

Happy with whatever the authors/maintainers decide most appropriate.

> > Fixes the following W=1 kernel build warning(s):
> > 
> >  drivers/spi/spi-at91-usart.c:684:34: warning: ‘at91_usart_spi_dt_ids’ defined but not used [-Wunused-const-variable=]
> >  684 | static const struct of_device_id at91_usart_spi_dt_ids[] = {
> >  | ^~~~~~~~~~~~~~~~~~~~~
> > 
> > Cc: Radu Pirea <radu_nicolae.pirea@upb.ro>
> > Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
> > Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> > Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >  drivers/spi/spi-at91-usart.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/spi/spi-at91-usart.c b/drivers/spi/spi-at91-usart.c
> > index 88033422a42ae..d47a20be43ccd 100644
> > --- a/drivers/spi/spi-at91-usart.c
> > +++ b/drivers/spi/spi-at91-usart.c
> > @@ -692,6 +692,7 @@ static struct platform_driver at91_usart_spi_driver = {
> >  	.driver = {
> >  		.name = "at91_usart_spi",
> >  		.pm = &at91_usart_spi_pm_ops,
> > +		.of_match_table = at91_usart_spi_dt_ids,
> >  	},
> >  	.probe = at91_usart_spi_probe,
> >  	.remove = at91_usart_spi_remove,
> 

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 12/14] spi: spi-at91-usart: Make use of the defined 'struct of_device_id'
  2020-07-16  7:56     ` Lee Jones
@ 2020-07-16  8:50       ` Alexandre Belloni
  0 siblings, 0 replies; 22+ messages in thread
From: Alexandre Belloni @ 2020-07-16  8:50 UTC (permalink / raw)
  To: Lee Jones
  Cc: broonie, linux-arm-kernel, linux-kernel, linux-spi, Radu Pirea,
	Nicolas Ferre, Ludovic Desroches

On 16/07/2020 08:56:06+0100, Lee Jones wrote:
> On Wed, 15 Jul 2020, Alexandre Belloni wrote:
> 
> > Hi Lee,
> > 
> > On 15/07/2020 16:06:30+0100, Lee Jones wrote:
> > > It's there so why not use it.
> > > 
> > 
> > Is that the correct resolution? Isn't the proper thing to do simply
> > removing at91_usart_spi_dt_ids as the only way it will ever be probed is
> > through drivers/mfd/at91-usart.c and I would think matching the driver
> > name is enough.
> 
> I'm 50/50 on this.
> 
> Happy with whatever the authors/maintainers decide most appropriate.
> 

Seeing that the compatible string is not documented or used by any dts,
I would go for the removal.

> > > Fixes the following W=1 kernel build warning(s):
> > > 
> > >  drivers/spi/spi-at91-usart.c:684:34: warning: ‘at91_usart_spi_dt_ids’ defined but not used [-Wunused-const-variable=]
> > >  684 | static const struct of_device_id at91_usart_spi_dt_ids[] = {
> > >  | ^~~~~~~~~~~~~~~~~~~~~
> > > 
> > > Cc: Radu Pirea <radu_nicolae.pirea@upb.ro>
> > > Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
> > > Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> > > Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
> > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > ---
> > >  drivers/spi/spi-at91-usart.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/drivers/spi/spi-at91-usart.c b/drivers/spi/spi-at91-usart.c
> > > index 88033422a42ae..d47a20be43ccd 100644
> > > --- a/drivers/spi/spi-at91-usart.c
> > > +++ b/drivers/spi/spi-at91-usart.c
> > > @@ -692,6 +692,7 @@ static struct platform_driver at91_usart_spi_driver = {
> > >  	.driver = {
> > >  		.name = "at91_usart_spi",
> > >  		.pm = &at91_usart_spi_pm_ops,
> > > +		.of_match_table = at91_usart_spi_dt_ids,
> > >  	},
> > >  	.probe = at91_usart_spi_probe,
> > >  	.remove = at91_usart_spi_remove,
> > 
> 
> -- 
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 08/14] spi: spi-pl022: Provide missing struct attribute/function param docs
  2020-07-15 15:06 ` [PATCH 08/14] spi: spi-pl022: Provide missing struct attribute/function param docs Lee Jones
@ 2020-07-16 13:59   ` Linus Walleij
  0 siblings, 0 replies; 22+ messages in thread
From: Linus Walleij @ 2020-07-16 13:59 UTC (permalink / raw)
  To: Lee Jones; +Cc: Mark Brown, Linux ARM, linux-kernel, linux-spi, Sachin Verma

On Wed, Jul 15, 2020 at 5:06 PM Lee Jones <lee.jones@linaro.org> wrote:

> Also demote non-worthy kerneldoc headers to standard comment blocks.
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/spi/spi-pl022.c:304: warning: cannot understand function prototype: 'enum ssp_writing '
>  drivers/spi/spi-pl022.c:330: warning: Function parameter or member 'loopback' not described in 'vendor_data'
>  drivers/spi/spi-pl022.c:398: warning: Function parameter or member 'rx_lev_trig' not described in 'pl022'
>  drivers/spi/spi-pl022.c:398: warning: Function parameter or member 'tx_lev_trig' not described in 'pl022'
>  drivers/spi/spi-pl022.c:398: warning: Function parameter or member 'dma_running' not described in 'pl022'
>  drivers/spi/spi-pl022.c:670: warning: Function parameter or member 'pl022' not described in 'readwriter'
>  drivers/spi/spi-pl022.c:1250: warning: Function parameter or member 'irq' not described in 'pl022_interrupt_handler'
>  drivers/spi/spi-pl022.c:1250: warning: Function parameter or member 'dev_id' not described in 'pl022_interrupt_handler'
>  drivers/spi/spi-pl022.c:1343: warning: Function parameter or member 'pl022' not described in 'set_up_next_transfer'
>  drivers/spi/spi-pl022.c:1343: warning: Function parameter or member 'transfer' not described in 'set_up_next_transfer'
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Sachin Verma <sachin.verma@st.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 00/14] Rid W=1 warnings in SPI
  2020-07-15 15:06 [PATCH 00/14] Rid W=1 warnings in SPI Lee Jones
                   ` (13 preceding siblings ...)
  2020-07-15 15:06 ` [PATCH 14/14] spi: spi-amd: " Lee Jones
@ 2020-07-20 11:12 ` Mark Brown
  14 siblings, 0 replies; 22+ messages in thread
From: Mark Brown @ 2020-07-20 11:12 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-arm-kernel, linux-spi, linux-kernel

On Wed, 15 Jul 2020 16:06:18 +0100, Lee Jones wrote:
> This set is part of a larger effort attempting to clean-up W=1
> kernel builds, which are currently overwhelmingly riddled with
> niggly little warnings.
> 
> After these patches are applied, the build system no longer
> complains about any W=0 nor W=1 level warnings in drivers/spi.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[01/13] spi: spi-loopback-test: Fix formatting issues in function header blocks
        commit: 055fe5f499b6783a3eac4978c9012ff08934f37c
[02/13] spi: spi-bitbang: Demote obvious misuse of kerneldoc to standard comment blocks
        commit: c13b5044ab0a484dfe4a8a1d946f3da6abb8d245
[03/13] spi: spi-davinci: Fix a few kerneldoc misspellings and API slippages
        commit: f6305d2706a7f1427d237044c470057508836590
[04/13] spi: spi-ep93xx: Fix API slippage
        commit: dfa51f6db34608d7829a5ef6add11557e548969a
[05/13] spi: spi-meson-spifc: Fix misdocumenting of 'dev' in 'struct meson_spifc'
        commit: 78a7f0c0a170ddef39822b8ec2b6311f0f27ea9b
[06/13] spi: spi-meson-spicc: Remove set but never used variable 'data' from meson_spicc_reset_fifo()
        commit: d9b883aeaeb05d196244383ebe1bc52e39697948
[07/13] spi: spi-s3c64xx: Add missing entries for structs 's3c64xx_spi_dma_data' and 's3c64xx_spi_dma_data'
        commit: 6b8d1e4739f41fcfb5d9adfd91b0ddfd1487c7e5
[08/13] spi: spi-pl022: Provide missing struct attribute/function param docs
        commit: c7cd1dfbd8bbd4a61a39773537db541e247a7ab0
[09/13] spi: spi-zynq-qspi: Add description for 2 missing attributes/parameters
        commit: e867feecda9bbbf854a5e6d8c5d765e31ebc545b
[10/13] spi: spi-zynqmp-gqspi: Correct a couple of misspellings in kerneldoc
        commit: 4b42b0b498124e4d38eaccbbb6b79e2a0ad1e047
[11/13] spi: spi-topcliff-pch: Add missing descriptions to 'struct pch_spi_data'
        commit: decf5326944bc6c32c9256f3992adfb7283cb0f3
[12/13] spi: spi-pxa2xx: Do not define 'struct acpi_device_id' when !CONFIG_ACPI
        commit: 9b2d611929afefee78037c92919d633aae35636a
[13/13] spi: spi-amd: Do not define 'struct acpi_device_id' when !CONFIG_ACPI
        commit: 85ed0f63c0e362afc51e541a8216a58094c36f6b

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-07-20 11:12 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-15 15:06 [PATCH 00/14] Rid W=1 warnings in SPI Lee Jones
2020-07-15 15:06 ` [PATCH 01/14] spi: spi-loopback-test: Fix formatting issues in function header blocks Lee Jones
2020-07-15 15:06 ` [PATCH 02/14] spi: spi-bitbang: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
2020-07-15 15:06 ` [PATCH 03/14] spi: spi-davinci: Fix a few kerneldoc misspellings and API slippages Lee Jones
2020-07-15 15:06 ` [PATCH 04/14] spi: spi-ep93xx: Fix API slippage Lee Jones
2020-07-15 15:06 ` [PATCH 05/14] spi: spi-meson-spifc: Fix misdocumenting of 'dev' in 'struct meson_spifc' Lee Jones
2020-07-15 15:06 ` [PATCH 06/14] spi: spi-meson-spicc: Remove set but never used variable 'data' from meson_spicc_reset_fifo() Lee Jones
2020-07-15 15:06 ` [PATCH 07/14] spi: spi-s3c64xx: Add missing entries for structs 's3c64xx_spi_dma_data' and 's3c64xx_spi_dma_data' Lee Jones
2020-07-15 15:06 ` [PATCH 08/14] spi: spi-pl022: Provide missing struct attribute/function param docs Lee Jones
2020-07-16 13:59   ` Linus Walleij
2020-07-15 15:06 ` [PATCH 09/14] spi: spi-zynq-qspi: Add description for 2 missing attributes/parameters Lee Jones
2020-07-16  7:19   ` Michal Simek
2020-07-15 15:06 ` [PATCH 10/14] spi: spi-zynqmp-gqspi: Correct a couple of misspellings in kerneldoc Lee Jones
2020-07-16  7:20   ` Michal Simek
2020-07-15 15:06 ` [PATCH 11/14] spi: spi-topcliff-pch: Add missing descriptions to 'struct pch_spi_data' Lee Jones
2020-07-15 15:06 ` [PATCH 12/14] spi: spi-at91-usart: Make use of the defined 'struct of_device_id' Lee Jones
2020-07-15 21:24   ` Alexandre Belloni
2020-07-16  7:56     ` Lee Jones
2020-07-16  8:50       ` Alexandre Belloni
2020-07-15 15:06 ` [PATCH 13/14] spi: spi-pxa2xx: Do not define 'struct acpi_device_id' when Lee Jones
2020-07-15 15:06 ` [PATCH 14/14] spi: spi-amd: " Lee Jones
2020-07-20 11:12 ` [PATCH 00/14] Rid W=1 warnings in SPI Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).