* [PATCH 4/20] dmfe: fix misspelling of current function in string
2014-12-07 19:20 [PATCH 0/20] fix misspelling of current function in string Julia Lawall
@ 2014-12-07 19:20 ` Julia Lawall
2014-12-07 20:34 ` Grant Grundler
2014-12-09 21:14 ` David Miller
2014-12-07 19:20 ` [PATCH 5/20] isdn: " Julia Lawall
` (8 subsequent siblings)
9 siblings, 2 replies; 24+ messages in thread
From: Julia Lawall @ 2014-12-07 19:20 UTC (permalink / raw)
To: Grant Grundler; +Cc: kernel-janitors, linux, joe, netdev, linux-kernel
The function name contains cleanup, not clean.
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>
---
The semantic patch is difficult to summarize, but is available in the cover
letter of this patch series.
drivers/net/ethernet/dec/tulip/dmfe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/dec/tulip/dmfe.c b/drivers/net/ethernet/dec/tulip/dmfe.c
index c820560..50a0077 100644
--- a/drivers/net/ethernet/dec/tulip/dmfe.c
+++ b/drivers/net/ethernet/dec/tulip/dmfe.c
@@ -2265,7 +2265,7 @@ static int __init dmfe_init_module(void)
static void __exit dmfe_cleanup_module(void)
{
- DMFE_DBUG(0, "dmfe_clean_module() ", debug);
+ DMFE_DBUG(0, "dmfe_cleanup_module() ", debug);
pci_unregister_driver(&dmfe_driver);
}
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH 4/20] dmfe: fix misspelling of current function in string
2014-12-07 19:20 ` [PATCH 4/20] dmfe: " Julia Lawall
@ 2014-12-07 20:34 ` Grant Grundler
2014-12-09 21:14 ` David Miller
1 sibling, 0 replies; 24+ messages in thread
From: Grant Grundler @ 2014-12-07 20:34 UTC (permalink / raw)
To: Julia Lawall
Cc: Grant Grundler, kernel-janitors, Rasmus Villemoes, joe,
open list:TULIP NETWORK DRI..., open list
On Sun, Dec 7, 2014 at 11:20 AM, Julia Lawall <Julia.Lawall@lip6.fr> wrote:
> The function name contains cleanup, not clean.
>
> 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>
Thanks - seems like a obvious mistake.
Acked-by: Grant Grundler <grundler@parisc-linux.org>
>
> ---
> The semantic patch is difficult to summarize, but is available in the cover
> letter of this patch series.
>
> drivers/net/ethernet/dec/tulip/dmfe.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/dec/tulip/dmfe.c b/drivers/net/ethernet/dec/tulip/dmfe.c
> index c820560..50a0077 100644
> --- a/drivers/net/ethernet/dec/tulip/dmfe.c
> +++ b/drivers/net/ethernet/dec/tulip/dmfe.c
> @@ -2265,7 +2265,7 @@ static int __init dmfe_init_module(void)
>
> static void __exit dmfe_cleanup_module(void)
> {
> - DMFE_DBUG(0, "dmfe_clean_module() ", debug);
> + DMFE_DBUG(0, "dmfe_cleanup_module() ", debug);
> pci_unregister_driver(&dmfe_driver);
> }
>
>
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH 4/20] dmfe: fix misspelling of current function in string
2014-12-07 19:20 ` [PATCH 4/20] dmfe: " Julia Lawall
2014-12-07 20:34 ` Grant Grundler
@ 2014-12-09 21:14 ` David Miller
1 sibling, 0 replies; 24+ messages in thread
From: David Miller @ 2014-12-09 21:14 UTC (permalink / raw)
To: Julia.Lawall; +Cc: grundler, kernel-janitors, linux, joe, netdev, linux-kernel
From: Julia Lawall <Julia.Lawall@lip6.fr>
Date: Sun, 7 Dec 2014 20:20:46 +0100
> The function name contains cleanup, not clean.
>
> 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>
Applied.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 5/20] isdn: fix misspelling of current function in string
2014-12-07 19:20 [PATCH 0/20] fix misspelling of current function in string Julia Lawall
2014-12-07 19:20 ` [PATCH 4/20] dmfe: " Julia Lawall
@ 2014-12-07 19:20 ` Julia Lawall
2014-12-09 21:14 ` David Miller
2014-12-07 19:20 ` [PATCH 10/20] uli526x: " Julia Lawall
` (7 subsequent siblings)
9 siblings, 1 reply; 24+ messages in thread
From: Julia Lawall @ 2014-12-07 19:20 UTC (permalink / raw)
To: Karsten Keil; +Cc: kernel-janitors, linux, joe, netdev, linux-kernel
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>
---
The semantic patch is difficult to summarize, but is available in the cover
letter of this patch series.
drivers/isdn/hisax/hfc_2bs0.c | 2 +-
drivers/isdn/hisax/hfc_sx.c | 3 ++-
drivers/isdn/hisax/hfc_usb.c | 5 ++---
drivers/isdn/hisax/ipacx.c | 2 +-
drivers/isdn/hisax/isdnl1.c | 2 +-
drivers/isdn/hisax/isdnl3.c | 2 +-
drivers/isdn/hysdn/hycapi.c | 2 +-
drivers/isdn/pcbit/layer2.c | 1 -
8 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/drivers/isdn/pcbit/layer2.c b/drivers/isdn/pcbit/layer2.c
index 42ecfef..46e1240 100644
--- a/drivers/isdn/pcbit/layer2.c
+++ b/drivers/isdn/pcbit/layer2.c
@@ -85,7 +85,6 @@ pcbit_l2_write(struct pcbit_dev *dev, ulong msg, ushort refnum,
}
if ((frame = kmalloc(sizeof(struct frame_buf),
GFP_ATOMIC)) == NULL) {
- printk(KERN_WARNING "pcbit_2_write: kmalloc failed\n");
dev_kfree_skb(skb);
return -1;
}
diff --git a/drivers/isdn/hisax/ipacx.c b/drivers/isdn/hisax/ipacx.c
index 5faa5de..9cc26b4 100644
--- a/drivers/isdn/hisax/ipacx.c
+++ b/drivers/isdn/hisax/ipacx.c
@@ -580,7 +580,7 @@ bch_fill_fifo(struct BCState *bcs)
if (cs->debug & L1_DEB_HSCX_FIFO) {
char *t = bcs->blog;
- t += sprintf(t, "chb_fill_fifo() B-%d cnt %d", hscx, count);
+ t += sprintf(t, "%s() B-%d cnt %d", __func__, hscx, count);
QuickHex(t, ptr, count);
debugl1(cs, "%s", bcs->blog);
}
diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c
index 849a807..678bd52 100644
--- a/drivers/isdn/hisax/hfc_usb.c
+++ b/drivers/isdn/hisax/hfc_usb.c
@@ -927,9 +927,8 @@ start_int_fifo(usb_fifo *fifo)
fifo->active = 1; /* must be marked active */
errcode = usb_submit_urb(fifo->urb, GFP_KERNEL);
if (errcode) {
- printk(KERN_ERR
- "HFC-S USB: submit URB error(start_int_info): status:%i\n",
- errcode);
+ printk(KERN_ERR "HFC-S USB: submit URB error(%s): status:%i\n",
+ __func__, errcode);
fifo->active = 0;
fifo->skbuff = NULL;
}
diff --git a/drivers/isdn/hisax/hfc_2bs0.c b/drivers/isdn/hisax/hfc_2bs0.c
index 838531b..14dada4 100644
--- a/drivers/isdn/hisax/hfc_2bs0.c
+++ b/drivers/isdn/hisax/hfc_2bs0.c
@@ -31,7 +31,7 @@ WaitForBusy(struct IsdnCardState *cs)
to--;
}
if (!to) {
- printk(KERN_WARNING "HiSax: waitforBusy timeout\n");
+ printk(KERN_WARNING "HiSax: %s timeout\n", __func__);
return (0);
} else
return (to);
diff --git a/drivers/isdn/hisax/isdnl1.c b/drivers/isdn/hisax/isdnl1.c
index 8000957..a560842 100644
--- a/drivers/isdn/hisax/isdnl1.c
+++ b/drivers/isdn/hisax/isdnl1.c
@@ -867,7 +867,7 @@ l1_msg(struct IsdnCardState *cs, int pr, void *arg) {
break;
default:
if (cs->debug)
- debugl1(cs, "l1msg %04X unhandled", pr);
+ debugl1(cs, "%s %04X unhandled", __func__, pr);
break;
}
st = st->next;
diff --git a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c
index fa1fefd..b1fad81 100644
--- a/drivers/isdn/hisax/hfc_sx.c
+++ b/drivers/isdn/hisax/hfc_sx.c
@@ -1159,7 +1159,8 @@ hfcsx_l2l1(struct PStack *st, int pr, void *arg)
case (PH_PULL | INDICATION):
spin_lock_irqsave(&bcs->cs->lock, flags);
if (bcs->tx_skb) {
- printk(KERN_WARNING "hfc_l2l1: this shouldn't happen\n");
+ printk(KERN_WARNING "%s: this shouldn't happen\n",
+ __func__);
} else {
// test_and_set_bit(BC_FLG_BUSY, &bcs->Flag);
bcs->tx_skb = skb;
diff --git a/drivers/isdn/hisax/isdnl3.c b/drivers/isdn/hisax/isdnl3.c
index 45b0384..c754706 100644
--- a/drivers/isdn/hisax/isdnl3.c
+++ b/drivers/isdn/hisax/isdnl3.c
@@ -153,7 +153,7 @@ void
newl3state(struct l3_process *pc, int state)
{
if (pc->debug & L3_DEB_STATE)
- l3_debug(pc->st, "newstate cr %d %d --> %d",
+ l3_debug(pc->st, "%s cr %d %d --> %d", __func__,
pc->callref & 0x7F,
pc->state, state);
pc->state = state;
diff --git a/drivers/isdn/hysdn/hycapi.c b/drivers/isdn/hysdn/hycapi.c
index 00aad10..93bae94 100644
--- a/drivers/isdn/hysdn/hycapi.c
+++ b/drivers/isdn/hysdn/hycapi.c
@@ -501,7 +501,7 @@ static char *hycapi_procinfo(struct capi_ctr *ctrl)
{
hycapictrl_info *cinfo = (hycapictrl_info *)(ctrl->driverdata);
#ifdef HYCAPI_PRINTFNAMES
- printk(KERN_NOTICE "hycapi_proc_info\n");
+ printk(KERN_NOTICE "%s\n", __func__);
#endif
if (!cinfo)
return "";
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH 5/20] isdn: fix misspelling of current function in string
2014-12-07 19:20 ` [PATCH 5/20] isdn: " Julia Lawall
@ 2014-12-09 21:14 ` David Miller
0 siblings, 0 replies; 24+ messages in thread
From: David Miller @ 2014-12-09 21:14 UTC (permalink / raw)
To: Julia.Lawall; +Cc: isdn, kernel-janitors, linux, joe, netdev, linux-kernel
From: Julia Lawall <Julia.Lawall@lip6.fr>
Date: Sun, 7 Dec 2014 20:20:47 +0100
> 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>
Applied.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 10/20] uli526x: fix misspelling of current function in string
2014-12-07 19:20 [PATCH 0/20] fix misspelling of current function in string Julia Lawall
2014-12-07 19:20 ` [PATCH 4/20] dmfe: " Julia Lawall
2014-12-07 19:20 ` [PATCH 5/20] isdn: " Julia Lawall
@ 2014-12-07 19:20 ` Julia Lawall
2014-12-07 20:48 ` Grant Grundler
2014-12-09 21:14 ` [PATCH 10/20] " David Miller
2014-12-07 19:20 ` [PATCH 12/20] hp100: " Julia Lawall
` (6 subsequent siblings)
9 siblings, 2 replies; 24+ messages in thread
From: Julia Lawall @ 2014-12-07 19:20 UTC (permalink / raw)
To: Grant Grundler; +Cc: kernel-janitors, linux, joe, netdev, linux-kernel
Replace a misspelled function name by %s and then __func__.
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>
---
The semantic patch is difficult to summarize, but is available in the cover
letter of this patch series.
drivers/net/ethernet/dec/tulip/uli526x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/dec/tulip/uli526x.c b/drivers/net/ethernet/dec/tulip/uli526x.c
index 4061f9b..1c5916b 100644
--- a/drivers/net/ethernet/dec/tulip/uli526x.c
+++ b/drivers/net/ethernet/dec/tulip/uli526x.c
@@ -1837,7 +1837,7 @@ static int __init uli526x_init_module(void)
static void __exit uli526x_cleanup_module(void)
{
- ULI526X_DBUG(0, "uli526x_clean_module() ", debug);
+ ULI526X_DBUG(0, "uli526x_cleanup_module() ", debug);
pci_unregister_driver(&uli526x_driver);
}
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH 10/20] uli526x: fix misspelling of current function in string
2014-12-07 19:20 ` [PATCH 10/20] uli526x: " Julia Lawall
@ 2014-12-07 20:48 ` Grant Grundler
2014-12-07 20:59 ` [PATCH 10/20 v2] " Julia Lawall
2014-12-09 21:14 ` [PATCH 10/20] " David Miller
1 sibling, 1 reply; 24+ messages in thread
From: Grant Grundler @ 2014-12-07 20:48 UTC (permalink / raw)
To: Julia Lawall
Cc: Grant Grundler, kernel-janitors, Rasmus Villemoes, joe,
open list:TULIP NETWORK DRI..., open list
On Sun, Dec 7, 2014 at 11:20 AM, Julia Lawall <Julia.Lawall@lip6.fr> wrote:
> Replace a misspelled function name by %s and then __func__.
Patch is correct but this commit message is not. Please correct and
add my Ack-by.
cheers,
grant
> 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>
>
> ---
> The semantic patch is difficult to summarize, but is available in the cover
> letter of this patch series.
>
> drivers/net/ethernet/dec/tulip/uli526x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/dec/tulip/uli526x.c b/drivers/net/ethernet/dec/tulip/uli526x.c
> index 4061f9b..1c5916b 100644
> --- a/drivers/net/ethernet/dec/tulip/uli526x.c
> +++ b/drivers/net/ethernet/dec/tulip/uli526x.c
> @@ -1837,7 +1837,7 @@ static int __init uli526x_init_module(void)
>
> static void __exit uli526x_cleanup_module(void)
> {
> - ULI526X_DBUG(0, "uli526x_clean_module() ", debug);
> + ULI526X_DBUG(0, "uli526x_cleanup_module() ", debug);
> pci_unregister_driver(&uli526x_driver);
> }
>
>
^ permalink raw reply [flat|nested] 24+ messages in thread* [PATCH 10/20 v2] uli526x: fix misspelling of current function in string
2014-12-07 20:48 ` Grant Grundler
@ 2014-12-07 20:59 ` Julia Lawall
0 siblings, 0 replies; 24+ messages in thread
From: Julia Lawall @ 2014-12-07 20:59 UTC (permalink / raw)
To: Grant Grundler
Cc: Grant Grundler, kernel-janitors, Rasmus Villemoes, joe,
open list:TULIP NETWORK DRI..., open list
The function is named uli526x_cleanup_module, rather than uli526x_clean_module.
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>
Acked-by: Grant Grundler <grantgrundler@gmail.com>
---
v2: fixed commit message
The semantic patch is difficult to summarize, but is available in the cover
letter of this patch series.
drivers/net/ethernet/dec/tulip/uli526x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/dec/tulip/uli526x.c b/drivers/net/ethernet/dec/tulip/uli526x.c
index 4061f9b..1c5916b 100644
--- a/drivers/net/ethernet/dec/tulip/uli526x.c
+++ b/drivers/net/ethernet/dec/tulip/uli526x.c
@@ -1837,7 +1837,7 @@ static int __init uli526x_init_module(void)
static void __exit uli526x_cleanup_module(void)
{
- ULI526X_DBUG(0, "uli526x_clean_module() ", debug);
+ ULI526X_DBUG(0, "uli526x_cleanup_module() ", debug);
pci_unregister_driver(&uli526x_driver);
}
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 10/20] uli526x: fix misspelling of current function in string
2014-12-07 19:20 ` [PATCH 10/20] uli526x: " Julia Lawall
2014-12-07 20:48 ` Grant Grundler
@ 2014-12-09 21:14 ` David Miller
1 sibling, 0 replies; 24+ messages in thread
From: David Miller @ 2014-12-09 21:14 UTC (permalink / raw)
To: Julia.Lawall; +Cc: grundler, kernel-janitors, linux, joe, netdev, linux-kernel
From: Julia Lawall <Julia.Lawall@lip6.fr>
Date: Sun, 7 Dec 2014 20:20:52 +0100
> Replace a misspelled function name by %s and then __func__.
>
> 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>
Applied.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 12/20] hp100: fix misspelling of current function in string
2014-12-07 19:20 [PATCH 0/20] fix misspelling of current function in string Julia Lawall
` (2 preceding siblings ...)
2014-12-07 19:20 ` [PATCH 10/20] uli526x: " Julia Lawall
@ 2014-12-07 19:20 ` Julia Lawall
2014-12-07 20:44 ` Jeremiah Mahler
` (2 more replies)
2014-12-07 19:20 ` [PATCH 13/20] zd1211rw: " Julia Lawall
` (5 subsequent siblings)
9 siblings, 3 replies; 24+ messages in thread
From: Julia Lawall @ 2014-12-07 19:20 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: kernel-janitors, linux, joe, netdev, linux-kernel
Replace a misspelled function name by %s and then __func__.
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>
---
The semantic patch is difficult to summarize, but is available in the cover
letter of this patch series.
drivers/net/ethernet/hp/hp100.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/hp/hp100.c b/drivers/net/ethernet/hp/hp100.c
index 76a6e0c..ae6e30d 100644
--- a/drivers/net/ethernet/hp/hp100.c
+++ b/drivers/net/ethernet/hp/hp100.c
@@ -490,7 +490,8 @@ static int hp100_probe1(struct net_device *dev, int ioaddr, u_char bus,
eid = hp100_read_id(ioaddr);
if (eid == NULL) { /* bad checksum? */
- printk(KERN_WARNING "hp100_probe: bad ID checksum at base port 0x%x\n", ioaddr);
+ printk(KERN_WARNING "%s: bad ID checksum at base port 0x%x\n",
+ __func__, ioaddr);
goto out2;
}
@@ -498,7 +499,9 @@ static int hp100_probe1(struct net_device *dev, int ioaddr, u_char bus,
for (i = uc = 0; i < 7; i++)
uc += hp100_inb(LAN_ADDR + i);
if (uc != 0xff) {
- printk(KERN_WARNING "hp100_probe: bad lan address checksum at port 0x%x)\n", ioaddr);
+ printk(KERN_WARNING
+ "%s: bad lan address checksum at port 0x%x)\n",
+ __func__, ioaddr);
err = -EIO;
goto out2;
}
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH 12/20] hp100: fix misspelling of current function in string
2014-12-07 19:20 ` [PATCH 12/20] hp100: " Julia Lawall
@ 2014-12-07 20:44 ` Jeremiah Mahler
2014-12-09 21:13 ` David Miller
2014-12-09 21:14 ` David Miller
2 siblings, 0 replies; 24+ messages in thread
From: Jeremiah Mahler @ 2014-12-07 20:44 UTC (permalink / raw)
To: Julia Lawall; +Cc: kernel-janitors, netdev, linux-kernel
Julia,
On Sun, Dec 07, 2014 at 08:20:54PM +0100, Julia Lawall wrote:
> Replace a misspelled function name by %s and then __func__.
>
> 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>
>
> ---
> The semantic patch is difficult to summarize, but is available in the cover
> letter of this patch series.
>
> drivers/net/ethernet/hp/hp100.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/hp/hp100.c b/drivers/net/ethernet/hp/hp100.c
> index 76a6e0c..ae6e30d 100644
> --- a/drivers/net/ethernet/hp/hp100.c
> +++ b/drivers/net/ethernet/hp/hp100.c
> @@ -490,7 +490,8 @@ static int hp100_probe1(struct net_device *dev, int ioaddr, u_char bus,
>
> eid = hp100_read_id(ioaddr);
> if (eid == NULL) { /* bad checksum? */
> - printk(KERN_WARNING "hp100_probe: bad ID checksum at base port 0x%x\n", ioaddr);
> + printk(KERN_WARNING "%s: bad ID checksum at base port 0x%x\n",
> + __func__, ioaddr);
More printk statements that can be change to pr_warn() to fix the
checkpatch warning.
> goto out2;
> }
>
> @@ -498,7 +499,9 @@ static int hp100_probe1(struct net_device *dev, int ioaddr, u_char bus,
> for (i = uc = 0; i < 7; i++)
> uc += hp100_inb(LAN_ADDR + i);
> if (uc != 0xff) {
> - printk(KERN_WARNING "hp100_probe: bad lan address checksum at port 0x%x)\n", ioaddr);
> + printk(KERN_WARNING
> + "%s: bad lan address checksum at port 0x%x)\n",
> + __func__, ioaddr);
And here too.
> err = -EIO;
> goto out2;
> }
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
- Jeremiah Mahler
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH 12/20] hp100: fix misspelling of current function in string
2014-12-07 19:20 ` [PATCH 12/20] hp100: " Julia Lawall
2014-12-07 20:44 ` Jeremiah Mahler
@ 2014-12-09 21:13 ` David Miller
2014-12-09 21:14 ` David Miller
2 siblings, 0 replies; 24+ messages in thread
From: David Miller @ 2014-12-09 21:13 UTC (permalink / raw)
To: Julia.Lawall; +Cc: perex, kernel-janitors, linux, joe, netdev, linux-kernel
From: Julia Lawall <Julia.Lawall@lip6.fr>
Date: Sun, 7 Dec 2014 20:20:54 +0100
> Replace a misspelled function name by %s and then __func__.
>
> 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>
Applied.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 12/20] hp100: fix misspelling of current function in string
2014-12-07 19:20 ` [PATCH 12/20] hp100: " Julia Lawall
2014-12-07 20:44 ` Jeremiah Mahler
2014-12-09 21:13 ` David Miller
@ 2014-12-09 21:14 ` David Miller
2 siblings, 0 replies; 24+ messages in thread
From: David Miller @ 2014-12-09 21:14 UTC (permalink / raw)
To: Julia.Lawall; +Cc: perex, kernel-janitors, linux, joe, netdev, linux-kernel
From: Julia Lawall <Julia.Lawall@lip6.fr>
Date: Sun, 7 Dec 2014 20:20:54 +0100
> Replace a misspelled function name by %s and then __func__.
>
> 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>
Applied.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 13/20] zd1211rw: fix misspelling of current function in string
2014-12-07 19:20 [PATCH 0/20] fix misspelling of current function in string Julia Lawall
` (3 preceding siblings ...)
2014-12-07 19:20 ` [PATCH 12/20] hp100: " Julia Lawall
@ 2014-12-07 19:20 ` Julia Lawall
2014-12-07 19:20 ` [PATCH 14/20] chelsio: " Julia Lawall
` (4 subsequent siblings)
9 siblings, 0 replies; 24+ messages in thread
From: Julia Lawall @ 2014-12-07 19:20 UTC (permalink / raw)
To: Daniel Drake
Cc: kernel-janitors, linux, joe, Ulrich Kunitz, John W. Linville,
linux-wireless, netdev, linux-kernel
Replace a misspelled function name by %s and then __func__.
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>
---
The semantic patch is difficult to summarize, but is available in the cover
letter of this patch series.
drivers/net/wireless/zd1211rw/zd_chip.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c
index 73a49b8..07b94ed 100644
--- a/drivers/net/wireless/zd1211rw/zd_chip.c
+++ b/drivers/net/wireless/zd1211rw/zd_chip.c
@@ -129,7 +129,7 @@ int zd_ioread32v_locked(struct zd_chip *chip, u32 *values, const zd_addr_t *addr
r = zd_ioread16v_locked(chip, v16, a16, count16);
if (r) {
dev_dbg_f(zd_chip_dev(chip),
- "error: zd_ioread16v_locked. Error number %d\n", r);
+ "error: %s. Error number %d\n", __func__, r);
return r;
}
@@ -256,8 +256,8 @@ int zd_iowrite32a_locked(struct zd_chip *chip,
if (r) {
zd_usb_iowrite16v_async_end(&chip->usb, 0);
dev_dbg_f(zd_chip_dev(chip),
- "error _zd_iowrite32v_locked."
- " Error number %d\n", r);
+ "error _%s. Error number %d\n", __func__,
+ r);
return r;
}
}
^ permalink raw reply related [flat|nested] 24+ messages in thread* [PATCH 14/20] chelsio: fix misspelling of current function in string
2014-12-07 19:20 [PATCH 0/20] fix misspelling of current function in string Julia Lawall
` (4 preceding siblings ...)
2014-12-07 19:20 ` [PATCH 13/20] zd1211rw: " Julia Lawall
@ 2014-12-07 19:20 ` Julia Lawall
2014-12-09 21:13 ` David Miller
2014-12-09 21:14 ` David Miller
2014-12-07 19:20 ` [PATCH 15/20] hostap_cs: " Julia Lawall
` (3 subsequent siblings)
9 siblings, 2 replies; 24+ messages in thread
From: Julia Lawall @ 2014-12-07 19:20 UTC (permalink / raw)
To: netdev; +Cc: kernel-janitors, linux, joe, linux-kernel
Replace a misspelled function name by %s and then __func__.
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>
---
The semantic patch is difficult to summarize, but is available in the cover
letter of this patch series.
drivers/net/ethernet/chelsio/cxgb/sge.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb/sge.c b/drivers/net/ethernet/chelsio/cxgb/sge.c
index 4c58793..86222a1 100644
--- a/drivers/net/ethernet/chelsio/cxgb/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb/sge.c
@@ -301,7 +301,7 @@ unsigned int t1_sched_update_parms(struct sge *sge, unsigned int port,
struct sched_port *p = &s->p[port];
unsigned int max_avail_segs;
- pr_debug("t1_sched_update_params mtu=%d speed=%d\n", mtu, speed);
+ pr_debug("%s mtu=%d speed=%d\n", __func__, mtu, speed);
if (speed)
p->speed = speed;
if (mtu)
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH 14/20] chelsio: fix misspelling of current function in string
2014-12-07 19:20 ` [PATCH 14/20] chelsio: " Julia Lawall
@ 2014-12-09 21:13 ` David Miller
2014-12-09 21:14 ` David Miller
1 sibling, 0 replies; 24+ messages in thread
From: David Miller @ 2014-12-09 21:13 UTC (permalink / raw)
To: Julia.Lawall; +Cc: netdev, kernel-janitors, linux, joe, linux-kernel
From: Julia Lawall <Julia.Lawall@lip6.fr>
Date: Sun, 7 Dec 2014 20:20:56 +0100
> Replace a misspelled function name by %s and then __func__.
>
> 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>
Applied.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 14/20] chelsio: fix misspelling of current function in string
2014-12-07 19:20 ` [PATCH 14/20] chelsio: " Julia Lawall
2014-12-09 21:13 ` David Miller
@ 2014-12-09 21:14 ` David Miller
1 sibling, 0 replies; 24+ messages in thread
From: David Miller @ 2014-12-09 21:14 UTC (permalink / raw)
To: Julia.Lawall; +Cc: netdev, kernel-janitors, linux, joe, linux-kernel
From: Julia Lawall <Julia.Lawall@lip6.fr>
Date: Sun, 7 Dec 2014 20:20:56 +0100
> Replace a misspelled function name by %s and then __func__.
>
> 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>
Applied.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 15/20] hostap_cs: fix misspelling of current function in string
2014-12-07 19:20 [PATCH 0/20] fix misspelling of current function in string Julia Lawall
` (5 preceding siblings ...)
2014-12-07 19:20 ` [PATCH 14/20] chelsio: " Julia Lawall
@ 2014-12-07 19:20 ` Julia Lawall
[not found] ` <1417980062-25151-1-git-send-email-Julia.Lawall-L2FTfq7BK8M@public.gmane.org>
` (2 subsequent siblings)
9 siblings, 0 replies; 24+ messages in thread
From: Julia Lawall @ 2014-12-07 19:20 UTC (permalink / raw)
To: Jouni Malinen
Cc: kernel-janitors, linux, joe, John W. Linville, linux-wireless,
netdev, linux-kernel
Replace a misspelled function name by %s and then __func__.
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>
---
The semantic patch is difficult to summarize, but is available in the cover
letter of this patch series.
drivers/net/wireless/hostap/hostap_cs.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index b6ec519..50033aa 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -381,18 +381,15 @@ static void prism2_pccard_genesis_reset(local_info_t *local, int hcr)
res = pcmcia_read_config_byte(hw_priv->link, CISREG_COR, &old_cor);
if (res != 0) {
- printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 1 "
- "(%d)\n", res);
+ printk(KERN_DEBUG "%s failed 1 (%d)\n", __func__, res);
return;
}
- printk(KERN_DEBUG "prism2_pccard_genesis_sreset: original COR %02x\n",
- old_cor);
+ printk(KERN_DEBUG "%s: original COR %02x\n", __func__, old_cor);
res = pcmcia_write_config_byte(hw_priv->link, CISREG_COR,
old_cor | COR_SOFT_RESET);
if (res != 0) {
- printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 2 "
- "(%d)\n", res);
+ printk(KERN_DEBUG "%s failed 2 (%d)\n", __func__, res);
return;
}
@@ -401,8 +398,7 @@ static void prism2_pccard_genesis_reset(local_info_t *local, int hcr)
/* Setup Genesis mode */
res = pcmcia_write_config_byte(hw_priv->link, CISREG_CCSR, hcr);
if (res != 0) {
- printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 3 "
- "(%d)\n", res);
+ printk(KERN_DEBUG "%s failed 3 (%d)\n", __func__, res);
return;
}
mdelay(10);
@@ -410,8 +406,7 @@ static void prism2_pccard_genesis_reset(local_info_t *local, int hcr)
res = pcmcia_write_config_byte(hw_priv->link, CISREG_COR,
old_cor & ~COR_SOFT_RESET);
if (res != 0) {
- printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 4 "
- "(%d)\n", res);
+ printk(KERN_DEBUG "%s failed 4 (%d)\n", __func__, res);
return;
}
^ permalink raw reply related [flat|nested] 24+ messages in thread[parent not found: <1417980062-25151-1-git-send-email-Julia.Lawall-L2FTfq7BK8M@public.gmane.org>]
* [PATCH 16/20] rtlwifi: rtl8821ae: fix misspelling of current function in string
[not found] ` <1417980062-25151-1-git-send-email-Julia.Lawall-L2FTfq7BK8M@public.gmane.org>
@ 2014-12-07 19:20 ` Julia Lawall
0 siblings, 0 replies; 24+ messages in thread
From: Julia Lawall @ 2014-12-07 19:20 UTC (permalink / raw)
To: Larry Finger
Cc: kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
linux-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg,
joe-6d6DIl74uiNBDgjK7y7TUQ, Chaoming Li, John W. Linville,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Replace a misspelled function name by %s and then __func__.
8821 was written as 8812.
This was done using Coccinelle, including the use of Levenshtein distance,
as proposed by Rasmus Villemoes.
Signed-off-by: Julia Lawall <Julia.Lawall-L2FTfq7BK8M@public.gmane.org>
---
The semantic patch is difficult to summarize, but is available in the cover
letter of this patch series.
drivers/net/wireless/rtlwifi/rtl8821ae/dm.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/rtl8821ae/dm.c b/drivers/net/wireless/rtlwifi/rtl8821ae/dm.c
index 9be1061..ba30b0d 100644
--- a/drivers/net/wireless/rtlwifi/rtl8821ae/dm.c
+++ b/drivers/net/wireless/rtlwifi/rtl8821ae/dm.c
@@ -2078,8 +2078,7 @@ void rtl8821ae_dm_txpwr_track_set_pwr(struct ieee80211_hw *hw,
if (rtldm->tx_rate != 0xFF)
tx_rate = rtl8821ae_hw_rate_to_mrate(hw, rtldm->tx_rate);
- RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
- "===>rtl8812ae_dm_txpwr_track_set_pwr\n");
+ RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, "===>%s\n", __func__);
if (tx_rate != 0xFF) { /* Mimic Modify High Rate BBSwing Limit.*/
/*CCK*/
@@ -2128,7 +2127,7 @@ void rtl8821ae_dm_txpwr_track_set_pwr(struct ieee80211_hw *hw,
if (method == BBSWING) {
RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
- "===>rtl8812ae_dm_txpwr_track_set_pwr\n");
+ "===>%s\n", __func__);
if (rf_path == RF90_PATH_A) {
final_swing_idx[RF90_PATH_A] =
(rtldm->ofdm_index[RF90_PATH_A] >
@@ -2260,7 +2259,8 @@ void rtl8821ae_dm_txpower_tracking_callback_thermalmeter(
rtldm->txpower_trackinginit = true;
RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
- "===>rtl8812ae_dm_txpower_tracking_callback_thermalmeter,\n pDM_Odm->BbSwingIdxCckBase: %d,pDM_Odm->BbSwingIdxOfdmBase[A]:%d, pDM_Odm->DefaultOfdmIndex: %d\n",
+ "===>%s,\n pDM_Odm->BbSwingIdxCckBase: %d,pDM_Odm->BbSwingIdxOfdmBase[A]:%d, pDM_Odm->DefaultOfdmIndex: %d\n",
+ __func__,
rtldm->swing_idx_cck_base,
rtldm->swing_idx_ofdm_base[RF90_PATH_A],
rtldm->default_ofdm_index);
@@ -2539,8 +2539,7 @@ void rtl8821ae_dm_txpower_tracking_callback_thermalmeter(
}
}
- RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
- "<===rtl8812ae_dm_txpower_tracking_callback_thermalmeter\n");
+ RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, "<===%s\n", __func__);
}
void rtl8821ae_dm_check_txpower_tracking_thermalmeter(struct ieee80211_hw *hw)
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 0/20] fix misspelling of current function in string
2014-12-07 19:20 [PATCH 0/20] fix misspelling of current function in string Julia Lawall
` (7 preceding siblings ...)
[not found] ` <1417980062-25151-1-git-send-email-Julia.Lawall-L2FTfq7BK8M@public.gmane.org>
@ 2014-12-07 23:44 ` Julian Calaby
2014-12-08 6:43 ` Julia Lawall
2014-12-08 3:55 ` Joe Perches
9 siblings, 1 reply; 24+ messages in thread
From: Julian Calaby @ 2014-12-07 23:44 UTC (permalink / raw)
To: Julia Lawall
Cc: devel@driverdev.osuosl.org, linux-samsung-soc, linux-scsi,
linux-pci, linux-wireless, intel-gfx, linux-usb, kernel-janitors,
linux-kernel@vger.kernel.org, dri-devel, netdev, linux-mtd, linux,
Joe Perches, Mailing List, Arm
Hi Julia,
On Mon, Dec 8, 2014 at 6:20 AM, Julia Lawall <Julia.Lawall@lip6.fr> wrote:
> These patches replace what appears to be a reference to the name of the
> current function but is misspelled in some way by either the name of the
> function itself, or by %s and then __func__ in an argument list.
Would there be any value in doing this for _all_ cases where the
function name is written in a format string?
Thanks,
--
Julian Calaby
Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH 0/20] fix misspelling of current function in string
2014-12-07 23:44 ` [PATCH 0/20] " Julian Calaby
@ 2014-12-08 6:43 ` Julia Lawall
2014-12-10 2:56 ` Julian Calaby
0 siblings, 1 reply; 24+ messages in thread
From: Julia Lawall @ 2014-12-08 6:43 UTC (permalink / raw)
To: Julian Calaby
Cc: devel@driverdev.osuosl.org, linux-samsung-soc, linux-scsi, linux,
linux-wireless, intel-gfx, linux-usb, kernel-janitors,
linux-kernel@vger.kernel.org, dri-devel, Julia Lawall, netdev,
linux-mtd, linux-pci, Joe Perches, Mailing List, Arm
On Mon, 8 Dec 2014, Julian Calaby wrote:
> Hi Julia,
>
> On Mon, Dec 8, 2014 at 6:20 AM, Julia Lawall <Julia.Lawall@lip6.fr> wrote:
> > These patches replace what appears to be a reference to the name of the
> > current function but is misspelled in some way by either the name of the
> > function itself, or by %s and then __func__ in an argument list.
>
> Would there be any value in doing this for _all_ cases where the
> function name is written in a format string?
Probably. But there are a lot of them. Even for the misspellings, I have
only don about 1/3 of the cases.
On the other hand, the misspelling have to be checked carefully, because a
misspelling of one thing could be the correct spelling of the thing thst
was actually intended.
Joe, however, points out that a lot of these prints are just for function
tracing, and could be removed. I worked on another semantic patch that
tries to do that. It might be better to remove those prints completely,
rather than sending one patch to transform them and then one patch to
remove them after that. That is why for this series I did only the ones
where there was actually a problem.
julia
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 0/20] fix misspelling of current function in string
2014-12-08 6:43 ` Julia Lawall
@ 2014-12-10 2:56 ` Julian Calaby
0 siblings, 0 replies; 24+ messages in thread
From: Julian Calaby @ 2014-12-10 2:56 UTC (permalink / raw)
To: Julia Lawall
Cc: devel@driverdev.osuosl.org, linux-samsung-soc, linux-scsi,
linux-pci, linux-wireless, intel-gfx, linux-usb, kernel-janitors,
linux-kernel@vger.kernel.org, dri-devel, netdev, linux-mtd, linux,
Joe Perches, Mailing List, Arm
Hi Julia,
On Mon, Dec 8, 2014 at 5:43 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
> On Mon, 8 Dec 2014, Julian Calaby wrote:
>
>> Hi Julia,
>>
>> On Mon, Dec 8, 2014 at 6:20 AM, Julia Lawall <Julia.Lawall@lip6.fr> wrote:
>> > These patches replace what appears to be a reference to the name of the
>> > current function but is misspelled in some way by either the name of the
>> > function itself, or by %s and then __func__ in an argument list.
>>
>> Would there be any value in doing this for _all_ cases where the
>> function name is written in a format string?
>
> Probably. But there are a lot of them. Even for the misspellings, I have
> only don about 1/3 of the cases.
>
> On the other hand, the misspelling have to be checked carefully, because a
> misspelling of one thing could be the correct spelling of the thing thst
> was actually intended.
>
> Joe, however, points out that a lot of these prints are just for function
> tracing, and could be removed. I worked on another semantic patch that
> tries to do that. It might be better to remove those prints completely,
> rather than sending one patch to transform them and then one patch to
> remove them after that. That is why for this series I did only the ones
> where there was actually a problem.
Ok, that makes sense.
Either way though, this is a really interesting application of the
semantic patching. Nice work!
Thanks,
--
Julian Calaby
Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 0/20] fix misspelling of current function in string
2014-12-07 19:20 [PATCH 0/20] fix misspelling of current function in string Julia Lawall
` (8 preceding siblings ...)
2014-12-07 23:44 ` [PATCH 0/20] " Julian Calaby
@ 2014-12-08 3:55 ` Joe Perches
9 siblings, 0 replies; 24+ messages in thread
From: Joe Perches @ 2014-12-08 3:55 UTC (permalink / raw)
To: Julia Lawall
Cc: devel, linux-samsung-soc, linux-scsi, linux-pci, linux-wireless,
intel-gfx, linux-usb, kernel-janitors, linux-kernel, dri-devel,
netdev, linux-mtd, linux, linux-arm-kernel
On Sun, 2014-12-07 at 20:20 +0100, Julia Lawall wrote:
> These patches replace what appears to be a reference to the name of the
> current function but is misspelled in some way by either the name of the
> function itself, or by %s and then __func__ in an argument list.
At least a few of these seem to be function tracing
style uses that might as well be deleted instead.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 24+ messages in thread