Skip to content

Commit eeb4e6d

Browse files
JuliaLawalldavem330
authored andcommitted
isdn: fix misspelling of current function in string
Replace a misspelled function name by %s and then __func__. In the first case, the print is just dropped, because kmalloc itself does enough error reporting. This was done using Coccinelle, including the use of Levenshtein distance, as proposed by Rasmus Villemoes. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent bbc7975 commit eeb4e6d

File tree

8 files changed

+9
-10
lines changed

8 files changed

+9
-10
lines changed

drivers/isdn/hisax/hfc_2bs0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ WaitForBusy(struct IsdnCardState *cs)
3131
to--;
3232
}
3333
if (!to) {
34-
printk(KERN_WARNING "HiSax: waitforBusy timeout\n");
34+
printk(KERN_WARNING "HiSax: %s timeout\n", __func__);
3535
return (0);
3636
} else
3737
return (to);

drivers/isdn/hisax/hfc_sx.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,8 @@ hfcsx_l2l1(struct PStack *st, int pr, void *arg)
11591159
case (PH_PULL | INDICATION):
11601160
spin_lock_irqsave(&bcs->cs->lock, flags);
11611161
if (bcs->tx_skb) {
1162-
printk(KERN_WARNING "hfc_l2l1: this shouldn't happen\n");
1162+
printk(KERN_WARNING "%s: this shouldn't happen\n",
1163+
__func__);
11631164
} else {
11641165
// test_and_set_bit(BC_FLG_BUSY, &bcs->Flag);
11651166
bcs->tx_skb = skb;

drivers/isdn/hisax/hfc_usb.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -927,9 +927,8 @@ start_int_fifo(usb_fifo *fifo)
927927
fifo->active = 1; /* must be marked active */
928928
errcode = usb_submit_urb(fifo->urb, GFP_KERNEL);
929929
if (errcode) {
930-
printk(KERN_ERR
931-
"HFC-S USB: submit URB error(start_int_info): status:%i\n",
932-
errcode);
930+
printk(KERN_ERR "HFC-S USB: submit URB error(%s): status:%i\n",
931+
__func__, errcode);
933932
fifo->active = 0;
934933
fifo->skbuff = NULL;
935934
}

drivers/isdn/hisax/ipacx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ bch_fill_fifo(struct BCState *bcs)
580580
if (cs->debug & L1_DEB_HSCX_FIFO) {
581581
char *t = bcs->blog;
582582

583-
t += sprintf(t, "chb_fill_fifo() B-%d cnt %d", hscx, count);
583+
t += sprintf(t, "%s() B-%d cnt %d", __func__, hscx, count);
584584
QuickHex(t, ptr, count);
585585
debugl1(cs, "%s", bcs->blog);
586586
}

drivers/isdn/hisax/isdnl1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ l1_msg(struct IsdnCardState *cs, int pr, void *arg) {
867867
break;
868868
default:
869869
if (cs->debug)
870-
debugl1(cs, "l1msg %04X unhandled", pr);
870+
debugl1(cs, "%s %04X unhandled", __func__, pr);
871871
break;
872872
}
873873
st = st->next;

drivers/isdn/hisax/isdnl3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ void
153153
newl3state(struct l3_process *pc, int state)
154154
{
155155
if (pc->debug & L3_DEB_STATE)
156-
l3_debug(pc->st, "newstate cr %d %d --> %d",
156+
l3_debug(pc->st, "%s cr %d %d --> %d", __func__,
157157
pc->callref & 0x7F,
158158
pc->state, state);
159159
pc->state = state;

drivers/isdn/hysdn/hycapi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ static char *hycapi_procinfo(struct capi_ctr *ctrl)
501501
{
502502
hycapictrl_info *cinfo = (hycapictrl_info *)(ctrl->driverdata);
503503
#ifdef HYCAPI_PRINTFNAMES
504-
printk(KERN_NOTICE "hycapi_proc_info\n");
504+
printk(KERN_NOTICE "%s\n", __func__);
505505
#endif
506506
if (!cinfo)
507507
return "";

drivers/isdn/pcbit/layer2.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ pcbit_l2_write(struct pcbit_dev *dev, ulong msg, ushort refnum,
8585
}
8686
if ((frame = kmalloc(sizeof(struct frame_buf),
8787
GFP_ATOMIC)) == NULL) {
88-
printk(KERN_WARNING "pcbit_2_write: kmalloc failed\n");
8988
dev_kfree_skb(skb);
9089
return -1;
9190
}

0 commit comments

Comments
 (0)