netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH resend net-next 0/2] net_sched: do some cleanup
@ 2013-12-23  1:06 Yang Yingliang
  2013-12-23  1:06 ` [PATCH resend net-next 1/2] net_sched: replace pr_warning with pr_warn Yang Yingliang
  2013-12-23  1:06 ` [PATCH resend net-next 2/2] sch_htb: use /* comments Yang Yingliang
  0 siblings, 2 replies; 5+ messages in thread
From: Yang Yingliang @ 2013-12-23  1:06 UTC (permalink / raw)
  To: davem, netdev

Prefer pr_warn(... to pr_warning(...
Do not use C99 // comments and fix spelling.

Yang Yingliang (2):
  net_sched: replace pr_warning with pr_warn
  sch_htb: use /* comments

 net/sched/sch_cbq.c    |  4 ++--
 net/sched/sch_dsmark.c |  4 ++--
 net/sched/sch_gred.c   |  4 ++--
 net/sched/sch_htb.c    | 19 +++++++++----------
 4 files changed, 15 insertions(+), 16 deletions(-)

-- 
1.7.12

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

* [PATCH resend net-next 1/2] net_sched: replace pr_warning with pr_warn
  2013-12-23  1:06 [PATCH resend net-next 0/2] net_sched: do some cleanup Yang Yingliang
@ 2013-12-23  1:06 ` Yang Yingliang
  2013-12-23  1:20   ` Joe Perches
  2013-12-23  1:06 ` [PATCH resend net-next 2/2] sch_htb: use /* comments Yang Yingliang
  1 sibling, 1 reply; 5+ messages in thread
From: Yang Yingliang @ 2013-12-23  1:06 UTC (permalink / raw)
  To: davem, netdev

Prefer pr_warn(... to pr_warning(...

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 net/sched/sch_cbq.c    |  4 ++--
 net/sched/sch_dsmark.c |  4 ++--
 net/sched/sch_gred.c   |  4 ++--
 net/sched/sch_htb.c    | 12 +++++-------
 4 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index e251833..2f80d01 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -1060,8 +1060,8 @@ static void cbq_normalize_quanta(struct cbq_sched_data *q, int prio)
 			}
 			if (cl->quantum <= 0 ||
 			    cl->quantum > 32*qdisc_dev(cl->qdisc)->mtu) {
-				pr_warning("CBQ: class %08x has bad quantum==%ld, repaired.\n",
-					   cl->common.classid, cl->quantum);
+				pr_warn("CBQ: class %08x has bad quantum==%ld, repaired.\n",
+					cl->common.classid, cl->quantum);
 				cl->quantum = qdisc_dev(cl->qdisc)->mtu/2 + 1;
 			}
 		}
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
index 0952fd2..7cd49e5 100644
--- a/net/sched/sch_dsmark.c
+++ b/net/sched/sch_dsmark.c
@@ -303,8 +303,8 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch)
 		 * and don't need yet another qdisc as a bypass.
 		 */
 		if (p->mask[index] != 0xff || p->value[index])
-			pr_warning("dsmark_dequeue: unsupported protocol %d\n",
-				   ntohs(skb->protocol));
+			pr_warn("dsmark_dequeue: unsupported protocol %d\n",
+				ntohs(skb->protocol));
 		break;
 	}
 
diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c
index d42234c..fb621d2 100644
--- a/net/sched/sch_gred.c
+++ b/net/sched/sch_gred.c
@@ -370,8 +370,8 @@ static inline int gred_change_table_def(struct Qdisc *sch, struct nlattr *dps)
 
 	for (i = table->DPs; i < MAX_DPs; i++) {
 		if (table->tab[i]) {
-			pr_warning("GRED: Warning: Destroying "
-				   "shadowed VQ 0x%x\n", i);
+			pr_warn("GRED: Warning: Destroying "
+				"shadowed VQ 0x%x\n", i);
 			gred_destroy_vq(table->tab[i]);
 			table->tab[i] = NULL;
 		}
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 6b0e854..e598810 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -712,7 +712,7 @@ static s64 htb_do_events(struct htb_sched *q, const int level,
 
 	/* too much load - let's continue after a break for scheduling */
 	if (!(q->warned & HTB_WARN_TOOMANYEVENTS)) {
-		pr_warning("htb: too many events!\n");
+		pr_warn("htb: too many events!\n");
 		q->warned |= HTB_WARN_TOOMANYEVENTS;
 	}
 
@@ -1488,15 +1488,13 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
 		cl->quantum = min_t(u64, quantum, INT_MAX);
 
 		if (!hopt->quantum && cl->quantum < 1000) {
-			pr_warning(
-			       "HTB: quantum of class %X is small. Consider r2q change.\n",
-			       cl->common.classid);
+			pr_warn("HTB: quantum of class %X is small. Consider r2q change.\n",
+				cl->common.classid);
 			cl->quantum = 1000;
 		}
 		if (!hopt->quantum && cl->quantum > 200000) {
-			pr_warning(
-			       "HTB: quantum of class %X is big. Consider r2q change.\n",
-			       cl->common.classid);
+			pr_warn("HTB: quantum of class %X is big. Consider r2q change.\n",
+				cl->common.classid);
 			cl->quantum = 200000;
 		}
 		if (hopt->quantum)
-- 
1.7.12

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

* [PATCH resend net-next 2/2] sch_htb: use /* comments
  2013-12-23  1:06 [PATCH resend net-next 0/2] net_sched: do some cleanup Yang Yingliang
  2013-12-23  1:06 ` [PATCH resend net-next 1/2] net_sched: replace pr_warning with pr_warn Yang Yingliang
@ 2013-12-23  1:06 ` Yang Yingliang
  1 sibling, 0 replies; 5+ messages in thread
From: Yang Yingliang @ 2013-12-23  1:06 UTC (permalink / raw)
  To: davem, netdev

Do not use C99 // comments and correct a spelling typo.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 net/sched/sch_htb.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index e598810..0db5a6e 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -1276,9 +1276,10 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg)
 	struct Qdisc *new_q = NULL;
 	int last_child = 0;
 
-	// TODO: why don't allow to delete subtree ? references ? does
-	// tc subsys quarantee us that in htb_destroy it holds no class
-	// refs so that we can remove children safely there ?
+	/* TODO: why don't allow to delete subtree ? references ? does
+	 * tc subsys guarantee us that in htb_destroy it holds no class
+	 * refs so that we can remove children safely there ?
+	 */
 	if (cl->children || cl->filter_cnt)
 		return -EBUSY;
 
-- 
1.7.12

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

* Re: [PATCH resend net-next 1/2] net_sched: replace pr_warning with pr_warn
  2013-12-23  1:06 ` [PATCH resend net-next 1/2] net_sched: replace pr_warning with pr_warn Yang Yingliang
@ 2013-12-23  1:20   ` Joe Perches
  2013-12-23  7:39     ` Yang Yingliang
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2013-12-23  1:20 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: davem, netdev

On Mon, 2013-12-23 at 09:06 +0800, Yang Yingliang wrote:
> Prefer pr_warn(... to pr_warning(...

Couple of trivial comments:

> diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
[]
> @@ -303,8 +303,8 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch)
>  		 * and don't need yet another qdisc as a bypass.
>  		 */
>  		if (p->mask[index] != 0xff || p->value[index])
> -			pr_warning("dsmark_dequeue: unsupported protocol %d\n",
> -				   ntohs(skb->protocol));
> +			pr_warn("dsmark_dequeue: unsupported protocol %d\n",
> +				ntohs(skb->protocol));

When converting messages with embedded function names,
consider using "%s: ...", __func__

> diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c
[]
> @@ -370,8 +370,8 @@ static inline int gred_change_table_def(struct Qdisc *sch, struct nlattr *dps)
>  
>  	for (i = table->DPs; i < MAX_DPs; i++) {
>  		if (table->tab[i]) {
> -			pr_warning("GRED: Warning: Destroying "
> -				   "shadowed VQ 0x%x\n", i);
> +			pr_warn("GRED: Warning: Destroying "
> +				"shadowed VQ 0x%x\n", i);

When converting formats split across multiple lines,
please coalesce the format fragments like:

			pr_warn("GRED: Warning: Destroying shadowed V0 0x%x\n",
				i);

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

* Re: [PATCH resend net-next 1/2] net_sched: replace pr_warning with pr_warn
  2013-12-23  1:20   ` Joe Perches
@ 2013-12-23  7:39     ` Yang Yingliang
  0 siblings, 0 replies; 5+ messages in thread
From: Yang Yingliang @ 2013-12-23  7:39 UTC (permalink / raw)
  To: Joe Perches; +Cc: davem, netdev

On 2013/12/23 9:20, Joe Perches wrote:
> On Mon, 2013-12-23 at 09:06 +0800, Yang Yingliang wrote:
>> Prefer pr_warn(... to pr_warning(...
> 
> Couple of trivial comments:
> 
>> diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
> []
>> @@ -303,8 +303,8 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch)
>>  		 * and don't need yet another qdisc as a bypass.
>>  		 */
>>  		if (p->mask[index] != 0xff || p->value[index])
>> -			pr_warning("dsmark_dequeue: unsupported protocol %d\n",
>> -				   ntohs(skb->protocol));
>> +			pr_warn("dsmark_dequeue: unsupported protocol %d\n",
>> +				ntohs(skb->protocol));
> 
> When converting messages with embedded function names,
> consider using "%s: ...", __func__
> 
>> diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c
> []
>> @@ -370,8 +370,8 @@ static inline int gred_change_table_def(struct Qdisc *sch, struct nlattr *dps)
>>  
>>  	for (i = table->DPs; i < MAX_DPs; i++) {
>>  		if (table->tab[i]) {
>> -			pr_warning("GRED: Warning: Destroying "
>> -				   "shadowed VQ 0x%x\n", i);
>> +			pr_warn("GRED: Warning: Destroying "
>> +				"shadowed VQ 0x%x\n", i);
> 
> When converting formats split across multiple lines,
> please coalesce the format fragments like:
> 
> 			pr_warn("GRED: Warning: Destroying shadowed V0 0x%x\n",
> 				i);
> 
> 
> 
> 

OK, thanks!

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

end of thread, other threads:[~2013-12-23  7:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-23  1:06 [PATCH resend net-next 0/2] net_sched: do some cleanup Yang Yingliang
2013-12-23  1:06 ` [PATCH resend net-next 1/2] net_sched: replace pr_warning with pr_warn Yang Yingliang
2013-12-23  1:20   ` Joe Perches
2013-12-23  7:39     ` Yang Yingliang
2013-12-23  1:06 ` [PATCH resend net-next 2/2] sch_htb: use /* comments Yang Yingliang

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