From: Corey Minyard <minyard@acm.org>
To: Tang Bin <tangbin@cmss.chinamobile.com>
Cc: arnd@arndb.de, gregkh@linuxfoundation.org,
openipmi-developer@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3]ipmi:bt-bmc:Avoid unnecessary judgement
Date: Mon, 13 Apr 2020 06:32:25 -0500 [thread overview]
Message-ID: <20200413113225.GB3587@minyard.net> (raw)
In-Reply-To: <20200408115958.2848-1-tangbin@cmss.chinamobile.com>
On Wed, Apr 08, 2020 at 07:59:58PM +0800, Tang Bin wrote:
> bt_bmc_probe() is only called with an openfirmware platform device.
> Therefore there is no need to check that the passed in device is NULL or
> that it has an openfirmware node.
I waited until after the merge window closed, this is queued for 5.8. I
changed the title to be "Avoid unnecessary check". "Judgement",
although technically correct, has a legal or moral connotation.
Thanks,
-corey
>
> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
> ---
> Changes from v2:
> - improve the commit message.
>
> Changes from v1:
> - improve the commit message.
> ---
> drivers/char/ipmi/bt-bmc.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c
> index d36aeacb2..890ad55aa 100644
> --- a/drivers/char/ipmi/bt-bmc.c
> +++ b/drivers/char/ipmi/bt-bmc.c
> @@ -430,9 +430,6 @@ static int bt_bmc_probe(struct platform_device *pdev)
> struct device *dev;
> int rc;
>
> - if (!pdev || !pdev->dev.of_node)
> - return -ENODEV;
> -
> dev = &pdev->dev;
> dev_info(dev, "Found bt bmc device\n");
>
> --
> 2.20.1.windows.1
>
>
>
next prev parent reply other threads:[~2020-04-13 11:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-08 11:59 [PATCH v3]ipmi:bt-bmc:Avoid unnecessary judgement Tang Bin
2020-04-13 11:32 ` Corey Minyard [this message]
2020-04-13 11:56 ` Tang Bin
2020-04-13 14:23 ` Corey Minyard
2020-04-13 15:44 ` Tang Bin
2020-04-13 21:59 ` Corey Minyard
2020-04-14 9:42 ` Tang Bin
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=20200413113225.GB3587@minyard.net \
--to=minyard@acm.org \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=openipmi-developer@lists.sourceforge.net \
--cc=tangbin@cmss.chinamobile.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.