[PATCH 1/4] drivers/i2c: Drop redundant includes of moduleparam.h

2007-11-13 Thread Julia Lawall
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

[PATCH 2/4] drivers/ieee1394: Drop redundant includes of moduleparam.h

2007-11-13 Thread Julia Lawall
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

[PATCH 3/4] drivers/infiniband: Drop redundant includes of moduleparam.h

2007-11-13 Thread Julia Lawall
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

[PATCH 4/4] drivers/input: Drop redundant includes of moduleparam.h

2007-11-13 Thread Julia Lawall
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

Re: [PATCH 1/4] drivers/i2c: Drop redundant includes of moduleparam.h

2007-11-13 Thread Julia Lawall
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

[PATCH 1/4] arch/ia64: Drop unnecessary continue

2007-11-14 Thread Julia Lawall
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

[PATCH 2/4] drivers/net: Drop unnecessary continue

2007-11-14 Thread Julia Lawall
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

[PATCH 3/4] drivers/usb: Drop unnecessary continue

2007-11-14 Thread Julia Lawall
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

[PATCH 4/4] sound/pci: Drop unnecessary continue

2007-11-14 Thread Julia Lawall
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

Re: [PATCH 3/4] drivers/infiniband: Drop redundant includes of moduleparam.h

2007-11-14 Thread Julia Lawall
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

[PATCH 1/2]: drivers/char: remove unnecessary pci_dev_put

2007-11-15 Thread Julia Lawall
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

[PATCH 2/2]: drivers/video: remove unnecessary pci_dev_put

2007-11-15 Thread Julia Lawall
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

[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

[PATCH 2/5] drivers/macintosh/via-pmu.c: 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. 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

[PATCH 3/5] drivers/pci/pci-sysfs.c: 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 @@ identifier d; type T; expression e; iterator for_each_pci_dev; @@ T *d

[PATCH 4/5] drivers/pnp/resource.c: 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 @@ identifier d; type T; expression e; iterator for_each_pci_dev; @@ T *d

[PATCH 5/5] sound/core/memalloc.c: 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. 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

[PATCH 1/2] arch/cris: Added a missing iounmap

2007-11-30 Thread Julia Lawall
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

[PATCH 2/2] drivers/macintosh/via-pmu.c: Added a missing iounmap

2007-11-30 Thread Julia Lawall
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

Subject: [PATCH] arch/powerpc/platforms/powermac: Drop unneeded of_node_put

2007-12-02 Thread Julia Lawall
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

[PATCH 1/3] arch/powerpc: Add missing of_node_put

2007-12-02 Thread Julia Lawall
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

[PATCH 2/3] arch/sparc: Add missing of_node_put

2007-12-02 Thread Julia Lawall
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

[PATCH 3/3] drivers/serial/uartlite.c: Add missing of_node_put

2007-12-02 Thread Julia Lawall
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

[PATCH] arch/powerpc: Add missing of_node_put

2007-12-04 Thread Julia Lawall
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

[PATCH] drivers/bluetooth: Convert kfree to kfree_skb

2007-11-20 Thread Julia Lawall
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

Re: [PATCH] drivers/bluetooth: Convert kfree to kfree_skb

2007-11-21 Thread Julia Lawall
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

[PATCH] drivers/bluetooth: Convert kfree/kfree_skb to dev_kfree_skb_irq

2007-11-21 Thread Julia Lawall
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

[PATCH 1/3] Fix use of skb after netif_rx

2007-12-09 Thread Julia Lawall
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

[PATCH 2/3] Fix use of skb after netif_rx

2007-12-09 Thread Julia Lawall
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

[PATCH 3/3] Fix use of skb after netif_rx

2007-12-09 Thread Julia Lawall
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

Re: [PATCH 3/3] Fix use of skb after netif_rx

2007-12-09 Thread Julia Lawall
// /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 =

[PATCH] s390/net/qeth_main.c: Fix use of skb after netif_rx

2007-12-14 Thread Julia Lawall
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

[PATCH 1/38] arch/alpha: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 2/38] arch/ia64: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 3/38] arch/ia64/sn: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 4/38] arch/parisc: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 5/38] arch/powerpc: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 6/38] arch/sparc64: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 7/38] arch/x86/ia32: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 8/38] arch/x86/kernel/apm_32.c: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 9/38] arch/x86/kernel/io_apic_{64,32}.c: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 10/38] drivers/atm: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 11/38] drivers/char/drm: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 12/38] drivers/char/ds1286.c: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 13/38] drivers/char/keyboard.c: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 14/38] drivers/char/rtc.c: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 15/38] drivers/infiniband: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 16/38] drivers/md: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 17/38] drivers/media/dvb: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 18/38] drivers/media/video: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 19/38] drivers/net/appletalk: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 20/38] drivers/net: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 21/38] drivers/scsi: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 22/38] serial: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 23/38] usb/serial: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 24/38] fs/autofs: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 25/38] fs: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 26/38] init: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 27/38] kernel: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 28/38] mm: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 29/38] net/bluetooth: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 30/38] net/bridge: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 31/38] net/decnet: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 32/38] net/econet: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 33/38] net/ipv4: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 34/38] net/ipv6: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 35/38] net/irda: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 36/38] net/mac80211: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 37/38] net/sctp: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 38/38] sound: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

Re: [PATCH 15/38] drivers/infiniband: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

Re: [PATCH 7/38] arch/x86/ia32: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

Re: [PATCH 1/38] arch/alpha: Use time_before, time_before_eq, etc.

2007-12-24 Thread Julia Lawall
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

[PATCH 1/4] fs/autofs: Use time_before, time_before_eq, etc.

2007-12-26 Thread Julia Lawall
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

[PATCH 2/4] sound/oss: Use time_before, time_before_eq, etc.

2007-12-26 Thread Julia Lawall
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

[PATCH 3/4] drivers/scsi/lpfc: Use time_before, time_before_eq, etc.

2007-12-26 Thread Julia Lawall
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

[PATCH 4/4] drivers/scsi/u14-34f.c: Use time_before, time_before_eq, etc.

2007-12-26 Thread Julia Lawall
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

[PATCH 1/3] arch/x86: Use offsetof

2007-12-26 Thread Julia Lawall
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

[PATCH 3/3] drivers/scsi: Use offsetof

2007-12-26 Thread Julia Lawall
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

[PATCH 2/3] drivers/s390: Use offsetof

2007-12-26 Thread Julia Lawall
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

Re: [PATCH 1/4] fs/autofs: Use time_before, time_before_eq, etc.

2007-12-26 Thread Julia Lawall
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

Re: [PATCH 1/4] fs/autofs: Use time_before, time_before_eq, etc.

2007-12-26 Thread Julia Lawall
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

Re: [PATCH 1/4] fs/autofs: Use time_before, time_before_eq, etc.

2007-12-28 Thread Julia Lawall
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

Re: [PATCH 7/38] arch/x86/ia32: Use time_before, time_before_eq, etc.

2007-12-30 Thread Julia Lawall
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

Re: [PATCH 7/38] arch/x86/ia32: Use time_before, time_before_eq, etc.

2007-12-30 Thread Julia Lawall
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

[PATCH 1/3] arch/powerpc/platforms/pseries: Add missing of_node_put

2008-01-01 Thread Julia Lawall
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

[PATCH 3/3] arch/powerpc/platforms/82xx: Add missing of_node_put

2008-01-01 Thread Julia Lawall
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

[PATCH 2/3] arch/powerpc/sysdev: Add missing of_node_put

2008-01-01 Thread Julia Lawall
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

[PATCH] drivers/pcmcia: Add missing iounmap

2008-01-01 Thread Julia Lawall
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

[PATCH] net/x25: Add missing x25_neigh_put

2008-01-01 Thread Julia Lawall
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

[PATCH 1/2] drivers/media/radio: Use video_device_release rather than kfree

2008-01-01 Thread Julia Lawall
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

[PATCH 2/2] drivers/media/common: Add missing video_device_release

2008-01-01 Thread Julia Lawall
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

/net/tipc/port.c: Use tipc_port_unlock

2008-01-04 Thread Julia Lawall
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

[PATCH] drivers/pcmcia: Add missing pci_dev_get

2008-01-04 Thread Julia Lawall
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

[PATCH] drivers/char/agp: Add missing pci_dev_get

2008-01-04 Thread Julia Lawall
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

[PATCH] drivers/video: Add missing pci_dev_get

2008-01-04 Thread Julia Lawall
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

[PATCH] drivers/macintosh: Add missing pci_dev_get

2008-01-04 Thread Julia Lawall
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

[PATCH] /net/bluetooth: Use sockfd_put

2008-01-06 Thread Julia Lawall
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

[PATCH] drivers/cpufreq: Add calls to cpufreq_cpu_put

2008-01-06 Thread Julia Lawall
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

[PATCH] fs/jffs2: Add missing call to posix_acl_release

2008-01-06 Thread Julia Lawall
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   2   3   4   5   6   7   8   9   10   >