Category: Linux

[media] drivers: media: platform: vivid: Fix possible null derefrence

Author: Tapasweni Pathak <tapaswenipathak@gmail.com> Check for dev_fmt being null before derefrencing it, to assign it to planes. Found using Coccinelle. Signed-off-by: Tapasweni Pathak Acked-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab — drivers/media/platform/vivid/vivid-vid-out.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)   diff –git a/drivers/media/platform/vivid/vivid-vid-out.c b/drivers/media/platform/vivid/vivid-vid-out.c index 39ff79f..8f081bb 100644 — a/drivers/media/platform/vivid/vivid-vid-out.c …

Continue reading

drm/i915: fix simple_return.cocci warnings

Author: kbuild test robot <fengguang.wu@intel.com> drivers/gpu/drm/i915/intel_ringbuffer.c:435: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: Paulo Zanoni Signed-off-by: Fengguang Wu Signed-off-by: Daniel Vetter — drivers/gpu/drm/i915/intel_ringbuffer.c | 6 +—– 1 file changed, 1 insertion(+), 5 deletions(-)   diff –git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index e9858d2..441e250 …

Continue reading

staging: rtl8192e: Remove unnecessary OOM message

Author: Quentin Lambert <lambert.quentin@gmail.com> This patch reduces the kernel size by removing error messages that duplicate the normal OOM message. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr) @@ identifier f,print,l; expression e; constant char[] c; @@ e = \(kzalloc\|kmalloc\|devm_kzalloc\|devm_kmalloc\)(…); if (e == NULL) { } Signed-off-by: Quentin …

Continue reading

Staging: comedi: Clean dev_err() logging

Author: Haneen Mohammed <hamohammed.sa@gmail.com> This patch removes __func__ from dev_err. dev_err includes information about: (devcice, driver, specific instance of device, etc) in the log printout, so there is no need for __func__. This was done using Coccinelle, with the following semantic patch: @a@ expression E; expression msg; @@ dev_err(E, msg, __func__); @script:python b@ e

Input: tc3589x-keypad – set IRQF_ONESHOT flag to ensure IRQ request

Author: Valentin Rothberg <Valentin.Rothberg@lip6.fr> 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. Currently, plat->irqtype is only set to IRQF_TRIGGER_FALLING. This patch sets the ONESHOT flag directly in request_threaded_irq() to enforce the flag without being affected by future …

Continue reading

ASoC: tegra: fix platform_no_drv_owner.cocci warnings

Author: kbuild test robot <fengguang.wu@intel.com> sound/soc/tegra/tegra_rt5677.c:334: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: Anatol Pomozov Signed-off-by: Fengguang Wu Signed-off-by: Mark Brown — sound/soc/tegra/tegra_rt5677.c | 1 – 1 file changed, 1 deletion(-)   diff –git a/sound/soc/tegra/tegra_rt5677.c b/sound/soc/tegra/tegra_rt5677.c …

Continue reading

Staging: drivers: Bool initializations should use true/false

Author: Cristina Opriceana <cristina.opriceana@gmail.com> This patch replaces bool initializations of 1/0 with true/false in order to increase readability and respect the standards. Warning found by coccinelle. Signed-off-by: Cristina Opriceana Signed-off-by: Greg Kroah-Hartman — drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 4 ++– drivers/staging/lustre/lustre/llite/llite_mmap.c | 2 +- drivers/staging/rtl8192u/ieee80211/dot11d.c | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 4 ++– drivers/staging/rtl8192u/r8192U_core.c | …

Continue reading

staging: rts5208: Convert variable from int to bool and propagate the change to function parameters

Author: Quentin Lambert <lambert.quentin@gmail.com> This patch convert local variables declared as int into booleans. It also propagates the conversion when these variables were used as function parameters. Coccinelle was used to generate this patch. Signed-off-by: Quentin Lambert Signed-off-by: Greg Kroah-Hartman — drivers/staging/rts5208/ms.c | 9 ++++—- drivers/staging/rts5208/ms.h | 2 +- drivers/staging/rts5208/rtsx_scsi.c | 7 +++— drivers/staging/rts5208/sd.c | …

Continue reading

staging: rts5208: Convert non-returned local variable to boolean when relevant

Author: Quentin Lambert <lambert.quentin@gmail.com> This patch was produced using Coccinelle. A simplified version of the semantic patch is: @r exists@ identifier f; local idexpression u8 x; identifier xname; @@ f(…) { …when any ( x@xname = 1; | x@xname = 0; ) …when any } @bad exists@ identifier r.f; local idexpression u8 r.x expression e1 …

Continue reading

Staging: rtl8188eu: Remove redundant local variable

Author: Somya Anand <somyaanand214@gmail.com> This patch removes a redundant variable “raid” and adds inline return statements. This issue is identified by the following coccinelle script: @@ expression ret; identifier f; @@ -ret = +return f(…); -return ret; Signed-off-by: Somya Anand Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 24 +++++++—————– 1 file changed, 7 insertions(+), 17 deletions(-) …

Continue reading