All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jon Derrick <jonathan.derrick@intel.com>
Cc: linux-pci@vger.kernel.org, iommu@lists.linux-foundation.org,
	Bjorn Helgaas <helgaas@kernel.org>,
	Keith Busch <kbusch@kernel.org>,
	David Woodhouse <dwmw2@infradead.org>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v3 1/5] x86/pci: Add a to_pci_sysdata helper
Date: Tue, 14 Jan 2020 09:49:16 +0100	[thread overview]
Message-ID: <20200114084916.GA32024@lst.de> (raw)
In-Reply-To: <1578676873-6206-2-git-send-email-jonathan.derrick@intel.com>

On Fri, Jan 10, 2020 at 10:21:09AM -0700, Jon Derrick wrote:
> From: Christoph Hellwig <hch@lst.de>
> 
> Various helpers need the pci_sysdata just to dereference a single field
> in it.  Add a little helper that returns the properly typed sysdata
> pointer to require a little less boilerplate code.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> [jonathan.derrick: added un-const cast]

> +	return to_pci_sysdata((struct pci_bus *) bus)->node;

Instead of this case I think we'd be better off marking the bus
argument to to_pci_sysdata const.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Jon Derrick <jonathan.derrick@intel.com>
Cc: iommu@lists.linux-foundation.org, linux-pci@vger.kernel.org,
	Bjorn Helgaas <helgaas@kernel.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Keith Busch <kbusch@kernel.org>, Joerg Roedel <joro@8bytes.org>,
	Christoph Hellwig <hch@lst.de>,
	David Woodhouse <dwmw2@infradead.org>,
	Lu Baolu <baolu.lu@linux.intel.com>
Subject: Re: [PATCH v3 1/5] x86/pci: Add a to_pci_sysdata helper
Date: Tue, 14 Jan 2020 09:49:16 +0100	[thread overview]
Message-ID: <20200114084916.GA32024@lst.de> (raw)
In-Reply-To: <1578676873-6206-2-git-send-email-jonathan.derrick@intel.com>

On Fri, Jan 10, 2020 at 10:21:09AM -0700, Jon Derrick wrote:
> From: Christoph Hellwig <hch@lst.de>
> 
> Various helpers need the pci_sysdata just to dereference a single field
> in it.  Add a little helper that returns the properly typed sysdata
> pointer to require a little less boilerplate code.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> [jonathan.derrick: added un-const cast]

> +	return to_pci_sysdata((struct pci_bus *) bus)->node;

Instead of this case I think we'd be better off marking the bus
argument to to_pci_sysdata const.

  parent reply	other threads:[~2020-01-14  8:49 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10 17:21 [PATCH v3 0/5] Clean up VMD DMA Map Ops Jon Derrick
2020-01-10 17:21 ` Jon Derrick
2020-01-10 17:21 ` [PATCH v3 1/5] x86/pci: Add a to_pci_sysdata helper Jon Derrick
2020-01-10 17:21   ` Jon Derrick
2020-01-13 14:40   ` Bjorn Helgaas
2020-01-13 14:40     ` Bjorn Helgaas
2020-01-14  8:49   ` Christoph Hellwig [this message]
2020-01-14  8:49     ` Christoph Hellwig
2020-01-10 17:21 ` [PATCH v3 2/5] x86/PCI: Expose VMD's PCI Device in pci_sysdata Jon Derrick
2020-01-10 17:21   ` Jon Derrick
2020-01-14  8:50   ` Christoph Hellwig
2020-01-14  8:50     ` Christoph Hellwig
2020-01-10 17:21 ` [PATCH v3 3/5] PCI: Introduce pci_direct_dma_alias() Jon Derrick
2020-01-10 17:21   ` Jon Derrick
2020-01-14  8:51   ` Christoph Hellwig
2020-01-14  8:51     ` Christoph Hellwig
2020-01-10 17:21 ` [PATCH v3 4/5] PCI: vmd: Stop overriding dma_map_ops Jon Derrick
2020-01-10 17:21   ` Jon Derrick
2020-01-14  8:54   ` Christoph Hellwig
2020-01-14  8:54     ` Christoph Hellwig
2020-01-17 18:17     ` Derrick, Jonathan
2020-01-17 18:17       ` Derrick, Jonathan
2020-01-10 17:21 ` [PATCH v3 5/5] x86/pci: Remove X86_DEV_DMA_OPS Jon Derrick
2020-01-10 17:21   ` Jon Derrick
2020-01-13 12:08 ` [PATCH v3 0/5] Clean up VMD DMA Map Ops Lorenzo Pieralisi
2020-01-13 12:08   ` Lorenzo Pieralisi
2020-01-13 17:13   ` Derrick, Jonathan
2020-01-13 17:13     ` Derrick, Jonathan
2020-01-13 18:01     ` Bjorn Helgaas
2020-01-13 18:01       ` Bjorn Helgaas
2020-01-13 18:17       ` Lorenzo Pieralisi
2020-01-13 18:17         ` Lorenzo Pieralisi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200114084916.GA32024@lst.de \
    --to=hch@lst.de \
    --cc=dwmw2@infradead.org \
    --cc=helgaas@kernel.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jonathan.derrick@intel.com \
    --cc=kbusch@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.