Send to:
[EMAIL PROTECTED],
[EMAIL PROTECTED],
linux-kernel@vger.kernel.org,
[EMAIL PROTECTED]
Subject: [PATCH 1/4] drivers/i2c: Drop redundant includes of moduleparam.h
--
From: Julia Lawall [EMAIL PROTECTED]
Drop #include linux
From: Julia Lawall [EMAIL PROTECTED]
Drop #include linux/moduleparam.h in files that also include #include
linux/module.h. module.h includes moduleparam.h already.
The semantic patch implementing this change is as follows:
@ includesmodule @
@@
#include linux/module.h
@ depends
From: Julia Lawall [EMAIL PROTECTED]
Drop #include linux/moduleparam.h in files that also include #include
linux/module.h. module.h includes moduleparam.h already.
The semantic patch implementing this change is as follows:
@ includesmodule @
@@
#include linux/module.h
@ depends
From: Julia Lawall [EMAIL PROTECTED]
Drop #include linux/moduleparam.h in files that also include #include
linux/module.h. module.h includes moduleparam.h already.
The semantic patch implementing this change is as follows:
@ includesmodule @
@@
#include linux/module.h
@ depends
From: Julia Lawall [EMAIL PROTECTED]
Drop #include linux/moduleparam.h in files that also include #include
linux/module.h. module.h includes moduleparam.h already.
i'm not convinced that's a good idea. while module.h does currently
(and unfortunately) include moduleparam.h, there may come
From: Julia Lawall [EMAIL PROTECTED]
Continue is not needed at the bottom of a loop.
The semantic patch implementing this change is as follows:
@@
statement S;
@@
for (...;...;...) {
...
if (...)
- {
S
- continue;
- }
}
Signed-off-by: Julia Lawall [EMAIL PROTECTED]
---
diff -u -p
From: Julia Lawall [EMAIL PROTECTED]
Continue is not needed at the bottom of a loop.
The semantic patch implementing this change is as follows:
@@
statement S;
@@
for (...;...;...) {
...
if (...)
- {
S
- continue;
- }
}
Signed-off-by: Julia Lawall [EMAIL PROTECTED]
---
diff -u -p
From: Julia Lawall [EMAIL PROTECTED]
Continue is not needed at the bottom of a loop.
The semantic patch implementing this change is as follows:
@@
@@
for (...;...;...) {
...
if (...) {
...
- continue;
}
}
Signed-off-by: Julia Lawall [EMAIL PROTECTED]
---
diff -u -p -b -B
From: Julia Lawall [EMAIL PROTECTED]
Continue is not needed at the bottom of a loop.
The semantic patch implementing this change is as follows:
@@
@@
for (...;...;...) {
...
if (...) {
...
- continue;
}
}
Signed-off-by: Julia Lawall [EMAIL PROTECTED]
---
diff -u -p -b -B a/sound
On Wed, 14 Nov 2007, Roland Dreier wrote:
Drop #include linux/moduleparam.h in files that also include #include
linux/module.h. module.h includes moduleparam.h already.
Do we want to make this sort of source code change? I thought that
the consensus about the kernel was that we wanted to
From: Julia Lawall [EMAIL PROTECTED]
pci_get_class implicitly does a pci_dev_put on its second argument, so
pci_dev_put is only needed if there is a break out of the loop.
The semantic match detecting this problem is as follows:
// smpl
@@
expression dev;
expression E;
@@
* pci_dev_put(dev
From: Julia Lawall [EMAIL PROTECTED]
pci_get_class implicitly does a pci_dev_put on its second argument, so
pci_dev_put is only needed if there is a break out of the loop.
The semantic match detecting this problem is as follows:
// smpl
@@
expression dev;
expression E;
@@
* pci_dev_put(dev
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
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.
In this case, the return under the #else case of #ifdef HACKED_PCI_SAVE
should have a pci_dev_put, just as the return in the case
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
@@
identifier d;
type T;
expression e;
iterator for_each_pci_dev;
@@
T *d
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
@@
identifier d;
type T;
expression e;
iterator for_each_pci_dev;
@@
T *d
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.
In this case, the return under the initial if needs a pci_dev_put in the
same way that the return under the subsequent for loop has
From: Julia Lawall [EMAIL PROTECTED]
An extra error handling label is needed for the case where the ioremap has
succeeded.
The problem was detected using the following semantic match
(http://www.emn.fr/x-info/coccinelle/)
// smpl
@@
type T,T1,T2;
identifier E;
statement S;
expression x1,x2
From: Julia Lawall [EMAIL PROTECTED]
The error handling code should undo the ioremap as well.
The problem was detected using the following semantic match
(http://www.emn.fr/x-info/coccinelle/)
// smpl
@@
type T,T1,T2;
identifier E;
statement S;
expression x1,x2;
constant C;
int ret;
@@
T E
From: Julia Lawall [EMAIL PROTECTED]
After using for_each_node_by_name, there is no need for of_node_put unless
there was a break in the loop body, as for_each_node_by_name does a
of_node_put on each of the elements it returns.
This was detected and fixed using the following semantic patch
From: Julia Lawall [EMAIL PROTECTED]
There should be an of_node_put when breaking out of a loop that iterates
using for_each_node_by_type.
This was detected and fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)
// smpl
@@
identifier d;
type T;
expression e
From: Julia Lawall [EMAIL PROTECTED]
There should be an of_node_put when breaking out of a loop that iterates
using for_each_node_by_type.
This was detected and fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)
// smpl
@@
identifier d;
type T;
expression e
From: Julia Lawall [EMAIL PROTECTED]
There should be an of_node_put when breaking out of a loop that iterates
using for_each_compatible_node.
This was detected and fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)
// smpl
@@
identifier d;
type T;
expression e
From: Julia Lawall [EMAIL PROTECTED]
There should be an of_node_put when breaking out of a loop that iterates
over calls to of_find_all_nodes, as this function does an of_node_get on
the value it returns.
This was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle
From: Julia Lawall [EMAIL PROTECTED]
kfree_skb rather than kfree should be used for values of type struct
sk_buff *.
This was fixed using the following semantic patch
(http://www.emn.fr/x-info/coccinelle/).
// smpl
@@
struct sk_buff *skb;
@@
- kfree(skb)
+ kfree_skb(skb)
// /smpl
Signed-off
Please ignore this patch. In the case of btsdio.c, the enclosing function
is used as an interrupt handler, so it should not use kfree_skb either.
julia
On Tue, 20 Nov 2007, Julia Lawall wrote:
From: Julia Lawall [EMAIL PROTECTED]
kfree_skb rather than kfree should be used for values
From: Julia Lawall [EMAIL PROTECTED]
When values of type struct sk_buff * are freed from within an interrupt
handler, dev_kfree_skb_irq should be used rather than kfree or kfree_skb.
In most of the cases below, the function containing the free ends up as a
URB completion callback
From: Julia Lawall [EMAIL PROTECTED]
Recently, Wang Chen submitted a patch
(d30f53aeb31d453a5230f526bea592af07944564) to move a call to netif_rx(skb)
after a subsequent reference to skb, because netif_rx may call kfree_skb on
its argument. The same problem occurs in some other drivers as well
From: Julia Lawall [EMAIL PROTECTED]
Recently, Wang Chen submitted a patch
(d30f53aeb31d453a5230f526bea592af07944564) to move a call to netif_rx(skb)
after a subsequent reference to skb, because netif_rx may call kfree_skb on
its argument. The same problem occurs in some other drivers as well
From: Julia Lawall [EMAIL PROTECTED]
Recently, Wang Chen submitted a patch
(d30f53aeb31d453a5230f526bea592af07944564) to move a call to netif_rx(skb)
after a subsequent reference to skb, because netif_rx may call kfree_skb on
its argument. netif_rx_ni calls netif_rx, so the same problem occurs
// /smpl
diff a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c
diff a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c
Julia, seems that your semantic patch misses following place.
drivers/s390/net/qeth_main.c:2733
...
#endif
rxrc =
From: Julia Lawall [EMAIL PROTECTED]
Recently, Wang Chen submitted a patch
(d30f53aeb31d453a5230f526bea592af07944564) to move a call to netif_rx(skb)
after a subsequent reference to skb, because netif_rx may call kfree_skb on
its argument. The same problem occurs in some other drivers as well
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
On Tue, 25 Dec 2007, YOSHIFUJI Hideaki / µÈÆ£±ÑÌÀ wrote:
In article [EMAIL PROTECTED] (at Mon, 24 Dec 2007 15:28:42 +0100 (CET)),
Julia Lawall [EMAIL PROTECTED] says:
diff -r -u -p a/drivers/infiniband/hw/ipath/ipath_mad.c
b/drivers/infiniband/hw/ipath/ipath_mad.c
--- a/drivers
On Mon, 24 Dec 2007, Andi Kleen wrote:
On Mon, Dec 24, 2007 at 03:23:19PM +0100, Julia Lawall wrote:
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
The old code
Please ignore this patch, in which I have found an error.
julia
On Mon, 24 Dec 2007, Julia Lawall wrote:
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
From: Julia Lawall [EMAIL PROTECTED]
In the patch cc154ac64aa8d3396b187f64cef01ce67f433324, Al Viro observed
that the proper way to compute the distance between two structure fields is
to use offsetof() or a cast to a pointer to character. The same change can
be applied to a few more files
From: Julia Lawall [EMAIL PROTECTED]
In the patch cc154ac64aa8d3396b187f64cef01ce67f433324, Al Viro observed
that the proper way to compute the distance between two structure fields is
to use offsetof() or a cast to a pointer to character. The same change can
be applied to a few more files
From: Julia Lawall [EMAIL PROTECTED]
In the patch cc154ac64aa8d3396b187f64cef01ce67f433324, Al Viro observed
that the proper way to compute the distance between two structure fields is
to use offsetof() or a cast to a pointer to character. The same change can
be applied to a few more files
On Wed, 26 Dec 2007, H. Peter Anvin wrote:
Julia Lawall wrote:
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
More robust, how? You already almost introduced
On Wed, 26 Dec 2007, H. Peter Anvin wrote:
Ray Lee wrote:
On Dec 26, 2007 7:21 AM, Julia Lawall [EMAIL PROTECTED] wrote:
- if (jiffies - ent-last_usage timeout)
+ if (time_before(jiffies, ent-last_usage + timeout))
I don't think this is a safe change
On Wed, 26 Dec 2007, H. Peter Anvin wrote:
Ray Lee wrote:
On Dec 26, 2007 7:21 AM, Julia Lawall [EMAIL PROTECTED] wrote:
- if (jiffies - ent-last_usage timeout)
+ if (time_before(jiffies, ent-last_usage + timeout))
I don't think this is a safe change
On Sun, 30 Dec 2007, Ingo Molnar wrote:
* Julia Lawall [EMAIL PROTECTED] wrote:
On Mon, 24 Dec 2007, Andi Kleen wrote:
On Mon, Dec 24, 2007 at 03:23:19PM +0100, Julia Lawall wrote:
From: Julia Lawall [EMAIL PROTECTED]
The functions time_before, time_before_eq, time_after
On Sun, 30 Dec 2007, Ingo Molnar wrote:
* Julia Lawall [EMAIL PROTECTED] wrote:
your x86 patches (#7, #8 and #9) do not include any *_eq()
comparisons and they all seem to be correct. So picked those three
up into x86.git - let me know if there's any breakage in them that i
From: Julia Lawall [EMAIL PROTECTED]
Of_get_parent and of_find_compatible_node do an of_node_get, and thus a
corresponding of_code_put is needed in the error case.
The problem was found using the following semantic match.
(http://www.emn.fr/x-info/coccinelle/)
// smpl
@@
type T,T1,T2
From: Julia Lawall [EMAIL PROTECTED]
Of_get_parent and of_find_compatible_node do a of_node_get, and thus a
corresponding of_code_put is needed in both the error case and the normal
return case.
The problem was found using the following semantic match.
(http://www.emn.fr/x-info/coccinelle
From: Julia Lawall [EMAIL PROTECTED]
The functions of_find_compatible_node and of_find_node_by_type both call
of_node_get on their result. So any error handling code thereafter should
call of_node_put(np). This is taken care of in the case where there is a goto
out, but not when
From: Julia Lawall [EMAIL PROTECTED]
of_iomap calls ioremap, and so should be matched with an iounmap. At the
two error returns, the result of calling of_iomap is only stored in a local
variable, so these error paths need to call iounmap. Furthermore, this
function ultimately stores the result
From: Julia Lawall [EMAIL PROTECTED]
The function x25_get_neigh increments a reference count. At the point of
the second goto out, the result of calling x25_get_neigh is only stored in
a local variable, and thus no one outside the function will be able to
decrease the reference count. Thus
From: Julia Lawall [EMAIL PROTECTED]
The file drivers/media/video/videodev.c defines both video_device_alloc and
video_device_release. These are essentially just kzmalloc and kfree,
respectively, but it seems better to use video_device_release, as done in
the other media files, rather than kfree
From: Julia Lawall [EMAIL PROTECTED]
Video_device_alloc returns the result of a kzalloc. In this case, the
value is stored in a local variable which is not copied elsewhere before
the point of the error return (video_register_device does not save its
first argument anywhere if it returns
From: Julia Lawall [EMAIL PROTECTED]
The file net/tipc/port.c takes a lock using the function tipc_port_lock and
then releases the lock sometimes using tipc_port_unlock and sometimes using
spin_unlock_bh(p_ptr-publ.lock). tipc_port_unlock simply does the
spin_unlock_bh, but it seems cleaner
From: Julia Lawall [EMAIL PROTECTED]
pci_get_slot does a pci_dev_get, so pci_dev_put needs to be called in an
error case.
An extract of the semantic match used to find the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// smpl
@@
type find1.T,T1,T2;
identifier find1.E;
statement
From: Julia Lawall [EMAIL PROTECTED]
pci_get_slot does a pci_dev_get, so pci_dev_put needs to be called in an
error case
The problem was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)
// smpl
@exists@
type T1,T2;
identifier E;
statement S,S1;
expression x1,x2
From: Julia Lawall [EMAIL PROTECTED]
pci_get_device does a pci_dev_get, so pci_dev_put needs to be called in an
error case
The problem was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)
// smpl
@exists@
type T1,T2;
identifier E;
statement S,S1;
expression x1,x2
From: Julia Lawall [EMAIL PROTECTED]
pci_get_bus_and_slot does a pci_dev_get, so pci_dev_put needs to be called
in an error case.
The problem was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)
// smpl
@exists@
type T1,T2;
identifier E;
statement S,S1
From: Julia Lawall [EMAIL PROTECTED]
The function sockfd_lookup uses fget on the value that is stored in the
file field of the returned structure, so fput should ultimately be applied
to this value. This can be done directly, but it seems better to use the
specific macro sockfd_put, which does
From: Julia Lawall [EMAIL PROTECTED]
A call to cpufreq_cpu_get should be matched by a call to cpufreq_cpu_put.
The problem was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)
// smpl
@@
type T;
identifier E;
expression E1, E2;
int ret;
statement S;
@@
T E
From: Julia Lawall [EMAIL PROTECTED]
posix_acl_clone does a memory allocation and sets a reference count, so
posix_acl_release is needed afterwards to free it.
The problem was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)
// smpl
@@
type T;
identifier E
1 - 100 of 7749 matches
Mail list logo