* [PATCH net-next] net: ppp: remove error variable
@ 2025-06-09 0:51 Li Jun
2025-06-09 6:24 ` Michal Swiatkowski
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Li Jun @ 2025-06-09 0:51 UTC (permalink / raw)
To: davem, edumazet, lijun01, netdev, michal.swiatkowski, horms
the error variable did not function as a variable.
so remove it.
Signed-off-by: Li Jun <lijun01@kylinos.cn>
---
drivers/net/ppp/pptp.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c
index 5feaa70b5f47..67239476781e 100644
--- a/drivers/net/ppp/pptp.c
+++ b/drivers/net/ppp/pptp.c
@@ -501,7 +501,6 @@ static int pptp_release(struct socket *sock)
{
struct sock *sk = sock->sk;
struct pppox_sock *po;
- int error = 0;
if (!sk)
return 0;
@@ -526,7 +525,7 @@ static int pptp_release(struct socket *sock)
release_sock(sk);
sock_put(sk);
- return error;
+ return 0;
}
static void pptp_sock_destruct(struct sock *sk)
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: ppp: remove error variable
2025-06-09 0:51 [PATCH net-next] net: ppp: remove error variable Li Jun
@ 2025-06-09 6:24 ` Michal Swiatkowski
2025-06-09 6:38 ` Subbaraya Sundeep
2025-06-09 19:37 ` Jakub Kicinski
2 siblings, 0 replies; 4+ messages in thread
From: Michal Swiatkowski @ 2025-06-09 6:24 UTC (permalink / raw)
To: Li Jun; +Cc: davem, edumazet, netdev, michal.swiatkowski, horms
On Mon, Jun 09, 2025 at 08:51:43AM +0800, Li Jun wrote:
> the error variable did not function as a variable.
> so remove it.
>
> Signed-off-by: Li Jun <lijun01@kylinos.cn>
> ---
> drivers/net/ppp/pptp.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c
> index 5feaa70b5f47..67239476781e 100644
> --- a/drivers/net/ppp/pptp.c
> +++ b/drivers/net/ppp/pptp.c
> @@ -501,7 +501,6 @@ static int pptp_release(struct socket *sock)
> {
> struct sock *sk = sock->sk;
> struct pppox_sock *po;
> - int error = 0;
>
> if (!sk)
> return 0;
> @@ -526,7 +525,7 @@ static int pptp_release(struct socket *sock)
> release_sock(sk);
> sock_put(sk);
>
> - return error;
> + return 0;
> }
>
> static void pptp_sock_destruct(struct sock *sk)
Right,
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: ppp: remove error variable
2025-06-09 0:51 [PATCH net-next] net: ppp: remove error variable Li Jun
2025-06-09 6:24 ` Michal Swiatkowski
@ 2025-06-09 6:38 ` Subbaraya Sundeep
2025-06-09 19:37 ` Jakub Kicinski
2 siblings, 0 replies; 4+ messages in thread
From: Subbaraya Sundeep @ 2025-06-09 6:38 UTC (permalink / raw)
To: Li Jun; +Cc: davem, edumazet, netdev, michal.swiatkowski, horms
On 2025-06-09 at 00:51:43, Li Jun (lijun01@kylinos.cn) wrote:
> the error variable did not function as a variable.
> so remove it.
>
> Signed-off-by: Li Jun <lijun01@kylinos.cn>
Reviewed-by: Subbaraya Sundeep <sbhatta@marvell.com>
Thanks,
Sundeep
> ---
> drivers/net/ppp/pptp.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c
> index 5feaa70b5f47..67239476781e 100644
> --- a/drivers/net/ppp/pptp.c
> +++ b/drivers/net/ppp/pptp.c
> @@ -501,7 +501,6 @@ static int pptp_release(struct socket *sock)
> {
> struct sock *sk = sock->sk;
> struct pppox_sock *po;
> - int error = 0;
>
> if (!sk)
> return 0;
> @@ -526,7 +525,7 @@ static int pptp_release(struct socket *sock)
> release_sock(sk);
> sock_put(sk);
>
> - return error;
> + return 0;
> }
>
> static void pptp_sock_destruct(struct sock *sk)
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: ppp: remove error variable
2025-06-09 0:51 [PATCH net-next] net: ppp: remove error variable Li Jun
2025-06-09 6:24 ` Michal Swiatkowski
2025-06-09 6:38 ` Subbaraya Sundeep
@ 2025-06-09 19:37 ` Jakub Kicinski
2 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2025-06-09 19:37 UTC (permalink / raw)
To: Li Jun; +Cc: davem, edumazet, netdev, michal.swiatkowski, horms
On Mon, 9 Jun 2025 08:51:43 +0800 Li Jun wrote:
> the error variable did not function as a variable.
> so remove it.
Quoting documentation:
Clean-up patches
~~~~~~~~~~~~~~~~
Netdev discourages patches which perform simple clean-ups, which are not in
the context of other work. For example:
* Addressing ``checkpatch.pl`` warnings
* Addressing :ref:`Local variable ordering<rcs>` issues
* Conversions to device-managed APIs (``devm_`` helpers)
This is because it is felt that the churn that such changes produce comes
at a greater cost than the value of such clean-ups.
Conversely, spelling and grammar fixes are not discouraged.
See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#clean-up-patches
--
pw-bot: reject
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-06-09 19:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-09 0:51 [PATCH net-next] net: ppp: remove error variable Li Jun
2025-06-09 6:24 ` Michal Swiatkowski
2025-06-09 6:38 ` Subbaraya Sundeep
2025-06-09 19:37 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).