Author: Andrzej Hajda <a.hajda@samsung.com> Unsigned minus constant is still unsigned so checking its sign 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/brcm80211/brcmsmac/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c index …
Catégorie : Linux
Sep 21 2015
net: stmmac: fix type of entry variable
Author: Andrzej Hajda <a.hajda@samsung.com> Variable can store 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: David S. Miller — drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 925f2f8..934143e 100644 — a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -1945,7 …
Sep 21 2015
net/ibm/emac: fix type of phy_mode
Author: Andrzej Hajda <a.hajda@samsung.com> phy_mode can 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: David S. Miller — drivers/net/ethernet/ibm/emac/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/drivers/net/ethernet/ibm/emac/core.h b/drivers/net/ethernet/ibm/emac/core.h index 28df374..f379e47 100644 — a/drivers/net/ethernet/ibm/emac/core.h +++ b/drivers/net/ethernet/ibm/emac/core.h @@ -181,7 +181,7 …
Sep 21 2015
isdn: hisax: fix frame calculation
Author: Andrzej Hajda <a.hajda@samsung.com> Difference of unsigned values is also unsigned so it does not make sense to check its sign. 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/isdn/hisax/hfc4s8s_l1.c | 10 +++++—– 1 file changed, 5 insertions(+), 5 deletions(-) diff …
Sep 21 2015
gpu: ipu-v3: fix div_ratio type
Author: Andrzej Hajda <a.hajda@samsung.com> The variable can 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: Philipp Zabel — drivers/gpu/ipu-v3/ipu-csi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/drivers/gpu/ipu-v3/ipu-csi.c b/drivers/gpu/ipu-v3/ipu-csi.c index 3bdb705..06631ac 100644 — a/drivers/gpu/ipu-v3/ipu-csi.c +++ b/drivers/gpu/ipu-v3/ipu-csi.c @@ -202,7 +202,7 …
Sep 21 2015
drm/layerscape: fix handling fsl_dcu_drm_plane_index result
Author: Andrzej Hajda <a.hajda@samsung.com> The function can return negative value. 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: Dave Airlie — drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff –git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c index 82be6b8..d1e300d 100644 — a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c @@ -58,7 …
Sep 21 2015
ARM: shmobile: apmu: correct type of CPU id
Author: Andrzej Hajda <a.hajda@samsung.com> CPU id can be negative, so it cannot be assigned to unsigned variable. 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: Simon Horman — arch/arm/mach-shmobile/platsmp-apmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c index bcf4cc5..911884f …
Sep 21 2015
HSI: omap_ssi_port: fix handling of_get_named_gpio result
Author: Andrzej Hajda <a.hajda@samsung.com> The function can return negative value. 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: Sebastian Reichel — drivers/hsi/controllers/omap_ssi_port.c | 8 ++++—- 1 file changed, 4 insertions(+), 4 deletions(-) diff –git a/drivers/hsi/controllers/omap_ssi_port.c b/drivers/hsi/controllers/omap_ssi_port.c index 02e6603..e80a66e 100644 — a/drivers/hsi/controllers/omap_ssi_port.c +++ b/drivers/hsi/controllers/omap_ssi_port.c @@ -1147,13 …
Sep 21 2015
HSI: omap_ssi: fix handling ida_simple_get result
Author: Andrzej Hajda <a.hajda@samsung.com> The function can return negative value. 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: Sebastian Reichel — drivers/hsi/controllers/omap_ssi.c | 7 +++—- 1 file changed, 3 insertions(+), 4 deletions(-) diff –git a/drivers/hsi/controllers/omap_ssi.c b/drivers/hsi/controllers/omap_ssi.c index f6d3100..27b91f1 100644 — a/drivers/hsi/controllers/omap_ssi.c +++ b/drivers/hsi/controllers/omap_ssi.c @@ -323,11 …
Sep 21 2015
hwrng: xgene – fix handling platform_get_irq
Author: Andrzej Hajda <a.hajda@samsung.com> The function can return negative value. 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: Herbert Xu — drivers/char/hw_random/xgene-rng.c | 7 ++++— 1 file changed, 4 insertions(+), 3 deletions(-) diff –git a/drivers/char/hw_random/xgene-rng.c b/drivers/char/hw_random/xgene-rng.c index c37cf75..3c77645 100644 — a/drivers/char/hw_random/xgene-rng.c +++ b/drivers/char/hw_random/xgene-rng.c @@ -344,11 …