Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3977040imm; Mon, 14 May 2018 00:18:33 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqxjcw4V51ZgaNlDjt86xHA4r+5Puj8MvcWYZkAZPAJc3yp6+0onIcYC17rso2BgOyvZ6oy X-Received: by 2002:a17:902:7402:: with SMTP id g2-v6mr8927333pll.246.1526282313261; Mon, 14 May 2018 00:18:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526282313; cv=none; d=google.com; s=arc-20160816; b=Nn2qBZkBPa8Th70gtc35TpA/KPa8GKzLzlw+RiRpNhpakee7FMja2oMha9mUfFpaNi Zp2pAilXxCIVl88eTuc/tfE2hcXL8bUGGiBdDQ+jZQc+vWHkcVRQs0HXdjg8vLMRzcKz hm8ZBNrajV5d/f+2s6jzag5XK8uTPmvM1Ele1/qsoPwxlHipzRinI4AT+zYkjHTjKr7x Ad+pEYxC3LMthymuekRsZoOOamG3FRnoP24PZBci8kvZRPurOeFZS2gGLdijNGlLrM3P ijMc8nJsRcFF28skkXaDw6OxhoUiYI8OdPqRU5qSFaiAoh1znFsN8hwMQwRPFS2NjVzE fNpQ== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=XLUnt6yE9ioasEXCMhDkkp/b2By/G+Vk3n/yt55b7WE=; b=GVjCXi8HDZ5C72IqczOdzxvcWB9Iog0ryOkahR3YbXhQBgaywkgBUhD8H69iXkhk/x FitNmR7OtTgiExS51w3H6Cr7YElp2PpiukzZJVL6YV3JQ/vPlhAB9M8Eby7ubaCfTpXC RkuQJKDI6cSfTPZGpYZ5i1umOH/Zog2U1+DihzMK5X7nmtTrfLPUSrf6JAwAHHgBQ129 0SYQV9zvvb11t0npkoUM7gNQrkLBMeYraWQ95UYbUbkO1Y0nmnpWCL9YHcLX4UrHpEnD S8cW0ITNuL0w4HtDSNQa1Wvxnw1IGDjjrD5U6EtmR1JiH1JVr89WDH7rCT7IpGoxlAoQ Bfcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=azi6EIAT; 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 w16-v6si8009865plk.592.2018.05.14.00.18.18; Mon, 14 May 2018 00:18:33 -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=azi6EIAT; 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 S1753888AbeENHQ6 (ORCPT + 99 others); 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 Received: by mail-qt0-f179.google.com with SMTP id c2-v6so14826709qtn.9; Mon, 14 May 2018 00:16:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=XLUnt6yE9ioasEXCMhDkkp/b2By/G+Vk3n/yt55b7WE=; b=azi6EIATG6STfRRBntwI5qQdrT5cWS0Y4J/l7S3QFTe3kVLysdR3P0+0g6mHmTNPle lk+ubX9JC0Akj2p7JhqfsjP62R1vPISAOl5xtUdYMiSk+VQB8SAE8gc8QXtH+L174ycC aCNpxV75GMFjd/Wd8TkUIBmalXAY/Bm3KKb/lJVw83FqUCw4bt8hqVpQaqhZ2xoOqieR zuobjqkS3LpmX78I7TJKORxXBNTWfyjIcu7cPUAr1n1Gh5W0kWBrOcyl0mKRp8xOBfUW SERtbsCUPXt1Hy3buAJWfdDcyPMKWlUGmEc2HAESFf84cocb2ZkY1CLEIr9dwWqoX87Q 78gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=XLUnt6yE9ioasEXCMhDkkp/b2By/G+Vk3n/yt55b7WE=; b=V8h6J+muw4AfomltrCCkjDTJgVUv36sy4d3FAQ+/IahMlQcTqsQtIRzPFkcR6yEkD8 f0td2maONhg6FNSZfVJjnNNwBJx5eZzAMkgNW/acoEjFiorH4qcfyQUDcBNIusqU+cVE 5oAsYtG531UgfMAkE5I5yus6vKoA+FZlmIFqQFoz8zNQSVSBp+MUVKEK2Cw7HQqD5P3j sNtiTvLFvmvglEj2ixgK/mnTlBZUXBZGA+c91OIM7HSDsJdqBwlMOreiejK9NE0CD46G qpA1NWYMd+7+mZu+nZ8UNIdFGNjcf0cZEzJRO0Rzo6MKjxLRY6psAiDcR0KMefg0kxUI QVbA== X-Gm-Message-State: ALKqPwdGC0sVxuAYjPlyG9fQJ8MHvikByPwj9lJx1aBDb+DMKaLnDh9R Lp08qzS3iDdOQniLl+FHT0xoF9LeZSO++/7I71Q= X-Received: by 2002:ac8:3488:: with SMTP id w8-v6mr8023972qtb.278.1526282214492; Mon, 14 May 2018 00:16:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.152.150 with HTTP; Mon, 14 May 2018 00:16:54 -0700 (PDT) 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 Precedence: bulk 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