public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Ley Foon Tan <ley.foon.tan@intel.com>
Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	lftan.linux@gmail.com
Subject: Re: [PATCH v2 1/2] pci: altera: Add Stratix10 PCIe support
Date: Mon, 31 Dec 2018 09:17:30 -0600	[thread overview]
Message-ID: <20181231151730.GD159477@google.com> (raw)
In-Reply-To: <1546244693-34633-2-git-send-email-ley.foon.tan@intel.com>

Run "git log --oneline --follow drivers/pci/controller/pcie-altera.c" and
make your subject line match in style, phrasing, and capitalization.

Hint:

  ............ pci: altera: Add Stratix10 PCIe support
  ef75369a5b9a PCI: altera: Fix platform_get_irq() error handling
  bfdbbf0e3c2a PCI: altera: Use size=4 IRQ domain for legacy INTx
  6ab380957838 PCI: altera: Drop pci_fixup_irqs()
  9815791319a0 PCI: altera: Convert PCI scan API to pci_scan_root_bus_bridge()
  2a7275a3d867 PCI: altera: Fix TLP_CFG_DW0 for TLP write

One of these is not like the others.

On Mon, Dec 31, 2018 at 04:24:52PM +0800, Ley Foon Tan wrote:
...
> +struct altera_pcie_data {
> +	int (*tlp_read_pkt)(struct altera_pcie *pcie, u32 *value);
> +	void (*tlp_write_pkt)(struct altera_pcie *pcie, u32 *headers,
> +			      u32 data, bool align);
> +	bool (*get_link_status)(struct altera_pcie *pcie);
> +	int (*rp_read_cfg)(struct altera_pcie *pcie, int where,
> +			   int size, u32 *value);
> +	int (*rp_write_cfg)(struct altera_pcie *pcie, u8 bus, int where,
> +			    int size, u32 value);
> +	bool s10_flag;		/* Stratix 10 */

This is OK if you only ever have two programming models (the original
and Stratix 10).  But if there's a possibility of more, an int model
type that can be tested with a switch is more extensible.

Personally I prefer bitfields over bool in structures, but ultimately
Lorenzo will take this and I don't know whether he has a preference.

https://lkml.kernel.org/r/CA+55aFxnePDimkVKVtv3gNmRGcwc8KQ5mHYvUxY8sAQg6yvVYg@mail.gmail.com
https://lkml.kernel.org/r/CA+55aFzKQ6Pj18TB8p4Yr0M4t+S+BsiHH=BJNmn=76-NcjTj-g@mail.gmail.com

Bjorn

  reply	other threads:[~2018-12-31 15:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-31  8:24 [PATCH v2 0/2] Add Stratix10 PCIe Root Port support Ley Foon Tan
2018-12-31  8:24 ` [PATCH v2 1/2] pci: altera: Add Stratix10 PCIe support Ley Foon Tan
2018-12-31 15:17   ` Bjorn Helgaas [this message]
2019-01-02  1:47     ` Tan, Ley Foon
2019-01-02  1:47     ` Ley Foon Tan
2018-12-31  8:24 ` [PATCH v2 2/2] Documentation: dt-bindings: pci: altera: Add altr,pcie-root-port-2.0 Ley Foon Tan
2018-12-31 16:15 ` [PATCH v2 0/2] Add Stratix10 PCIe Root Port support Bjorn Helgaas
2019-01-02  1:31   ` Ley Foon Tan

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=20181231151730.GD159477@google.com \
    --to=helgaas@kernel.org \
    --cc=ley.foon.tan@intel.com \
    --cc=lftan.linux@gmail.com \
    --cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox