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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 727F4C433DB for ; Fri, 26 Mar 2021 07:15:41 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EA34C619F7 for ; Fri, 26 Mar 2021 07:15:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EA34C619F7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1qUKpHqXHapXpZofdevLESaf3wPZ3nmz0iPPAukyUC4=; b=FVa6DMVb974P6qmiFT8Vso5G2 ULMu7U/GVjCTxu2oGK2UzVmm/zs9si6j2dFR+lC8o/0CpjcomYNL44+uxHwJObNx7Xf4LC7hgtWq/ 7YmN1hlCf5ekKBG4yAjSjQfTRo/d6c8IEW4wANU7dvcnFihyBT6xcfypYWykR+riMYnblFgEQ1TzO iOBqH7fjjl11GtDrpB/PAwf9vkNqnuRX+iJuC6ycNEYrinyax9+xXlVBzptmhHDVBhGwGBpq4IdjB EvmdNSk5uf7YqsUStIeLCQEFPnxLuBqqEeNfqKDyk29bmkckFD77laUE8wCKcGQYVQqHOl8t9MXak TKlyypSBw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lPgfa-002wjE-34; Fri, 26 Mar 2021 07:14:13 +0000 Received: from mail-lf1-f41.google.com ([209.85.167.41]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lPgfU-002wip-DC for linux-arm-kernel@lists.infradead.org; Fri, 26 Mar 2021 07:14:06 +0000 Received: by mail-lf1-f41.google.com with SMTP id m12so6172441lfq.10 for ; Fri, 26 Mar 2021 00:14:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=J3D3RetWBQStv8LDiiUAqn2Af0uI+83y6GMS6/IQqpc=; b=XYL3II+mwL783WxHROmQH/KrunDiQL/NNg0WipnOryOXbKASGHh8uWrFy3Fje4dOkq IvWeWWgEG3KLFlE5mc/Q5+VAfQf6cQdgP88jkC/ddbCULej6NEeQXjjWHbXzEqY5qB8j Zo8aJ4K+g1bUFwt36jHi3gEGSVsvqUGHrr8R87lDwgTtpQNqj61ekz3yRbpkVruKrZlk AIBFJ4y4Son1vyY/k3HiIYtTjsoVmEwiWuNv39PdgJxe5CE1t/FLlO6tubfiRfwH5Skh 8ZEt+smFGt+wnk2iJ63K4I7DObNqchU00700e/JWvbF54k0NT/srAGSdjxTxiheAdRMs BdiQ== X-Gm-Message-State: AOAM530hzbjzc76BfNzCXeTGnzNUghbgg5mWQ0c1bqzDxIKDoEo9zM4v 87x9SVCb6zAnIcORsq9uqOk= X-Google-Smtp-Source: ABdhPJzgeg6BB02Aog2ZfQw20L0rem+otMtnZoT+Gly0obQjZqXhdmnRC6beTC+rL5IlPsQr6BWPvQ== X-Received: by 2002:a19:3f08:: with SMTP id m8mr7383770lfa.275.1616742843676; Fri, 26 Mar 2021 00:14:03 -0700 (PDT) Received: from rocinante ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id i123sm1054639lji.108.2021.03.26.00.14.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 00:14:03 -0700 (PDT) Date: Fri, 26 Mar 2021 08:14:02 +0100 From: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= To: Kishon Vijay Abraham I Cc: Bjorn Helgaas , Rob Herring , Lorenzo Pieralisi , Marc Zyngier , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Lokesh Vutla Subject: Re: [PATCH 5/6] PCI: keystone: Add PCI legacy interrupt support for AM654 Message-ID: References: <20210325090026.8843-1-kishon@ti.com> <20210325090026.8843-6-kishon@ti.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210325090026.8843-6-kishon@ti.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210326_071404_709178_01E5A40E X-CRM114-Status: GOOD ( 13.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Kishon, [...] > + if (!legacy_irq_domain) { > + dev_err(dev, "Failed to add irq domain for legacy irqs\n"); > + return -EINVAL; > + } [...] It would be "IRQ" and "IRQs" in the message above. [...] > - ret = ks_pcie_config_legacy_irq(ks_pcie); > - if (ret) > - return ret; > + if (!ks_pcie->is_am6) { > + pp->bridge->child_ops = &ks_child_pcie_ops; > + ret = ks_pcie_config_legacy_irq(ks_pcie); > + if (ret) > + return ret; > + } else { > + ret = ks_pcie_am654_config_legacy_irq(ks_pcie); > + if (ret) > + return ret; > + } [...] What if we change this to the following: if (!ks_pcie->is_am6) { pp->bridge->child_ops = &ks_child_pcie_ops; ret = ks_pcie_config_legacy_irq(ks_pcie); } else { ret = ks_pcie_am654_config_legacy_irq(ks_pcie); } if (ret) return ret; Not sure if this is something you would prefer, but it seems that either of the functions can set "ret", so checking immediately after would be the same as checking in either of the branches. But, this is a matter of style, so it would be up to you - not sure what do you prefer. Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel