Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1232336

Re: [PATCH 17/19] tools: bpf_jit_disasm: make get_last_jit_image return unsigned

From Daniel Borkmann <daniel@iogearbox.net>
Newsgroups linux.kernel
Subject Re: [PATCH 17/19] tools: bpf_jit_disasm: make get_last_jit_image return unsigned
Date 2015-09-24 21:00 +0200
Message-ID <qcjUm-389-7@gated-at.bofh.it> (permalink)
References <qcfnH-5il-3@gated-at.bofh.it> <qcfnJ-5il-55@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 09/24/2015 04:00 PM, Andrzej Hajda wrote:
> The function returns always non-negative values.
>
> 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 <a.hajda@samsung.com>
> ---
> Hi,
>
> To avoid problems with too many mail recipients I have sent whole
> patchset only to LKML. Anyway patches have no dependencies.
>
> Regards
> Andrzej
> ---
>   tools/net/bpf_jit_disasm.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/net/bpf_jit_disasm.c b/tools/net/bpf_jit_disasm.c
> index 2cd3d4c..b422dbe 100644
> --- a/tools/net/bpf_jit_disasm.c
> +++ b/tools/net/bpf_jit_disasm.c
> @@ -156,7 +156,7 @@ static void put_log_buff(char *buff)
>   	free(buff);
>   }
>
> -static int get_last_jit_image(char *haystack, size_t hlen,
> +static unsigned int get_last_jit_image(char *haystack, size_t hlen,
>   			      uint8_t *image, size_t ilen)

I have no problem if you want to change this, but then please also
fix up the 2nd line's indentation to match the '(' as it was before.

Thanks !

>   {
>   	char *ptr, *pptr, *tmp;
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/19] Fixes related to incorrect assignment of signed results  function Andrzej Hajda <a.hajda@samsung.com> - 2015-09-24 16:10 +0200
  [PATCH 14/19] sony-laptop: fix handling sony_nc_hotkeys_decode result Andrzej Hajda <a.hajda@samsung.com> - 2015-09-24 16:10 +0200
    Re: [PATCH 14/19] sony-laptop: fix handling sony_nc_hotkeys_decode  result Darren Hart <dvhart@infradead.org> - 2015-10-03 18:50 +0200
      Re: [PATCH 14/19] sony-laptop: fix handling sony_nc_hotkeys_decode  result Andrzej Hajda <a.hajda@samsung.com> - 2015-10-05 09:50 +0200
  [PATCH 03/19] libata: samsung_cf: fix handling platform_get_irq result Andrzej Hajda <a.hajda@samsung.com> - 2015-09-24 16:10 +0200
    Re: [PATCH 03/19] libata: samsung_cf: fix handling platform_get_irq  result Tejun Heo <tj@kernel.org> - 2015-09-24 17:00 +0200
      [PATCH v2 03/19] libata: samsung_cf: fix handling platform_get_irq  result Andrzej Hajda <a.hajda@samsung.com> - 2015-09-25 08:50 +0200
        Re: [PATCH v2 03/19] libata: samsung_cf: fix handling  platform_get_irq result Tejun Heo <tj@kernel.org> - 2015-09-25 18:00 +0200
  [PATCH 02/19] spi: davinci: fix handling platform_get_irq result Andrzej Hajda <a.hajda@samsung.com> - 2015-09-24 16:10 +0200
  [PATCH 07/19] net: hisilicon: fix handling platform_get_irq result Andrzej Hajda <a.hajda@samsung.com> - 2015-09-24 16:10 +0200
    Re: [PATCH 07/19] net: hisilicon: fix handling platform_get_irq  result David Miller <davem@davemloft.net> - 2015-09-27 07:50 +0200
  [PATCH 16/19] r8169: fix handling rtl_readphy result Andrzej Hajda <a.hajda@samsung.com> - 2015-09-24 16:10 +0200
    Re: [PATCH 16/19] r8169: fix handling rtl_readphy result David Miller <davem@davemloft.net> - 2015-09-27 07:50 +0200
  [PATCH 18/19] mac80211: make ieee80211_new_mesh_header return unsigned Andrzej Hajda <a.hajda@samsung.com> - 2015-09-24 16:10 +0200
    Re: [PATCH 18/19] mac80211: make ieee80211_new_mesh_header return  unsigned Johannes Berg <johannes@sipsolutions.net> - 2015-09-24 16:20 +0200
      [PATCH v2 18/19] mac80211: make ieee80211_new_mesh_header return  unsigned Andrzej Hajda <a.hajda@samsung.com> - 2015-09-25 08:50 +0200
  [PATCH 11/19] clocksource: fix __ftm_clk_init result Andrzej Hajda <a.hajda@samsung.com> - 2015-09-24 16:10 +0200
  [PATCH 17/19] tools: bpf_jit_disasm: make get_last_jit_image return  unsigned Andrzej Hajda <a.hajda@samsung.com> - 2015-09-24 16:10 +0200
    Re: [PATCH 17/19] tools: bpf_jit_disasm: make get_last_jit_image  return unsigned Daniel Borkmann <daniel@iogearbox.net> - 2015-09-24 21:00 +0200
      [PATCH v2 17/19] tools: bpf_jit_disasm: make get_last_jit_image return  unsigned Andrzej Hajda <a.hajda@samsung.com> - 2015-09-25 08:50 +0200
        Re: [PATCH v2 17/19] tools: bpf_jit_disasm: make  get_last_jit_image return unsigned David Miller <davem@davemloft.net> - 2015-09-29 07:20 +0200
  [PATCH 05/19] media: am437x-vpfe: fix handling platform_get_irq result Andrzej Hajda <a.hajda@samsung.com> - 2015-09-24 16:10 +0200
  [PATCH 13/19] extcon: sm5502: fix handling regmap_irq_get_virq result Andrzej Hajda <a.hajda@samsung.com> - 2015-09-24 16:10 +0200
    Re: [PATCH 13/19] extcon: sm5502: fix handling regmap_irq_get_virq  result Chanwoo Choi <cw00.choi@samsung.com> - 2015-09-25 01:50 +0200
  [PATCH 15/19] KVM: PPC: e500: fix handling local_sid_lookup result Andrzej Hajda <a.hajda@samsung.com> - 2015-09-24 16:10 +0200
  [PATCH 06/19] staging: media: omap4iss: fix handling platform_get_irq  result Andrzej Hajda <a.hajda@samsung.com> - 2015-09-24 16:10 +0200
    Re: [PATCH 06/19] staging: media: omap4iss: fix handling  platform_get_irq result Dan Carpenter <dan.carpenter@oracle.com> - 2015-09-24 17:10 +0200
  [PATCH 09/19] dmaengine: xgene-dma: fix handling  xgene_dma_get_ring_size result Andrzej Hajda <a.hajda@samsung.com> - 2015-09-24 16:10 +0200
    Re: [PATCH 09/19] dmaengine: xgene-dma: fix handling  xgene_dma_get_ring_size result Vinod Koul <vinod.koul@intel.com> - 2015-09-25 04:10 +0200

csiph-web