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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 E791EC49360 for ; Mon, 14 Jun 2021 05:49:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CB4CC613C5 for ; Mon, 14 Jun 2021 05:49:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232276AbhFNFwB (ORCPT ); Mon, 14 Jun 2021 01:52:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229696AbhFNFwA (ORCPT ); Mon, 14 Jun 2021 01:52:00 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05E3CC061574; Sun, 13 Jun 2021 22:49:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=cRGwSxQF9rL7/z4W4kadPyPPQxWQDJw1aSVOOE037fM=; b=TQq68SZUCOA+gqEbGQmoYVNOwK Hk4gfD0h/2W7VjZ7grHaH7D8SQmq4GtQLcGaRzRdNKMx+o5OhKhZl1LAiNB2h88GGVNdDVfVM1ZuK Unyoe0ElPPCfD5g5JEJ/OffYCBh8og65gpQ2+kjhlrH0odb/vpmjxOLuTraQFkumjOj2/rWYKKOiB WOPXGXZJaG2eHVK2HeTxjPxg0fPDN0fHW7dCjzpe5JD3yKnNm3MjKYD6hSr81/OWFVo7xb84WohWI byebFddvB9xhh1vjnYI6yUUylQChrcMpCsZ28j0oMFyHAK65KITaZjda3o1tlPszlftkqTJCcbdVQ 1Pl6eMKg==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lsfTX-005409-Gt; Mon, 14 Jun 2021 05:49:33 +0000 Date: Mon, 14 Jun 2021 06:49:31 +0100 From: Christoph Hellwig To: Dongdong Liu Cc: helgaas@kernel.org, hch@infradead.org, kw@linux.com, linux-pci@vger.kernel.org, rajur@chelsio.com, hverkuil-cisco@xs4all.nl, linux-media@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [RESEND PATCH V3 2/6] PCI: Use cached Device Capabilities 2 Register Message-ID: References: <1623576555-40338-1-git-send-email-liudongdong3@huawei.com> <1623576555-40338-3-git-send-email-liudongdong3@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1623576555-40338-3-git-send-email-liudongdong3@huawei.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > + if (!(bridge->pcie_devcap2 & PCI_EXP_DEVCAP2_ATOMIC_ROUTE)) Overly long line. > +static void pci_init_devcap2(struct pci_dev *dev) > +{ > + if (!pci_is_pcie(dev)) > + return; > + > + pcie_capability_read_dword(dev, PCI_EXP_DEVCAP2, &dev->pcie_devcap2); > +} Wouldn't it make sene to merge this into set_pcie_port_type?