From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B293C25B08 for ; Wed, 17 Aug 2022 09:11:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234550AbiHQJLP (ORCPT ); Wed, 17 Aug 2022 05:11:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232929AbiHQJLI (ORCPT ); Wed, 17 Aug 2022 05:11:08 -0400 Received: from smtp.smtpout.orange.fr (smtp03.smtpout.orange.fr [80.12.242.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ED2E53000 for ; Wed, 17 Aug 2022 02:11:07 -0700 (PDT) Received: from [192.168.1.18] ([90.11.190.129]) by smtp.orange.fr with ESMTPA id OF4qoVq4HsfCIOF4qonF44; Wed, 17 Aug 2022 11:11:05 +0200 X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Wed, 17 Aug 2022 11:11:05 +0200 X-ME-IP: 90.11.190.129 Message-ID: Date: Wed, 17 Aug 2022 11:11:04 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH -next 2/2] PCI: switch to use dev_err_probe() Content-Language: fr To: Yang Yingliang , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Cc: bhelgaas@google.com References: <20220817084444.2876059-1-yangyingliang@huawei.com> <20220817084444.2876059-2-yangyingliang@huawei.com> From: Christophe JAILLET In-Reply-To: <20220817084444.2876059-2-yangyingliang@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 17/08/2022 à 10:44, Yang Yingliang a écrit : > Use dev_err_probe() to simplify code and print error code. > > Signed-off-by: Yang Yingliang > --- > drivers/pci/probe.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c > index 0e947f24153e..f2430da8a30b 100644 > --- a/drivers/pci/probe.c > +++ b/drivers/pci/probe.c > @@ -3054,10 +3054,9 @@ int pci_host_probe(struct pci_host_bridge *bridge) > int ret; > > ret = pci_scan_root_bus_bridge(bridge); > - if (ret < 0) { > - dev_err(bridge->dev.parent, "Scanning root bridge failed"); > - return ret; > - } > + if (ret < 0) > + return dev_err_probe(bridge->dev.parent, ret, > + "Scanning root bridge failed"); > > bus = bridge->bus; > Nit: you could also add a \n at the end of the message. Just my 2c, CJ