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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D969C433F5 for ; Tue, 17 May 2022 08:21:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239549AbiEQIVu (ORCPT ); Tue, 17 May 2022 04:21:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243111AbiEQIV1 (ORCPT ); Tue, 17 May 2022 04:21:27 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D046BCB1; Tue, 17 May 2022 01:21:25 -0700 (PDT) Received: from fraeml736-chm.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4L2TXG147Gz67x9g; Tue, 17 May 2022 16:18:22 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml736-chm.china.huawei.com (10.206.15.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 17 May 2022 10:21:22 +0200 Received: from [10.47.88.19] (10.47.88.19) 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.2375.24; Tue, 17 May 2022 09:21:21 +0100 Message-ID: Date: Tue, 17 May 2022 09:21:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v8 2/8] hwtracing: hisi_ptt: Add trace function support for HiSilicon PCIe Tune and Trace device To: Yicong Yang , Yicong Yang , , , , , , , , CC: , , , , , , , , , , , , , , , , , References: <20220516125223.32012-1-yangyicong@hisilicon.com> <20220516125223.32012-3-yangyicong@hisilicon.com> <90aafbc1-b7f6-1cc9-8f94-c72f05150f70@huawei.com> <31113797-29c5-1400-f7ac-bff79853b3fe@huawei.com> From: John Garry In-Reply-To: <31113797-29c5-1400-f7ac-bff79853b3fe@huawei.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.47.88.19] X-ClientProxiedBy: lhreml743-chm.china.huawei.com (10.201.108.193) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On 17/05/2022 09:09, Yicong Yang wrote: >>> +    target = cpumask_any(cpumask_of_node(dev_to_node(&hisi_ptt->pdev->dev))); >>> +    if (target < nr_cpumask_bits) { >> the comment for cpumask_any() hints to check against nr_cpu_ids - any specific reason to check against nr_cpumask_bits? >> > here should be: > if (target >= nr_cpumask_bits) { > > will fix this up. > I am still not sure that using nr_cpumask_bits is correct.