Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp295996pxt; Wed, 11 Aug 2021 21:41:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5cHbwUcadPtxfuGVg4D/42h7yNHlq87PFOlwmSSKwvkYvwKq7RJPzeh5OiK6p9QMFOSkb X-Received: by 2002:a17:906:d1d6:: with SMTP id bs22mr428779ejb.554.1628743317265; Wed, 11 Aug 2021 21:41:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628743317; cv=none; d=google.com; s=arc-20160816; b=ZX1xUMVOqrlA5aGsLoQnWScIouZ5HanZD8UkWybzFjFZKYekEtUADGmE11pkDgMeGM J2PIkB51IxgXLsCTLws41GiqpurEClI3EePtnW8YJ33ONlJVFMuzEbhOeN0S+a9r8cNM 0+fvnrNtEQwgbUQWgoLgdlfJvAKEwWPvRHIYmCCCiLVbFgGYzQ+kCypRY/Z8lQSi6rrs cYS8nad7lhHMdNglzxPc8sosTdg+3vZhxS3lYcI1v5DpvS1HQAjMG910+Uq9jeiYf8EV cyIcu2WledKdyjT/VSC0kxTW4zEGHe4ABI1BY5WJg9oLFVaaxaG9mZTGhkgpmv0d14rF /27g== 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-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=QIQ8XVkxmM62Na0sKOHaDAfA54c6z/ZEJq29i2dI4Yc=; b=BzIDYCOuyUQNlNPAlLx1EfcBEt9EN9giaKJniOSmeXzSHHFInuXXbFxh+ZtFMl0pwn Uj9GqOFTED+tDwo7dGvt3K/6Nx+xKKqmSpLeK5ffH+QxbJ9ZMG/okjpwzHyDRobHYtoZ TedibA/j6SRXmxDaVsWoU6+bX/QSsNiUPe8FKB9kC95a51390YXnitTXcuatSkzUg2YS SE/GSR0Ykgj+5+9jUIjP/UK6kKC3BJiDi2Q3+Ddkch/qrg6uyZAgrbJlcsWAeH7rf5Qt HLjDH9yPiXtihLRamw08UTiHNWsHVv9Ncu2vCckuO9SnRTzYem+h9CGCneQc7Z26sE/E 060Q== 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 c2si1391161ejz.69.2021.08.11.21.41.32; Wed, 11 Aug 2021 21:41:57 -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 S233971AbhHLEjg (ORCPT + 99 others); Thu, 12 Aug 2021 00:39:36 -0400 Received: from mga02.intel.com ([134.134.136.20]:45052 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233944AbhHLEjg (ORCPT ); Thu, 12 Aug 2021 00:39:36 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10073"; a="202463615" X-IronPort-AV: E=Sophos;i="5.84,314,1620716400"; d="scan'208";a="202463615" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2021 21:39:10 -0700 X-IronPort-AV: E=Sophos;i="5.84,314,1620716400"; d="scan'208";a="517294469" Received: from yjin15-mobl1.ccr.corp.intel.com (HELO [10.249.174.184]) ([10.249.174.184]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2021 21:39:06 -0700 Subject: Re: [PATCH v4 1/2] perf pmu: Add PMU alias support To: Andi Kleen , 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> <1d9d2f4e-ed7e-e770-066d-ef53ec31b42d@linux.intel.com> From: "Jin, Yao" Message-ID: Date: Thu, 12 Aug 2021 12:39:04 +0800 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: <1d9d2f4e-ed7e-e770-066d-ef53ec31b42d@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/11/2021 9:27 PM, Andi Kleen wrote: > >> + >> +    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 Thanks Andi! Let me check how to do it. Thanks Jin Yao