diff mbox series

[net-next,v4,05/15] net: dsa: vsc73xx: add structure descriptions

Message ID 20240213220331.239031-6-paweldembicki@gmail.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series net: dsa: vsc73xx: Make vsc73xx usable | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 989 this patch: 989
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 1006 this patch: 1006
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1006 this patch: 1006
netdev/checkpatch warning WARNING: line length of 85 exceeds 80 columns WARNING: line length of 91 exceeds 80 columns
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 8 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Pawel Dembicki Feb. 13, 2024, 10:03 p.m. UTC
This commit adds updates to the documentation describing the structures
used in vsc73xx. This will help prevent kdoc-related issues in the future.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
---
v4:
  - introduced patch

 drivers/net/dsa/vitesse-vsc73xx.h | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

Comments

Linus Walleij Feb. 13, 2024, 11:08 p.m. UTC | #1
On Tue, Feb 13, 2024 at 11:05 PM Pawel Dembicki <paweldembicki@gmail.com> wrote:

> This commit adds updates to the documentation describing the structures
> used in vsc73xx. This will help prevent kdoc-related issues in the future.
>
> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>

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

Yours,
Linus Walleij
Florian Fainelli Feb. 13, 2024, 11:20 p.m. UTC | #2
On 2/13/24 14:03, Pawel Dembicki wrote:
> This commit adds updates to the documentation describing the structures
> used in vsc73xx. This will help prevent kdoc-related issues in the future.
> 
> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Vladimir Oltean Feb. 15, 2024, 12:18 a.m. UTC | #3
On Tue, Feb 13, 2024 at 11:03:18PM +0100, Pawel Dembicki wrote:
> diff --git a/drivers/net/dsa/vitesse-vsc73xx.h b/drivers/net/dsa/vitesse-vsc73xx.h
> index fee1378508b5..99c5c24ffde0 100644
> --- a/drivers/net/dsa/vitesse-vsc73xx.h
> +++ b/drivers/net/dsa/vitesse-vsc73xx.h
> @@ -15,7 +15,15 @@
>  #define VSC73XX_MAX_NUM_PORTS	8
>  
>  /**
> - * struct vsc73xx - VSC73xx state container
> + * struct vsc73xx - VSC73xx state container: main data structure
> + * @dev: The device pointer
> + * @reset: The descriptor for the GPIO line tied to the reset pin
> + * @ds: Pointer to the DSA core structure
> + * @gc: Main structure of the GPIO controller
> + * @chipid: Storage for the Chip ID value read from the CHIPID register of the switch
> + * @addr: MAC address used in flow control frames
> + * @ops: Structure with hardware-dependent operations
> + * @priv: Pointer to the configuration interface structure
>   */
>  struct vsc73xx {
>  	struct device			*dev;
> @@ -28,6 +36,11 @@ struct vsc73xx {
>  	void				*priv;
>  };
>  
> +/**
> + * struct vsc73xx_ops - VSC73xx methods container: pointers to hardware-dependent functions

The netdev coding style still sticks to the "80 characters per line" rule.
I can't find other deviations from this rule in the driver.

Maybe you can cut down on the boilerplate a little bit. Like:

/**
 * struct vsc73xx_ops - VSC73xx methods container
 * @read: Method for register reading over the hardware-dependent interface
 * @write: Method for register writing over the hardware-dependent interface

> + * @read: Pointer to the read function from the hardware-dependent interface
> + * @write: Pointer to the write function from the hardware-dependent interface
> + */
>  struct vsc73xx_ops {
>  	int (*read)(struct vsc73xx *vsc, u8 block, u8 subblock, u8 reg,
>  		    u32 *val);
> -- 
> 2.34.1
>
diff mbox series

Patch

diff --git a/drivers/net/dsa/vitesse-vsc73xx.h b/drivers/net/dsa/vitesse-vsc73xx.h
index fee1378508b5..99c5c24ffde0 100644
--- a/drivers/net/dsa/vitesse-vsc73xx.h
+++ b/drivers/net/dsa/vitesse-vsc73xx.h
@@ -15,7 +15,15 @@ 
 #define VSC73XX_MAX_NUM_PORTS	8
 
 /**
- * struct vsc73xx - VSC73xx state container
+ * struct vsc73xx - VSC73xx state container: main data structure
+ * @dev: The device pointer
+ * @reset: The descriptor for the GPIO line tied to the reset pin
+ * @ds: Pointer to the DSA core structure
+ * @gc: Main structure of the GPIO controller
+ * @chipid: Storage for the Chip ID value read from the CHIPID register of the switch
+ * @addr: MAC address used in flow control frames
+ * @ops: Structure with hardware-dependent operations
+ * @priv: Pointer to the configuration interface structure
  */
 struct vsc73xx {
 	struct device			*dev;
@@ -28,6 +36,11 @@  struct vsc73xx {
 	void				*priv;
 };
 
+/**
+ * struct vsc73xx_ops - VSC73xx methods container: pointers to hardware-dependent functions
+ * @read: Pointer to the read function from the hardware-dependent interface
+ * @write: Pointer to the write function from the hardware-dependent interface
+ */
 struct vsc73xx_ops {
 	int (*read)(struct vsc73xx *vsc, u8 block, u8 subblock, u8 reg,
 		    u32 *val);