[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200413113225.GB3587@minyard.net>
Date: Mon, 13 Apr 2020 06:32:25 -0500
From: Corey Minyard <minyard@....org>
To: Tang Bin <tangbin@...s.chinamobile.com>
Cc: arnd@...db.de, gregkh@...uxfoundation.org,
openipmi-developer@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3]ipmi:bt-bmc:Avoid unnecessary judgement
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@...s.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
>
>
>
Powered by blists - more mailing lists