public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: <linux-kernel@vger.kernel.org>, Wolfram Sang <wsa@the-dreams.de>,
	<linux-i2c@vger.kernel.org>, Hulk Robot <hulkci@huawei.com>
Subject: Re: [PATCH 3/3] i2c: i801: avoid panic if ioreamp fails
Date: Fri, 10 May 2019 14:18:33 +0200	[thread overview]
Message-ID: <20190510141833.2cb3d108@endymion> (raw)
In-Reply-To: <164bb498-35dc-b226-4adb-3d743f4790a1@huawei.com>

On Fri, 10 May 2019 17:35:46 +0800, Kefeng Wang wrote:
> On 2019/5/10 16:09, Jean Delvare wrote:
> > We don't need this anyway. The comment says it can't fail, so why
> > bother checking for a condition which will never happen?  
> 
> The ioremap could fails due to no memory, our inner test robot(enable FAULT_INJECTION)
> 
> find this issue.

The code only runs on x86 where this specific memory segment is
standardized for the purpose. That's how we know it "can't fail".

That being said, maybe it could fail for other reasons (internal kernel
bug, or bogus BIOS maybe), and I don't care adding the check
anyway, as this code path is not performance critical.

-- 
Jean Delvare
SUSE L3 Support

  reply	other threads:[~2019-05-10 12:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-10  3:03 [PATCH 1/3] Input: apanel: avoid panic if ioreamp fails Kefeng Wang
2019-05-10  3:03 ` [PATCH 2/3] Input: wistron_btns: " Kefeng Wang
2019-05-10  3:03 ` [PATCH 3/3] i2c: i801: " Kefeng Wang
2019-05-10  8:09   ` Jean Delvare
2019-05-10  9:35     ` Kefeng Wang
2019-05-10 12:18       ` Jean Delvare [this message]
2019-05-11  1:32         ` Kefeng Wang

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=20190510141833.2cb3d108@endymion \
    --to=jdelvare@suse.de \
    --cc=hulkci@huawei.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wangkefeng.wang@huawei.com \
    --cc=wsa@the-dreams.de \
    /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