From: Catalin Marinas <catalin.marinas@arm.com>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, will@kernel.org,
mark.rutland@arm.com, suzuki.poulose@arm.com,
Mark Brown <broonie@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3] arm64/cpufeature: Add get_arm64_ftr_reg_nowarn()
Date: Wed, 27 May 2020 12:37:03 +0100 [thread overview]
Message-ID: <20200527113703.GD28101@gaia> (raw)
In-Reply-To: <1590573876-19120-1-git-send-email-anshuman.khandual@arm.com>
On Wed, May 27, 2020 at 03:34:36PM +0530, Anshuman Khandual wrote:
> +/*
> + * get_arm64_ftr_reg - Looks up a feature register entry using
> + * its sys_reg() encoding. This calls get_arm64_ftr_reg_nowarn().
> + *
> + * returns - Upon success, matching ftr_reg entry for id.
> + * - NULL on failure but with an WARN_ON().
> + */
> +static struct arm64_ftr_reg *get_arm64_ftr_reg(u32 sys_id)
> +{
> + struct arm64_ftr_reg *reg;
> +
> + reg = get_arm64_ftr_reg_nowarn(sys_id);
> +
> + /*
> + * Can not really proceed when the search fails here.
> + * Requesting for a non existent register search will
> + * be an error. Warn but let it continue for now.
> + */
> + WARN_ON(!reg);
> + return reg;
I find the comment here slightly confusing: cannot proceed but continue.
Maybe something like:
/*
* Requesting a non-existent register search is an error. Warn
* and let the caller handle it.
*/
Otherwise it looks fine:
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
next prev parent reply other threads:[~2020-05-27 11:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-27 10:04 [PATCH V3] arm64/cpufeature: Add get_arm64_ftr_reg_nowarn() Anshuman Khandual
2020-05-27 11:37 ` Catalin Marinas [this message]
2020-05-27 12:25 ` Will Deacon
2020-05-28 7:46 ` Anshuman Khandual
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=20200527113703.GD28101@gaia \
--to=catalin.marinas@arm.com \
--cc=anshuman.khandual@arm.com \
--cc=broonie@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=suzuki.poulose@arm.com \
--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;
as well as URLs for NNTP newsgroup(s).