Author: Julia Lawall <julia@diku.dk> Delete successive assignments to the same location. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression i; @@ *i = …; i = …; // Signed-off-by: Julia Lawall Signed-off-by: Matthew Garrett — drivers/platform/x86/thinkpad_acpi.c | 1 – 1 file changed, 1 deletion(-) …
Catégorie : Linux
Oct 26 2010
drivers/staging/brcm80211/brcmfmac/dhd_linux.c: delete double assignment
Author: Julia Lawall <julia@diku.dk> Delete successive assignments to the same location. dhd_ops_virt contains a subset of the definitions of dhd_ops_pri. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression i; @@ *i = …; i = …; // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/brcm80211/brcmfmac/dhd_linux.c …
Oct 26 2010
drivers/vhost/vhost.c: delete double assignment
Author: Julia Lawall <julia@diku.dk> Delete successive assignments to the same location. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression i; @@ *i = …; i = …; // Signed-off-by: Julia Lawall Signed-off-by: Michael S. Tsirkin — drivers/vhost/vhost.c | 1 – 1 file changed, 1 deletion(-) …
Oct 26 2010
USB: gadget: amd5536udc.c: delete double assignment
Author: Julia Lawall <julia@diku.dk> Delete successive assignments to the same location. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression i; @@ *i = …; i = …; // Signed-off-by: Julia Lawall Acked-by: Thomas Dahlmann Signed-off-by: Greg Kroah-Hartman — drivers/usb/gadget/amd5536udc.c | 1 – 1 file changed, …
Oct 26 2010
drivers/staging: delete double assignment
Author: Julia Lawall <julia@diku.dk> Delete successive assignments to the same location. In three of the cases, the two assignments are identical. In the case of the file rt2860/common/cmm_aes.c, the assigned variable i is never used, so both assignments are dropped. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) …
Oct 26 2010
drivers/isdn: delete double assignment
Author: Julia Lawall <julia@diku.dk> Delete successive assignments to the same location. In the first case, the hscx array has two elements, so change the assignment to initialize the second one. In the second case, the two assignments are simply identical. Furthermore, neither is necessary, because the effect of the assignment is only visible in the …
Oct 26 2010
drivers/net/typhoon.c: delete double assignment
Author: Julia Lawall <julia@diku.dk> Delete successive assignments to the same location. The current definition does not initialize the respRing structure, which has the same type as the cmdRing structure, so initialize that one instead. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression i; @@ *i …
Oct 26 2010
drivers/net/sb1000.c: delete double assignment
Author: Julia Lawall <julia@diku.dk> The other code around these duplicated assignments initializes the 0 1 2 and 3 elements of an array, so change the initialization of the rx_session_id array to do the same. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression i; @@ *i …
Oct 24 2010
i2c-amd8111: Add proper error handling
Author: Julia Lawall <julia@diku.dk> The functions the functions amd_ec_wait_write and amd_ec_wait_read have an unsigned return type, but return a negative constant to indicate an error condition. A sematic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @exists@ identifier f; constant C; @@ unsigned f(…) { } // Fixing amd_ec_wait_write and amd_ec_wait_read leads to …
Oct 21 2010
drivers/char/agp/parisc-agp.c: eliminate memory leak
Author: Julia Lawall <julia@diku.dk> alloc_pci_dev allocates some memory, so that memory should be freed before leaving the function in an error case. A simplified version of the semantic match that finds this problem is: (http://coccinelle.lip6.fr/) // @r exists@ local idexpression x; expression E; identifier f1; iterator I; @@ x = alloc_pci_dev(…); f1 ) …> * …