From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752349AbdGDENm (ORCPT ); Tue, 4 Jul 2017 00:13:42 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:9270 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750893AbdGDENl (ORCPT ); Tue, 4 Jul 2017 00:13:41 -0400 From: Hanjun Guo To: Corey Minyard CC: G Gregory , , Hanjun Guo Subject: [PATCH] char: ipmi: eliminate misleading print info when being probed via ACPI Date: Tue, 4 Jul 2017 12:08:09 +0800 Message-ID: <1499141289-62335-1-git-send-email-guohanjun@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A010202.595B15F0.0009,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 282c04915c7d9e248a6ee073422d889d Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hanjun Guo When ipmi is probed via ACPI, the boot log shows [ 17.945139] ipmi_si IPI0001:00: probing via device tree [ 17.950369] ipmi_si IPI0001:00: ipmi_si: probing via ACPI [ 17.955795] ipmi_si IPI0001:00: [io 0x00e4-0x3fff] regsize 1 spacing 1 irq 0 [ 17.962932] ipmi_si: Adding ACPI-specified bt state machine which "ipmi_si IPI0001:00: probing via device tree" is misleading with a ACPI HID "IPI0001" but probing via DT. Eliminate this misleading print info by checking of_node is valid or not before calling of_ipmi_probe(). Signed-off-by: Hanjun Guo --- drivers/char/ipmi/ipmi_si_intf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 59ee93e..159950d 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -2810,7 +2810,7 @@ static int acpi_ipmi_probe(struct platform_device *dev) static int ipmi_probe(struct platform_device *dev) { - if (of_ipmi_probe(dev) == 0) + if (dev->dev.of_node && of_ipmi_probe(dev) == 0) return 0; return acpi_ipmi_probe(dev); -- 1.7.12.4