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 B7150C54E41 for ; Mon, 26 Feb 2024 15:11:42 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uRU77MXGijmSOC/tVX0sCjsQ2aqQOJpcH9V+bUqkAZY=; b=JVl/oqZ2uD5T2i lZCgscoTz22u2GX9fMIX5EH5R54vcFHKnefu0f8zABznzOrO4MfeGr3EeuRHWo8J9SfPZqtgpPTaq Kst0Iq7MzIQM46Ex7liv6PVYO8mWv+Ytst9oWHjsikp8NAqSQBtMzL3BVgIDjeeu0NsgEF3WpF8o5 8kjU1JyCDh6imROwwNTOGuTBELgNNV1MPqVWGBBu8aGQZp2M1s5T68k9WxsdwBbd2WkcXqSVOxaJk XxS+C3RzuLgbAkHJcUfDcNr0lUycFAnnkaoLHm1I84FkxbCTVrXTZJE6O9G9YFDEs7JvC1Je9g8L8 Fc3c0I+zxxzl8xeOpIrw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1recda-00000001LQ5-3Ijw; Mon, 26 Feb 2024 15:11:26 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1recdW-00000001LNN-3qw0 for linux-arm-kernel@lists.infradead.org; Mon, 26 Feb 2024 15:11:25 +0000 Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Tk3qJ6YCkz6J9qf; Mon, 26 Feb 2024 23:06:36 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id C74521419FA; Mon, 26 Feb 2024 23:11:10 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 26 Feb 2024 15:11:10 +0000 Date: Mon, 26 Feb 2024 15:11:09 +0000 From: Jonathan Cameron To: Yicong Yang CC: , , , , , , , , Subject: Re: [PATCH v2 1/8] drivers/perf: hisi_pcie: Rename hisi_pcie_pmu_{config,clear}_filter() Message-ID: <20240226151109.00003b31@Huawei.com> In-Reply-To: <20240223103359.18669-2-yangyicong@huawei.com> References: <20240223103359.18669-1-yangyicong@huawei.com> <20240223103359.18669-2-yangyicong@huawei.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml100004.china.huawei.com (7.191.162.219) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240226_071123_329794_56388FB0 X-CRM114-Status: GOOD ( 15.14 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 23 Feb 2024 18:33:52 +0800 Yicong Yang wrote: > From: Yicong Yang > > hisi_pcie_pmu_{config,clear}_filter() are config/clear HISI_PCIE_EVENT_CTRL > register which contains not only the filter but also the event code. The > function names are bit misleading. Rename it to > hisi_pcie_pmu_{config,clear}_event_ctrl() to reflects their functions > more accurately. > > Signed-off-by: Yicong Yang Definitely an improvement on readability. As discussed offline I'm not sure the 'clear' part is strictly right either, but in some sense that's a separate issue. Reviewed-by: Jonathan Cameron > --- > drivers/perf/hisilicon/hisi_pcie_pmu.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/perf/hisilicon/hisi_pcie_pmu.c b/drivers/perf/hisilicon/hisi_pcie_pmu.c > index b90ba8aca3fa..9760ddde46fd 100644 > --- a/drivers/perf/hisilicon/hisi_pcie_pmu.c > +++ b/drivers/perf/hisilicon/hisi_pcie_pmu.c > @@ -216,7 +216,7 @@ static void hisi_pcie_pmu_writeq(struct hisi_pcie_pmu *pcie_pmu, u32 reg_offset, > writeq_relaxed(val, pcie_pmu->base + offset); > } > > -static void hisi_pcie_pmu_config_filter(struct perf_event *event) > +static void hisi_pcie_pmu_config_event_ctrl(struct perf_event *event) > { > struct hisi_pcie_pmu *pcie_pmu = to_pcie_pmu(event->pmu); > struct hw_perf_event *hwc = &event->hw; > @@ -259,7 +259,7 @@ static void hisi_pcie_pmu_config_filter(struct perf_event *event) > hisi_pcie_pmu_writeq(pcie_pmu, HISI_PCIE_EVENT_CTRL, hwc->idx, reg); > } > > -static void hisi_pcie_pmu_clear_filter(struct perf_event *event) > +static void hisi_pcie_pmu_clear_event_ctrl(struct perf_event *event) > { > struct hisi_pcie_pmu *pcie_pmu = to_pcie_pmu(event->pmu); > struct hw_perf_event *hwc = &event->hw; > @@ -505,7 +505,7 @@ static void hisi_pcie_pmu_start(struct perf_event *event, int flags) > WARN_ON_ONCE(!(hwc->state & PERF_HES_UPTODATE)); > hwc->state = 0; > > - hisi_pcie_pmu_config_filter(event); > + hisi_pcie_pmu_config_event_ctrl(event); > hisi_pcie_pmu_enable_counter(pcie_pmu, hwc); > hisi_pcie_pmu_enable_int(pcie_pmu, hwc); > hisi_pcie_pmu_set_period(event); > @@ -526,7 +526,7 @@ static void hisi_pcie_pmu_stop(struct perf_event *event, int flags) > hisi_pcie_pmu_event_update(event); > hisi_pcie_pmu_disable_int(pcie_pmu, hwc); > hisi_pcie_pmu_disable_counter(pcie_pmu, hwc); > - hisi_pcie_pmu_clear_filter(event); > + hisi_pcie_pmu_clear_event_ctrl(event); > WARN_ON_ONCE(hwc->state & PERF_HES_STOPPED); > hwc->state |= PERF_HES_STOPPED; > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel