Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp622238ybb; Thu, 28 Mar 2019 08:59:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqxr/W4IKeOTDaxEulBY2muxOdFqnTWCmICIbqy/ZfqoXzzIt5V5zJZwKEdQntWlHoSOJ8me X-Received: by 2002:a65:60c7:: with SMTP id r7mr41871751pgv.37.1553788753898; Thu, 28 Mar 2019 08:59:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553788753; cv=none; d=google.com; s=arc-20160816; b=x0caHNBmlcLZtOmDbcO7rtZICufQXctBJdbCW4FUUKTGRts70Qxorsd8czXecM/hn8 eh6BzJYiDYMZHaEcUWzmMc9t7CAh/wxG9ZTarbG5ba3W1TH0ZKEJHsQaotQKoQ5FE7Ge sviSeFsn6xmboHVtiwtAfAOdJdDdWEbVdgDS07kMgD6nhrc0qWxBpwzvgfX3XkqoZ8XU yxUTP53KQsPXUPdMWDqU3+jX122//muBeyMOXlvt3ITuoiIsh8aAJOQ+i6lIOv0fNqul EtcAMoSHwlErcuJ3lcQ6rw/6rJWt+bi+cqOjstGhpBBHUsUiiMcw5I5TnB2PWREztBTH j5LA== 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=RwulVR+fvKq6vVJdowgQoJclqQ3Dv1qZouc2Y1YIUtI=; b=gJABS55bDqn6Pptx2JQ9cj/PTChkH8IB2qTzOIxv7D1RaHY5/L9vK9IJClw18b1CXK aM9+AtqRCAD+PVkLCGY61PGVQ4Os3Cw4G++thz7ryJOJMbmCoWgO5EWbIIDqotJaDnCN twyD90/hOFuCOl6CPeGud3orzROPFTpPsykpveBX1bYGzHkYtGHUh51ctyCzUDihsEr4 TZPrbbjvjvm4x8e33tKmvuGtZ3yqyIAjJpnakWv4SG8Up0L5Wprfmx5g/IVhLTo14z0i eXlZNUCGh0Xf17tIyqLQkRa+qMtkPY1bshwKrR+JgrXxjC6IhAfYnm/MCoF8Q45rDqJB p6gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=iQTNsGtR; 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 f7si20693434pgo.569.2019.03.28.08.58.57; Thu, 28 Mar 2019 08:59:13 -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=iQTNsGtR; 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 S1727265AbfC1P6R (ORCPT + 99 others); Thu, 28 Mar 2019 11:58:17 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:36558 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727182AbfC1P6Q (ORCPT ); Thu, 28 Mar 2019 11:58:16 -0400 Received: by mail-wm1-f65.google.com with SMTP id h18so4671683wml.1 for ; Thu, 28 Mar 2019 08:58:15 -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=RwulVR+fvKq6vVJdowgQoJclqQ3Dv1qZouc2Y1YIUtI=; b=iQTNsGtRibUM+UyIrzIVd/SUgDHeOlaqKWG1Ro00D/Bt1O7fN9EATXW4M0+uHY/PA6 rVHwp7uIjngQhUld7oVWRb5I+dsovgVvcEI9yhSr/Apot+OCGScczsX8KjRNEXambkpw HLm6k52eMJ4EtpvK1/hEfmMv4Ti7u0WZ43vJLT9AqL0qiDQhad5QiAMpvfqZHhbJ/bC5 x4Vmhnq0dKDnhr8wVdlf3fBOAF/jq93vGlS9wZU8wRC1Pj2SJXvlYHH40owqCMfhUaOu uSt6DsD4oFWrFid+OCkaBfPHWLxPfvn8fwOw0L33qWljlJV9vAaOEDAxlNKtOlD3NYsm +uoA== 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=RwulVR+fvKq6vVJdowgQoJclqQ3Dv1qZouc2Y1YIUtI=; b=VnZ9xt+OtiTdE+SdbWiy2H+Xza1dV7zVkKAsm5pvbtaZD4auELFpMbJ3Q76pv0q6lA 1sXPNOi8Iky5y9L8JM25MUcwKVo183lpmZ13V0ra4ZBAS57z+K8tzohBK1DJzi7a/0Fa pSIRh5CcbYNe1Gt9khoCNRpituInJ7hQNWmx8qNmwGJZKfxkXyBvohy2gNxQhvwetqoC DII3AB88qgpBqR47QeRgrJxj5xvhxtFH1wkS6dyHpQ6TTK/5GqVQ70Zui3oEmadhqBxv 3JFeuEsi04g4oqQWlVJUOJDvNtj9FSKfoOxpgSMAt9qQTnf+sgbvADUG2uZKoHUtRdY3 X5YA== X-Gm-Message-State: APjAAAXiEjPqrb4knHXECiMF1CTVPrxu5xyDLY7Qazo/gAW9Zq53Zcfc 6umNvNt+QF/oBB8UqVhRXkcRCg/Ys/Y= X-Received: by 2002:a1c:e90f:: with SMTP id q15mr472472wmc.112.1553788694320; Thu, 28 Mar 2019 08:58:14 -0700 (PDT) Received: from [172.20.1.105] ([217.38.71.146]) by smtp.gmail.com with ESMTPSA id f128sm4334975wme.28.2019.03.28.08.58.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Mar 2019 08:58:13 -0700 (PDT) To: David Laight , "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+KPaSSQARAQABtC1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TliRb3Fl2Q27cEr7kNKlsz/t6vLSEN2 j8x+tWD8x53SEOSn94g2AyJA9Txh2xBhWGuZ9CpBuXjtPrnRSd8xdrw36AL53goTt/NiLHUd RHhSHGnKaQ6MfrTge5Q0h5A= Subject: =?UTF-8?B?UmU6IFtQQVRDSF0gYnBmOiBicGZ0b29sOiBjb252ZXJ0IOKAmGNvbnN0?= =?UTF-8?Q?_char_*=e2=80=99_type_into_=27char_*=27_in_assignment?= Message-ID: <4c015f97-b5f0-68a0-2a6b-9333fe1bcb62@netronome.com> Date: Thu, 28 Mar 2019 15:58:13 +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: 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 15:08 UTC+0000 ~ David Laight > From: Quentin Monnet >> Sent: 28 March 2019 14:31 >> 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. >>> > ... >>> --- 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; > > At some point someone may decide to build with -Wcast-const > at which point you've just generated a different error. > > The (probably) correct fix is to make info.disassempler_options 'const char *'. > > David > Which is what this binutils commit I cited does :) Quentin