All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipvs: Reduce checkpatch noise in ip_vs_lblc.c
@ 2014-02-11  6:29 Tingwei Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Tingwei Liu @ 2014-02-11  6:29 UTC (permalink / raw)
  To: netdev; +Cc: Tingwei Liu, Tingwei Liu, Wensong Zhang

Add whitespace after operator and put open brace { on the previous line

Signed-off-by: Tingwei Liu <tingw.liu@gmail.com>
Cc: Tingwei Liu <liutingwei@hisense.com>
Cc: Wensong Zhang <wensong@linux-vs.org>
---
 net/netfilter/ipvs/ip_vs_lblc.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c
index ca056a3..547ff33 100644
--- a/net/netfilter/ipvs/ip_vs_lblc.c
+++ b/net/netfilter/ipvs/ip_vs_lblc.c
@@ -238,7 +238,7 @@ static void ip_vs_lblc_flush(struct ip_vs_service *svc)
 
 	spin_lock_bh(&svc->sched_lock);
 	tbl->dead = 1;
-	for (i=0; i<IP_VS_LBLC_TAB_SIZE; i++) {
+	for (i = 0; i < IP_VS_LBLC_TAB_SIZE; i++) {
 		hlist_for_each_entry_safe(en, next, &tbl->bucket[i], list) {
 			ip_vs_lblc_del(en);
 			atomic_dec(&tbl->entries);
@@ -265,7 +265,7 @@ static inline void ip_vs_lblc_full_check(struct ip_vs_service *svc)
 	unsigned long now = jiffies;
 	int i, j;
 
-	for (i=0, j=tbl->rover; i<IP_VS_LBLC_TAB_SIZE; i++) {
+	for (i = 0, j = tbl->rover; i < IP_VS_LBLC_TAB_SIZE; i++) {
 		j = (j + 1) & IP_VS_LBLC_TAB_MASK;
 
 		spin_lock(&svc->sched_lock);
@@ -321,7 +321,7 @@ static void ip_vs_lblc_check_expire(unsigned long data)
 	if (goal > tbl->max_size/2)
 		goal = tbl->max_size/2;
 
-	for (i=0, j=tbl->rover; i<IP_VS_LBLC_TAB_SIZE; i++) {
+	for (i = 0, j = tbl->rover; i < IP_VS_LBLC_TAB_SIZE; i++) {
 		j = (j + 1) & IP_VS_LBLC_TAB_MASK;
 
 		spin_lock(&svc->sched_lock);
@@ -340,7 +340,7 @@ static void ip_vs_lblc_check_expire(unsigned long data)
 	tbl->rover = j;
 
   out:
-	mod_timer(&tbl->periodic_timer, jiffies+CHECK_EXPIRE_INTERVAL);
+	mod_timer(&tbl->periodic_timer, jiffies + CHECK_EXPIRE_INTERVAL);
 }
 
 
@@ -363,7 +363,7 @@ static int ip_vs_lblc_init_svc(struct ip_vs_service *svc)
 	/*
 	 *    Initialize the hash buckets
 	 */
-	for (i=0; i<IP_VS_LBLC_TAB_SIZE; i++) {
+	for (i = 0; i < IP_VS_LBLC_TAB_SIZE; i++) {
 		INIT_HLIST_HEAD(&tbl->bucket[i]);
 	}
 	tbl->max_size = IP_VS_LBLC_TAB_SIZE*16;
@@ -536,8 +536,7 @@ out:
 /*
  *      IPVS LBLC Scheduler structure
  */
-static struct ip_vs_scheduler ip_vs_lblc_scheduler =
-{
+static struct ip_vs_scheduler ip_vs_lblc_scheduler = {
 	.name =			"lblc",
 	.refcnt =		ATOMIC_INIT(0),
 	.module =		THIS_MODULE,
-- 
1.6.0.2

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

* Re: [PATCH] ipvs: Reduce checkpatch noise in ip_vs_lblc.c
  2014-02-11  9:17 Tingwei Liu
@ 2014-02-13  7:05 ` Simon Horman
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2014-02-13  7:05 UTC (permalink / raw)
  To: Tingwei Liu; +Cc: Wensong Zhang, Tingwei Liu, lvs-devel

On Tue, Feb 11, 2014 at 05:17:21PM +0800, Tingwei Liu wrote:
> Add whitespace after operator and put open brace { on the previous line

Thanks, applied to ipvs-next.

> 
> Cc: Tingwei Liu <liutingwei@hisense.com>
> Cc: lvs-devel@vger.kernel.org
> Signed-off-by: Tingwei Liu <tingw.liu@gmail.com>
> ---
>  net/netfilter/ipvs/ip_vs_lblc.c |   13 ++++++-------
>  1 files changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c
> index ca056a3..547ff33 100644
> --- a/net/netfilter/ipvs/ip_vs_lblc.c
> +++ b/net/netfilter/ipvs/ip_vs_lblc.c
> @@ -238,7 +238,7 @@ static void ip_vs_lblc_flush(struct ip_vs_service *svc)
>  
>  	spin_lock_bh(&svc->sched_lock);
>  	tbl->dead = 1;
> -	for (i=0; i<IP_VS_LBLC_TAB_SIZE; i++) {
> +	for (i = 0; i < IP_VS_LBLC_TAB_SIZE; i++) {
>  		hlist_for_each_entry_safe(en, next, &tbl->bucket[i], list) {
>  			ip_vs_lblc_del(en);
>  			atomic_dec(&tbl->entries);
> @@ -265,7 +265,7 @@ static inline void ip_vs_lblc_full_check(struct ip_vs_service *svc)
>  	unsigned long now = jiffies;
>  	int i, j;
>  
> -	for (i=0, j=tbl->rover; i<IP_VS_LBLC_TAB_SIZE; i++) {
> +	for (i = 0, j = tbl->rover; i < IP_VS_LBLC_TAB_SIZE; i++) {
>  		j = (j + 1) & IP_VS_LBLC_TAB_MASK;
>  
>  		spin_lock(&svc->sched_lock);
> @@ -321,7 +321,7 @@ static void ip_vs_lblc_check_expire(unsigned long data)
>  	if (goal > tbl->max_size/2)
>  		goal = tbl->max_size/2;
>  
> -	for (i=0, j=tbl->rover; i<IP_VS_LBLC_TAB_SIZE; i++) {
> +	for (i = 0, j = tbl->rover; i < IP_VS_LBLC_TAB_SIZE; i++) {
>  		j = (j + 1) & IP_VS_LBLC_TAB_MASK;
>  
>  		spin_lock(&svc->sched_lock);
> @@ -340,7 +340,7 @@ static void ip_vs_lblc_check_expire(unsigned long data)
>  	tbl->rover = j;
>  
>    out:
> -	mod_timer(&tbl->periodic_timer, jiffies+CHECK_EXPIRE_INTERVAL);
> +	mod_timer(&tbl->periodic_timer, jiffies + CHECK_EXPIRE_INTERVAL);
>  }
>  
>  
> @@ -363,7 +363,7 @@ static int ip_vs_lblc_init_svc(struct ip_vs_service *svc)
>  	/*
>  	 *    Initialize the hash buckets
>  	 */
> -	for (i=0; i<IP_VS_LBLC_TAB_SIZE; i++) {
> +	for (i = 0; i < IP_VS_LBLC_TAB_SIZE; i++) {
>  		INIT_HLIST_HEAD(&tbl->bucket[i]);
>  	}
>  	tbl->max_size = IP_VS_LBLC_TAB_SIZE*16;
> @@ -536,8 +536,7 @@ out:
>  /*
>   *      IPVS LBLC Scheduler structure
>   */
> -static struct ip_vs_scheduler ip_vs_lblc_scheduler =
> -{
> +static struct ip_vs_scheduler ip_vs_lblc_scheduler = {
>  	.name =			"lblc",
>  	.refcnt =		ATOMIC_INIT(0),
>  	.module =		THIS_MODULE,
> -- 
> 1.6.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe lvs-devel" 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] 4+ messages in thread

* [PATCH] ipvs: Reduce checkpatch noise in ip_vs_lblc.c
@ 2014-02-11  9:17 Tingwei Liu
  2014-02-13  7:05 ` Simon Horman
  0 siblings, 1 reply; 4+ messages in thread
From: Tingwei Liu @ 2014-02-11  9:17 UTC (permalink / raw)
  To: Wensong Zhang; +Cc: Tingwei Liu, Tingwei Liu, lvs-devel

Add whitespace after operator and put open brace { on the previous line

Cc: Tingwei Liu <liutingwei@hisense.com>
Cc: lvs-devel@vger.kernel.org
Signed-off-by: Tingwei Liu <tingw.liu@gmail.com>
---
 net/netfilter/ipvs/ip_vs_lblc.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c
index ca056a3..547ff33 100644
--- a/net/netfilter/ipvs/ip_vs_lblc.c
+++ b/net/netfilter/ipvs/ip_vs_lblc.c
@@ -238,7 +238,7 @@ static void ip_vs_lblc_flush(struct ip_vs_service *svc)
 
 	spin_lock_bh(&svc->sched_lock);
 	tbl->dead = 1;
-	for (i=0; i<IP_VS_LBLC_TAB_SIZE; i++) {
+	for (i = 0; i < IP_VS_LBLC_TAB_SIZE; i++) {
 		hlist_for_each_entry_safe(en, next, &tbl->bucket[i], list) {
 			ip_vs_lblc_del(en);
 			atomic_dec(&tbl->entries);
@@ -265,7 +265,7 @@ static inline void ip_vs_lblc_full_check(struct ip_vs_service *svc)
 	unsigned long now = jiffies;
 	int i, j;
 
-	for (i=0, j=tbl->rover; i<IP_VS_LBLC_TAB_SIZE; i++) {
+	for (i = 0, j = tbl->rover; i < IP_VS_LBLC_TAB_SIZE; i++) {
 		j = (j + 1) & IP_VS_LBLC_TAB_MASK;
 
 		spin_lock(&svc->sched_lock);
@@ -321,7 +321,7 @@ static void ip_vs_lblc_check_expire(unsigned long data)
 	if (goal > tbl->max_size/2)
 		goal = tbl->max_size/2;
 
-	for (i=0, j=tbl->rover; i<IP_VS_LBLC_TAB_SIZE; i++) {
+	for (i = 0, j = tbl->rover; i < IP_VS_LBLC_TAB_SIZE; i++) {
 		j = (j + 1) & IP_VS_LBLC_TAB_MASK;
 
 		spin_lock(&svc->sched_lock);
@@ -340,7 +340,7 @@ static void ip_vs_lblc_check_expire(unsigned long data)
 	tbl->rover = j;
 
   out:
-	mod_timer(&tbl->periodic_timer, jiffies+CHECK_EXPIRE_INTERVAL);
+	mod_timer(&tbl->periodic_timer, jiffies + CHECK_EXPIRE_INTERVAL);
 }
 
 
@@ -363,7 +363,7 @@ static int ip_vs_lblc_init_svc(struct ip_vs_service *svc)
 	/*
 	 *    Initialize the hash buckets
 	 */
-	for (i=0; i<IP_VS_LBLC_TAB_SIZE; i++) {
+	for (i = 0; i < IP_VS_LBLC_TAB_SIZE; i++) {
 		INIT_HLIST_HEAD(&tbl->bucket[i]);
 	}
 	tbl->max_size = IP_VS_LBLC_TAB_SIZE*16;
@@ -536,8 +536,7 @@ out:
 /*
  *      IPVS LBLC Scheduler structure
  */
-static struct ip_vs_scheduler ip_vs_lblc_scheduler =
-{
+static struct ip_vs_scheduler ip_vs_lblc_scheduler = {
 	.name =			"lblc",
 	.refcnt =		ATOMIC_INIT(0),
 	.module =		THIS_MODULE,
-- 
1.6.0.2


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

* [PATCH] ipvs: Reduce checkpatch noise in ip_vs_lblc.c
@ 2014-02-11  5:35 Tingwei Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Tingwei Liu @ 2014-02-11  5:35 UTC (permalink / raw)
  To: netdev; +Cc: Tingwei Liu, Tony

Add whitespace after operator and put open brace { on the previous line

Cc: Tony <liutingwei@hisense.com>
Signed-off-by: Tingwei Liu <tingw.liu@gmail.com>
---
 net/netfilter/ipvs/ip_vs_lblc.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c
index ca056a3..547ff33 100644
--- a/net/netfilter/ipvs/ip_vs_lblc.c
+++ b/net/netfilter/ipvs/ip_vs_lblc.c
@@ -238,7 +238,7 @@ static void ip_vs_lblc_flush(struct ip_vs_service *svc)
 
 	spin_lock_bh(&svc->sched_lock);
 	tbl->dead = 1;
-	for (i=0; i<IP_VS_LBLC_TAB_SIZE; i++) {
+	for (i = 0; i < IP_VS_LBLC_TAB_SIZE; i++) {
 		hlist_for_each_entry_safe(en, next, &tbl->bucket[i], list) {
 			ip_vs_lblc_del(en);
 			atomic_dec(&tbl->entries);
@@ -265,7 +265,7 @@ static inline void ip_vs_lblc_full_check(struct ip_vs_service *svc)
 	unsigned long now = jiffies;
 	int i, j;
 
-	for (i=0, j=tbl->rover; i<IP_VS_LBLC_TAB_SIZE; i++) {
+	for (i = 0, j = tbl->rover; i < IP_VS_LBLC_TAB_SIZE; i++) {
 		j = (j + 1) & IP_VS_LBLC_TAB_MASK;
 
 		spin_lock(&svc->sched_lock);
@@ -321,7 +321,7 @@ static void ip_vs_lblc_check_expire(unsigned long data)
 	if (goal > tbl->max_size/2)
 		goal = tbl->max_size/2;
 
-	for (i=0, j=tbl->rover; i<IP_VS_LBLC_TAB_SIZE; i++) {
+	for (i = 0, j = tbl->rover; i < IP_VS_LBLC_TAB_SIZE; i++) {
 		j = (j + 1) & IP_VS_LBLC_TAB_MASK;
 
 		spin_lock(&svc->sched_lock);
@@ -340,7 +340,7 @@ static void ip_vs_lblc_check_expire(unsigned long data)
 	tbl->rover = j;
 
   out:
-	mod_timer(&tbl->periodic_timer, jiffies+CHECK_EXPIRE_INTERVAL);
+	mod_timer(&tbl->periodic_timer, jiffies + CHECK_EXPIRE_INTERVAL);
 }
 
 
@@ -363,7 +363,7 @@ static int ip_vs_lblc_init_svc(struct ip_vs_service *svc)
 	/*
 	 *    Initialize the hash buckets
 	 */
-	for (i=0; i<IP_VS_LBLC_TAB_SIZE; i++) {
+	for (i = 0; i < IP_VS_LBLC_TAB_SIZE; i++) {
 		INIT_HLIST_HEAD(&tbl->bucket[i]);
 	}
 	tbl->max_size = IP_VS_LBLC_TAB_SIZE*16;
@@ -536,8 +536,7 @@ out:
 /*
  *      IPVS LBLC Scheduler structure
  */
-static struct ip_vs_scheduler ip_vs_lblc_scheduler =
-{
+static struct ip_vs_scheduler ip_vs_lblc_scheduler = {
 	.name =			"lblc",
 	.refcnt =		ATOMIC_INIT(0),
 	.module =		THIS_MODULE,
-- 
1.6.0.2

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

end of thread, other threads:[~2014-02-13  7:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-11  6:29 [PATCH] ipvs: Reduce checkpatch noise in ip_vs_lblc.c Tingwei Liu
  -- strict thread matches above, loose matches on Subject: below --
2014-02-11  9:17 Tingwei Liu
2014-02-13  7:05 ` Simon Horman
2014-02-11  5:35 Tingwei Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.