Skip to content

Commit c76f2a2

Browse files
Yang Yingliangdavem330
authored andcommitted
sch_dsmark: use correct func name in print messages
In dsmark_drop(), the function name printed by pr_debug is "dsmark_reset", correct it to "dsmark_drop" by using __func__ . BTW, replace the other function names with __func__ . Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a071d27 commit c76f2a2

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

net/sched/sch_dsmark.c

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ static int dsmark_graft(struct Qdisc *sch, unsigned long arg,
5757
{
5858
struct dsmark_qdisc_data *p = qdisc_priv(sch);
5959

60-
pr_debug("dsmark_graft(sch %p,[qdisc %p],new %p,old %p)\n",
61-
sch, p, new, old);
60+
pr_debug("%s(sch %p,[qdisc %p],new %p,old %p)\n",
61+
__func__, sch, p, new, old);
6262

6363
if (new == NULL) {
6464
new = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops,
@@ -85,8 +85,8 @@ static struct Qdisc *dsmark_leaf(struct Qdisc *sch, unsigned long arg)
8585

8686
static unsigned long dsmark_get(struct Qdisc *sch, u32 classid)
8787
{
88-
pr_debug("dsmark_get(sch %p,[qdisc %p],classid %x)\n",
89-
sch, qdisc_priv(sch), classid);
88+
pr_debug("%s(sch %p,[qdisc %p],classid %x)\n",
89+
__func__, sch, qdisc_priv(sch), classid);
9090

9191
return TC_H_MIN(classid) + 1;
9292
}
@@ -118,8 +118,8 @@ static int dsmark_change(struct Qdisc *sch, u32 classid, u32 parent,
118118
int err = -EINVAL;
119119
u8 mask = 0;
120120

121-
pr_debug("dsmark_change(sch %p,[qdisc %p],classid %x,parent %x),"
122-
"arg 0x%lx\n", sch, p, classid, parent, *arg);
121+
pr_debug("%s(sch %p,[qdisc %p],classid %x,parent %x), arg 0x%lx\n",
122+
__func__, sch, p, classid, parent, *arg);
123123

124124
if (!dsmark_valid_index(p, *arg)) {
125125
err = -ENOENT;
@@ -166,7 +166,8 @@ static void dsmark_walk(struct Qdisc *sch, struct qdisc_walker *walker)
166166
struct dsmark_qdisc_data *p = qdisc_priv(sch);
167167
int i;
168168

169-
pr_debug("dsmark_walk(sch %p,[qdisc %p],walker %p)\n", sch, p, walker);
169+
pr_debug("%s(sch %p,[qdisc %p],walker %p)\n",
170+
__func__, sch, p, walker);
170171

171172
if (walker->stop)
172173
return;
@@ -199,7 +200,7 @@ static int dsmark_enqueue(struct sk_buff *skb, struct Qdisc *sch)
199200
struct dsmark_qdisc_data *p = qdisc_priv(sch);
200201
int err;
201202

202-
pr_debug("dsmark_enqueue(skb %p,sch %p,[qdisc %p])\n", skb, sch, p);
203+
pr_debug("%s(skb %p,sch %p,[qdisc %p])\n", __func__, skb, sch, p);
203204

204205
if (p->set_tc_index) {
205206
switch (skb->protocol) {
@@ -275,7 +276,7 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch)
275276
struct sk_buff *skb;
276277
u32 index;
277278

278-
pr_debug("dsmark_dequeue(sch %p,[qdisc %p])\n", sch, p);
279+
pr_debug("%s(sch %p,[qdisc %p])\n", __func__, sch, p);
279280

280281
skb = p->q->ops->dequeue(p->q);
281282
if (skb == NULL)
@@ -303,8 +304,8 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch)
303304
* and don't need yet another qdisc as a bypass.
304305
*/
305306
if (p->mask[index] != 0xff || p->value[index])
306-
pr_warn("dsmark_dequeue: unsupported protocol %d\n",
307-
ntohs(skb->protocol));
307+
pr_warn("%s: unsupported protocol %d\n",
308+
__func__, ntohs(skb->protocol));
308309
break;
309310
}
310311

@@ -315,7 +316,7 @@ static struct sk_buff *dsmark_peek(struct Qdisc *sch)
315316
{
316317
struct dsmark_qdisc_data *p = qdisc_priv(sch);
317318

318-
pr_debug("dsmark_peek(sch %p,[qdisc %p])\n", sch, p);
319+
pr_debug("%s(sch %p,[qdisc %p])\n", __func__, sch, p);
319320

320321
return p->q->ops->peek(p->q);
321322
}
@@ -325,7 +326,7 @@ static unsigned int dsmark_drop(struct Qdisc *sch)
325326
struct dsmark_qdisc_data *p = qdisc_priv(sch);
326327
unsigned int len;
327328

328-
pr_debug("dsmark_reset(sch %p,[qdisc %p])\n", sch, p);
329+
pr_debug("%s(sch %p,[qdisc %p])\n", __func__, sch, p);
329330

330331
if (p->q->ops->drop == NULL)
331332
return 0;
@@ -346,7 +347,7 @@ static int dsmark_init(struct Qdisc *sch, struct nlattr *opt)
346347
u16 indices;
347348
u8 *mask;
348349

349-
pr_debug("dsmark_init(sch %p,[qdisc %p],opt %p)\n", sch, p, opt);
350+
pr_debug("%s(sch %p,[qdisc %p],opt %p)\n", __func__, sch, p, opt);
350351

351352
if (!opt)
352353
goto errout;
@@ -384,7 +385,7 @@ static int dsmark_init(struct Qdisc *sch, struct nlattr *opt)
384385
if (p->q == NULL)
385386
p->q = &noop_qdisc;
386387

387-
pr_debug("dsmark_init: qdisc %p\n", p->q);
388+
pr_debug("%s: qdisc %p\n", __func__, p->q);
388389

389390
err = 0;
390391
errout:
@@ -395,7 +396,7 @@ static void dsmark_reset(struct Qdisc *sch)
395396
{
396397
struct dsmark_qdisc_data *p = qdisc_priv(sch);
397398

398-
pr_debug("dsmark_reset(sch %p,[qdisc %p])\n", sch, p);
399+
pr_debug("%s(sch %p,[qdisc %p])\n", __func__, sch, p);
399400
qdisc_reset(p->q);
400401
sch->q.qlen = 0;
401402
}
@@ -404,7 +405,7 @@ static void dsmark_destroy(struct Qdisc *sch)
404405
{
405406
struct dsmark_qdisc_data *p = qdisc_priv(sch);
406407

407-
pr_debug("dsmark_destroy(sch %p,[qdisc %p])\n", sch, p);
408+
pr_debug("%s(sch %p,[qdisc %p])\n", __func__, sch, p);
408409

409410
tcf_destroy_chain(&p->filter_list);
410411
qdisc_destroy(p->q);
@@ -417,7 +418,7 @@ static int dsmark_dump_class(struct Qdisc *sch, unsigned long cl,
417418
struct dsmark_qdisc_data *p = qdisc_priv(sch);
418419
struct nlattr *opts = NULL;
419420

420-
pr_debug("dsmark_dump_class(sch %p,[qdisc %p],class %ld\n", sch, p, cl);
421+
pr_debug("%s(sch %p,[qdisc %p],class %ld\n", __func__, sch, p, cl);
421422

422423
if (!dsmark_valid_index(p, cl))
423424
return -EINVAL;

0 commit comments

Comments
 (0)