diff mbox series

i2c: xiic: Fix kerneldoc warnings

Message ID 1572615563-31751-1-git-send-email-shubhrajyoti.datta@xilinx.com
State Superseded
Headers show
Series i2c: xiic: Fix kerneldoc warnings | expand

Commit Message

Shubhrajyoti Datta Nov. 1, 2019, 1:39 p.m. UTC
Fix the below warning by adding the description of clock and dev.

drivers/i2c/busses/i2c-xiic.c:57: info: Scanning doc for struct xiic_i2c
drivers/i2c/busses/i2c-xiic.c:84: warning: Function parameter or member
'dev' not described in 'xiic_i2c'
drivers/i2c/busses/i2c-xiic.c:84: warning: Function parameter or member
'clk' not described in 'xiic_i2c'

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
---
 drivers/i2c/busses/i2c-xiic.c | 2 ++
 1 file changed, 2 insertions(+)

--
2.1.1

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

Comments

Luca Ceresoli Nov. 4, 2019, 5:16 p.m. UTC | #1
Hi Shubhrajyoti,

On 01/11/19 14:39, Shubhrajyoti Datta wrote:
> Fix the below warning by adding the description of clock and dev.
> 
> drivers/i2c/busses/i2c-xiic.c:57: info: Scanning doc for struct xiic_i2c
> drivers/i2c/busses/i2c-xiic.c:84: warning: Function parameter or member
> 'dev' not described in 'xiic_i2c'
> drivers/i2c/busses/i2c-xiic.c:84: warning: Function parameter or member
> 'clk' not described in 'xiic_i2c'
> 
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> ---
>  drivers/i2c/busses/i2c-xiic.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
> index 0c51c0f..e212a9c 100644
> --- a/drivers/i2c/busses/i2c-xiic.c
> +++ b/drivers/i2c/busses/i2c-xiic.c
> @@ -55,6 +55,7 @@ enum xiic_endian {
> 
>  /**
>   * struct xiic_i2c - Internal representation of the XIIC I2C bus
> + * @dev:       Pointer to device structure
>   * @base:      Memory base of the HW registers
>   * @wait:      Wait queue for callers
>   * @adap:      Kernel adapter representation
> @@ -66,6 +67,7 @@ enum xiic_endian {
>   * @rx_msg:    Current RX message
>   * @rx_pos:    Position within current RX message
>   * @endianness: big/little-endian byte order
> + * @clk:       Pointer to struct clk

'Pointer to struct clk' does not say anything that is not already
obvious from the 'struct clk *clk' below. I understand you are simply
fixing a kernel-doc warning, but I'd rather document this field as
'Input clock' or 'AXI4-Lite input clock', which gives at least a bit of
extra information (even though not much more, because clock management
is really simple for this device).

Just my 2c,
Shubhrajyoti Datta Nov. 5, 2019, 5:29 a.m. UTC | #2
Hi Luca,
thanks for review.
On Mon, Nov 4, 2019 a
t 10:47 PM Luca Ceresoli <luca@lucaceresoli.net> wrote:
>
> Hi Shubhrajyoti,
>
> On 01/11/19 14:39, Shubhrajyoti Datta wrote:
> > Fix the below warning by adding the description of clock and dev.
> >
> > drivers/i2c/busses/i2c-xiic.c:57: info: Scanning doc for struct xiic_i2c
> > drivers/i2c/busses/i2c-xiic.c:84: warning: Function parameter or member
> > 'dev' not described in 'xiic_i2c'
> > drivers/i2c/busses/i2c-xiic.c:84: warning: Function parameter or member
> > 'clk' not described in 'xiic_i2c'
> >
> > Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> > ---
> >  drivers/i2c/busses/i2c-xiic.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
> > index 0c51c0f..e212a9c 100644
> > --- a/drivers/i2c/busses/i2c-xiic.c
> > +++ b/drivers/i2c/busses/i2c-xiic.c
> > @@ -55,6 +55,7 @@ enum xiic_endian {
> >
> >  /**
> >   * struct xiic_i2c - Internal representation of the XIIC I2C bus
> > + * @dev:       Pointer to device structure
> >   * @base:      Memory base of the HW registers
> >   * @wait:      Wait queue for callers
> >   * @adap:      Kernel adapter representation
> > @@ -66,6 +67,7 @@ enum xiic_endian {
> >   * @rx_msg:    Current RX message
> >   * @rx_pos:    Position within current RX message
> >   * @endianness: big/little-endian byte order
> > + * @clk:       Pointer to struct clk
>
> 'Pointer to struct clk' does not say anything that is not already
> obvious from the 'struct clk *clk' below. I understand you are simply
> fixing a kernel-doc warning, but I'd rather document this field as
> 'Input clock' or 'AXI4-Lite input clock', which gives at least a bit of
> extra information (even though not much more, because clock management
> is really simple for this device).
>
> Just my 2c,
I agree  fixed that in v2.


> --
> Luca
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
index 0c51c0f..e212a9c 100644
--- a/drivers/i2c/busses/i2c-xiic.c
+++ b/drivers/i2c/busses/i2c-xiic.c
@@ -55,6 +55,7 @@  enum xiic_endian {

 /**
  * struct xiic_i2c - Internal representation of the XIIC I2C bus
+ * @dev:       Pointer to device structure
  * @base:      Memory base of the HW registers
  * @wait:      Wait queue for callers
  * @adap:      Kernel adapter representation
@@ -66,6 +67,7 @@  enum xiic_endian {
  * @rx_msg:    Current RX message
  * @rx_pos:    Position within current RX message
  * @endianness: big/little-endian byte order
+ * @clk:       Pointer to struct clk
  */
 struct xiic_i2c {
        struct device           *dev;