Category: Linux

target: remove unneeded array

Author: Julia Lawall <Julia.Lawall@lip6.fr> Delete a local array that is only used to be initialized by memset. A semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; type T; @@ { … when any -T x[…]; } // Signed-off-by: Julia Lawall Signed-off-by: Nicholas Bellinger — drivers/target/target_core_pr.c | 7 ++—– 1 …

Continue reading

[media] tuners: remove uneeded checks before release_firmware()

Author: Markus Elfring <elfring@users.sourceforge.net> The release_firmware() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Mauro Carvalho Chehab — drivers/media/tuners/si2157.c | 3 +– drivers/media/tuners/xc5000.c | 3 +– 2 files changed, 2 …

Continue reading

wusb: replace memset by memzero_explicit

Author: Julia Lawall <Julia.Lawall@lip6.fr> Memset on a local variable may be removed when it is called just before the variable goes out of scope. Using memzero_explicit defeats this optimization. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; type T; @@ { … when any …

Continue reading

crypto: arm – replace memset by memzero_explicit

Author: Julia Lawall <Julia.Lawall@lip6.fr> Memset on a local variable may be removed when it is called just before the variable goes out of scope. Using memzero_explicit defeats this optimization. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; type T; @@ { … when any …

Continue reading

crypto: powerpc – replace memset by memzero_explicit

Author: Julia Lawall <Julia.Lawall@lip6.fr> Memset on a local variable may be removed when it is called just before the variable goes out of scope. Using memzero_explicit defeats this optimization. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; type T; @@ { … when any …

Continue reading

crypto: sha – replace memset by memzero_explicit

Author: Julia Lawall <Julia.Lawall@lip6.fr> Memset on a local variable may be removed when it is called just before the variable goes out of scope. Using memzero_explicit defeats this optimization. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; type T; @@ { … when any …

Continue reading

crypto: sparc – replace memset by memzero_explicit

Author: Julia Lawall <Julia.Lawall@lip6.fr> Memset on a local variable may be removed when it is called just before the variable goes out of scope. Using memzero_explicit defeats this optimization. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; type T; @@ { … when any …

Continue reading

net-PA Semi: Deletion of unnecessary checks before the function call “pci_dev_put”

Author: Markus Elfring <elfring@users.sourceforge.net> The pci_dev_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Olof Johansson Acked-by: Luis R. Rodriguez Signed-off-by: David S. Miller — drivers/net/ethernet/pasemi/pasemi_mac.c | 6 ++—- 1 …

Continue reading

spi/txx9: Deletion of an unnecessary check before the function call “clk_disable”

Author: Markus Elfring <elfring@users.sourceforge.net> The clk_disable() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Mark Brown — drivers/spi/spi-txx9.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff …

Continue reading

net-ipvlan: Deletion of an unnecessary check before the function call “free_percpu”

Author: Markus Elfring <elfring@users.sourceforge.net> The free_percpu() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Mahesh Bandewar Signed-off-by: David S. Miller — drivers/net/ipvlan/ipvlan_main.c | 3 +– 1 file changed, 1 insertion(+), …

Continue reading