public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm_pmu: Drop redundant armpmu->map_event() in armpmu_event_init()
Date: Thu, 1 Dec 2022 12:24:35 +0000	[thread overview]
Message-ID: <Y4idAz6XTpj6gdTd@FVFF77S0Q05N> (raw)
In-Reply-To: <20221130083350.264583-1-anshuman.khandual@arm.com>

On Wed, Nov 30, 2022 at 02:03:50PM +0530, Anshuman Khandual wrote:
> __hw_perf_event_init() already calls armpmu->map_event() callback, and also
> returns its error code including -ENOENT, along with a debug callout. Hence
> an additional armpmu->map_event() check for -ENOENT is redundant.

Hmm; it looks like this has been redundant since commit:

  e1f431b57ef9e4a6 ("ARM: perf: refactor event mapping")

... and was an oversight on my behalf.

This looks fine to me, so FWIW:

Acked-by: Mark Rutland <mark.rutland@arm.com>

Mark.

> 
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> ---
> This applies on v6.1-rc6
> 
>  drivers/perf/arm_pmu.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c
> index 6538cec1a601..4be6869005f1 100644
> --- a/drivers/perf/arm_pmu.c
> +++ b/drivers/perf/arm_pmu.c
> @@ -529,10 +529,6 @@ static int armpmu_event_init(struct perf_event *event)
>  			return -EOPNOTSUPP;
>  		}
>  	}
> -
> -	if (armpmu->map_event(event) == -ENOENT)
> -		return -ENOENT;
> -
>  	return __hw_perf_event_init(event);
>  }
>  
> -- 
> 2.25.1
> 

  reply	other threads:[~2022-12-01 12:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-30  8:33 [PATCH] arm_pmu: Drop redundant armpmu->map_event() in armpmu_event_init() Anshuman Khandual
2022-12-01 12:24 ` Mark Rutland [this message]
2022-12-01 17:45 ` Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y4idAz6XTpj6gdTd@FVFF77S0Q05N \
    --to=mark.rutland@arm.com \
    --cc=anshuman.khandual@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox