netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipvs: fixed style errors in ip_vs_dh
@ 2013-07-11 19:15 Dragos Foianu
  2013-08-06  6:20 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Dragos Foianu @ 2013-07-11 19:15 UTC (permalink / raw)
  To: wensong
  Cc: horms, ja, pablo, kaber, kadlec, davem, netdev, lvs-devel,
	netfilter-devel, netfilter, coreteam, linux-kernel, Dragos Foianu

found with the help of checkpatch.pl

Signed-off-by: Dragos Foianu <dragos.foianu@gmail.com>
---
 net/netfilter/ipvs/ip_vs_dh.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/net/netfilter/ipvs/ip_vs_dh.c b/net/netfilter/ipvs/ip_vs_dh.c
index c3b8454..8ab2fc8 100644
--- a/net/netfilter/ipvs/ip_vs_dh.c
+++ b/net/netfilter/ipvs/ip_vs_dh.c
@@ -110,7 +110,7 @@ ip_vs_dh_reassign(struct ip_vs_dh_state *s, struct ip_vs_service *svc)
 	b = &s->buckets[0];
 	p = &svc->destinations;
 	empty = list_empty(p);
-	for (i=0; i<IP_VS_DH_TAB_SIZE; i++) {
+	for (i = 0; i < IP_VS_DH_TAB_SIZE; i++) {
 		dest = rcu_dereference_protected(b->dest, 1);
 		if (dest)
 			ip_vs_dest_put(dest);
@@ -142,7 +142,7 @@ static void ip_vs_dh_flush(struct ip_vs_dh_state *s)
 	struct ip_vs_dest *dest;
 
 	b = &s->buckets[0];
-	for (i=0; i<IP_VS_DH_TAB_SIZE; i++) {
+	for (i = 0; i < IP_VS_DH_TAB_SIZE; i++) {
 		dest = rcu_dereference_protected(b->dest, 1);
 		if (dest) {
 			ip_vs_dest_put(dest);
@@ -244,8 +244,7 @@ ip_vs_dh_schedule(struct ip_vs_service *svc, const struct sk_buff *skb,
 /*
  *      IPVS DH Scheduler structure
  */
-static struct ip_vs_scheduler ip_vs_dh_scheduler =
-{
+static struct ip_vs_scheduler ip_vs_dh_scheduler = {
 	.name =			"dh",
 	.refcnt =		ATOMIC_INIT(0),
 	.module =		THIS_MODULE,
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ipvs: fixed style errors in ip_vs_dh
  2013-07-11 19:15 [PATCH] ipvs: fixed style errors in ip_vs_dh Dragos Foianu
@ 2013-08-06  6:20 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2013-08-06  6:20 UTC (permalink / raw)
  To: Dragos Foianu
  Cc: wensong, ja, pablo, kaber, kadlec, davem, netdev, lvs-devel,
	netfilter-devel, netfilter, coreteam, linux-kernel

On Thu, Jul 11, 2013 at 10:15:44PM +0300, Dragos Foianu wrote:
> found with the help of checkpatch.pl

Thanks for your contribution and sorry for taking so long to look at it.

While in principle I have no problem with these changes.
I would like them to be be accompanied by more descriptive changelogs.

In the case of this patch there seem to be two fixes.

1. Fix whitespace associated with for statements.
2. Place opening '{' of structure initialiser on its won line.

I'm sure that the wording above can be improved, but as a minimum
I would like something like that included in the changelog.

I think that I would also prefer each of the two changes in their own
patch, rather than grouping them together because they happen to be in the
same file.

Likewise for the following patches that you also submitted:

* [PATCH] ipvs: fixed style error in ip_vs_sched
* [PATCH] ipvs: fixed style errors and warnings in ip_vs_conn

I would not object if you grouped together the same change in multiple
files into a single patch.

> Signed-off-by: Dragos Foianu <dragos.foianu@gmail.com>
> ---
>  net/netfilter/ipvs/ip_vs_dh.c |    7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/net/netfilter/ipvs/ip_vs_dh.c b/net/netfilter/ipvs/ip_vs_dh.c
> index c3b8454..8ab2fc8 100644
> --- a/net/netfilter/ipvs/ip_vs_dh.c
> +++ b/net/netfilter/ipvs/ip_vs_dh.c
> @@ -110,7 +110,7 @@ ip_vs_dh_reassign(struct ip_vs_dh_state *s, struct ip_vs_service *svc)
>  	b = &s->buckets[0];
>  	p = &svc->destinations;
>  	empty = list_empty(p);
> -	for (i=0; i<IP_VS_DH_TAB_SIZE; i++) {
> +	for (i = 0; i < IP_VS_DH_TAB_SIZE; i++) {
>  		dest = rcu_dereference_protected(b->dest, 1);
>  		if (dest)
>  			ip_vs_dest_put(dest);
> @@ -142,7 +142,7 @@ static void ip_vs_dh_flush(struct ip_vs_dh_state *s)
>  	struct ip_vs_dest *dest;
>  
>  	b = &s->buckets[0];
> -	for (i=0; i<IP_VS_DH_TAB_SIZE; i++) {
> +	for (i = 0; i < IP_VS_DH_TAB_SIZE; i++) {
>  		dest = rcu_dereference_protected(b->dest, 1);
>  		if (dest) {
>  			ip_vs_dest_put(dest);
> @@ -244,8 +244,7 @@ ip_vs_dh_schedule(struct ip_vs_service *svc, const struct sk_buff *skb,
>  /*
>   *      IPVS DH Scheduler structure
>   */
> -static struct ip_vs_scheduler ip_vs_dh_scheduler =
> -{
> +static struct ip_vs_scheduler ip_vs_dh_scheduler = {
>  	.name =			"dh",
>  	.refcnt =		ATOMIC_INIT(0),
>  	.module =		THIS_MODULE,
> -- 
> 1.7.10.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-06  6:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-11 19:15 [PATCH] ipvs: fixed style errors in ip_vs_dh Dragos Foianu
2013-08-06  6:20 ` Simon Horman

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).