PTR_RET is now PTR_ERR_OR_ZERO(): Replace most.Sweep of the simple cases.Cc: netdev@vger.kernel.orgCc: linuxppc-dev@lists.ozlabs.orgCc: linux-arm-kernel@lists.infradead.orgCc: Julia Lawall <ju
PTR_RET is now PTR_ERR_OR_ZERO(): Replace most.Sweep of the simple cases.Cc: netdev@vger.kernel.orgCc: linuxppc-dev@lists.ozlabs.orgCc: linux-arm-kernel@lists.infradead.orgCc: Julia Lawall <julia.lawall@lip6.fr>Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>Acked-by: David S. Miller <davem@davemloft.net>Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
show more ...
Coccinelle: Update the options used to the new option schemespatch has changed its option scheme.E.g., --no_show_diff is now --no-show-diffThis patch updates: - scripts/coccicheck - Semantic p
Coccinelle: Update the options used to the new option schemespatch has changed its option scheme.E.g., --no_show_diff is now --no-show-diffThis patch updates: - scripts/coccicheck - Semantic patches under scripts/coccinelle/Signed-off-by: Nicolas Palix <nicolas.palix@imag.fr>Signed-off-by: Michal Marek <mmarek@suse.cz>
lib: devres: Introduce devm_ioremap_resource()The devm_request_and_ioremap() function is very useful and helps avoid awhole lot of boilerplate. However, one issue that keeps popping up isits lack
lib: devres: Introduce devm_ioremap_resource()The devm_request_and_ioremap() function is very useful and helps avoid awhole lot of boilerplate. However, one issue that keeps popping up isits lack of a specific error code to determine which of the steps thatit performs failed. Furthermore, while the function gives an example andsuggests what error code to return on failure, a wide variety of errorcodes are used throughout the tree.In an attempt to fix these problems, this patch adds a new function thatdrivers can transition to. The devm_ioremap_resource() returns a pointerto the remapped I/O memory on success or an ERR_PTR() encoded error codeon failure. Callers can check for failure using IS_ERR() and determineits cause by extracting the error code using PTR_ERR().devm_request_and_ioremap() is implemented as a wrapper around the newAPI and return NULL on failure as before. This ensures that backwardscompatibility is maintained until all users have been converted to thenew API, at which point the old devm_request_and_ioremap() functionshould be removed.A semantic patch is included which can be used to convert from the olddevm_request_and_ioremap() API to the new devm_ioremap_resource() API.Some non-trivial cases may require manual intervention, though.Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>Cc: Arnd Bergmann <arnd@arndb.de>Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Coccinelle: add api/d_find_alias.cocciEnsure that calls to d_find_alias() have a corresponding dput().Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>Cc: Julia Lawall <Julia.Lawall@lip6.fr>Cc
Coccinelle: add api/d_find_alias.cocciEnsure that calls to d_find_alias() have a corresponding dput().Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>Cc: Julia Lawall <Julia.Lawall@lip6.fr>Cc: Gilles Muller <Gilles.Muller@lip6.fr>Cc: Nicolas Palix <nicolas.palix@imag.fr>Signed-off-by: Andrew Morton <akpm@linux-foundation.org>Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuildPull kbuild misc changes from Michal Marek: "In the non-critical part of kbuild, I have - Some make coccicheck
Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuildPull kbuild misc changes from Michal Marek: "In the non-critical part of kbuild, I have - Some make coccicheck improvements and two new tests - Support for a cleaner html output in scripts/kernel-doc, named html5 (no, it does not play videos, yet) BTW, Randy wants to route further kernel-doc patches through the kbuild tree."* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: Update SmPL/Coccinelle section of MAINTAINERS coccicheck: Add the rep+ctxt mode scripts/coccinelle/tests/odd_ptr_err.cocci: semantic patch for IS_ERR/PTR_ERR inconsistency scripts/tags.sh: Add magic for pci access functions scripts/coccinelle: ptr_ret: Add ternary operator version scripts/kernel-doc: drop maintainer scripts/kernel-doc: added support for html5
Coccinelle: fix typo in memdup_user.cocciSigned-off-by: Fengguang Wu <fengguang.wu@intel.com>Signed-off-by: Jiri Kosina <jkosina@suse.cz>
scripts/coccinelle: ptr_ret: Add ternary operator versionAdd a ternary operator version of the open-coded PTR_RET().Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>Signed-off-by: Julia Lawall
scripts/coccinelle: ptr_ret: Add ternary operator versionAdd a ternary operator version of the open-coded PTR_RET().Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>Signed-off-by: Michal Marek <mmarek@suse.cz>
Merge branch 'akpm' (Andrew's patch-bomb)Merge batch of fixes from Andrew Morton: "The simple_open() cleanup was held back while I wanted for laggards to merge things. I still need to send a
Merge branch 'akpm' (Andrew's patch-bomb)Merge batch of fixes from Andrew Morton: "The simple_open() cleanup was held back while I wanted for laggards to merge things. I still need to send a few checkpoint/restore patches. I've been wobbly about merging them because I'm wobbly about the overall prospects for success of the project. But after speaking with Pavel at the LSF conference, it sounds like they're further toward completion than I feared - apparently davem is at the "has stopped complaining" stage regarding the net changes. So I need to go back and re-review those patchs and their (lengthy) discussion."* emailed from Andrew Morton <akpm@linux-foundation.org>: (16 patches) memcg swap: use mem_cgroup_uncharge_swap fix backlight: add driver for DA9052/53 PMIC v1 C6X: use set_current_blocked() and block_sigmask() MAINTAINERS: add entry for sparse checker MAINTAINERS: fix REMOTEPROC F: typo alpha: use set_current_blocked() and block_sigmask() simple_open: automatically convert to simple_open() scripts/coccinelle/api/simple_open.cocci: semantic patch for simple_open() libfs: add simple_open() hugetlbfs: remove unregister_filesystem() when initializing module drivers/rtc/rtc-88pm860x.c: fix rtc irq enable callback fs/xattr.c:setxattr(): improve handling of allocation failures fs/xattr.c:listxattr(): fall back to vmalloc() if kmalloc() failed fs/xattr.c: suppress page allocation failure warnings from sys_listxattr() sysrq: use SEND_SIG_FORCED instead of force_sig() proc: fix mount -t proc -o AAA
scripts/coccinelle/api/simple_open.cocci: semantic patch for simple_open()Find instances of an open-coded simple_open() and replace them withcalls to simple_open().Signed-off-by: Julia Lawall <J
scripts/coccinelle/api/simple_open.cocci: semantic patch for simple_open()Find instances of an open-coded simple_open() and replace them withcalls to simple_open().Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>Reported-by: Stephen Boyd <sboyd@codeaurora.org>Signed-off-by: Andrew Morton <akpm@linux-foundation.org>Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/coccinelle/api/ptr_ret.cocci: semantic patch for ptr_errSigned-off-by: Julia Lawall <Julia.Lawall@lip6.fr>Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/coccinelle: improve the coverage of some semantic patchesThis patch ensures that all semantic patches in the scripts/coccinelledirectory provide the report option. Report messages that in
scripts/coccinelle: improve the coverage of some semantic patchesThis patch ensures that all semantic patches in the scripts/coccinelledirectory provide the report option. Report messages that include linenumbers now have the line number preceded by "line" for easier subsequentprocessing.Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>Signed-off-by: Michal Marek <mmarek@suse.cz>
coccinelle: semantic patches related to devm_ functions (part 1)devm_ functions allocate memory that is to remain allocated until thedevice is detached. This patch checks for opportunities for us
coccinelle: semantic patches related to devm_ functions (part 1)devm_ functions allocate memory that is to remain allocated until thedevice is detached. This patch checks for opportunities for using thefunction devm_request_and_ioremap.Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>Signed-off-by: Michal Marek <mmarek@suse.cz>
Coccinelle: Move alloc directory into api directoryalloc contains various semantic patches relatedto the allocation APIsSigned-off-by: Nicolas Palix <npalix@diku.dk>Signed-off-by: Julia Lawall
Coccinelle: Move alloc directory into api directoryalloc contains various semantic patches relatedto the allocation APIsSigned-off-by: Nicolas Palix <npalix@diku.dk>Signed-off-by: Julia Lawall <julia@diku.dk>Signed-off-by: Michal Marek <mmarek@suse.cz>
Coccinelle: Move resource_size.cocci to the api directorySigned-off-by: Nicolas Palix <npalix@diku.dk>Signed-off-by: Julia Lawall <julia@diku.dk>Signed-off-by: Michal Marek <mmarek@suse.cz>
Coccinelle: Move err_cast.cocci to the api directorySigned-off-by: Nicolas Palix <npalix@diku.dk>Signed-off-by: Julia Lawall <julia@diku.dk>Signed-off-by: Michal Marek <mmarek@suse.cz>
Coccinelle: Add api/memdup_userUse kmemdup_user rather than duplicating its implementationThis is a little bit restricted to reduce false positivesSigned-off-by: Nicolas Palix <npalix@diku.dk>S
Coccinelle: Add api/memdup_userUse kmemdup_user rather than duplicating its implementationThis is a little bit restricted to reduce false positivesSigned-off-by: Nicolas Palix <npalix@diku.dk>Signed-off-by: Julia Lawall <julia@diku.dk>Signed-off-by: Michal Marek <mmarek@suse.cz>
Coccinelle: Add api/memdup.cocciUse kmemdup rather than duplicating its implementationSigned-off-by: Nicolas Palix <npalix@diku.dk>Signed-off-by: Julia Lawall <julia@diku.dk>Signed-off-by: Mich
Coccinelle: Add api/memdup.cocciUse kmemdup rather than duplicating its implementationSigned-off-by: Nicolas Palix <npalix@diku.dk>Signed-off-by: Julia Lawall <julia@diku.dk>Signed-off-by: Michal Marek <mmarek@suse.cz>
Coccinelle: Add api/kstrdup.cocciUse kstrdup rather than duplicating its implementationSigned-off-by: Nicolas Palix <npalix@diku.dk>Signed-off-by: Julia Lawall <julia@diku.dk>Signed-off-by: Mic
Coccinelle: Add api/kstrdup.cocciUse kstrdup rather than duplicating its implementationSigned-off-by: Nicolas Palix <npalix@diku.dk>Signed-off-by: Julia Lawall <julia@diku.dk>Signed-off-by: Michal Marek <mmarek@suse.cz>
12345