From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755831AbbIXOBI (ORCPT ); Thu, 24 Sep 2015 10:01:08 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:61485 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754505AbbIXOBG (ORCPT ); Thu, 24 Sep 2015 10:01:06 -0400 X-AuditID: cbfec7f5-f794b6d000001495-9b-5604021e24b1 From: Andrzej Hajda To: linux-kernel@vger.kernel.org Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Marek Szyprowski Subject: [PATCH 00/19] Fixes related to incorrect assignment of signed results function Date: Thu, 24 Sep 2015 16:00:08 +0200 Message-id: <1443103227-25612-1-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrLJMWRmVeSWpSXmKPExsVy+t/xa7pyTCxhBpPOiFvcWneO1WLjjPWs Fpd3zWGzWHvkLrsDi0ffllWMHp83yQUwRXHZpKTmZJalFunbJXBltD3ZylQwR6Li5Jz5jA2M R4W6GDk5JARMJLbcPMoGYYtJXLi3HswWEljKKDHzonAXIxeQ3cQkMfXtTFaQBJuApsTfzTfB ikQEFCQ29z5jBSliFuhjlGj8uwoowcEhLBApcXC+KEgNi4CqROepO0wgNq+As8SRxQ+ZIJbJ SZw8Npl1AiP3AkaGVYyiqaXJBcVJ6blGesWJucWleel6yfm5mxghnv66g3HpMatDjAIcjEo8 vDN1mMOEWBPLiitzDzFKcDArifByvAcK8aYkVlalFuXHF5XmpBYfYpTmYFES5525632IkEB6 YklqdmpqQWoRTJaJg1OqgXGjgF9VG+/19C+rN2U03lbYnDv5scjpmYnJ31+lbuBcu07++LXQ 6Kav/yQ3ehx9M8O3bEHtFHbDZrspq+7PevjDqXk348UF91knC3knv7mSe2HiolD+HJnLLzw5 51zqMjNLt9WyU9Vdb/f698fyR/mcuWdF1q2K0RNddjvA5ljY9Kk6XySEXuxQYinOSDTUYi4q TgQAtnl4nfABAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This is another set of independent patches. The only connection between them is that they try to address problems spotted by proposed coccinelle semantic patch assign_signed_to_unsigned.cocci[1]. This semantic patch tries to find bugs, where signed result of function is lost due to conversion to unsigned value. To decrease number of false positives it looks if after the call there is comparison of the result variable with 0. In pseudo-code it looks like: unsigned = signed_function(...); ... if (unsigned ( < | <= ) 0 ) ... This patchset contains mainly real bug fixes. Only last three patches do not fix real bugs, they just proposes change of types to avoid conversions int -> unsigned. The patches are based on linux-next. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Regards Andrzej Andrzej Hajda (19): SUNRPC: fix variable type spi: davinci: fix handling platform_get_irq result libata: samsung_cf: fix handling platform_get_irq result v4l: omap3isp: fix handling platform_get_irq result media: am437x-vpfe: fix handling platform_get_irq result staging: media: omap4iss: fix handling platform_get_irq result net: hisilicon: fix handling platform_get_irq result clk: st: fix handling result of of_property_count_strings dmaengine: xgene-dma: fix handling xgene_dma_get_ring_size result cx231xx: fix handling cx231xx_read_i2c_data result clocksource: fix __ftm_clk_init result extcon: rt8973a: fix handling regmap_irq_get_virq result extcon: sm5502: fix handling regmap_irq_get_virq result sony-laptop: fix handling sony_nc_hotkeys_decode result KVM: PPC: e500: fix handling local_sid_lookup result r8169: fix handling rtl_readphy result tools: bpf_jit_disasm: make get_last_jit_image return unsigned mac80211: make ieee80211_new_mesh_header return unsigned block: nvme-scsi: make nvme_trans_get_blk_desc_len return unsigned arch/powerpc/kvm/e500.c | 3 ++- drivers/ata/pata_samsung_cf.c | 5 ++--- drivers/block/nvme-scsi.c | 2 +- drivers/clk/st/clk-flexgen.c | 7 ++++--- drivers/clocksource/fsl_ftm_timer.c | 8 ++++---- drivers/dma/xgene-dma.c | 9 ++++++--- drivers/extcon/extcon-rt8973a.c | 2 +- drivers/extcon/extcon-sm5502.c | 2 +- drivers/media/platform/am437x/am437x-vpfe.c | 5 +++-- drivers/media/platform/omap3isp/isp.c | 5 +++-- drivers/media/usb/cx231xx/cx231xx-video.c | 3 ++- drivers/net/ethernet/hisilicon/hip04_eth.c | 2 +- drivers/net/ethernet/realtek/r8169.c | 2 +- drivers/platform/x86/sony-laptop.c | 12 ++++++++---- drivers/spi/spi-davinci.c | 7 ++++--- drivers/staging/media/omap4iss/iss.c | 5 +++-- net/mac80211/mesh.c | 2 +- net/sunrpc/xprtsock.c | 2 +- tools/net/bpf_jit_disasm.c | 2 +- 19 files changed, 49 insertions(+), 36 deletions(-) -- 1.9.1