2021-02-04 03:12:27

by Zheng Yongjun

[permalink] [raw]
Subject: [PATCH net-next] net: core: Remove extra spaces

Do codingstyle clean up to remove extra spaces.

Signed-off-by: Zheng Yongjun <[email protected]>
---
net/core/neighbour.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 9500d28a43b0..72ea94ec8c4a 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1618,7 +1618,7 @@ struct neigh_parms *neigh_parms_alloc(struct net_device *dev,

p = kmemdup(&tbl->parms, sizeof(*p), GFP_KERNEL);
if (p) {
- p->tbl = tbl;
+ p->tbl = tbl;
refcount_set(&p->refcnt, 1);
p->reachable_time =
neigh_rand_reach_time(NEIGH_VAR(p, BASE_REACHABLE_TIME));
--
2.22.0


2021-02-05 03:08:46

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH net-next] net: core: Remove extra spaces

On Thu, 4 Feb 2021 11:06:39 +0800 Zheng Yongjun wrote:
> Do codingstyle clean up to remove extra spaces.
>
> Signed-off-by: Zheng Yongjun <[email protected]>
> ---
> net/core/neighbour.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/core/neighbour.c b/net/core/neighbour.c
> index 9500d28a43b0..72ea94ec8c4a 100644
> --- a/net/core/neighbour.c
> +++ b/net/core/neighbour.c
> @@ -1618,7 +1618,7 @@ struct neigh_parms *neigh_parms_alloc(struct net_device *dev,
>
> p = kmemdup(&tbl->parms, sizeof(*p), GFP_KERNEL);
> if (p) {
> - p->tbl = tbl;
> + p->tbl = tbl;
> refcount_set(&p->refcnt, 1);
> p->reachable_time =

^

It's aligned with the assignment to reachable_time.

I don't find this particularly offensive, there are worse style issues
in this function.

> neigh_rand_reach_time(NEIGH_VAR(p, BASE_REACHABLE_TIME));

2021-02-05 03:16:48

by Zheng Yongjun

[permalink] [raw]
Subject: 答复: [PATCH net-next] net: core: Remove extr a spaces

Thank you, I will do this code style cleanup in ` net/core/neighbour.c` to fix the worse style issues you said :)

-----?ʼ?ԭ??-----
??????: Jakub Kicinski [mailto:[email protected]]
????ʱ??: 2021??2??5?? 11:05
?ռ???: zhengyongjun <[email protected]>
????: [email protected]; [email protected]; [email protected]
????: Re: [PATCH net-next] net: core: Remove extra spaces

On Thu, 4 Feb 2021 11:06:39 +0800 Zheng Yongjun wrote:
> Do codingstyle clean up to remove extra spaces.
>
> Signed-off-by: Zheng Yongjun <[email protected]>
> ---
> net/core/neighbour.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/core/neighbour.c b/net/core/neighbour.c index
> 9500d28a43b0..72ea94ec8c4a 100644
> --- a/net/core/neighbour.c
> +++ b/net/core/neighbour.c
> @@ -1618,7 +1618,7 @@ struct neigh_parms *neigh_parms_alloc(struct
> net_device *dev,
>
> p = kmemdup(&tbl->parms, sizeof(*p), GFP_KERNEL);
> if (p) {
> - p->tbl = tbl;
> + p->tbl = tbl;
> refcount_set(&p->refcnt, 1);
> p->reachable_time =

^

It's aligned with the assignment to reachable_time.

I don't find this particularly offensive, there are worse style issues in this function.

> neigh_rand_reach_time(NEIGH_VAR(p, BASE_REACHABLE_TIME));