diff mbox

[3/20] PCI: fix misspelling of current function in string

Message ID 1417980062-25151-4-git-send-email-Julia.Lawall@lip6.fr
State Rejected
Headers show

Commit Message

Julia Lawall Dec. 7, 2014, 7:20 p.m. UTC
Replace a misspelled function name by %s and then __func__.

The function name begins with pci, not cpci.

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/pci/hotplug/pci_hotplug_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Rasmus Villemoes Dec. 7, 2014, 8:41 p.m. UTC | #1
On Sun, Dec 07 2014, Julia Lawall <Julia.Lawall@lip6.fr> wrote:

> Replace a misspelled function name by %s and then __func__.
>
> The function name begins with pci, not cpci.
...
>  	result = cpci_hotplug_init(debug);
>  	if (result) {
> -		err("cpci_hotplug_init with error %d\n", result);
> +		err("%s with error %d\n", __func__, result);
>  		return result;
>  	}

This one seems to be a false positive; I think the err() is reporting on
the result from the call of the function which is indeed called
cpci_hotplug_init.

I just skimmed the rest quickly, but they seem ok.

Rasmus
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Julia Lawall Dec. 7, 2014, 8:43 p.m. UTC | #2
On Sun, 7 Dec 2014, Rasmus Villemoes wrote:

> On Sun, Dec 07 2014, Julia Lawall <Julia.Lawall@lip6.fr> wrote:
> 
> > Replace a misspelled function name by %s and then __func__.
> >
> > The function name begins with pci, not cpci.
> ...
> >  	result = cpci_hotplug_init(debug);
> >  	if (result) {
> > -		err("cpci_hotplug_init with error %d\n", result);
> > +		err("%s with error %d\n", __func__, result);
> >  		return result;
> >  	}
> 
> This one seems to be a false positive; I think the err() is reporting on
> the result from the call of the function which is indeed called
> cpci_hotplug_init.

Agreed.  Thanks.

julia
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c
index 56d8486..d3f8330 100644
--- a/drivers/pci/hotplug/pci_hotplug_core.c
+++ b/drivers/pci/hotplug/pci_hotplug_core.c
@@ -532,7 +532,7 @@  static int __init pci_hotplug_init(void)
 
 	result = cpci_hotplug_init(debug);
 	if (result) {
-		err("cpci_hotplug_init with error %d\n", result);
+		err("%s with error %d\n", __func__, result);
 		return result;
 	}