Catégorie : Linux

drm/i915/skl: Simplify wm structures slightly (v2)

Author: Matt Roper <matthew.d.roper@intel.com> A bunch of SKL watermark-related structures have the cursor plane as a separate entry from the rest of the planes. Since a previous patch updated I915_MAX_PLANES such that those plane arrays now have a slot for the cursor, update the code to use the new slot in the existing plane arrays …

Lire la suite

drm/i915: Determine I915_MAX_PLANES from plane enum

Author: Matt Roper <matthew.d.roper@intel.com> Let the compiler figure out what I915_MAX_PLANES is from ‘enum plane’ so that we don’t need a separate #define. While we’re at it, add the cursor plane to the enum. This will cause I915_MAX_PLANES to now include the cursor plane in its count (it didn’t previously). This change is safe since …

Lire la suite

r8169: fix handling rtl_readphy 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/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Signed-off-by: Andrzej Hajda Signed-off-by: David S. Miller — drivers/net/ethernet/realtek/r8169.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 2b32e0c..b4f2123 100644 — a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c @@ …

Lire la suite

KVM: PPC: e500: fix handling local_sid_lookup 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/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Signed-off-by: Andrzej Hajda Acked-by: Scott Wood Signed-off-by: Paul Mackerras — arch/powerpc/kvm/e500.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)   diff –git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c index b29ce75..32fdab5 100644 — a/arch/powerpc/kvm/e500.c +++ …

Lire la suite

sony-laptop: Fix handling sony_nc_hotkeys_decode result

Author: Andrzej Hajda <a.hajda@samsung.com> sony_nv_hotkeys_decode can return a negative value. real_ev is a u32 variable. The check for real_ev > 0 is incorrect. Use an intermediate ret variable. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Signed-off-by: Andrzej Hajda [dvhart: clarify commit msg, drop superfluous else block] Signed-off-by: Darren Hart …

Lire la suite

extcon: sm5502: fix handling regmap_irq_get_virq 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/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Signed-off-by: Andrzej Hajda Signed-off-by: Chanwoo Choi — drivers/extcon/extcon-sm5502.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/extcon/extcon-sm5502.c b/drivers/extcon/extcon-sm5502.c index 92ae484..2945091 100644 — a/drivers/extcon/extcon-sm5502.c +++ b/drivers/extcon/extcon-sm5502.c @@ -586,7 …

Lire la suite

extcon: rt8973a: fix handling regmap_irq_get_virq 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/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Signed-off-by: Andrzej Hajda Signed-off-by: Chanwoo Choi — drivers/extcon/extcon-rt8973a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/extcon/extcon-rt8973a.c b/drivers/extcon/extcon-rt8973a.c index 3428b6a..1bc3737 100644 — a/drivers/extcon/extcon-rt8973a.c +++ b/drivers/extcon/extcon-rt8973a.c @@ -594,7 …

Lire la suite

[media] cx231xx: fix handling cx231xx_read_i2c_data 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/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Signed-off-by: Andrzej Hajda Signed-off-by: Mauro Carvalho Chehab — drivers/media/usb/cx231xx/cx231xx-video.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)   diff –git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c index 9798160..d0d8f08 100644 — a/drivers/media/usb/cx231xx/cx231xx-video.c +++ b/drivers/media/usb/cx231xx/cx231xx-video.c @@ …

Lire la suite

dmaengine: xgene-dma: fix handling xgene_dma_get_ring_size 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/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Signed-off-by: Andrzej Hajda Signed-off-by: Vinod Koul — drivers/dma/xgene-dma.c | 9 ++++++— 1 file changed, 6 insertions(+), 3 deletions(-)   diff –git a/drivers/dma/xgene-dma.c b/drivers/dma/xgene-dma.c index b23e8d5..4c5ddda 100644 — a/drivers/dma/xgene-dma.c +++ b/drivers/dma/xgene-dma.c @@ -1421,15 …

Lire la suite

clk: st: fix handling result of of_property_count_strings

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/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Signed-off-by: Andrzej Hajda Signed-off-by: Stephen Boyd — drivers/clk/st/clk-flexgen.c | 7 ++++— 1 file changed, 4 insertions(+), 3 deletions(-)   diff –git a/drivers/clk/st/clk-flexgen.c b/drivers/clk/st/clk-flexgen.c index bd355ee..24d9959 100644 — a/drivers/clk/st/clk-flexgen.c +++ b/drivers/clk/st/clk-flexgen.c @@ -268,6 …

Lire la suite