[PATCH] dmaengine: dmatest: split struct dmatest_info from variable declaration

Rosen Penev posted 1 patch 1 week, 1 day ago
drivers/dma/dmatest.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
[PATCH] dmaengine: dmatest: split struct dmatest_info from variable declaration
Posted by Rosen Penev 1 week, 1 day ago
Combining the struct definition with its variable initializer confuses the
kernel-doc parser because __MUTEX_INITIALIZER() expands to contain braces,
breaking brace counting and causing:

  Warning: drivers/dma/dmatest.c:152 struct member '' not described in 'dmatest_info'

Split into separate struct definition and variable declaration, which is
the standard kernel pattern.

Assisted-by: Opencode:Big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/dma/dmatest.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index df38681a1ff4..2ae3469397f3 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -137,7 +137,7 @@ struct dmatest_params {
  * @did_init:		module has been initialized completely
  * @last_error:		test has faced configuration issues
  */
-static struct dmatest_info {
+struct dmatest_info {
 	/* Test parameters */
 	struct dmatest_params	params;

@@ -147,7 +147,9 @@ static struct dmatest_info {
 	int			last_error;
 	struct mutex		lock;
 	bool			did_init;
-} test_info = {
+};
+
+static struct dmatest_info test_info = {
 	.channels = LIST_HEAD_INIT(test_info.channels),
 	.lock = __MUTEX_INITIALIZER(test_info.lock),
 };
--
2.54.0