* [PATCH net-next 0/2] Fix Linux style violations
@ 2025-09-11 7:28 Suraj Gupta
2025-09-11 7:28 ` [PATCH net-next 1/2] net: xilinx: axienet: Fix kernel-doc warning for axienet_free_tx_chain return value Suraj Gupta
2025-09-11 7:28 ` [PATCH net-next 2/2] net: xilinx: axienet: Add inline comment for stats_lock mutex definition Suraj Gupta
0 siblings, 2 replies; 7+ messages in thread
From: Suraj Gupta @ 2025-09-11 7:28 UTC (permalink / raw)
To: andrew+netdev, davem, edumazet, kuba, pabeni, michal.simek,
sean.anderson, radhey.shyam.pandey, horms
Cc: netdev, linux-arm-kernel, linux-kernel, harini.katakam
Fix Linux style violations reported by tools.
Suraj Gupta (2):
net: xilinx: axienet: Fix kernel-doc warning for axienet_free_tx_chain
return value
net: xilinx: axienet: Add inline comment for stats_lock mutex
definition
drivers/net/ethernet/xilinx/xilinx_axienet.h | 2 +-
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net-next 1/2] net: xilinx: axienet: Fix kernel-doc warning for axienet_free_tx_chain return value
2025-09-11 7:28 [PATCH net-next 0/2] Fix Linux style violations Suraj Gupta
@ 2025-09-11 7:28 ` Suraj Gupta
2025-09-11 14:35 ` Sean Anderson
2025-09-11 15:41 ` Pandey, Radhey Shyam
2025-09-11 7:28 ` [PATCH net-next 2/2] net: xilinx: axienet: Add inline comment for stats_lock mutex definition Suraj Gupta
1 sibling, 2 replies; 7+ messages in thread
From: Suraj Gupta @ 2025-09-11 7:28 UTC (permalink / raw)
To: andrew+netdev, davem, edumazet, kuba, pabeni, michal.simek,
sean.anderson, radhey.shyam.pandey, horms
Cc: netdev, linux-arm-kernel, linux-kernel, harini.katakam
Add proper "Return:" section in axienet_free_tx_chain() description.
The return value description was present in the function description
but not in the standardized format.
Move the return value description from the main description to a separate
"Return:" section to follow Linux kernel documentation standards.
Fixes below kernel-doc warning:
warning: No description found for return value of 'axienet_free_tx_chain'
Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>
---
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index ec6d47dc984a..0cf776153508 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -773,7 +773,8 @@ static int axienet_device_reset(struct net_device *ndev)
*
* Would either be called after a successful transmit operation, or after
* there was an error when setting up the chain.
- * Returns the number of packets handled.
+ *
+ * Return: The number of packets handled.
*/
static int axienet_free_tx_chain(struct axienet_local *lp, u32 first_bd,
int nr_bds, bool force, u32 *sizep, int budget)
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net-next 2/2] net: xilinx: axienet: Add inline comment for stats_lock mutex definition
2025-09-11 7:28 [PATCH net-next 0/2] Fix Linux style violations Suraj Gupta
2025-09-11 7:28 ` [PATCH net-next 1/2] net: xilinx: axienet: Fix kernel-doc warning for axienet_free_tx_chain return value Suraj Gupta
@ 2025-09-11 7:28 ` Suraj Gupta
2025-09-11 14:35 ` Sean Anderson
1 sibling, 1 reply; 7+ messages in thread
From: Suraj Gupta @ 2025-09-11 7:28 UTC (permalink / raw)
To: andrew+netdev, davem, edumazet, kuba, pabeni, michal.simek,
sean.anderson, radhey.shyam.pandey, horms
Cc: netdev, linux-arm-kernel, linux-kernel, harini.katakam
Add inline comment to document the purpose of the stats_lock mutex in
the axienet_local structure. This mutex protects the hw_stats_seqcount
sequence counter used for hardware statistics synchronization.
Fixes checkpatch warning:
CHECK: struct mutex definition without comment
Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>
---
drivers/net/ethernet/xilinx/xilinx_axienet.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet.h b/drivers/net/ethernet/xilinx/xilinx_axienet.h
index 5ff742103beb..99b9c27bbd60 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet.h
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet.h
@@ -598,7 +598,7 @@ struct axienet_local {
u64 hw_stat_base[STAT_COUNT];
u32 hw_last_counter[STAT_COUNT];
- seqcount_mutex_t hw_stats_seqcount;
+ seqcount_mutex_t hw_stats_seqcount; /* Lock for hardware statistics */
struct mutex stats_lock;
struct delayed_work stats_work;
bool reset_in_progress;
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 2/2] net: xilinx: axienet: Add inline comment for stats_lock mutex definition
2025-09-11 7:28 ` [PATCH net-next 2/2] net: xilinx: axienet: Add inline comment for stats_lock mutex definition Suraj Gupta
@ 2025-09-11 14:35 ` Sean Anderson
2025-09-11 14:44 ` Andrew Lunn
0 siblings, 1 reply; 7+ messages in thread
From: Sean Anderson @ 2025-09-11 14:35 UTC (permalink / raw)
To: Suraj Gupta, andrew+netdev, davem, edumazet, kuba, pabeni,
michal.simek, radhey.shyam.pandey, horms
Cc: netdev, linux-arm-kernel, linux-kernel, harini.katakam
On 9/11/25 03:28, Suraj Gupta wrote:
> Add inline comment to document the purpose of the stats_lock mutex in
> the axienet_local structure. This mutex protects the hw_stats_seqcount
> sequence counter used for hardware statistics synchronization.
>
> Fixes checkpatch warning:
> CHECK: struct mutex definition without comment
>
> Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>
> ---
> drivers/net/ethernet/xilinx/xilinx_axienet.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet.h b/drivers/net/ethernet/xilinx/xilinx_axienet.h
> index 5ff742103beb..99b9c27bbd60 100644
> --- a/drivers/net/ethernet/xilinx/xilinx_axienet.h
> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet.h
> @@ -598,7 +598,7 @@ struct axienet_local {
>
> u64 hw_stat_base[STAT_COUNT];
> u32 hw_last_counter[STAT_COUNT];
> - seqcount_mutex_t hw_stats_seqcount;
> + seqcount_mutex_t hw_stats_seqcount; /* Lock for hardware statistics */
> struct mutex stats_lock;
> struct delayed_work stats_work;
> bool reset_in_progress;
NAK. This is already documented in the kernel-doc comment.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 1/2] net: xilinx: axienet: Fix kernel-doc warning for axienet_free_tx_chain return value
2025-09-11 7:28 ` [PATCH net-next 1/2] net: xilinx: axienet: Fix kernel-doc warning for axienet_free_tx_chain return value Suraj Gupta
@ 2025-09-11 14:35 ` Sean Anderson
2025-09-11 15:41 ` Pandey, Radhey Shyam
1 sibling, 0 replies; 7+ messages in thread
From: Sean Anderson @ 2025-09-11 14:35 UTC (permalink / raw)
To: Suraj Gupta, andrew+netdev, davem, edumazet, kuba, pabeni,
michal.simek, radhey.shyam.pandey, horms
Cc: netdev, linux-arm-kernel, linux-kernel, harini.katakam
On 9/11/25 03:28, Suraj Gupta wrote:
> Add proper "Return:" section in axienet_free_tx_chain() description.
> The return value description was present in the function description
> but not in the standardized format.
> Move the return value description from the main description to a separate
> "Return:" section to follow Linux kernel documentation standards.
>
> Fixes below kernel-doc warning:
> warning: No description found for return value of 'axienet_free_tx_chain'
>
> Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>
> ---
> drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> index ec6d47dc984a..0cf776153508 100644
> --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> @@ -773,7 +773,8 @@ static int axienet_device_reset(struct net_device *ndev)
> *
> * Would either be called after a successful transmit operation, or after
> * there was an error when setting up the chain.
> - * Returns the number of packets handled.
> + *
> + * Return: The number of packets handled.
> */
> static int axienet_free_tx_chain(struct axienet_local *lp, u32 first_bd,
> int nr_bds, bool force, u32 *sizep, int budget)
Reviewed-by: Sean Anderson <sean.anderson@linux.dev>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 2/2] net: xilinx: axienet: Add inline comment for stats_lock mutex definition
2025-09-11 14:35 ` Sean Anderson
@ 2025-09-11 14:44 ` Andrew Lunn
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2025-09-11 14:44 UTC (permalink / raw)
To: Sean Anderson
Cc: Suraj Gupta, andrew+netdev, davem, edumazet, kuba, pabeni,
michal.simek, radhey.shyam.pandey, horms, netdev,
linux-arm-kernel, linux-kernel, harini.katakam
On Thu, Sep 11, 2025 at 10:35:22AM -0400, Sean Anderson wrote:
> On 9/11/25 03:28, Suraj Gupta wrote:
> > Add inline comment to document the purpose of the stats_lock mutex in
> > the axienet_local structure. This mutex protects the hw_stats_seqcount
> > sequence counter used for hardware statistics synchronization.
> >
> > Fixes checkpatch warning:
> > CHECK: struct mutex definition without comment
> >
> > Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>
> > ---
> > drivers/net/ethernet/xilinx/xilinx_axienet.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet.h b/drivers/net/ethernet/xilinx/xilinx_axienet.h
> > index 5ff742103beb..99b9c27bbd60 100644
> > --- a/drivers/net/ethernet/xilinx/xilinx_axienet.h
> > +++ b/drivers/net/ethernet/xilinx/xilinx_axienet.h
> > @@ -598,7 +598,7 @@ struct axienet_local {
> >
> > u64 hw_stat_base[STAT_COUNT];
> > u32 hw_last_counter[STAT_COUNT];
> > - seqcount_mutex_t hw_stats_seqcount;
> > + seqcount_mutex_t hw_stats_seqcount; /* Lock for hardware statistics */
> > struct mutex stats_lock;
> > struct delayed_work stats_work;
> > bool reset_in_progress;
>
> NAK. This is already documented in the kernel-doc comment.
Agreed. checkpatch is just a guide, it does get things wrong, and we
don't insist it is 100% clean.
And the existing comment is much more specific:
Sequence counter for @hw_stat_base, @hw_last_counter,
and @reset_in_progress.
This makes it clear exactly what it should protect, and what it does
not protect.
Andrew
---
pw-bot: cr
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH net-next 1/2] net: xilinx: axienet: Fix kernel-doc warning for axienet_free_tx_chain return value
2025-09-11 7:28 ` [PATCH net-next 1/2] net: xilinx: axienet: Fix kernel-doc warning for axienet_free_tx_chain return value Suraj Gupta
2025-09-11 14:35 ` Sean Anderson
@ 2025-09-11 15:41 ` Pandey, Radhey Shyam
1 sibling, 0 replies; 7+ messages in thread
From: Pandey, Radhey Shyam @ 2025-09-11 15:41 UTC (permalink / raw)
To: Gupta, Suraj, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
Simek, Michal, sean.anderson@linux.dev, horms@kernel.org
Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Katakam, Harini
[Public]
> -----Original Message-----
> From: Suraj Gupta <suraj.gupta2@amd.com>
> Sent: Thursday, September 11, 2025 12:58 PM
> To: andrew+netdev@lunn.ch; davem@davemloft.net; edumazet@google.com;
> kuba@kernel.org; pabeni@redhat.com; Simek, Michal <michal.simek@amd.com>;
> sean.anderson@linux.dev; Pandey, Radhey Shyam
> <radhey.shyam.pandey@amd.com>; horms@kernel.org
> Cc: netdev@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; Katakam, Harini <harini.katakam@amd.com>
> Subject: [PATCH net-next 1/2] net: xilinx: axienet: Fix kernel-doc warning for
> axienet_free_tx_chain return value
>
> Add proper "Return:" section in axienet_free_tx_chain() description.
> The return value description was present in the function description but not in the
> standardized format.
> Move the return value description from the main description to a separate "Return:"
> section to follow Linux kernel documentation standards.
>
> Fixes below kernel-doc warning:
> warning: No description found for return value of 'axienet_free_tx_chain'
>
> Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Thanks!
> ---
> drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> index ec6d47dc984a..0cf776153508 100644
> --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> @@ -773,7 +773,8 @@ static int axienet_device_reset(struct net_device *ndev)
> *
> * Would either be called after a successful transmit operation, or after
> * there was an error when setting up the chain.
> - * Returns the number of packets handled.
> + *
> + * Return: The number of packets handled.
> */
> static int axienet_free_tx_chain(struct axienet_local *lp, u32 first_bd,
> int nr_bds, bool force, u32 *sizep, int budget)
> --
> 2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-09-11 15:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-11 7:28 [PATCH net-next 0/2] Fix Linux style violations Suraj Gupta
2025-09-11 7:28 ` [PATCH net-next 1/2] net: xilinx: axienet: Fix kernel-doc warning for axienet_free_tx_chain return value Suraj Gupta
2025-09-11 14:35 ` Sean Anderson
2025-09-11 15:41 ` Pandey, Radhey Shyam
2025-09-11 7:28 ` [PATCH net-next 2/2] net: xilinx: axienet: Add inline comment for stats_lock mutex definition Suraj Gupta
2025-09-11 14:35 ` Sean Anderson
2025-09-11 14:44 ` Andrew Lunn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox