Catégorie : Linux

clk: add missing of_node_put

Author: Julia Lawall <Julia.Lawall@lip6.fr> for_each_matching_node_and_match performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // @@ expression e1,e2,e; local idexpression np; @@ for_each_matching_node_and_match(np, e1, e2) { … when != of_node_put(np) when != e …

Lire la suite

staging: dgap: add spaces around binary operator ‘|’

Author: Ioana Ciornei <ciorneiioana@gmail.com> This patch adds spaces around binary operator ‘|’. Done with coccinelle semantic patch: @@ identifier x, y, z; @@ ( – x|y|z + x | y | z | – x|y + x | y ) Signed-off-by: Ioana Ciornei Signed-off-by: Greg Kroah-Hartman — drivers/staging/dgap/dgap.c | 58 ++++++++++++++++++++++———————– 1 file changed, 29 …

Lire la suite

staging: dgap: remove unnecessary brackets

Author: Ioana Ciornei <ciorneiioana@gmail.com> This patch removes unnecessary brackets when dealing with unary operators like ‘&’. Done with coccinelle semantic patch: @@ expression e; @@ ( – &(e) + &e ) Signed-off-by: Ioana Ciornei Signed-off-by: Greg Kroah-Hartman — drivers/staging/dgap/dgap.c | 190 ++++++++++++++++++++++———————- 1 file changed, 95 insertions(+), 95 deletions(-)   diff –git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index …

Lire la suite

staging: dgap: remove unnecessary space after cast

Author: Ioana Ciornei <ciorneiioana@gmail.com> This patch removes unnecessary spaces after the cast. Patch done with coccinelle semantic patch: @rule0@ type t; identifier e; constant c; expression expr; @@ ( – (t) e + (t)e | – (t) c + (t)c | – (t) expr + (t)expr ) Signed-off-by: Ioana Ciornei Signed-off-by: Greg Kroah-Hartman — drivers/staging/dgap/dgap.c …

Lire la suite

Staging: rtl8192u: Eliminate use of MSECS macro

Author: Shraddha Barke <shraddha.6596@gmail.com> Use msecs_to_jiffies instead of driver specific macro MSECS. This is done using Coccinelle and semantic patch used for this is as follows: @@expression t;@@ – MSECS(t) + msecs_to_jiffies(t) Signed-off-by: Shraddha Barke Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8192u/r8192U_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c …

Lire la suite

staging: comedi: Fix return flow

Author: Cristina Moraru <cristina.moraru09@gmail.com> Simplify function return flow. Issue found with coccinelle. Signed-off-by: Cristina Moraru Signed-off-by: Greg Kroah-Hartman — drivers/staging/comedi/drivers/daqboard2000.c | 8 ++—— 1 file changed, 2 insertions(+), 6 deletions(-)   diff –git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c index 611b0a3..57ab668 100644 — a/drivers/staging/comedi/drivers/daqboard2000.c +++ b/drivers/staging/comedi/drivers/daqboard2000.c @@ -713,12 +713,8 @@ static int daqboard2000_auto_attach(struct comedi_device *dev, return result;   s …

Lire la suite

net: hisilicon: fix ptr_ret.cocci warnings

Author: Wu Fengguang <fengguang.wu@intel.com> drivers/net/ethernet/hisilicon/hns/hnae.c:442:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(…)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci CC: Arnd Bergmann Signed-off-by: Fengguang Wu Signed-off-by: David S. Miller — drivers/net/ethernet/hisilicon/hns/hnae.c | 5 +—- 1 file changed, 1 insertion(+), 4 deletions(-)   diff –git a/drivers/net/ethernet/hisilicon/hns/hnae.c b/drivers/net/ethernet/hisilicon/hns/hnae.c index 9d3bb83..b364529 100644 — a/drivers/net/ethernet/hisilicon/hns/hnae.c +++ b/drivers/net/ethernet/hisilicon/hns/hnae.c @@ …

Lire la suite

rtc: isl1208: Pass the IRQF_ONESHOT flag

Author: Fabio Estevam <fabio.estevam@freescale.com> Since commit 1c6c69525b40eb76de8adf039409722015927dc3 (« genirq: Reject bogus threaded irq requests ») threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. So pass the IRQF_ONESHOT flag in this case. The semantic patch that makes this change is available in scripts/coccinelle/misc/irqf_oneshot.cocci Signed-off-by: Fabio Estevam Signed-off-by: Alexandre Belloni …

Lire la suite

stating: gdm724x: remove explicit NULL comparison

Author: Ioana Ciornei <ciorneiioana@gmail.com> This patch converts explicit NULL comparison to its shorter equivalent form. Done with coccinelle semantic patch: @@ expression e; @@ – e == NULL + !e Signed-off-by: Ioana Ciornei Signed-off-by: Greg Kroah-Hartman — drivers/staging/gdm724x/gdm_lte.c | 4 ++– drivers/staging/gdm724x/gdm_mux.c | 4 ++– drivers/staging/gdm724x/gdm_tty.c | 2 +- drivers/staging/gdm724x/gdm_usb.c | 16 ++++++++——– drivers/staging/gdm724x/netlink_k.c | …

Lire la suite

NFC: delete null dereference

Author: Julia Lawall <Julia.Lawall@lip6.fr> The exit label performs device_unlock(&dev->dev);, which will fail when dev is NULL, and nfc_put_device(dev);, which is not useful when dev is NULL, so just exit the function immediately. Problem found using scripts/coccinelle/null/deref_null.cocci Signed-off-by: Julia Lawall Signed-off-by: Samuel Ortiz — net/nfc/netlink.c | 6 ++—- 1 file changed, 2 insertions(+), 4 deletions(-)   …

Lire la suite

BtrLinux
Résumé de la politique de confidentialité

Ce site utilise des cookies afin que nous puissions vous fournir la meilleure expérience utilisateur possible. Les informations sur les cookies sont stockées dans votre navigateur et remplissent des fonctions telles que vous reconnaître lorsque vous revenez sur notre site Web et aider notre équipe à comprendre les sections du site que vous trouvez les plus intéressantes et utiles.