* [PATCH] ipvs: remove unnecessary space
@ 2019-07-11 3:39 yangxingwu
0 siblings, 0 replies; 10+ messages in thread
From: yangxingwu @ 2019-07-11 3:39 UTC (permalink / raw)
To: wensong
Cc: horms, ja, pablo, kadlec, fw, davem, netdev, lvs-devel,
netfilter-devel, coreteam, linux-kernel, yangxingwu
this patch removes the extra space and use bitmap_zalloc instead
Signed-off-by: yangxingwu <xingwu.yang@gmail.com>
---
net/netfilter/ipvs/ip_vs_mh.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_mh.c b/net/netfilter/ipvs/ip_vs_mh.c
index 94d9d34..3229867 100644
--- a/net/netfilter/ipvs/ip_vs_mh.c
+++ b/net/netfilter/ipvs/ip_vs_mh.c
@@ -174,8 +174,7 @@ static int ip_vs_mh_populate(struct ip_vs_mh_state *s,
return 0;
}
- table = kcalloc(BITS_TO_LONGS(IP_VS_MH_TAB_SIZE),
- sizeof(unsigned long), GFP_KERNEL);
+ table = bitmap_zalloc(IP_VS_MH_TAB_SIZE, GFP_KERNEL);
if (!table)
return -ENOMEM;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] ipvs: remove unnecessary space
@ 2019-07-10 7:45 yangxingwu
2019-07-10 8:06 ` Simon Horman
0 siblings, 1 reply; 10+ messages in thread
From: yangxingwu @ 2019-07-10 7:45 UTC (permalink / raw)
To: wensong
Cc: horms, ja, pablo, kadlec, fw, davem, netdev, lvs-devel,
netfilter-devel, coreteam, linux-kernel, yangxingwu
this patch removes the extra space.
Signed-off-by: yangxingwu <xingwu.yang@gmail.com>
---
net/netfilter/ipvs/ip_vs_mh.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_mh.c b/net/netfilter/ipvs/ip_vs_mh.c
index 94d9d34..98e358e 100644
--- a/net/netfilter/ipvs/ip_vs_mh.c
+++ b/net/netfilter/ipvs/ip_vs_mh.c
@@ -174,8 +174,8 @@ static int ip_vs_mh_populate(struct ip_vs_mh_state *s,
return 0;
}
- table = kcalloc(BITS_TO_LONGS(IP_VS_MH_TAB_SIZE),
- sizeof(unsigned long), GFP_KERNEL);
+ table = kcalloc(BITS_TO_LONGS(IP_VS_MH_TAB_SIZE),
+ sizeof(unsigned long), GFP_KERNEL);
if (!table)
return -ENOMEM;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] ipvs: remove unnecessary space
2019-07-10 7:45 yangxingwu
@ 2019-07-10 8:06 ` Simon Horman
2019-07-11 0:22 ` Joe Perches
2019-07-15 8:27 ` Pablo Neira Ayuso
0 siblings, 2 replies; 10+ messages in thread
From: Simon Horman @ 2019-07-10 8:06 UTC (permalink / raw)
To: yangxingwu, Pablo Neira Ayuso
Cc: wensong, ja, pablo, kadlec, fw, davem, netdev, lvs-devel,
netfilter-devel, coreteam, linux-kernel
On Wed, Jul 10, 2019 at 03:45:52PM +0800, yangxingwu wrote:
> this patch removes the extra space.
>
> Signed-off-by: yangxingwu <xingwu.yang@gmail.com>
Thanks, this looks good to me.
Acked-by: Simon Horman <horms@verge.net.au>
Pablo, please consider including this in nf-next.
> ---
> net/netfilter/ipvs/ip_vs_mh.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/netfilter/ipvs/ip_vs_mh.c b/net/netfilter/ipvs/ip_vs_mh.c
> index 94d9d34..98e358e 100644
> --- a/net/netfilter/ipvs/ip_vs_mh.c
> +++ b/net/netfilter/ipvs/ip_vs_mh.c
> @@ -174,8 +174,8 @@ static int ip_vs_mh_populate(struct ip_vs_mh_state *s,
> return 0;
> }
>
> - table = kcalloc(BITS_TO_LONGS(IP_VS_MH_TAB_SIZE),
> - sizeof(unsigned long), GFP_KERNEL);
> + table = kcalloc(BITS_TO_LONGS(IP_VS_MH_TAB_SIZE),
> + sizeof(unsigned long), GFP_KERNEL);
> if (!table)
> return -ENOMEM;
>
> --
> 1.8.3.1
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ipvs: remove unnecessary space
2019-07-10 8:06 ` Simon Horman
@ 2019-07-11 0:22 ` Joe Perches
2019-07-12 13:07 ` yangxingwu
2019-07-15 8:27 ` Pablo Neira Ayuso
1 sibling, 1 reply; 10+ messages in thread
From: Joe Perches @ 2019-07-11 0:22 UTC (permalink / raw)
To: Simon Horman, yangxingwu, Pablo Neira Ayuso
Cc: wensong, ja, kadlec, fw, davem, netdev, lvs-devel,
netfilter-devel, coreteam, linux-kernel
On Wed, 2019-07-10 at 10:06 +0200, Simon Horman wrote:
> On Wed, Jul 10, 2019 at 03:45:52PM +0800, yangxingwu wrote:
> > this patch removes the extra space.
> >
> > Signed-off-by: yangxingwu <xingwu.yang@gmail.com>
>
> Thanks, this looks good to me.
>
> Acked-by: Simon Horman <horms@verge.net.au>
>
> Pablo, please consider including this in nf-next.
>
>
> > ---
> > net/netfilter/ipvs/ip_vs_mh.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/net/netfilter/ipvs/ip_vs_mh.c b/net/netfilter/ipvs/ip_vs_mh.c
> > index 94d9d34..98e358e 100644
> > --- a/net/netfilter/ipvs/ip_vs_mh.c
> > +++ b/net/netfilter/ipvs/ip_vs_mh.c
> > @@ -174,8 +174,8 @@ static int ip_vs_mh_populate(struct ip_vs_mh_state *s,
> > return 0;
> > }
> >
> > - table = kcalloc(BITS_TO_LONGS(IP_VS_MH_TAB_SIZE),
> > - sizeof(unsigned long), GFP_KERNEL);
> > + table = kcalloc(BITS_TO_LONGS(IP_VS_MH_TAB_SIZE),
> > + sizeof(unsigned long), GFP_KERNEL);
bitmap_alloc?
> > if (!table)
> > return -ENOMEM;
> >
> > --
> > 1.8.3.1
> >
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] ipvs: remove unnecessary space
2019-07-11 0:22 ` Joe Perches
@ 2019-07-12 13:07 ` yangxingwu
2019-07-15 7:57 ` Pablo Neira Ayuso
0 siblings, 1 reply; 10+ messages in thread
From: yangxingwu @ 2019-07-12 13:07 UTC (permalink / raw)
To: wensong
Cc: horms, ja, pablo, kadlec, fw, davem, netdev, lvs-devel,
netfilter-devel, coreteam, linux-kernel, joe, yangxingwu
this patch removes the extra space and use bitmap_zalloc instead
Signed-off-by: yangxingwu <xingwu.yang@gmail.com>
---
net/netfilter/ipvs/ip_vs_mh.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_mh.c b/net/netfilter/ipvs/ip_vs_mh.c
index 94d9d34..3229867 100644
--- a/net/netfilter/ipvs/ip_vs_mh.c
+++ b/net/netfilter/ipvs/ip_vs_mh.c
@@ -174,8 +174,7 @@ static int ip_vs_mh_populate(struct ip_vs_mh_state *s,
return 0;
}
- table = kcalloc(BITS_TO_LONGS(IP_VS_MH_TAB_SIZE),
- sizeof(unsigned long), GFP_KERNEL);
+ table = bitmap_zalloc(IP_VS_MH_TAB_SIZE, GFP_KERNEL);
if (!table)
return -ENOMEM;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] ipvs: remove unnecessary space
2019-07-12 13:07 ` yangxingwu
@ 2019-07-15 7:57 ` Pablo Neira Ayuso
2019-07-15 8:26 ` Pablo Neira Ayuso
0 siblings, 1 reply; 10+ messages in thread
From: Pablo Neira Ayuso @ 2019-07-15 7:57 UTC (permalink / raw)
To: yangxingwu
Cc: wensong, horms, ja, kadlec, fw, davem, netdev, lvs-devel,
netfilter-devel, coreteam, linux-kernel, joe
On Fri, Jul 12, 2019 at 09:07:21PM +0800, yangxingwu wrote:
> this patch removes the extra space and use bitmap_zalloc instead
>
> Signed-off-by: yangxingwu <xingwu.yang@gmail.com>
> ---
> net/netfilter/ipvs/ip_vs_mh.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/net/netfilter/ipvs/ip_vs_mh.c b/net/netfilter/ipvs/ip_vs_mh.c
> index 94d9d34..3229867 100644
> --- a/net/netfilter/ipvs/ip_vs_mh.c
> +++ b/net/netfilter/ipvs/ip_vs_mh.c
> @@ -174,8 +174,7 @@ static int ip_vs_mh_populate(struct ip_vs_mh_state *s,
> return 0;
> }
>
> - table = kcalloc(BITS_TO_LONGS(IP_VS_MH_TAB_SIZE),
> - sizeof(unsigned long), GFP_KERNEL);
> + table = bitmap_zalloc(IP_VS_MH_TAB_SIZE, GFP_KERNEL);
By doing:
git grep "= " ...
on the netfilter folders, I see more of these, it would be good if you
fix them at once or, probably, you want to use coccinelle for this.
Thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ipvs: remove unnecessary space
2019-07-15 7:57 ` Pablo Neira Ayuso
@ 2019-07-15 8:26 ` Pablo Neira Ayuso
0 siblings, 0 replies; 10+ messages in thread
From: Pablo Neira Ayuso @ 2019-07-15 8:26 UTC (permalink / raw)
To: yangxingwu
Cc: wensong, horms, ja, kadlec, fw, davem, netdev, lvs-devel,
netfilter-devel, coreteam, linux-kernel, joe
On Mon, Jul 15, 2019 at 09:57:03AM +0200, Pablo Neira Ayuso wrote:
> On Fri, Jul 12, 2019 at 09:07:21PM +0800, yangxingwu wrote:
> > this patch removes the extra space and use bitmap_zalloc instead
> >
> > Signed-off-by: yangxingwu <xingwu.yang@gmail.com>
> > ---
> > net/netfilter/ipvs/ip_vs_mh.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/net/netfilter/ipvs/ip_vs_mh.c b/net/netfilter/ipvs/ip_vs_mh.c
> > index 94d9d34..3229867 100644
> > --- a/net/netfilter/ipvs/ip_vs_mh.c
> > +++ b/net/netfilter/ipvs/ip_vs_mh.c
> > @@ -174,8 +174,7 @@ static int ip_vs_mh_populate(struct ip_vs_mh_state *s,
> > return 0;
> > }
> >
> > - table = kcalloc(BITS_TO_LONGS(IP_VS_MH_TAB_SIZE),
> > - sizeof(unsigned long), GFP_KERNEL);
> > + table = bitmap_zalloc(IP_VS_MH_TAB_SIZE, GFP_KERNEL);
>
> By doing:
>
> git grep "= " ...
>
> on the netfilter folders, I see more of these, it would be good if you
> fix them at once or, probably, you want to use coccinelle for this.
If patch subject is "remove unnecessary space" then just remove
unnecessary spaces in the patch, otherwise I suggest you rename this
to "ipvs: use bitmap_zalloc()" or such, since the space removal here
is irrelevant.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ipvs: remove unnecessary space
2019-07-10 8:06 ` Simon Horman
2019-07-11 0:22 ` Joe Perches
@ 2019-07-15 8:27 ` Pablo Neira Ayuso
2019-07-16 1:26 ` yangxingwu
2019-07-16 2:18 ` yangxingwu
1 sibling, 2 replies; 10+ messages in thread
From: Pablo Neira Ayuso @ 2019-07-15 8:27 UTC (permalink / raw)
To: Simon Horman
Cc: yangxingwu, wensong, ja, kadlec, fw, davem, netdev, lvs-devel,
netfilter-devel, coreteam, linux-kernel
On Wed, Jul 10, 2019 at 10:06:09AM +0200, Simon Horman wrote:
> On Wed, Jul 10, 2019 at 03:45:52PM +0800, yangxingwu wrote:
> > ---
> > net/netfilter/ipvs/ip_vs_mh.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/net/netfilter/ipvs/ip_vs_mh.c b/net/netfilter/ipvs/ip_vs_mh.c
> > index 94d9d34..98e358e 100644
> > --- a/net/netfilter/ipvs/ip_vs_mh.c
> > +++ b/net/netfilter/ipvs/ip_vs_mh.c
> > @@ -174,8 +174,8 @@ static int ip_vs_mh_populate(struct ip_vs_mh_state *s,
> > return 0;
> > }
> >
> > - table = kcalloc(BITS_TO_LONGS(IP_VS_MH_TAB_SIZE),
> > - sizeof(unsigned long), GFP_KERNEL);
> > + table = kcalloc(BITS_TO_LONGS(IP_VS_MH_TAB_SIZE),
> > + sizeof(unsigned long), GFP_KERNEL);
May I ask one thing? :-)
Please, remove all unnecessary spaces in one go, search for:
git grep "= "
in the netfilter tree, and send a v2 for this one.
Thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ipvs: remove unnecessary space
2019-07-15 8:27 ` Pablo Neira Ayuso
@ 2019-07-16 1:26 ` yangxingwu
2019-07-16 2:18 ` yangxingwu
1 sibling, 0 replies; 10+ messages in thread
From: yangxingwu @ 2019-07-16 1:26 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: Simon Horman, wensong, ja, kadlec, fw, davem, netdev, lvs-devel,
netfilter-devel, coreteam, linux-kernel
ok
I will remove all unnecessary spaces and send the v2 patch
Thansk Pablo
Pablo Neira Ayuso <pablo@netfilter.org> 于2019年7月15日周一 下午4:27写道:
>
> On Wed, Jul 10, 2019 at 10:06:09AM +0200, Simon Horman wrote:
> > On Wed, Jul 10, 2019 at 03:45:52PM +0800, yangxingwu wrote:
> > > ---
> > > net/netfilter/ipvs/ip_vs_mh.c | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/net/netfilter/ipvs/ip_vs_mh.c b/net/netfilter/ipvs/ip_vs_mh.c
> > > index 94d9d34..98e358e 100644
> > > --- a/net/netfilter/ipvs/ip_vs_mh.c
> > > +++ b/net/netfilter/ipvs/ip_vs_mh.c
> > > @@ -174,8 +174,8 @@ static int ip_vs_mh_populate(struct ip_vs_mh_state *s,
> > > return 0;
> > > }
> > >
> > > - table = kcalloc(BITS_TO_LONGS(IP_VS_MH_TAB_SIZE),
> > > - sizeof(unsigned long), GFP_KERNEL);
> > > + table = kcalloc(BITS_TO_LONGS(IP_VS_MH_TAB_SIZE),
> > > + sizeof(unsigned long), GFP_KERNEL);
>
> May I ask one thing? :-)
>
> Please, remove all unnecessary spaces in one go, search for:
>
> git grep "= "
>
> in the netfilter tree, and send a v2 for this one.
>
> Thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ipvs: remove unnecessary space
2019-07-15 8:27 ` Pablo Neira Ayuso
2019-07-16 1:26 ` yangxingwu
@ 2019-07-16 2:18 ` yangxingwu
1 sibling, 0 replies; 10+ messages in thread
From: yangxingwu @ 2019-07-16 2:18 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: Simon Horman, wensong, ja, kadlec, fw, davem, netdev, lvs-devel,
netfilter-devel, coreteam, linux-kernel
Pablo
v2 has been sent
I made the following changes:
1. remove all unnecessary spaces in one go
2. revert bitmap_alloc ( since it's irrelevant to this subject)
3. chenge subject to "net/netfiler:remove unnecessary space"
thanks
Pablo Neira Ayuso <pablo@netfilter.org> 于2019年7月15日周一 下午4:27写道:
>
> On Wed, Jul 10, 2019 at 10:06:09AM +0200, Simon Horman wrote:
> > On Wed, Jul 10, 2019 at 03:45:52PM +0800, yangxingwu wrote:
> > > ---
> > > net/netfilter/ipvs/ip_vs_mh.c | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/net/netfilter/ipvs/ip_vs_mh.c b/net/netfilter/ipvs/ip_vs_mh.c
> > > index 94d9d34..98e358e 100644
> > > --- a/net/netfilter/ipvs/ip_vs_mh.c
> > > +++ b/net/netfilter/ipvs/ip_vs_mh.c
> > > @@ -174,8 +174,8 @@ static int ip_vs_mh_populate(struct ip_vs_mh_state *s,
> > > return 0;
> > > }
> > >
> > > - table = kcalloc(BITS_TO_LONGS(IP_VS_MH_TAB_SIZE),
> > > - sizeof(unsigned long), GFP_KERNEL);
> > > + table = kcalloc(BITS_TO_LONGS(IP_VS_MH_TAB_SIZE),
> > > + sizeof(unsigned long), GFP_KERNEL);
>
> May I ask one thing? :-)
>
> Please, remove all unnecessary spaces in one go, search for:
>
> git grep "= "
>
> in the netfilter tree, and send a v2 for this one.
>
> Thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-07-16 2:18 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-11 3:39 [PATCH] ipvs: remove unnecessary space yangxingwu
-- strict thread matches above, loose matches on Subject: below --
2019-07-10 7:45 yangxingwu
2019-07-10 8:06 ` Simon Horman
2019-07-11 0:22 ` Joe Perches
2019-07-12 13:07 ` yangxingwu
2019-07-15 7:57 ` Pablo Neira Ayuso
2019-07-15 8:26 ` Pablo Neira Ayuso
2019-07-15 8:27 ` Pablo Neira Ayuso
2019-07-16 1:26 ` yangxingwu
2019-07-16 2:18 ` yangxingwu
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).