Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4455493pxt; Wed, 11 Aug 2021 06:32:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyk5+fUt4Pc9WWgIe46//JiS94kPNJ0YI1Q7QNlW3dVLIdSfXpQ39bhI64LhzpmH78GRfYh X-Received: by 2002:a2e:82c4:: with SMTP id n4mr23196424ljh.472.1628688729015; Wed, 11 Aug 2021 06:32:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628688728; cv=none; d=google.com; s=arc-20160816; b=C54YOIirZjvlZY00ys7X74j45H2sSQA9h2D3ZsaWohe2ofi+1buH3ot0VDQHORl3Y/ IOGaWiL3pqzj9nIPNDvsk+juuMUQxP7peemvEjSf0eYYI+2sUfnTiiCPGdXbjRJP6Dh7 vtaFnoKiCsEn8laad++qZJayPud33SkcGfPK3nqaNSoYKFBlfOaO2XVfNp9E+dLdlhXr iKRQo7FcAS2jDcxmj51y/8JdbOZDpFzBemNFuq5f1sq4hSFK28vr3C7tLE++l0FXBxhq PfIAkjC1EET/R2OgiltC205HKZbsvJbpuwbIDuspXPEL3LcFzedHcuaa/nLOSJdEKy6M CvCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=GwyyBY2A+GcufhsXC3M/pKvt/d4p50TGA1Z1SIB8bvk=; b=GgKzV60EvVc3f/y3FianPneTANA9dqrRGswtrZxxZ7rukFL0ArQdhAJNmDx/KNAFO6 GH8FvJ2oyl2A3Dbwew6FlGmO9BT2/0wYCWuV6+JldhuyeVJXjdzFljAYVBiieMzZ7YPo INiJW2Kh6ff5iEViFHLQEy5Zr9ukQmMM5w3QYwrNBTIG7B/BBAMNBvO6zvFKGEnSbnDv fm/I5IpBRZEwbFimTExu6sszGCN1XFu4g0lw3yxfFKPRz5DLjPMUVrZ0SQ90037l7dDn +xyEmwkZ7XVJbzPKoh/S0Cfn2rpXa/OSs5iKi8TmsB6LYGZJo5LjVRAKirJ6Oha9I6JK t6tQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q7si22627867eja.751.2021.08.11.06.31.43; Wed, 11 Aug 2021 06:32:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230170AbhHKN2P (ORCPT + 99 others); Wed, 11 Aug 2021 09:28:15 -0400 Received: from mga04.intel.com ([192.55.52.120]:47024 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231546AbhHKN2O (ORCPT ); Wed, 11 Aug 2021 09:28:14 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10072"; a="213268141" X-IronPort-AV: E=Sophos;i="5.84,313,1620716400"; d="scan'208";a="213268141" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2021 06:27:48 -0700 X-IronPort-AV: E=Sophos;i="5.84,313,1620716400"; d="scan'208";a="469402094" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.209.58.25]) ([10.209.58.25]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2021 06:27:37 -0700 Subject: Re: [PATCH v4 1/2] perf pmu: Add PMU alias support To: Jin Yao , acme@kernel.org, jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com Cc: Linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, kan.liang@intel.com, yao.jin@intel.com, rickyman7@gmail.com, Kan Liang References: <20210811024827.9483-1-yao.jin@linux.intel.com> <20210811024827.9483-2-yao.jin@linux.intel.com> From: Andi Kleen Message-ID: <1d9d2f4e-ed7e-e770-066d-ef53ec31b42d@linux.intel.com> Date: Wed, 11 Aug 2021 06:27:37 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210811024827.9483-2-yao.jin@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + > + dir = opendir(path); > + if (!dir) > + return -1; Could we cache/check the opendir result through file_available too? The rest looks good Reviewed-by: Andi Kleen -Andi