From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753898AbeENHQ6 (ORCPT ); Mon, 14 May 2018 03:16:58 -0400 Received: from mail-qt0-f179.google.com ([209.85.216.179]:42918 "EHLO mail-qt0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752988AbeENHQz (ORCPT ); Mon, 14 May 2018 03:16:55 -0400 X-Google-Smtp-Source: AB8JxZpfweBkmGzB5k/2ZFUcWPQk4fP+HUxryXJuhQdYzKKxH6I2UPY1l2tBvJ5UeMB/6QepL7Ar+C819d8e4FOgDEQ= MIME-Version: 1.0 In-Reply-To: <99B4C6BADD9E3241B25E52B02BA737C54127E3BF@DGGEMA505-MBS.china.huawei.com> References: <99B4C6BADD9E3241B25E52B02BA737C54127E3BF@DGGEMA505-MBS.china.huawei.com> From: Andy Shevchenko Date: Mon, 14 May 2018 10:16:54 +0300 Message-ID: Subject: Re: reply: [PATCH v3 1/2] PCI: kirin: Add MSI support To: songxiaowei Cc: "chenyao (F)" , Wangbinghui , Lorenzo Pieralisi , Bjorn Helgaas , "xuwei (O)" , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , "linux-pci@vger.kernel.org" , Linux Kernel Mailing List , linux-arm Mailing List , devicetree , "dimitrysh@google.com" , "guodong.xu@linaro.org" , Suzhuangluan , Kongfei Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 14, 2018 at 4:11 AM, songxiaowei wrote: >> > + int ret; >> > + >> > + if (IS_ENABLED(CONFIG_PCI_MSI)) { >> >> > + pci->pp.msi_irq = platform_get_irq(pdev, 0); >> > + if (pci->pp.msi_irq < 0) { >> > + dev_err(&pdev->dev, "failed to get MSI IRQ >> (%d)\n", >> > + pci->pp.msi_irq); >> >> > + return -ENODEV; >> >> Why shadowing actual error code? > [songxiaowei] Sorry, I can't get your point about this, would you explain it for me. platform_get_irq() returns either correct IRQ number or negative error code. In the code above you shadow the actual error (as returned by that call) by -ENODEV. Any reason why? -- With Best Regards, Andy Shevchenko