Catégorie : Linux

drm/nouveau/fuse/gm107: simplify the return logic

Author: Martin Peres <martin.peres@free.fr> Spotted by coccinelle: drivers/gpu/drm/nouveau/core/subdev/fuse/gm107.c:50:5-8: WARNING: end returns can be simpified Signed-off-by: Martin Peres Reviewed-by: Tobias Klausmann Signed-off-by: Ben Skeggs — drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gm107.c | 4 +— 1 file changed, 1 insertion(+), 3 deletions(-)   diff –git a/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gm107.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gm107.c index ba19158..0b256aa 100644 — a/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gm107.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gm107.c @@ -45,10 +45,8 @@ gm107_fuse_ctor(struct nvkm_object *parent, struct …

Lire la suite

mmc: sdhci: host: fix odd_ptr_err.cocci warnings

Author: Wu Fengguang <fengguang.wu@intel.com> drivers/mmc/host/sdhci_f_sdh30.c:143:5-11: inconsistent IS_ERR and PTR_ERR, PTR_ERR on line 144 PTR_ERR should access the value just tested by IS_ERR Semantic patch information: There can be false positives in the patch case, where it is the call IS_ERR that is wrong. Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci CC: Vincent Yang Signed-off-by: Fengguang Wu Signed-off-by: Ulf Hansson …

Lire la suite

power: max77693: fix platform_no_drv_owner.cocci warnings

Author: kbuild test robot <fengguang.wu@intel.com> drivers/power/max77693_charger.c:747:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Krzysztof Kozlowski Signed-off-by: Fengguang Wu Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel — drivers/power/max77693_charger.c | 1 – 1 file changed, 1 deletion(-)   diff …

Lire la suite

power: max77693: fix simple_return.cocci warnings

Author: kbuild test robot <fengguang.wu@intel.com> drivers/power/max77693_charger.c:615:1-4: WARNING: end returns can be simpified Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci CC: Krzysztof Kozlowski Signed-off-by: Fengguang Wu Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel — drivers/power/max77693_charger.c | 6 +—– 1 file changed, 1 insertion(+), 5 deletions(-)   diff –git a/drivers/power/max77693_charger.c …

Lire la suite

brcmfmac: Use put_unaligned_le32

Author: Vaishali Thakkar <vthakkar1994@gmail.com> This patch introduces the use of function put_unaligned_le32. This is done using Coccinelle and semantic patch used is as follows: @a@ typedef u32, __le32, uint32_t; {u32,__le32,uint32_t} e32; identifier tmp; expression ptr; expression y,e; type T; type T; @@ – tmp = cpu_to_le32(y); ? tmp = e @@ type T; identifier a.tmp; …

Lire la suite

IB/qib: Replace rcu_assign_pointer() with RCU_INIT_POINTER() in qib_keys.c

Author: Andreea-Cristina Bernat <bernat.ada@gmail.com> The uses of « rcu_assign_pointer() » are NULLing out the pointers. According to RCU_INIT_POINTER()’s block comment: « 1. This use of RCU_INIT_POINTER() is NULLing out the pointer » it is better to use it instead of rcu_assign_pointer() because it has a smaller overhead. The following Coccinelle semantic patch was used: @@ @@ – rcu_assign_pointer + …

Lire la suite

IB/qib: Replace rcu_assign_pointer() with RCU_INIT_POINTER() in qib_qp.c

Author: Andreea-Cristina Bernat <bernat.ada@gmail.com> According to RCU_INIT_POINTER()’s block comment 3.a, it can be used if « 1. This use of RCU_INIT_POINTER() is NULLing out the pointer » it is better to use it instead of rcu_assign_pointer() because it has a smaller overhead. « 3. The referenced data structure has already been exposed to readers either at compile time …

Lire la suite

s390/net: Delete useless checks before function calls

Author: Markus Elfring <elfring@users.sourceforge.net> The function debug_unregister() tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Ursula Braun Signed-off-by: David S. Miller — drivers/s390/net/claw.c | 6 ++—- drivers/s390/net/lcs.c | 6 ++—- drivers/s390/net/netiucv.c …

Lire la suite

can: dev: fix semicolon.cocci warnings

Author: kbuild test robot <fengguang.wu@intel.com> drivers/net/can/dev.c:294:2-3: Unneeded semicolon Removes unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Cc: Andri Yngvason Signed-off-by: Fengguang Wu Signed-off-by: Marc Kleine-Budde — drivers/net/can/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/net/can/dev.c b/drivers/net/can/dev.c index e54dbc1a..6ac02c8 100644 — a/drivers/net/can/dev.c +++ b/drivers/net/can/dev.c @@ -293,7 +293,7 @@ static void can_update_state_error_stats(struct net_device …

Lire la suite

drm/i915: Rename struct intel_crtc_config to intel_crtc_state

Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> The objective is to make this structure usable with the atomic helpers, so let’s start with the rename. Patch generated with coccinelle: @@ @@ -struct intel_crtc_config { +struct intel_crtc_state { … } @@ @@ -struct intel_crtc_config +struct intel_crtc_state v2: Completely generate the patch with cocci. (Ander) Signed-off-by: Ander Conselvan …

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.