Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp878452pxb; Tue, 29 Mar 2022 12:02:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzS6leW6hhVrnOO9pKyYUB2jsXlsf70xCXSjKltyNa0FaN2GTwTzpSk2zIe3mFa+lOLICe0 X-Received: by 2002:a05:6122:16aa:b0:342:eb15:bf88 with SMTP id 42-20020a05612216aa00b00342eb15bf88mr13231684vkl.30.1648580558820; Tue, 29 Mar 2022 12:02:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648580558; cv=none; d=google.com; s=arc-20160816; b=sls98mt5gNscfRymzwzj5xufQsozGo263zL3XFz8qegDddN4ynD9Qq1UCUgj2gqkgu RgngqZiBdVgHIEQeo0751SNziPF/mlZd6rQWSzk8+kOa0MIRf4+0jTNZibbxS6nIdr25 Fje8DczBCltCxPqqBmda5WEb0IKQrQyYsBy5S3pU1cy8lT5sDVL0ZY2+IFP6ifvwTsIn Q5bfEPRWkF6jSYJ37MhVtRxJXIgoKUObl5+1ZF5IHfKI/9hb185cwKhPvp6kAqCh9ANh Oh/d4oIYUzDnrCIsk8lPqNQlL4PGruLcrVZ3ZpKJWkwgDNTKCzVsK0smd5PrV1ST6jJR wyHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=0GAt+bfp0tB1V34qjhs1gENgJpnR+yM0g8S6fQsOjUs=; b=axQHxeERhTM/npxpg+EoA7ip/tMqzHc1h8MEFtNHv4fZdusLyVyRgWURL9lHG6/DHG sqyAtuRBqyQrlBOs1kD3/FCOfKX2Tn65viAcJHZZNMN9r+pEBR6ZC1c/BBC8FL9ljBP6 Z17WZdGx5y15+mJ7rkH8nfDs24d6bqvdJiy5w2iogF3/9lnocxBirDd1l01qXzmLDd8P idieY/iia/UvWiqP8bph1KZQqYbeK5VmunJTPqxX3g3+Z4fTEARuOFGV3FpSZf0LUkOP HGmSd2JR3qemJlODszXC6u6olJlGL6hhf2Ot9oPX0WZ+ShxpKrIp+fLCGOv4U6OoNlCP 3ONw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ug75xzT5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a39-20020ab03ca7000000b0034c07a93b31si747091uax.204.2022.03.29.12.02.01; Tue, 29 Mar 2022 12:02:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ug75xzT5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238073AbiC2Osm (ORCPT + 99 others); Tue, 29 Mar 2022 10:48:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238091AbiC2Osj (ORCPT ); Tue, 29 Mar 2022 10:48:39 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E555C7666F for ; Tue, 29 Mar 2022 07:46:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 32951B8181A for ; Tue, 29 Mar 2022 14:46:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9004BC2BBE4; Tue, 29 Mar 2022 14:46:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648565212; bh=NI2Az7Mki6uKWg/mQRI5kFlwEnKHbVW29uFiWe61tUs=; h=Date:From:To:Cc:Subject:From; b=Ug75xzT5715xtp36K62YjK3JN71MnScjuz4nliC/zhbc8D8oGvcvn80H+qMnh0wpw LbAvdyB66T7CSxkdkgFzSTC5NVrG4b7caWbaHctsuR1UeteoN79FYvGo00TBOVD20j mLb/L7XWJoL0E3dpsAkMQnX+txmPDllQ9PrF+Fn7WLQstE3+Umct1rCRfTxjzzG5M5 tZfX5Kw5I1LX6k3nzGE+T0arRJfwo64ZFJ2s8W8PCie2s+QnoAa+d5dsAlUXT87+vJ 35dDdz2oCaM/BPMEzZYMjckWvSyxk2B8WvqIJh8KVxJ0Z8hABLUMevAEWQgw7GWzsW Bna4shemNu33Q== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 7A28640407; Tue, 29 Mar 2022 11:46:49 -0300 (-03) Date: Tue, 29 Mar 2022 11:46:49 -0300 From: Arnaldo Carvalho de Melo To: Mauricio =?iso-8859-1?Q?V=E1squez?= , Andrii Nakryiko Cc: Ian Rogers , Jiri Olsa , Namhyung Kim , Linux Kernel Mailing List Subject: [FYI PATCH 1/1] perf tools: Update copy of libbpf's hashmap.c Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Just FYI, I'm carrying this patch in the perf tools tree. - Arnaldo --- To pick the changes in: fba60b171a032283 ("libbpf: Use IS_ERR_OR_NULL() in hashmap__free()") That don't entail any changes in tools/perf. This addresses this perf build warning: Warning: Kernel ABI header at 'tools/perf/util/hashmap.h' differs from latest version at 'tools/lib/bpf/hashmap.h' diff -u tools/perf/util/hashmap.h tools/lib/bpf/hashmap.h Not a kernel ABI, its just that this uses the mechanism in place for checking kernel ABI files drift. Cc: Andrii Nakryiko Cc: Ian Rogers Cc: Jiri Olsa Cc: Mauricio V?squez Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/hashmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/perf/util/hashmap.c b/tools/perf/util/hashmap.c index 3c20b126d60d869a..aeb09c2887162d16 100644 --- a/tools/perf/util/hashmap.c +++ b/tools/perf/util/hashmap.c @@ -75,7 +75,7 @@ void hashmap__clear(struct hashmap *map) void hashmap__free(struct hashmap *map) { - if (!map) + if (IS_ERR_OR_NULL(map)) return; hashmap__clear(map); @@ -238,4 +238,3 @@ bool hashmap__delete(struct hashmap *map, const void *key, return true; } - -- 2.35.1