Re: [PATCH 1/5] arch/sparc64: Add missing pci_dev_put

2007-11-19 Thread David Miller
From: Julia Lawall <[EMAIL PROTECTED]>
Date: Mon, 19 Nov 2007 09:02:22 +0100 (CET)

> From: Julia Lawall <[EMAIL PROTECTED]>
> 
> There should be a pci_dev_put when breaking out of a loop that iterates
> over calls to pci_get_device and similar functions.
 ..
> Signed-off-by: Julia Lawall <[EMAIL PROTECTED]>

Patch applied, but something in your email client adds
extra spaces to the second column of several lines in your
your patch.

Please correct this before making future patch submissions.

Thank you.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/5] arch/sparc64: Add missing pci_dev_put

2007-11-19 Thread Julia Lawall

From: Julia Lawall <[EMAIL PROTECTED]>

There should be a pci_dev_put when breaking out of a loop that iterates
over calls to pci_get_device and similar functions.

This was fixed using the following semantic patch.

// 
@@
type T;
identifier d;
expression e;
@@

T *d;
...
while ((d = 
\(pci_get_device\|pci_get_device_reverse\|pci_get_subsys\|pci_get_class\)(..., 
d)) != NULL)
 {... when != pci_dev_put(d)
  when != e = d
(
   return d;
|
+  pci_dev_put(d);
?  return ...;
)
...}
// 

Signed-off-by: Julia Lawall <[EMAIL PROTECTED]>
---

diff -u -p a/arch/sparc64/kernel/isa.c b/arch/sparc64/kernel/isa.c
--- a/arch/sparc64/kernel/isa.c 2007-08-12 13:27:06.0 +0200
+++ b/arch/sparc64/kernel/isa.c 2007-11-19 08:06:48.0 +0100
@@ -155,6 +155,7 @@ void __init isa_init(void)
isa_br = kzalloc(sizeof(*isa_br), GFP_KERNEL);
if (!isa_br) {
printk(KERN_DEBUG "isa: cannot allocate 
sparc_isa_bridge");
+   pci_dev_put(pdev);
return;
}

@@ -168,6 +169,7 @@ void __init isa_init(void)
printk(KERN_DEBUG "isa: device registration error for 
%s!\n",
   dp->path_component_name);
kfree(isa_br);
+   pci_dev_put(pdev);
return;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/5] arch/sparc64: Add missing pci_dev_put

2007-11-19 Thread Julia Lawall

From: Julia Lawall [EMAIL PROTECTED]

There should be a pci_dev_put when breaking out of a loop that iterates
over calls to pci_get_device and similar functions.

This was fixed using the following semantic patch.

// smpl
@@
type T;
identifier d;
expression e;
@@

T *d;
...
while ((d = 
\(pci_get_device\|pci_get_device_reverse\|pci_get_subsys\|pci_get_class\)(..., 
d)) != NULL)
 {... when != pci_dev_put(d)
  when != e = d
(
   return d;
|
+  pci_dev_put(d);
?  return ...;
)
...}
// /smpl

Signed-off-by: Julia Lawall [EMAIL PROTECTED]
---

diff -u -p a/arch/sparc64/kernel/isa.c b/arch/sparc64/kernel/isa.c
--- a/arch/sparc64/kernel/isa.c 2007-08-12 13:27:06.0 +0200
+++ b/arch/sparc64/kernel/isa.c 2007-11-19 08:06:48.0 +0100
@@ -155,6 +155,7 @@ void __init isa_init(void)
isa_br = kzalloc(sizeof(*isa_br), GFP_KERNEL);
if (!isa_br) {
printk(KERN_DEBUG isa: cannot allocate 
sparc_isa_bridge);
+   pci_dev_put(pdev);
return;
}

@@ -168,6 +169,7 @@ void __init isa_init(void)
printk(KERN_DEBUG isa: device registration error for 
%s!\n,
   dp-path_component_name);
kfree(isa_br);
+   pci_dev_put(pdev);
return;
}
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/5] arch/sparc64: Add missing pci_dev_put

2007-11-19 Thread David Miller
From: Julia Lawall [EMAIL PROTECTED]
Date: Mon, 19 Nov 2007 09:02:22 +0100 (CET)

 From: Julia Lawall [EMAIL PROTECTED]
 
 There should be a pci_dev_put when breaking out of a loop that iterates
 over calls to pci_get_device and similar functions.
 ..
 Signed-off-by: Julia Lawall [EMAIL PROTECTED]

Patch applied, but something in your email client adds
extra spaces to the second column of several lines in your
your patch.

Please correct this before making future patch submissions.

Thank you.
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/