Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp544244ybb; Thu, 28 Mar 2019 07:31:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqykjisFt/uZyFTxUOXn8sAaEmzLg7wSXEIJQ8cHtMftYtq6UnH0qfpVwvDAN2llr5i5I7PD X-Received: by 2002:aa7:9090:: with SMTP id i16mr40183462pfa.85.1553783506830; Thu, 28 Mar 2019 07:31:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553783506; cv=none; d=google.com; s=arc-20160816; b=ukG1DJSRZ+VJgEvf9RIRITxr39IwoKKeyaF/phKRXslTLCnreW2k73g2y/7ZvMqcRk h8lr4jIrV56V9MMyguze2H4CJ4A0C1MjdPyB7Q++JmJzCVyjPU8XDVSN+157rhge9+zt dRg68rNCpQAa6vEAMWPIr1O+s1BEAGQy8lXwiVX21SdmDh6N8HFpnglhWDODe5aakLLF pA0T+wORSelICuyyc58l1Ke2cJvE4gdIaRvxicTlftTwkuPpprHzedGuDGpi7QIDGl55 iYvnIp8mGCdB2+8sR+0PYN/OLRKr9VmdQFXkowUqjj/NG+zzc48QSDVWKQMYxUlkak/8 YaTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:subject:autocrypt:openpgp:from:references:to :dkim-signature; bh=6jQgM82Ak5gxLhS3TfKaZNhwSGamDF9BZjyuXbzy7po=; b=MWsHm5rArJVxMzGaoaDcj46K2mNglXdfdJ88VLIftzlY6TLxfVujd3irYXyWcsneie 624JtI/fk1sXfcaNPscgxX6noEnY6FALnYIKd+itNye4EUKtm7T+CPGb6QnTfL6DVeAf icRfQ8KMHTsZPwiB5m6P+Wyo2YQtYfiJkM/y/mdeI80CcZNqFpJFRft0PK8VgnHR+GqC dUoJ6c/TLS3RFLdJM29OP44dkOfyy/6+rseiueny1aSDRPuncm25IjYypf3Tyyan9ovB qbqHQvYAcSDrE8mtZIjxF2xjEU4u3nDK+/sD5iMRCuZbdL517kOnffeHcKewYNUMyrOA N3tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=I2TYYvHd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c186si21158019pfg.160.2019.03.28.07.31.30; Thu, 28 Mar 2019 07:31:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=I2TYYvHd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727106AbfC1Oan (ORCPT + 99 others); Thu, 28 Mar 2019 10:30:43 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:43109 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726692AbfC1Oal (ORCPT ); Thu, 28 Mar 2019 10:30:41 -0400 Received: by mail-wr1-f66.google.com with SMTP id k17so15220073wrx.10 for ; Thu, 28 Mar 2019 07:30:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=to:references:from:openpgp:autocrypt:subject:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=6jQgM82Ak5gxLhS3TfKaZNhwSGamDF9BZjyuXbzy7po=; b=I2TYYvHdYLI5v04eLYujn1x2cWpHmnM6U2OylMgbiXfP0nQQ2qTjMBllIvxyfhW06/ SgfavnGc7zKVQQX7T6G+xOmP51fMFEdsQhdgW62O0toe3h/94sqXsAcV71rzqls0g5s/ i1G2HCxfMjA7qD7QMONDcfR1ZM1FRY6XFpR7G5xfkW6HrW9SAKjvqbhnJPaYqi/0Bh79 EnrndujjBIK3KXdGoKDqfbNn5sFRQC4xi0J/kH+6DRA6clVmId4rPdx56/BbGcCEK2gs 6vfV3tU860HFDWzeIU5EueKc9UA6gQ1rSb/GnGZMcOs21UVxX1u8STKY/ezr3sqFju4P hUKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:references:from:openpgp:autocrypt:subject :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=6jQgM82Ak5gxLhS3TfKaZNhwSGamDF9BZjyuXbzy7po=; b=E2mXsy8as+U8lE7Rm/ApBIHJqFWqRsWqluQnfdwRuMjWPW4LcA5PEs+X63prE4Xnek vdcib0pWwDQoWvMxuu/dpNi1vOFlUdmG5be+DWrIDMlCyd7lTN/pSSVJ4ER+cCaHaXYz ywEbfllcqnpl8pE9s7zcU+HbOM5E/tTv7hWpkRPTsLApb7BKv0u59W+zq6iTP18TK8TB ZpTX5pMg+POzl7W5DD38xd5Zi9ylt5VW6eQWfS13/lzvAo//JBgFpOY8gKiovjwZqNqT Ts1MO1hIriS28vRHss/LOcl09C9iVOvuuusQtikymm6zwmDJ9vWHbq/Z7JgszB/0uKCe w/tw== X-Gm-Message-State: APjAAAVBdzO/Uq3TusNKGf0JC2mfXpqibpg4j5IlDX139ydlAs06cwLX MlCkIEyNy7xlsZ/111SJOWWUiGa255Y= X-Received: by 2002:adf:ef91:: with SMTP id d17mr28888906wro.78.1553783438561; Thu, 28 Mar 2019 07:30:38 -0700 (PDT) Received: from [172.20.1.105] ([217.38.71.146]) by smtp.gmail.com with ESMTPSA id n1sm2256394wmc.19.2019.03.28.07.30.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Mar 2019 07:30:37 -0700 (PDT) To: ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, jakub.kicinski@netronome.com, df@google.com, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190328141652.wssqboyekxmp6tkw@yubo-2> From: Quentin Monnet Openpgp: preference=signencrypt Autocrypt: addr=quentin.monnet@netronome.com; prefer-encrypt=mutual; keydata= mQINBFnqRlsBEADfkCdH/bkkfjbglpUeGssNbYr/TD4aopXiDZ0dL2EwafFImsGOWmCIIva2 MofTQHQ0tFbwY3Ir74exzU9X0aUqrtHirQHLkKeMwExgDxJYysYsZGfM5WfW7j8X4aVwYtfs AVRXxAOy6/bw1Mccq8ZMTYKhdCgS3BfC7qK+VYC4bhM2AOWxSQWlH5WKQaRbqGOVLyq8Jlxk 2FGLThUsPRlXKz4nl+GabKCX6x3rioSuNoHoWdoPDKsRgYGbP9LKRRQy3ZeJha4x+apy8rAM jcGHppIrciyfH38+LdV1FVi6sCx8sRKX++ypQc3fa6O7d7mKLr6uy16xS9U7zauLu1FYLy2U N/F1c4F+bOlPMndxEzNc/XqMOM9JZu1XLluqbi2C6JWGy0IYfoyirddKpwzEtKIwiDBI08JJ Cv4jtTWKeX8pjTmstay0yWbe0sTINPh+iDw+ybMwgXhr4A/jZ1wcKmPCFOpb7U3JYC+ysD6m 6+O/eOs21wVag/LnnMuOKHZa2oNsi6Zl0Cs6C7Vve87jtj+3xgeZ8NLvYyWrQhIHRu1tUeuf T8qdexDphTguMGJbA8iOrncHXjpxWhMWykIyN4TYrNwnyhqP9UgqRPLwJt5qB1FVfjfAlaPV sfsxuOEwvuIt19B/3pAP0nbevNymR3QpMPRl4m3zXCy+KPaSSQARAQABtC1RdWVudGluIE1v bm5ldCA8cXVlbnRpbi5tb25uZXRAbmV0cm9ub21lLmNvbT6JAj0EEwEIACc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9CpBuXjtPrnRSd8xdrw36AL53goTt/NiLHUd RHhSHGnKaQ6MfrTge5Q0h5A= Subject: =?UTF-8?B?UmU6IFtQQVRDSF0gYnBmOiBicGZ0b29sOiBjb252ZXJ0IOKAmGNvbnN0?= =?UTF-8?Q?_char_*=e2=80=99_type_into_=27char_*=27_in_assignment?= Message-ID: Date: Thu, 28 Mar 2019 14:30:37 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190328141652.wssqboyekxmp6tkw@yubo-2> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2019-03-28 10:16 UTC-0400 ~ Bo YU > When compiling with check flag: make -C tools/bpf/bpftool/ > gcc will warning: > > jit_disasm.c:119:29: warning: assignment discards ‘const’ qualifier from > pointer target type [-Wdiscarded-qualifiers] >   info.disassembler_options = disassembler_options; > > So convert 'const char *' type into 'char *' to fix the warning. > > Fixes:3ddeac6705aba(tools: bpftool: use 4 context mode for the NFP disasm) > Signed-off-by: Bo YU > --- > tools/bpf/bpftool/jit_disasm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/bpf/bpftool/jit_disasm.c > b/tools/bpf/bpftool/jit_disasm.c > index 3ef3093560ba..40b46e46454a 100644 > --- a/tools/bpf/bpftool/jit_disasm.c > +++ b/tools/bpf/bpftool/jit_disasm.c > @@ -116,7 +116,7 @@ void disasm_print_insn(unsigned char *image, ssize_t > len, int opcodes, >     info.arch = bfd_get_arch(bfdf); >     info.mach = bfd_get_mach(bfdf); >     if (disassembler_options) > -        info.disassembler_options = disassembler_options; > +        info.disassembler_options = (char *)disassembler_options; >     info.buffer = image; >     info.buffer_length = len; > Hi, the warning does not show with latest versions of binutils, it was fixed with this (binutils) commit: commit f995bbe8e62fdb5607acb1ee127240cfe50d2b8f Author: Pedro Alves Date: Wed Apr 5 19:21:33 2017 +0100 -Wwrite-strings: Constify struct disassemble_info's disassembler_options field Distributions with recent binutils (Ubuntu 18.04, Fedora 29 at least) should not have this message. I thought about sending the same patch some time ago, but in the end Jakub and I decided that it may not be worth casting the const away to silence the warning just for older distributions. Daniel also shared the same opinion at the time (but that was off the mailing-list). Quentin