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=-3.9 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 6EF85C433DF for ; Tue, 25 Aug 2020 21:12:29 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 3B5EE20665 for ; Tue, 25 Aug 2020 21:12:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="rQQMWS26"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="hWC9wT9/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3B5EE20665 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kAgEb-0006x5-No; Tue, 25 Aug 2020 21:12:01 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kAgEa-0006x0-3H for xen-devel@lists.xenproject.org; Tue, 25 Aug 2020 21:12:00 +0000 X-Inumbo-ID: e374f322-20d2-4fc5-8e4b-00926264a1d5 Received: from galois.linutronix.de (unknown [193.142.43.55]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e374f322-20d2-4fc5-8e4b-00926264a1d5; Tue, 25 Aug 2020 21:11:58 +0000 (UTC) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1598389916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1frHZHutANeGhNvELKAlZV7ZBIw0Dqsl4tEEvrOnRU4=; b=rQQMWS26Jt5LaZuxdrMUZgNfuNew2mCXTFepS37C35I6xAhJ3rEo9Nx2wJCVYo9FS/Pgcj zMK/jubxjmgOMukHjD1+whg0AyErL8YAwjSJxzS+B1PMq4RdTvHJO6lnQ8zCroL34GT5hw 5/rfeY4s2ADMm35tAfb/mXN9dBB+PDzSGhJTbYCAYlaBzlpg8xMguI6MXbjreLqFtXNCau bsIWnmpXS6t/YonQ/7LmA5QV8SpSh4TrFs2TkYIhUy6U4rcc0A8vIF1QUkDGf2mbfLYdBM gsUXIxYqmPwtfL3S4OeTd+L815+ua7i1Gq/tsUgXEKLDUxlqgI3fswjFMqzoNQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1598389916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1frHZHutANeGhNvELKAlZV7ZBIw0Dqsl4tEEvrOnRU4=; b=hWC9wT9/QuU4/otH2U3KHZ3pSL+StkJoqjJVoH3bzCOAJhuscP4cb126Q52YIHKMSI5RAk NlcAG4imPXq613BA== To: Bjorn Helgaas Cc: LKML , x86@kernel.org, linux-pci@vger.kernel.org, Joerg Roedel , iommu@lists.linux-foundation.org, linux-hyperv@vger.kernel.org, Haiyang Zhang , Jon Derrick , Lu Baolu , Wei Liu , "K. Y. Srinivasan" , Stephen Hemminger , Steve Wahl , Dimitri Sivanich , Russ Anderson , Bjorn Helgaas , Lorenzo Pieralisi , Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, Juergen Gross , Boris Ostrovsky , Stefano Stabellini , Marc Zyngier , Greg Kroah-Hartman , "Rafael J. Wysocki" , Megha Dey , Jason Gunthorpe , Dave Jiang , Alex Williamson , Jacob Pan , Baolu Lu , Kevin Tian , Dan Williams Subject: Re: [patch RFC 13/38] PCI: MSI: Rework pci_msi_domain_calc_hwirq() In-Reply-To: <20200825200329.GA1923406@bjorn-Precision-5520> References: <20200825200329.GA1923406@bjorn-Precision-5520> Date: Tue, 25 Aug 2020 23:11:56 +0200 Message-ID: <87d03exwf7.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On Tue, Aug 25 2020 at 15:03, Bjorn Helgaas wrote: > On Fri, Aug 21, 2020 at 02:24:37AM +0200, Thomas Gleixner wrote: >> Retrieve the PCI device from the msi descriptor instead of doing so at the >> call sites. > > I'd like it *better* with "PCI/MSI: " in the subject (to match history Duh, yes. > and other patches in this series) and "MSI" here in the commit log, > but nice cleanup and: >> --- a/arch/x86/kernel/apic/msi.c >> +++ b/arch/x86/kernel/apic/msi.c >> @@ -232,7 +232,7 @@ EXPORT_SYMBOL_GPL(pci_msi_prepare); >> >> void pci_msi_set_desc(msi_alloc_info_t *arg, struct msi_desc *desc) >> { >> - arg->msi_hwirq = pci_msi_domain_calc_hwirq(arg->msi_dev, desc); >> + arg->msi_hwirq = pci_msi_domain_calc_hwirq(desc); > > I guess it's safe to assume that "arg->msi_dev == > msi_desc_to_pci_dev(desc)"? I didn't try to verify that. It is. >> +irq_hw_number_t pci_msi_domain_calc_hwirq(struct msi_desc *desc) >> { >> + struct pci_dev *pdev = msi_desc_to_pci_dev(desc); > > If you named this "struct pci_dev *dev" (not "pdev"), the diff would > be a little smaller and it would match other usage in the file. Ok. I'm always happy to see pdev because that doesn't make me wonder which type of dev it is :) But, yeah lets keep it consistent. Thanks, tglx