Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3921386pxj; Tue, 8 Jun 2021 01:54:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5zV9y33ptGMpC5JALHLyLyOjv6Zn6mf77OvJzXGtRo7wEkiE/gYSPU0Q8Q80zbH9OnXfx X-Received: by 2002:a17:906:f9d1:: with SMTP id lj17mr22623281ejb.345.1623142446183; Tue, 08 Jun 2021 01:54:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623142446; cv=none; d=google.com; s=arc-20160816; b=sWz6b2ky5ic8ZvmA1qwXuKMe9SqBq85VXdayppB64Q6HHuq9U1HkbFPgTZ9enU9jvV 0QdY9WK0ttoauEUUJr99LZVxfcKfD+F9zO7oFlh+iU6eBjDd/engZneCgenyu7XPgWRx rgYZRQMoVs2DU59gHo3Frz3xpj042WMhkvxhl6WRmiNGUs4vZrGEVOJdrXL8aTB7E3Dt rlG8Rvusd0SxZmhVRx7Ce1B7O2fuzCJqpsbtCAYSYtWgOEMINVCr4LY84Cw30bU7Rw2g +Wee25XNOm0lJXKUsmJJsusxrBWHrUn7i87uwAFcdOqbpuWoCMXz/k9DFBKGkP3X71CG +SBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=HSeAepRP+QVWkjwqiU/wm31lyNghZjtvUmqR3/2Z/Rs=; b=tLJIqFRxIuc773V/KsPY0S5YwhccvHl8nawRgJcaYKtQyiKSg6D7Hz+pSDEYXlMHCo RuDQjIaSqXNuLeOKUpXSbrYK1MrX+CNTvWp7zepL7oVAe8KE68k3R5H0KDTrVXAD7bVR pvoNyjBG3G0J2OK7z/ai9auVLc9q783w5JZ2/f4H1MlR5+srmv8iAN9ZmRjWg+CcSuEQ TXCwkdOA8dG+uZjVksO9/MSEEItpXEXTwmFUQ+l0TlzDMOeCw6itCvJknX5cqdDpEDTm AQv56sUqeRFuQDZXeP50MWoZwPThtoqy4uTg9a+SQ3UZysgFpZTFG2d26Ze1eWJ0amnL 71gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AxBTUuuq; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f23si7427321ejj.287.2021.06.08.01.53.41; Tue, 08 Jun 2021 01:54:06 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AxBTUuuq; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230268AbhFHIyn (ORCPT + 99 others); Tue, 8 Jun 2021 04:54:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:56626 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbhFHIyn (ORCPT ); Tue, 8 Jun 2021 04:54:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 78DDE6124B; Tue, 8 Jun 2021 08:52:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623142370; bh=ffcy4ITRe2eWn3D6+rBqkBtJ9q7jBgASKT2AeYL6tlo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AxBTUuuqJFLd+tUj+ExsdO3Tk7AOsBqAzJOl93L45BIJhTCmBl/emih/hJfbF6MhX CLrDZ7U0W0JsVyIdy5X76QcoH0ViKA7WYOOALgv707aGn0yQZmVojVAffK/hI16SbJ dCIFpJs2fa+g3lAPPuIWSYepi2zwkYL/G3syjefyyOAyZj/nVLn2IZbU3lkJvhq1cO lpd0WFCUzg+iKH68CEV9cQA4H5UYJwtAFzSCcbIp5O9k7t8Lbn4LFrqK8rCnk+2cq8 CuS+LyOr8znLPaiximWsp0d3RsQY2d+pEAy8/Ix7MmaB/G0/FUAf26qF1v2eCcM9J1 CWfSkl5SmdV6A== Date: Tue, 8 Jun 2021 09:52:46 +0100 From: Will Deacon To: Qi Liu Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com, Mark Rutland Subject: Re: [PATCH v3 8/9] drivers/perf: Simpilfy EVENT ATTR macro in arm_dsu_pmu.c Message-ID: <20210608085245.GA8791@willie-the-truck> References: <1623123201-45634-1-git-send-email-liuqi115@huawei.com> <1623123201-45634-9-git-send-email-liuqi115@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1623123201-45634-9-git-send-email-liuqi115@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Will