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=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 12D3EC54E49 for ; Thu, 7 May 2020 19:49:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D5F8F2186A for ; Thu, 7 May 2020 19:49:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588880982; bh=3BFFez11ssEZqJXanr8tMIJWo0jrdd8+mi41ZiiNFeM=; h=Date:From:To:Cc:Subject:In-Reply-To:List-ID:From; b=XPRHOZMstbQWMG6GgTsxZtkogcIJSAr6+PjFDEkQCWTyvq6SdafOf1GsvuRs1kkbU oDh++xg6cozNGNhWah8eYQNiTWuP1yVsz9XScDGcWgeKkR/MsCNO+VhIjjUfZUFAXk /w+SSEIV/bjqAc/IkRDLiWCkk2SIoZ5vjIDV4XmQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728045AbgEGTtm (ORCPT ); Thu, 7 May 2020 15:49:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:41676 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726326AbgEGTtl (ORCPT ); Thu, 7 May 2020 15:49:41 -0400 Received: from localhost (mobile-166-175-190-200.mycingular.net [166.175.190.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 427EE208E4; Thu, 7 May 2020 19:49:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588880981; bh=3BFFez11ssEZqJXanr8tMIJWo0jrdd8+mi41ZiiNFeM=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=JCOa7Rse7JB6N+5ceUwmomOh/fUwbhzciB1fjEKCZ4P9hwt7LCcA6xjlWVpbSfl0W K9WobNpo7/gtNna+drJTplZg7iggn/2qcYb1lD+LoaGru6cNq26602ReVnO0yzoKXr WM49CbDcNJ/6KUwWVxjXs4m35x7wmjHVje8Pe2H4= Date: Thu, 7 May 2020 14:49:39 -0500 From: Bjorn Helgaas To: Bharat Kumar Gogada Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, lorenzo.pieralisi@arm.com, bhelgaas@google.com, robh@kernel.org, rgummal@xilinx.com Subject: Re: [PATCH v7 2/2] PCI: xilinx-cpm: Add Versal CPM Root Port driver Message-ID: <20200507194939.GA21050@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1588852716-23132-3-git-send-email-bharat.kumar.gogada@xilinx.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 07, 2020 at 05:28:36PM +0530, Bharat Kumar Gogada wrote: > - Add support for Versal CPM as Root Port. > - The Versal ACAP devices include CCIX-PCIe Module (CPM). The integrated > block for CPM along with the integrated bridge can function > as PCIe Root Port. > - Bridge error and legacy interrupts in Versal CPM are handled using > Versal CPM specific interrupt line. > +static inline bool cpm_pcie_link_up(struct xilinx_cpm_pcie_port *port) > +{ > + return (pcie_read(port, XILINX_CPM_PCIE_REG_PSCR) & > + XILINX_CPM_PCIE_REG_PSCR_LNKUP) ? 1 : 0; Almost all of the *_link_up() functions return "int". I don't know if there's really any benefit to using "bool", but if you do, you should probably return "true" or "false" instead of 1/0. > + port->irq_misc = platform_get_irq(pdev, 0); > + if (port->irq_misc <= 0) { Use: if (port->irq_misc < 0) { See https://lore.kernel.org/r/20200501224042.141366-3-helgaas@kernel.org