Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6486476ybi; Wed, 5 Jun 2019 01:34:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqxC5kB/8PpPsILzwjoUpP6VMcq4xCaAiAau4SEcktsCtaFlOKIAGUjeiMOohQcZggE1ASbp X-Received: by 2002:a17:902:b402:: with SMTP id x2mr42607338plr.128.1559723688061; Wed, 05 Jun 2019 01:34:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559723688; cv=none; d=google.com; s=arc-20160816; b=YVXxzXUkKveIbUcv12c/e136FbNChZeFHTXHyah9O6BGe4tYTG6qem5vPjV5fphtHD VZ+9nfwRtd1BhXxRDIAQ1YGm5vpJpKqRpFIXVOXSUEirUzeqrB4d0cDhaP0xXc/GLU9W pZN/YA3Z+2liz0nQ5OR+Rsj93UxlfZ1YTtxq2CqA0lf5cYzpV40ujSK5t9zzL+sPSYd2 /V4n3F4+epTASqYhHFtWC7JrIL3nlXOTVBEXG/2liTaptS2pPvVNmhFuGNMonWVwYjZY PmMX0QyYQ54NYz/pGdQXbZeBVmUOXSAkIIEpAvWIfG7IYwLaRU/5Fsqyul1rt+WzuhLo aCWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=dk0R1JeANwhvfJ8EQjNAn0p7Nj8AEAOaqyvCO9n4i9o=; b=CzgI0CswUtKIE5hflZJ/XeQc9rkNzR5dHqk2gqnQyxiHv4jR62OIoi2hG4XWYMloPs SDZ5HgSYE3ez9WUdCeiszR3oNfYAVAwbRHjP0RKW3OrzO4GJaJDz7SLuZ/n72q4f+BVX m+uw9Uf7FDV1Ny4ZLCd7E0m0iyay0W4EK/wqZD4VmgBvtuaW7bf1KlXb2R75j9zr0x8Q +rtdmPfSwHh1bj8Hz/y3x5qGmW8/KQEaH+BqrP0zGB3BCZyK4lixYJQJXyMnxzStPbmh 3duHCicldgQCDG5bkBpTqKiIjOEsCOEHDGCFy/oyyidkTNWOdoZgrqs46eblDJ058bg4 yhqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=k03miPaf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x19si26110432pgj.92.2019.06.05.01.34.30; Wed, 05 Jun 2019 01:34:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=k03miPaf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726741AbfFEIcy (ORCPT + 99 others); Wed, 5 Jun 2019 04:32:54 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:34737 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726537AbfFEIcy (ORCPT ); Wed, 5 Jun 2019 04:32:54 -0400 Received: by mail-pl1-f195.google.com with SMTP id i2so5090917plt.1 for ; Wed, 05 Jun 2019 01:32:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dk0R1JeANwhvfJ8EQjNAn0p7Nj8AEAOaqyvCO9n4i9o=; b=k03miPaflHsYxMZvcILGpctdJhtceRMyyo9Sz+HkvQksJJ5V01qAuQPRb2/jd89gDK W6n3QXdOdbDFKXrQoM7emCK5pdtddXCUPmDIfXd7ruUGPhYAq8g4y4S8arksaz7/MZv1 Xe/oBYbsELe4UOkCSaFDKyGfqoGV+H4qILh3HdKr4cpBGa7+YJ6dZuVXGE9XDl12Qby7 OGiB7W+9JwHgOD+Ahlk4o/EW/Wo0knAZU9N+y0rCdxlKMJ65GdO6VjNosDTiZXaUfEKq SApCpBFPE4n/f+EVCTjab8t4+nsnS7hBs1IyP5Otrjj4xwplyT0oZ1m1uJ7gpNxp4m3a qXbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dk0R1JeANwhvfJ8EQjNAn0p7Nj8AEAOaqyvCO9n4i9o=; b=FoYXTPSmTNuPv3uvtrTG87P3mIM/QJEAFeyKSqB6DR61KOTRgcKfDEQXZiUSw1hOsm /cHHHmN9QEHK0td3lwpc47qIunmdEbqE3sEQt8D0vQiAab6Qxx1Jghzlw1pIICpKLx84 PnPJg1bHtmcJ1/aaguh65pGTFrslVw9z1BR1Mk0deM2bHrJanVNRNomL8erCgV88i6Gp b5onVt9CRddL09h3YzNWktlz6G5WzFy2H2aOhUg19PMDZ2xo25HhLLgyDxAHbZj9zqpf JvD5wLdp/NW4iSapv89nA/CdGQ6AkLuPP81ZPOF9rZQUnUuZPmXS0/rkJS3zkhgkjp/4 Je+A== X-Gm-Message-State: APjAAAWDpGbB7nR1IoJdjDKZkS5CySNvox/77n4zd37bHyQI2/K+kRe3 /VVfMSv69RnhFj5oIW9LsA5rPzHQXVBDqL/mCYM= X-Received: by 2002:a17:902:ab90:: with SMTP id f16mr41234514plr.262.1559723573797; Wed, 05 Jun 2019 01:32:53 -0700 (PDT) MIME-Version: 1.0 References: <20190602143017.19645-1-benniciemanuel78@gmail.com> In-Reply-To: <20190602143017.19645-1-benniciemanuel78@gmail.com> From: Andy Shevchenko Date: Wed, 5 Jun 2019 11:32:42 +0300 Message-ID: Subject: Re: [PATCH] pci: ibmphp: add check of return value from pci_hp_register() To: benniciemanuel78@gmail.com Cc: Linux Kernel Mailing List , Bjorn Helgaas , Joe Perches , Lukas Wunner , Tyrel Datwyler , Sebastian Ott Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 2, 2019 at 5:30 PM Emanuel Bennici wrote: > > Check the return value of pci_hp_register() in Function > ebda_rsrc_controller() > Maybe this is correct, maybe not. You are changing behaviour of the function. How did you test this? > Signed-off-by: Emanuel Bennici > --- > drivers/pci/hotplug/ibmphp_ebda.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/hotplug/ibmphp_ebda.c b/drivers/pci/hotplug/ibmphp_ebda.c > index 11a2661dc062..7e523ce071b3 100644 > --- a/drivers/pci/hotplug/ibmphp_ebda.c > +++ b/drivers/pci/hotplug/ibmphp_ebda.c > @@ -896,10 +896,17 @@ static int __init ebda_rsrc_controller(void) > > } /* each hpc */ > > + int result = 0; > list_for_each_entry(tmp_slot, &ibmphp_slot_head, ibm_slot_list) { > snprintf(name, SLOT_NAME_SIZE, "%s", create_file_name(tmp_slot)); > - pci_hp_register(&tmp_slot->hotplug_slot, > - pci_find_bus(0, tmp_slot->bus), tmp_slot->device, name); > + result = pci_hp_register(&tmp_slot->hotplug_slot, > + pci_find_bus(0, tmp_slot->bus), > + tmp_slot->device, name); > + > + if (result) { > + err("pci_hp_register failed with error %d\n", result); > + goto error; > + } > } > > print_ebda_hpc(); > -- > 2.19.1 > -- With Best Regards, Andy Shevchenko