Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10843153imu; Mon, 31 Dec 2018 07:47:53 -0800 (PST) X-Google-Smtp-Source: AFSGD/WSNr7Sfz3mtOaFBY6fUw6VEfG4w9ziFYKYAg19W4bn4Su4DroEsokbPEC9fcje4gjmiyhh X-Received: by 2002:a62:53c5:: with SMTP id h188mr37966068pfb.190.1546271273440; Mon, 31 Dec 2018 07:47:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546271273; cv=none; d=google.com; s=arc-20160816; b=rlJ0OqZtPxM8p8w9PBva9z8iVL14EXu1g4JcJqr2vNKSMz45C4gCvJBnP1XFeAde8g c//JZ7TWAPdmnBo+TeZNKBpZiD8zY1JeuEy/4mHNMpLj0jaFJNTEAGXDlbBGPJxEjpyK B8p6ZmLnjC8eMV5UsgdHsq1f9q93lh16h8uerH175ZQIIiL6+DIRUM1/YCZhunxObpbi l1rpj89MJh7CCMpenaLQy5haDcpJSVt1eOOZy152HuTmiriPQQaI3Rdvz5HJTGgF2KWQ z8wbxXc/72otMLyxiwu52pmgH55CXZ4MmlvNbKJ5nHhchh1Ya1giqNMccM3qKjBFIlAS /TKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=3VnWi88btYCl4dhPXFcrpGlPAxgOsCKSz+Oq0MzrWQY=; b=zR8xO9VuQ6BXIlqZMONY/6pnSFJbxI6c8TTgj9U+BrgjtFVb8r2NTtFh4pzmWXOcjE l3b8Zzu/cQ7JBLqe9rfaoS7Apvx2f1YE/FX8/Xnsh72fZGxlj3bE2cOcut6Dt0cuexwK HhhUuzv3peCXnOyZtP9ixE9ecaDB81TEiaxm1F+Q2eEZkK/OpnFaYc0fZklZ537zOHBa ZOhPRRIi7P100+E256x/tkDyVMBKV8pndFBjOvmp5TKjCZaOWY2rklShk/NzXrlyYmww ELRAiGXTlMcrWaHlW8OPx2WH+rqBMiMjEbUkX46aaQQBxpc6aSDp8jzec2xz4pVlrbNQ OQEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wxnWEUPV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h189si33872868pfc.211.2018.12.31.07.47.24; Mon, 31 Dec 2018 07:47:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wxnWEUPV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727286AbeLaPSB (ORCPT + 99 others); Mon, 31 Dec 2018 10:18:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:54222 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725899AbeLaPSB (ORCPT ); Mon, 31 Dec 2018 10:18:01 -0500 Received: from localhost (unknown [69.71.4.100]) (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 2076720828; Mon, 31 Dec 2018 15:17:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546269480; bh=aGavy5WzFL5M1jO/Zckw7BlftWg8uAqgooDww8t93U0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wxnWEUPVqO11Gu7TAPYvr3DCjoZzQ9cvVYRbvFpmFreQaURyGwywR9r7zOEWQ+gxc K+MHSvM4GezaINzK+rak9Ux9DaIqhvYJwcgHo5P/P06j4knK2noBLeKmv04Ri0mH+d DTbKWkhtdKX4TRczY0V+uuOV/3SLc3WtaBP2+tgo= Date: Mon, 31 Dec 2018 09:17:30 -0600 From: Bjorn Helgaas To: Ley Foon Tan 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 Message-ID: <20181231151730.GD159477@google.com> References: <1546244693-34633-1-git-send-email-ley.foon.tan@intel.com> <1546244693-34633-2-git-send-email-ley.foon.tan@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1546244693-34633-2-git-send-email-ley.foon.tan@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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