From: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
To: Yangtao Li <tiny.windzz@gmail.com>
Cc: rjw@rjwysocki.net, viresh.kumar@linaro.org,
benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH] cpufreq: powernv: fix missing check of return value in init_powernv_pstates()
Date: Mon, 18 Feb 2019 00:41:49 +0530 [thread overview]
Message-ID: <20190217190155.GA25556@aks.ibm> (raw)
In-Reply-To: <20190216170623.12634-1-tiny.windzz@gmail.com>
On Sat, Feb 16, 2019 at 12:06:23PM -0500, Yangtao Li wrote:
> kmalloc() could fail, so insert a check of its return value. And
> if it fails, returns -ENOMEM.
>
> And remove (struct pstate_idx_revmap_data *) to fix coccinelle WARNING
> by the way.
>
> WARNING: casting value returned by memory allocation function to (struct
> pstate_idx_revmap_data *) is useless.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
> drivers/cpufreq/powernv-cpufreq.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
Looks good to me. Thanks for fixing this.
WARNING: multiple messages have this Message-ID (diff)
From: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
To: Yangtao Li <tiny.windzz@gmail.com>
Cc: linux-pm@vger.kernel.org, viresh.kumar@linaro.org,
rjw@rjwysocki.net, linux-kernel@vger.kernel.org,
paulus@samba.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] cpufreq: powernv: fix missing check of return value in init_powernv_pstates()
Date: Mon, 18 Feb 2019 00:41:49 +0530 [thread overview]
Message-ID: <20190217190155.GA25556@aks.ibm> (raw)
In-Reply-To: <20190216170623.12634-1-tiny.windzz@gmail.com>
On Sat, Feb 16, 2019 at 12:06:23PM -0500, Yangtao Li wrote:
> kmalloc() could fail, so insert a check of its return value. And
> if it fails, returns -ENOMEM.
>
> And remove (struct pstate_idx_revmap_data *) to fix coccinelle WARNING
> by the way.
>
> WARNING: casting value returned by memory allocation function to (struct
> pstate_idx_revmap_data *) is useless.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
> drivers/cpufreq/powernv-cpufreq.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
Looks good to me. Thanks for fixing this.
next prev parent reply other threads:[~2019-02-17 19:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-16 17:06 [PATCH] cpufreq: powernv: fix missing check of return value in init_powernv_pstates() Yangtao Li
2019-02-16 17:06 ` Yangtao Li
2019-02-17 19:11 ` Akshay Adiga [this message]
2019-02-17 19:11 ` Akshay Adiga
2019-02-18 4:59 ` Viresh Kumar
2019-02-18 4:59 ` Viresh Kumar
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=20190217190155.GA25556@aks.ibm \
--to=akshay.adiga@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=rjw@rjwysocki.net \
--cc=tiny.windzz@gmail.com \
--cc=viresh.kumar@linaro.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 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.