Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5141377pxj; Wed, 9 Jun 2021 10:03:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJjKBH3t38627qNTZn5cWREuere8F1jkOSTeeypw/yt6K7wqvS74MlBt1GX8yA95hSnwae X-Received: by 2002:a17:907:6288:: with SMTP id nd8mr826162ejc.223.1623258224358; Wed, 09 Jun 2021 10:03:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623258224; cv=none; d=google.com; s=arc-20160816; b=jEApiNfuusnrftww0LBwCLGPReuskymbkPZwZup+a5L5PgElYB5qWaq4Tz8XypCxxp /JiJ8ZgcbNOlnDjzQCC4r1/9WStX6FtlJaA1FbECIkGlrGKsrzVQu+BGlaq/1kIGj5c4 LkB+WMiYoYgQPSUlsikbFHuePenKb7WCO7a4sgmeyvxV5BU4oVb+Hbk3PWOu8tbppjy/ Iq+g6oUqHyxFtNgqC67jI5ZG83r2IWpC609H8ZP1/AIzFzLniEIBvkgaXJ9EKtcBgVMf tSWn6mJnuzly6QkUBbOJ4PGHuCsb7d4Y/JV24BKhxLxlYcYG4VrIx5+OdPBMluZRgiNd ntPQ== 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=GVeB+rwKZpnp3+RTZuYnAhBo7hNNTRVh4FWiaWkRcz8=; b=te7Etdsfno/bxzY2BE0aeLyq4EUBnL5x0Ruf0FRbYPSlnLe2ppIFDPvJuvxIOj2aH5 WTODqlr9l1JRDLN8YdMzxy9McJUoDq8GDnLN2efk06149KIPDnYCsrmTO9XtslbXSK2M g1uGR62RIlUV6cG5xrqzOecyVIEfH1oibCSh1zy6LRtLIAR1xkpCM9neH9g6ZRdBRA0Q vvcqZNgBr6C4pSCO4KJCZbIUEFckGr4zr2mg1Vwv+fjiuWQIe9LbvslJX2mYsYKFu8xm dgCccvbCdGZJc5Fj4ReEeuil/qAD2pXrU25gUjr5b3Cf2O8Il+reWyUBxl3aEAy3lRU7 u6gw== 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=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jx12si299083ejc.502.2021.06.09.10.03.17; Wed, 09 Jun 2021 10:03:44 -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=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235386AbhFIB2m (ORCPT + 99 others); Tue, 8 Jun 2021 21:28:42 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:3803 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230303AbhFIB2m (ORCPT ); Tue, 8 Jun 2021 21:28:42 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4G08Tb0rB1zWsQv; Wed, 9 Jun 2021 09:21:55 +0800 (CST) Received: from dggema757-chm.china.huawei.com (10.1.198.199) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Wed, 9 Jun 2021 09:26:46 +0800 Received: from [127.0.0.1] (10.69.38.203) by dggema757-chm.china.huawei.com (10.1.198.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Wed, 9 Jun 2021 09:26:46 +0800 Subject: Re: [PATCH v3 8/9] drivers/perf: Simpilfy EVENT ATTR macro in arm_dsu_pmu.c To: Will Deacon , Qi Liu CC: , , Mark Rutland , Linuxarm References: <1623123201-45634-1-git-send-email-liuqi115@huawei.com> <1623123201-45634-9-git-send-email-liuqi115@huawei.com> <20210608085245.GA8791@willie-the-truck> From: "liuqi (BA)" Message-ID: <6faf9ebb-ed43-5fdb-f8b2-419c807ca45b@huawei.com> Date: Wed, 9 Jun 2021 09:26:45 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20210608085245.GA8791@willie-the-truck> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Originating-IP: [10.69.38.203] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggema757-chm.china.huawei.com (10.1.198.199) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Will, On 2021/6/8 16:52, Will Deacon wrote: > On Tue, Jun 08, 2021 at 11:33:20AM +0800, Qi Liu wrote: >> Use common macro PMU_EVENT_ATTR_ID to simplify DSU_EVENT_ATTR. >> >> Cc: Will Deacon >> Cc: Mark Rutland >> Signed-off-by: Qi Liu >> --- >> drivers/perf/arm_dsu_pmu.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/perf/arm_dsu_pmu.c b/drivers/perf/arm_dsu_pmu.c >> index 196faea..bed8376 100644 >> --- a/drivers/perf/arm_dsu_pmu.c >> +++ b/drivers/perf/arm_dsu_pmu.c >> @@ -82,7 +82,7 @@ >> })[0].attr.attr) >> >> #define DSU_EVENT_ATTR(_name, _config) \ >> - DSU_EXT_ATTR(_name, dsu_pmu_sysfs_event_show, (unsigned long)_config) >> + PMU_EVENT_ATTR_ID(_name, dsu_pmu_sysfs_event_show, _config) >> >> #define DSU_FORMAT_ATTR(_name, _config) \ >> DSU_EXT_ATTR(_name, dsu_pmu_sysfs_format_show, (char *)_config) > > I'm not convinced this is any simpler. We still have two users of the > DSU_EXT_ATTR macro and the net effect is no change in line count. > Got it, I'll drop this patch and sent a new patchset. Thanks, Qi > Will > . >