diff mbox series

[05/16] i2c: busses: i2c-axxia: Fix formatting issue in struct and demote unworthy kernel-doc headers

Message ID 20210520190105.3772683-6-lee.jones@linaro.org
State New
Headers show
Series Rid W=1 warnings from I2C | expand

Commit Message

Lee Jones May 20, 2021, 7 p.m. UTC
Fixes the following W=1 kernel build warning(s):

 drivers/i2c/busses/i2c-axxia.c:135: warning: cannot understand function prototype: 'struct axxia_i2c_dev '
 drivers/i2c/busses/i2c-axxia.c:172: warning: Function parameter or member 'ns' not described in 'ns_to_clk'
 drivers/i2c/busses/i2c-axxia.c:172: warning: Function parameter or member 'clk_mhz' not described in 'ns_to_clk'
 drivers/i2c/busses/i2c-axxia.c:271: warning: Function parameter or member 'idev' not described in 'axxia_i2c_empty_rx_fifo'
 drivers/i2c/busses/i2c-axxia.c:303: warning: Function parameter or member 'idev' not described in 'axxia_i2c_fill_tx_fifo'
 drivers/i2c/busses/i2c-axxia.c:150: warning: Function parameter or member 'slave' not described in 'axxia_i2c_dev'
 drivers/i2c/busses/i2c-axxia.c:150: warning: Function parameter or member 'irq' not described in 'axxia_i2c_dev'

Cc: Krzysztof Adamski <krzysztof.adamski@nokia.com>
Cc: Anders Berg <anders.berg@lsi.com>
Cc: linux-i2c@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>

---
 drivers/i2c/busses/i2c-axxia.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

-- 
2.31.1

Comments

Wolfram Sang June 3, 2021, 8:27 p.m. UTC | #1
> -/**

> - * axxia_i2c_dev - I2C device context

> +/*

> + * struct axxia_i2c_dev - I2C device context

>   * @base: pointer to register struct

>   * @msg: pointer to current message

>   * @msg_r: pointer to current read message (sequence transfer)


Shouldn't we keep the kernel-doc header here?
Lee Jones June 4, 2021, 8:49 a.m. UTC | #2
On Thu, 03 Jun 2021, Wolfram Sang wrote:

> 

> > -/**

> > - * axxia_i2c_dev - I2C device context

> > +/*

> > + * struct axxia_i2c_dev - I2C device context

> >   * @base: pointer to register struct

> >   * @msg: pointer to current message

> >   * @msg_r: pointer to current read message (sequence transfer)

> 

> Shouldn't we keep the kernel-doc header here?


There are a couple of missing descriptions still, but a) since a
concerted effort seems to have been made with this and b) the
remaining descriptions look fairly generic/trivial, I'd be prepared to
re-work this patch.

Will fix.

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

Patch

diff --git a/drivers/i2c/busses/i2c-axxia.c b/drivers/i2c/busses/i2c-axxia.c
index 5294b73beca85..946874e648547 100644
--- a/drivers/i2c/busses/i2c-axxia.c
+++ b/drivers/i2c/busses/i2c-axxia.c
@@ -117,8 +117,8 @@ 
 #define SDA_SETUP_TIME		0x8c
 #define SDA_HOLD_TIME		0x90
 
-/**
- * axxia_i2c_dev - I2C device context
+/*
+ * struct axxia_i2c_dev - I2C device context
  * @base: pointer to register struct
  * @msg: pointer to current message
  * @msg_r: pointer to current read message (sequence transfer)
@@ -165,7 +165,7 @@  static void i2c_int_enable(struct axxia_i2c_dev *idev, u32 mask)
 	writel(int_en | mask, idev->base + MST_INT_ENABLE);
 }
 
-/**
+/*
  * ns_to_clk - Convert time (ns) to clock cycles for the given clock frequency.
  */
 static u32 ns_to_clk(u64 ns, u32 clk_mhz)
@@ -263,7 +263,7 @@  static int i2c_m_recv_len(const struct i2c_msg *msg)
 	return (msg->flags & I2C_M_RECV_LEN) != 0;
 }
 
-/**
+/*
  * axxia_i2c_empty_rx_fifo - Fetch data from RX FIFO and update SMBus block
  * transfer length if this is the first byte of such a transfer.
  */
@@ -295,9 +295,8 @@  static int axxia_i2c_empty_rx_fifo(struct axxia_i2c_dev *idev)
 	return 0;
 }
 
-/**
+/*
  * axxia_i2c_fill_tx_fifo - Fill TX FIFO from current message buffer.
- * @return: Number of bytes left to transfer.
  */
 static int axxia_i2c_fill_tx_fifo(struct axxia_i2c_dev *idev)
 {