Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp7126674imm; Tue, 24 Jul 2018 08:48:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdznQTqgRE38iP3p2dmcRn+KGjc2+xAP9JG2JRUyxJBdVeI/yMru0n7s10OGdITHef2d2+n X-Received: by 2002:a62:3a5b:: with SMTP id h88-v6mr18316938pfa.61.1532447328122; Tue, 24 Jul 2018 08:48:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532447328; cv=none; d=google.com; s=arc-20160816; b=hgOcaXygDjB6Dgyu22fIP0JKOh94eMHqGhSB7PJRFeE4WCc1lyPnHGUEjhOarJgBlK 73glld5r4i3DbxTEKUEFuy641uBWSkSBeZMPjQ90HHrVxOzW1Kxquc9XM0Nn3SqL8KFF VwJVL90ndBlZHbxiXoxe1LeJsXWOz/lCO4WdVbRBnSnZ3Md/zhbnSocGztor2F/mWkZe HIEr2VV73UFZ7Ujt5evVRBHR8/dvHxIYyFdis4UrJXstDFQGXRYDVqexgs7spFl7BJzt eYrCWFfMHRKaKDCr/qc3fD6NvkZntTQmYaFnhGwXTHQU5v6hCWMgPeTC1tzA2kFQMezO Q7yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=gQ3jyUw+HUxRgby5xab85hRDwOZ2e9xXI7PxG3WTbAU=; b=WT5i/wZIGp2s9vkQAB1jhGrkmuaJcWjUniE6r0NB6Gs280GsxX55JpFcMY9GsBJvmB RKtyKQnThV506wPkmJhj5J3Dx7J//h9uPrxhLnaygbh9FQqvEc+1qsm9/jzeZC8CAp/Q W4S2dZoC2LKDY4ObDyj6qzi44789mOmLAw0jEUD6UctR/u4+qyIlbTB2qtr2QwNv9IxT xhCyKow29QaPDYk3kOESh1GaF0TFqjHna/KOtdVfjcjCq2HBmVthMH4LSzOsga1Ey8wV OiRz8eMAseTgL84DlRfjNrznYrwE84M5VYBy5wl3gd8T4x9rBfmuJXgf8nXsBHLlG3/v 3VTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=Nv7VYz4x; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o10-v6si10355913pgp.153.2018.07.24.08.48.33; Tue, 24 Jul 2018 08:48:48 -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=@fb.com header.s=facebook header.b=Nv7VYz4x; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388499AbeGXQxm (ORCPT + 99 others); Tue, 24 Jul 2018 12:53:42 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:40434 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388330AbeGXQxm (ORCPT ); Tue, 24 Jul 2018 12:53:42 -0400 Received: from pps.filterd (m0001255.ppops.net [127.0.0.1]) by mx0b-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6OFgBb3000611; Tue, 24 Jul 2018 08:45:56 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=facebook; bh=gQ3jyUw+HUxRgby5xab85hRDwOZ2e9xXI7PxG3WTbAU=; b=Nv7VYz4xAEl388Ma87uicNnpffeqra7GjwmmlermyVRdEJN/y4WvRMt5XsLu4Kktg+R/ ISgUNd7QbuxiP6/M1ew3yyLvaxnGwihLRKIdoJ3Y9pd3NA/MQnGWrL+HxeeYMaEWzv/p QRwNPsCaYWqNvQRvXkKIuMhEYYKTUWxtT2g= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0b-00082601.pphosted.com with ESMTP id 2kdrra1v8g-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 24 Jul 2018 08:45:56 -0700 Received: from kafai-mbp (192.168.52.123) by mail.thefacebook.com (192.168.16.11) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 24 Jul 2018 08:45:53 -0700 Date: Tue, 24 Jul 2018 08:45:49 -0700 From: Martin KaFai Lau To: YueHaibing CC: , , , , , , , , Subject: Re: [PATCH bpf-next] bpf: btf: fix inconsistent IS_ERR and PTR_ERR Message-ID: <20180724154549.dulibeesja7ajwni@kafai-mbp> References: <20180724025524.22012-1-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20180724025524.22012-1-yuehaibing@huawei.com> User-Agent: NeoMutt/20180512 X-Originating-IP: [192.168.52.123] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-24_04:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 24, 2018 at 10:55:24AM +0800, YueHaibing wrote: > Fix inconsistent IS_ERR and PTR_ERR in get_btf, > the proper pointer to be passed as argument is '*btf' > > This issue was detected with the help of Coccinelle. > > Fixes: 2d3feca8c44f ("bpf: btf: print map dump and lookup with btf info") > Signed-off-by: YueHaibing Acked-by: Martin KaFai Lau > --- > tools/bpf/bpftool/map.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c > index 9c81918..0ee3ba4 100644 > --- a/tools/bpf/bpftool/map.c > +++ b/tools/bpf/bpftool/map.c > @@ -230,7 +230,7 @@ static int get_btf(struct bpf_map_info *map_info, struct btf **btf) > > *btf = btf__new((__u8 *)btf_info.btf, btf_info.btf_size, NULL); > if (IS_ERR(*btf)) { > - err = PTR_ERR(btf); > + err = PTR_ERR(*btf); > *btf = NULL; > } > > -- > 2.7.0 > >