Category: Linux

gpio/msic: Fix race in installing chained IRQ handler

Author: Thomas Gleixner <tglx@linutronix.de> Fix a race where a pending interrupt could be received and the handler called before the handler’s data has been setup, by converting to irq_set_chained_handler_and_data(). Search and conversion was done with coccinelle: @@ expression E1, E2, E3; @@ ( -if (irq_set_chained_handler(E1, E3) != 0) – BUG(); | -irq_set_chained_handler(E1, E3); ) -irq_set_handler_data(E1, …

Continue reading

gpio/dwapb: Fix race in installing chained IRQ handler

Author: Thomas Gleixner <tglx@linutronix.de> Fix a race where a pending interrupt could be received and the handler called before the handler’s data has been setup, by converting to irq_set_chained_handler_and_data(). Search and conversion was done with coccinelle: @@ expression E1, E2, E3; @@ ( -if (irq_set_chained_handler(E1, E3) != 0) – BUG(); | -irq_set_chained_handler(E1, E3); ) -irq_set_handler_data(E1, …

Continue reading

gpio/bcm-kona: Fix race in installing chained IRQ handler

Author: Thomas Gleixner <tglx@linutronix.de> Fix a race where a pending interrupt could be received and the handler called before the handler’s data has been setup, by converting to irq_set_chained_handler_and_data(). Search and conversion was done with coccinelle: @@ expression E1, E2, E3; @@ ( -if (irq_set_chained_handler(E1, E3) != 0) – BUG(); | -irq_set_chained_handler(E1, E3); ) -irq_set_handler_data(E1, …

Continue reading

Staging: wilc1000: Replace memset with eth_zero_addr

Author: Vaishali Thakkar <vthakkar1994@gmail.com> Use eth_zero_addr to assign the zero address to the given address array instead of memset when second argument is address of zero. The Coccinelle semantic patch that makes this change is as follows: // @eth_zero_addr@ expression e; @@ -memset(e,0x00,ETH_ALEN); +eth_zero_addr(e); // Signed-off-by: Vaishali Thakkar Signed-off-by: Greg Kroah-Hartman — drivers/staging/wilc1000/linux_mon.c | 2 …

Continue reading

staging: lustre: osc: drop trivially useless initialization

Author: Julia Lawall <Julia.Lawall@lip6.fr> Remove initialization of a variable that is immediately reassigned. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ type T; identifier x; constant C; expression e; @@ T x – = C ; x = e; // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/osc/osc_page.c | 2 …

Continue reading

staging: lustre: obdclass: llog: drop trivially useless initialization

Author: Julia Lawall <Julia.Lawall@lip6.fr> Remove initialization of a variable that is immediately reassigned. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ type T; identifier x; constant C; expression e; @@ T x – = C ; x = e; // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/obdclass/llog.c | 2 …

Continue reading

staging: lustre: lmv: drop trivially useless initialization

Author: Julia Lawall <Julia.Lawall@lip6.fr> Remove initialization of a variable that is immediately reassigned. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ type T; identifier x; constant C; expression e; @@ T x – = C ; x = e; // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 …

Continue reading

staging: lustre: llite: drop trivially useless initialization

Author: Julia Lawall <Julia.Lawall@lip6.fr> Remove initialization of a variable that is immediately reassigned. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ type T; identifier x; constant C; expression e; @@ T x – = C ; x = e; // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/llite/file.c | 2 …

Continue reading

staging: lustre: libcfs: drop trivially useless initialization

Author: Julia Lawall <Julia.Lawall@lip6.fr> Remove initialization of a variable that is immediately reassigned. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ type T; identifier x; constant C; expression e; @@ T x – = C ; x = e; // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/libcfs/fail.c | 2 …

Continue reading

staging: lustre: ptlrpc: Use !x to check for kzalloc failure

Author: Julia Lawall <Julia.Lawall@lip6.fr> !x is more normal for kzalloc failure in the kernel. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x; statement S1, S2; @@ x = kzalloc(…); if ( – x == NULL + !x ) S1 else S2 // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman …

Continue reading