- 19 2月, 2016 5 次提交
-
-
由 Vaishali Thakkar 提交于
Use the timer API function setup_timer instead of structure field assignments to initialize a timer. Signed-off-by: NVaishali Thakkar <vaishali.thakkar@oracle.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.com>
-
由 Julia Lawall 提交于
Rule r is only use in org or report mode, so only execute it in those cases. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.com>
-
由 Julia Lawall 提交于
Rule r is only used in org or report mode, so only execute it in those cases. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.com>
-
由 Julia Lawall 提交于
Rule r is only use in org or report mode, so only execute it in those cases. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.com>
-
由 Julia Lawall 提交于
Rule r is only use in org or report mode, so only execute it in those cases. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.com>
-
- 18 2月, 2016 1 次提交
-
-
由 Julia Lawall 提交于
& is no longer allowed in column 0, since Coccinelle 1.0.4. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Tested-by: NNishanth Menon <nm@ti.com> Cc: stable@vger.kernel.org Signed-off-by: NMichal Marek <mmarek@suse.com>
-
- 13 1月, 2016 1 次提交
-
-
由 Andrzej Hajda 提交于
Unsigned expressions cannot be lesser than zero. Presence of comparisons 'unsigned (<|<=|>|>=) 0' often indicates a bug, usually wrong type of variable. The patch beside finding such comparisons tries to eliminate false positives, mainly by bypassing range checks. gcc can detect such comparisons also using -Wtype-limits switch, but it warns also in correct cases, making too much noise. Signed-off-by: NAndrzej Hajda <a.hajda@samsung.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.com>
-
- 27 10月, 2015 8 次提交
-
-
由 Daniel Granat 提交于
Extend checking on tables containing structures which are initialized without specifying member name. Added new tables for checking: i2c_device_id and platform_device_id. Signed-off-by: NDaniel Granat <d.granat@samsung.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
由 Julia Lawall 提交于
Extend ifnullfree to the various destroy functions that were recently extended to tolerate NULL arguments. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
由 Julia Lawall 提交于
Adjust tests to compare against NULL, to match cases that explicitly make that comparison. Remove removal and re-addition of freeing functions. Add position variable on usb_free_urb in the non-patch case. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
由 Julia Lawall 提交于
Device node iterators perform an of_node_put on each iteration, so putting an of_node_put before a continue results in a double put. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
由 Julia Lawall 提交于
Fix a couple spelling mistakes. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
由 Johan Hovold 提交于
This effectively reverts 932058a5 ("coccinelle: misc: semantic patch to delete overly complex return code processing"). There can be both symmetry and readability reasons for not wanting to do the final function call as part of the return statement and to maintain a clear separation of success and error paths. Since this is in no way mandated by the coding standard, let's just remove this semantic patch to avoid having "clean up" patches being posted over and over in response to these Coccinelle warnings. Signed-off-by: NJohan Hovold <johan@kernel.org> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
由 Julia Lawall 提交于
The original version only considered the case where the then branch contains only one call to PTR_ERR. Reimplement the whole thing to allow multiple calls, with potentially different arguments. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
由 Julia Lawall 提交于
Move constants to the right in binary operators. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.com>
-
- 09 9月, 2015 1 次提交
-
-
由 Sean O. Stalley 提交于
add [pci|dma]_pool_zalloc coccinelle check. replaces instances of [pci|dma]_pool_alloc() followed by memset(0) with [pci|dma]_pool_zalloc(). Signed-off-by: NSean O. Stalley <sean.stalley@intel.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Cc: Vinod Koul <vinod.koul@intel.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Gilles Muller <Gilles.Muller@lip6.fr> Cc: Nicolas Palix <nicolas.palix@imag.fr> Cc: Michal Marek <mmarek@suse.cz> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 19 8月, 2015 1 次提交
-
-
由 Krzysztof Kozlowski 提交于
i2c_add_driver (through i2c_register_driver) sets the owner field so we can drop it also from i2c drivers, just like from platform drivers. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.com>
-
- 03 6月, 2015 1 次提交
-
-
由 Fabio Estevam 提交于
Insert a blank line in order to improve the readability of the generated patch and also make it consistent with the other .cocci files. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
- 25 5月, 2015 1 次提交
-
-
由 Fabio Estevam 提交于
Improve the commit log of the generated patch by mentioning the commit log that makes threaded IRQs without a primary handler to be requested with the IRQF_ONESHOT flag. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked- by: Valentin Rothberg <valentinrothberg@gmail.com> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
- 21 5月, 2015 3 次提交
-
-
由 Dmitry Kalinkin 提交于
This semantic patch replaces explicit computations of vma page count with explicit function call. Signed-off-by: NDmitry Kalinkin <dmitry.kalinkin@gmail.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
由 Fabio Estevam 提交于
Correct form is 'always requested'. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
由 Fabio Estevam 提交于
According to Documentation/SubmittingPatches: "Describe your changes in imperative mood, e.g. "make xyzzy do frotz" instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy to do frotz", as if you are giving orders to the codebase to change its behaviour. So do as recommended. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
- 20 5月, 2015 4 次提交
-
-
由 Fabio Estevam 提交于
According to Documentation/SubmittingPatches: "Describe your changes in imperative mood, e.g. "make xyzzy do frotz" instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy to do frotz", as if you are giving orders to the codebase to change its behaviour." So do as recommended. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
由 Fabio Estevam 提交于
Make the sentence sensible. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
由 Fabio Estevam 提交于
According to Documentation/SubmittingPatches: "Describe your changes in imperative mood, e.g. "make xyzzy do frotz" instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy to do frotz", as if you are giving orders to the codebase to change its behaviour." So do as recommended. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
由 Fabio Estevam 提交于
Insert a blank line in order to improve the readability of the generated patch and also make it consistent with the other .cocci files. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
- 15 4月, 2015 2 次提交
-
-
由 Fabian Frederick 提交于
if()/BUG conversion to BUG_ON must be avoided when there's side effect in condition. The reason being BUG_ON won't execute the condition when CONFIG_BUG is not defined. Inspired-by: NJ. Bruce Fields <bfields@fieldses.org> Suggested-by: NJulia Lawall <Julia.Lawall@lip6.fr> Acked-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NFabian Frederick <fabf@skynet.be> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
由 Fabian Frederick 提交于
if()/BUG conversion to BUG_ON must be avoided when there's side effect in condition. The reason being BUG_ON won't execute the condition when CONFIG_BUG is not defined. With inspiration from Bruce Fields. Signed-off-by: NFabian Frederick <fabf@skynet.be> Suggested-by: NJulia Lawall <Julia.Lawall@lip6.fr> Acked-by: NJulia Lawall <Julia.Lawall@lip6.fr> Cc: J. Bruce Fields <bfields@fieldses.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 25 3月, 2015 1 次提交
-
-
由 Valentin Rothberg 提交于
Since commit 1c6c6952 ("genirq: Reject bogus threaded irq requests") threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. Until now, this coccinelle script only checked request_threaded_irq(). However, the counterpart devm function (see kernel/irq/devres.c) is also affected by the missing flag which can be detected with this patch. Signed-off-by: NValentin Rothberg <valentinrothberg@gmail.com> Signed-off-by: NPeter Senna Tschudin <peter.senna@gmail.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
- 25 11月, 2014 1 次提交
-
-
由 Mauro Carvalho Chehab 提交于
The comma after --no-includes makes coccinelle to not run the script: /usr/bin/spatch -D report --very-quiet --no-show-diff --cocci-file ./scripts/coccinelle/misc/bugon.cocci --no-includes, --include-headers --patch . --dir drivers/media/platform/coda/ -I ./arch/x86/include -I arch/x86/include/generated -I include -I ./arch/x86/include/uapi -I arch/x86/include/generated/uapi -I ./include/uapi -I include/generated/uapi -I ./include/linux/kconfig.h Usage: spatch.opt --sp-file <SP> <infile> [-o <outfile>] [--iso-file <iso>] [options] Options are: --sp-file <file> the semantic patch file -o <file> the output file --in-place do the modification on the file directly --backup-suffix suffix to use when making a backup for inplace ... At least with Fedora 20 coccinelle package: coccinelle-1.0.0-0.rc20.1.fc21.x86_64 Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Tested-by: NWolfram Sang <wsa@the-dreams.de> Fixes: 5be1df66 (Coccinelle: Script to replace if and BUG with BUG_ON) Cc: stable@vger.kernel.org Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
- 07 11月, 2014 1 次提交
-
-
由 Wolfram Sang 提交于
There are calls which silently set the owner of a module. This is the preferred way [1], so avoid setting it manually. Currently, we only care about platform drivers, but there might be more calls to be added later. [1] https://lkml.org/lkml/2014/10/12/87Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 26 9月, 2014 1 次提交
-
-
由 Julia Lawall 提交于
This semantic patch simplifies cases where the effect of the processing of a function call's return code is just to return the result of the function directly. It may also delete a local return flag variable, if this is no longer used. This was proposed by Uwe Kleine-König. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
- 09 8月, 2014 2 次提交
-
-
由 Fabian Frederick 提交于
All coccinelle scripts have a copyright in the header. Signed-off-by: NFabian Frederick <fabf@skynet.be> Suggested-by: NJulia Lawall <Julia.Lawall@lip6.fr> Acked-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Fabian Frederick 提交于
Warns or generates patch for NULL check before the following functions: kfree usb_free_urb debugfs_remove debugfs_remove_recursive Signed-off-by: NFabian Frederick <fabf@skynet.be> Acked-by: NJulia Lawall <Julia.Lawall@lip6.fr> Cc: Gilles Muller <Gilles.Muller@lip6.fr> Cc: Joe Perches <joe@perches.com> Cc: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 06 8月, 2014 5 次提交
-
-
由 Himangi Saraogi 提交于
This script detects cases where BUG() follows an if condition on an expression and replaces the if condition and BUG() with a BUG_ON having the conditional expression of the if statement as argument. Signed-off-by: NHimangi Saraogi <himangi774@gmail.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
由 Himangi Saraogi 提交于
This makes an effort to find cases where the argument to sizeof is wrong in memory allocation functions by checking the type of the allocated memory when it is a double pointer and ensuring the sizeof argument takes a pointer to the the memory being allocated. There are false positives in cases the sizeof argument is not used in constructing the return value. Signed-off-by: NHimangi Saraogi <himangi774@gmail.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
由 Himangi Saraogi 提交于
This script detects cases where ARRAY_SIZE can be used such as where there is a division of sizeof the array by the sizeof its first element or by any indexed element or the element type. It replaces the division of the two sizeofs by ARRAY_SIZE. Signed-off-by: NHimangi Saraogi <himangi774@gmail.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
由 Himangi Saraogi 提交于
This script detects cases of use of cast for the value returned by kmalloc, kzalloc, kcalloc, kmem_cache_alloc, kmem_cache_zalloc, kmem_cache_alloc_node, kmalloc_node and kzalloc_node and removes the cast as it is not useful. This Coccinelle script replaces drop_kmalloc_cast.cocci as it removes the casting in more limited cases of kmalloc, kzalloc and kcalloc. Signed-off-by: NHimangi Saraogi <himangi774@gmail.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
由 Himangi Saraogi 提交于
This patch solves the parse-error by adding @@ . This is necessary since Coccinelle version 1.0.0-rc20. Also, the comment is added to use a recent version of Coccinelle. Signed-off-by: NHimangi Saraogi <himangi774@gmail.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
- 20 6月, 2014 1 次提交
-
-
由 Jingoo Han 提交于
devm_request_and_ioremap() was obsoleted by the commit 75096579 ("lib: devres: Introduce devm_ioremap_resource()") and has been deprecated for a long time. So, let's remove this function. In addition, all usages of devm_request_and_ioremap() are also removed. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-