From: Will Deacon <will.deacon@arm.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Nicholas Mc Guire <hofrat@osadl.org>
Subject: Re: [PATCH] perf: arm_spe: handle devm_kasprintf() failure
Date: Thu, 29 Nov 2018 16:01:06 +0000 [thread overview]
Message-ID: <20181129160105.GA4546@arm.com> (raw)
In-Reply-To: <20181129121432.2ntsfhp2s43gyvfx@lakrids.cambridge.arm.com>
On Thu, Nov 29, 2018 at 12:14:32PM +0000, Mark Rutland wrote:
> On Wed, Nov 28, 2018 at 12:24:47PM +0100, Nicholas Mc Guire wrote:
> > diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c
> > index 54ec278..f1ea00c 100644
> > --- a/drivers/perf/arm_spe_pmu.c
> > +++ b/drivers/perf/arm_spe_pmu.c
> > @@ -927,6 +927,11 @@ static int arm_spe_pmu_perf_init(struct arm_spe_pmu *spe_pmu)
> >
> > idx = atomic_inc_return(&pmu_idx);
> > name = devm_kasprintf(dev, GFP_KERNEL, "%s_%d", PMUNAME, idx);
> > + if (!name) {
> > + dev_err(dev, "Allocation of name failed\n");
> > + return -ENOMEM;
> > + }
>
> In the other dev_err() messages, we use the form "failed to ...", e.g.
>
> "failed to get IRQ (%d)\n"
> "failed to get PPI partition (%d)\n
> "failed to allocate spe_pmu\n"
>
> ... so for consistency could you please change the string to:
>
> "failed to allocate spe_pmu name\n"
>
> With that, feel free to add:
>
> Acked-by: Mark Rutland <mark.rutland@arm.com>
Thanks, I've queued this for 4.21 with a tweaked error message.
Will
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Nicholas Mc Guire <hofrat@osadl.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf: arm_spe: handle devm_kasprintf() failure
Date: Thu, 29 Nov 2018 16:01:06 +0000 [thread overview]
Message-ID: <20181129160105.GA4546@arm.com> (raw)
In-Reply-To: <20181129121432.2ntsfhp2s43gyvfx@lakrids.cambridge.arm.com>
On Thu, Nov 29, 2018 at 12:14:32PM +0000, Mark Rutland wrote:
> On Wed, Nov 28, 2018 at 12:24:47PM +0100, Nicholas Mc Guire wrote:
> > diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c
> > index 54ec278..f1ea00c 100644
> > --- a/drivers/perf/arm_spe_pmu.c
> > +++ b/drivers/perf/arm_spe_pmu.c
> > @@ -927,6 +927,11 @@ static int arm_spe_pmu_perf_init(struct arm_spe_pmu *spe_pmu)
> >
> > idx = atomic_inc_return(&pmu_idx);
> > name = devm_kasprintf(dev, GFP_KERNEL, "%s_%d", PMUNAME, idx);
> > + if (!name) {
> > + dev_err(dev, "Allocation of name failed\n");
> > + return -ENOMEM;
> > + }
>
> In the other dev_err() messages, we use the form "failed to ...", e.g.
>
> "failed to get IRQ (%d)\n"
> "failed to get PPI partition (%d)\n
> "failed to allocate spe_pmu\n"
>
> ... so for consistency could you please change the string to:
>
> "failed to allocate spe_pmu name\n"
>
> With that, feel free to add:
>
> Acked-by: Mark Rutland <mark.rutland@arm.com>
Thanks, I've queued this for 4.21 with a tweaked error message.
Will
next prev parent reply other threads:[~2018-11-29 16:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-28 11:24 [PATCH] perf: arm_spe: handle devm_kasprintf() failure Nicholas Mc Guire
2018-11-28 11:24 ` Nicholas Mc Guire
2018-11-29 12:14 ` Mark Rutland
2018-11-29 16:01 ` Will Deacon [this message]
2018-11-29 16:01 ` 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=20181129160105.GA4546@arm.com \
--to=will.deacon@arm.com \
--cc=hofrat@osadl.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.