Quentin LAMBERT

Author's posts

USB: storage: ene_ub6250: Use kmemdup instead of kmalloc + memcpy

Author: Benoit Taine <benoit.taine@lip6.fr> This issue was reported by coccicheck using the semantic patch at scripts/coccinelle/api/memdup.cocci Signed-off-by: Benoit Taine Signed-off-by: Greg Kroah-Hartman — drivers/usb/storage/ene_ub6250.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff –git a/drivers/usb/storage/ene_ub6250.c b/drivers/usb/storage/ene_ub6250.c index 1bfc9a6..ef6efb5 100644 — a/drivers/usb/storage/ene_ub6250.c +++ b/drivers/usb/storage/ene_ub6250.c @@ -1928,11 +1928,10 @@ static int ene_load_bincode(struct us_data *us, …

Continue reading

drivers/staging: Remove useless return variables

Author: Peter Senna Tschudin <peter.senna@gmail.com> This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that find and fixes this issue is: // @@ type T; constant C; identifier …

Continue reading

video: msm: Introduce the use of the managed version of kzalloc

Author: Himangi Saraogi <himangi774@gmail.com> This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary kfrees in probe and remove functions. Also, linux/device.h is added to make sure the devm_*() routine declarations are unambiguously available. The function mddi_dummy_remove is removed as it is no longer required after removing the …

Continue reading

ix86/mid/thermal: Introduce the use of the managed version of kzalloc

Author: Himangi Saraogi <himangi774@gmail.com> This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary kfrees in probe and remove functions. The following Coccinelle semantic patch was used for making the change: @platform@ identifier p, probefn, removefn; @@ struct platform_driver p = { .probe = probefn, .remove = removefn, …

Continue reading

staging: rtl8712: remove _malloc()

Author: Vitaly Osipov <vitaly.osipov@gmail.com> This patch removes all usage of _malloc() and the function itself. Most uses are straightforward replacements by kmalloc(…, GFP_ATOMIC), because this was the definition of _malloc(). In a few places it was possible to use kzalloc() or memdup_user. A further improvement would be to replace GFP_ATOMIC with GFP_KERNEL where possible. Verified …

Continue reading

mtd: bf5xx_nand: use the managed version of kzalloc

Author: Himangi Saraogi <himangi774@gmail.com> This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary kfrees in probe and remove functions. Also, the now unnecessary label out_err_hw_init is done away with and the label out_err_kzalloc is renamed to out_err. The following Coccinelle semantic patch was used for making the …

Continue reading

ALSA: Replace DEFINE_PCI_DEVICE_TABLE macro use

Author: Benoit Taine <benoit.taine@lip6.fr> We should prefer `const struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding style guidelines. This issue was reported by checkpatch. A simplified version of the semantic patch that makes this change is as follows (http://coccinelle.lip6.fr/): // @@ identifier i; declarer name DEFINE_PCI_DEVICE_TABLE; initializer z; @@ – DEFINE_PCI_DEVICE_TABLE(i) + const struct pci_device_id …

Continue reading

nfsd: Remove assignments inside conditions

Author: Benoit Taine <benoit.taine@lip6.fr> Assignments should not happen inside an if conditional, but in the line before. This issue was reported by checkpatch. The semantic patch that makes this change is as follows (http://coccinelle.lip6.fr/): // @@ identifier i1; expression e1; statement S; @@ -if(!(i1 = e1)) S +i1 = e1; +if(!i1) +S // It has …

Continue reading

drm/i915: Split the ringbuffers from the rings (3/3)

Author: Oscar Mateo <oscar.mateo@intel.com> Manual cleanup after the previous Coccinelle script. Yes, I could write another Coccinelle script to do this but I don’t want labor-replacing robots making an honest programmer’s work obsolete (also, I’m lazy). Signed-off-by: Oscar Mateo Signed-off-by: Daniel Vetter — drivers/gpu/drm/i915/i915_dma.c | 13 ++– drivers/gpu/drm/i915/i915_irq.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 109 +++++++++++++++++————— …

Continue reading

drm/i915: Split the ringbuffers from the rings (2/3)

Author: Oscar Mateo <oscar.mateo@intel.com> This refactoring has been performed using the following Coccinelle semantic script: @@ struct intel_engine_cs r; @@ ( – (r).obj + r.buffer->obj | – (r).virtual_start + r.buffer->virtual_start | – (r).head + r.buffer->head | – (r).tail + r.buffer->tail | – (r).space + r.buffer->space | – (r).size + r.buffer->size | – (r).effective_size + r.buffer->effective_size …

Continue reading

BtrLinux
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.