Catégorie : Linux

drm/amdgpu: use kmemdup rather than duplicating its implementation

Author: Andrzej Hajda <a.hajda@samsung.com> The patch was generated using fixed coccinelle semantic patch scripts/coccinelle/api/memdup.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2014320 Signed-off-by: Andrzej Hajda Reviewed-by: Christian König Signed-off-by: Alex Deucher — drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 +— 1 file changed, 1 insertion(+), 3 deletions(-)   diff –git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index f25cfed..1a7708f 100644 — a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -536,12 +536,10 @@ int …

Lire la suite

MIPS: Remove invalid check

Author: Andrzej Hajda <a.hajda@samsung.com> Unsigned values cannot be lesser than zero. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [ralf@linux-mips.org: Chris Dearman’s original commit 9318c51acd9689505850152cc98277a6d6f2d752 ([MIPS] MIPS32/MIPS64 secondary cache management) introduced these less than zero checks in 2.6.18.] [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda Cc: linux-kernel@vger.kernel.org Cc: Bartlomiej Zolnierkiewicz Cc: Marek Szyprowski Cc: …

Lire la suite

video/omap: remove invalid check

Author: Andrzej Hajda <a.hajda@samsung.com> regno is unsigned so it cannot be negative. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda Signed-off-by: Tomi Valkeinen — drivers/video/fbdev/omap/omapfb_main.c | 5 —– 1 file changed, 5 deletions(-)   diff –git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c index 1fb3ea3..393ae1b 100644 — a/drivers/video/fbdev/omap/omapfb_main.c +++ b/drivers/video/fbdev/omap/omapfb_main.c @@ -276,11 …

Lire la suite

usbnet: remove invalid check

Author: Andrzej Hajda <a.hajda@samsung.com> skb->len is always non-negative. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda Signed-off-by: David S. Miller — drivers/net/usb/lan78xx.c | 5 —– drivers/net/usb/smsc75xx.c | 5 —– drivers/net/usb/smsc95xx.c | 5 —– 3 files changed, 15 deletions(-)   diff –git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index 6a70a72..d2a5f3f 100644 — …

Lire la suite

staging: lustre: remove invalid check

Author: Andrzej Hajda <a.hajda@samsung.com> Unsigned cannot be negative. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/osc/lproc_osc.c | 3 — 1 file changed, 3 deletions(-)   diff –git a/drivers/staging/lustre/lustre/osc/lproc_osc.c b/drivers/staging/lustre/lustre/osc/lproc_osc.c index c504d15..f3eb39f 100644 — a/drivers/staging/lustre/lustre/osc/lproc_osc.c +++ b/drivers/staging/lustre/lustre/osc/lproc_osc.c @@ -451,9 +451,6 @@ static ssize_t …

Lire la suite

[media] staging: media: davinci_vpfe: fix ipipe_mode type

Author: Andrzej Hajda <a.hajda@samsung.com> The variable can take negative values. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab — drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c index 2a3a56b..b1d5e23 100644 — a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c …

Lire la suite

rtc: opal: fix type of token

Author: Andrzej Hajda <a.hajda@samsung.com> The variable can take signed values. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda Signed-off-by: Alexandre Belloni — drivers/rtc/rtc-opal.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git a/drivers/rtc/rtc-opal.c b/drivers/rtc/rtc-opal.c index 6fbf9e6..590e1a4 100644 — a/drivers/rtc/rtc-opal.c +++ b/drivers/rtc/rtc-opal.c @@ -152,10 …

Lire la suite

rndis_wlan: fix checking for default value

Author: Andrzej Hajda <a.hajda@samsung.com> Thresholds uses -1 to indicate that default value should be used. Since thresholds are unsigned sign checking makes no sense. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda Signed-off-by: David S. Miller — drivers/net/wireless/rndis_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 …

Lire la suite

orinoco: fix checking for default value

Author: Andrzej Hajda <a.hajda@samsung.com> Thresholds uses -1 to indicate that default value should be used. Since thresholds are unsigned sign checking makes no sense. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda Signed-off-by: David S. Miller — drivers/net/wireless/orinoco/cfg.c | 6 +++— 1 file changed, 3 insertions(+), 3 …

Lire la suite

mwifiex: fix comparison expression

Author: Andrzej Hajda <a.hajda@samsung.com> To avoid underflows signed variables should be used in expression. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda Acked-by: Amitkumar Karwar Signed-off-by: David S. Miller — drivers/net/wireless/mwifiex/11n_rxreorder.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git a/drivers/net/wireless/mwifiex/11n_rxreorder.c b/drivers/net/wireless/mwifiex/11n_rxreorder.c index …

Lire la suite