From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E82B7C433F5 for ; Wed, 8 Dec 2021 12:07:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:CC:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=quyyUwXhq5gxcAHj+vNjkZ2CFX4iKpEChy8PCB5vPUc=; b=BhIvFY0xU4mVcncQUSZoHW7KCo Q/Lcs4Om8u+0H5sMa2NoWubEHNAzGQMqBIGVOl1kQpvI2tVujbfSgFmN0JORbD0003DeNRrh3hqvT aSVhNXzM+B5SdnfGEMa/2uU5PbqKhpV9q1dlv81JUSi97VDaxnDajOog1E6BkL6cxOIg+CfsPvbmQ uM16GnwX31trzoyNv6tpWgL4In4XC4JDrvflmLOV4DnkEXeHV0WdEJnBYu3nwGAE5dQtMs8UZJre2 QZNErYxa8xMPBM++MPpg481KZUQrABkVcvVTqGR3hCAsJZc2MxGH4gUPmw1xQhYTg3R89cuYJsm0q Y8jKGT2A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1muviD-00CNJW-1D; Wed, 08 Dec 2021 12:06:17 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1muvi8-00CNHz-K4 for linux-arm-kernel@lists.infradead.org; Wed, 08 Dec 2021 12:06:14 +0000 Received: from fraeml714-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4J8G7c27GDz67b2S; Wed, 8 Dec 2021 20:05:00 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml714-chm.china.huawei.com (10.206.15.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 8 Dec 2021 13:06:09 +0100 Received: from [10.47.91.245] (10.47.91.245) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 8 Dec 2021 12:06:08 +0000 Subject: Re: [PATCH 01/22] libperf: Add comments to perf_cpu_map. To: Ian Rogers , Andi Kleen , "Jiri Olsa" , Namhyung Kim , Kajol Jain , "Paul A . Clarke" , "Arnaldo Carvalho de Melo" , Riccardo Mancini , Kan Liang , Peter Zijlstra , "Ingo Molnar" , Mark Rutland , "Alexander Shishkin" , , , "Vineet Singh" , James Clark , "Mathieu Poirier" , Suzuki K Poulose , Mike Leach , Leo Yan , , CC: References: <20211208024607.1784932-1-irogers@google.com> <20211208024607.1784932-2-irogers@google.com> From: John Garry Message-ID: Date: Wed, 8 Dec 2021 12:05:49 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20211208024607.1784932-2-irogers@google.com> Content-Language: en-US X-Originating-IP: [10.47.91.245] X-ClientProxiedBy: lhreml724-chm.china.huawei.com (10.201.108.75) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211208_040612_846867_7AA7F253 X-CRM114-Status: GOOD ( 11.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 08/12/2021 02:45, Ian Rogers wrote: > diff --git a/tools/lib/perf/include/internal/cpumap.h b/tools/lib/perf/include/internal/cpumap.h > index 840d4032587b..1c1726f4a04e 100644 > --- a/tools/lib/perf/include/internal/cpumap.h > +++ b/tools/lib/perf/include/internal/cpumap.h > @@ -4,9 +4,16 @@ > > #include > > +/** > + * A sized, reference counted, sorted array of integers representing CPU > + * numbers. This is commonly used to capture which CPUs a PMU is associated > + * with. > + */ > struct perf_cpu_map { > refcount_t refcnt; > + /** Length of the map array. */ > int nr; > + /** The CPU values. */ > int map[]; would simply more distinct names for the variables help instead of or in addition to comments? Generally developers don't always check comments where the struct is defined when the meaning could be judged intuitively Thanks, John _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel