linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Michael Turquette <mturquette@baylibre.com>,
	Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	Xuefeng Li <lixuefeng@loongson.cn>
Subject: Re: [PATCH v4 1/2] clk: hisilicon: Use correct return value about hisi_reset_init()
Date: Fri, 29 May 2020 14:14:22 -0700	[thread overview]
Message-ID: <159078686285.69627.11416031375116687757@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <f11b46d7-0d94-b4b3-350a-19e5a98d5289@loongson.cn>

Quoting Tiezhu Yang (2020-05-29 03:20:11)
> On 05/29/2020 05:36 PM, Stephen Boyd wrote:
> > Quoting Tiezhu Yang (2020-05-28 23:44:20)
> >> On 05/29/2020 12:31 PM, Stephen Boyd wrote:
> >>> Quoting Tiezhu Yang (2020-05-28 21:02:05)
> >>> I think you didn't understand my question. I'm asking where is this
> >>> patch applied to the kernel and what commit is it? I don't see it in the
> >>> clk tree.
> >> Sorry for that, actually I do not quite understand what you mean.
> >>
> >> In my opinion, after the following commit,  when devm_ioremap_resource()
> >> is called in hisi_reset_init(), hisi_reset_init() still returns NULL and
> >> it only returns
> >> -ENOMEM when call hisi_reset_init() failed, I think it may returns
> >> -EINVAL, -EBUSY
> >> or -ENOMEM if failed, this is what I want to fix.
> >>
> >> "reset: hisilicon: fix potential NULL pointer dereference"
> >> https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/commit/drivers/clk/hisilicon/reset.c?h=clk-next&id=e9a2310fb689151166df7fd9971093362d34bd79
> >>
> > This commit doesn't change the value that is returned by
> > hisi_reset_init() on an error. It still returns NULL when an error
> > happens.
> 
> Yes, I agree, but after this commit e9a2310fb689 ("reset:
> hisilicon: fix potential NULL pointer dereference"), the
> return value of hisi_reset_init() is not so correct because
> it replaces devm_ioremap() with devm_ioremap_resource().

Where does the return value of hisi_reset_init() change in that commit?
The usage of devm_ioremap_resource() vs. devm_ioremap() doesn't change
the return value of hisi_reset_init().

> 
> Do you think the code of this patch is OK but the "Fixes:" commit
> is not accurate? If so, can we remove the "Fixes:" tag?
> 

No. The patch is incorrect and the Fixes tag is incorrect.

      reply	other threads:[~2020-05-29 21:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27 14:39 [PATCH v4 1/2] clk: hisilicon: Use correct return value about hisi_reset_init() Tiezhu Yang
2020-05-27 14:39 ` [PATCH v4 2/2] clk: Allow COMPILE_TEST for subdir hisilicon in Makefile Tiezhu Yang
2020-05-31 21:05   ` kbuild test robot
2020-06-02  1:43     ` Tiezhu Yang
2020-05-27 19:06 ` [PATCH v4 1/2] clk: hisilicon: Use correct return value about hisi_reset_init() Stephen Boyd
2020-05-28  2:27   ` Tiezhu Yang
2020-05-28 23:15     ` Stephen Boyd
2020-05-29  2:03       ` Tiezhu Yang
2020-05-29  3:58         ` Stephen Boyd
2020-05-29  4:02           ` Tiezhu Yang
2020-05-29  4:31             ` Stephen Boyd
2020-05-29  6:44               ` Tiezhu Yang
2020-05-29  9:36                 ` Stephen Boyd
2020-05-29 10:20                   ` Tiezhu Yang
2020-05-29 21:14                     ` Stephen Boyd [this message]

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=159078686285.69627.11416031375116687757@swboyd.mtv.corp.google.com \
    --to=sboyd@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lixuefeng@loongson.cn \
    --cc=mturquette@baylibre.com \
    --cc=yangtiezhu@loongson.cn \
    /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).