lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 12 Nov 2021 00:50:44 +0100
From:   Krzysztof WilczyƄski <kw@...ux.com>
To:     Jim Quinlan <jim2101024@...il.com>
Cc:     linux-pci@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>,
        Nicolas Saenz Julienne <nsaenz@...nel.org>,
        Rob Herring <robh@...nel.org>, Mark Brown <broonie@...nel.org>,
        bcm-kernel-feedback-list@...adcom.com, james.quinlan@...adcom.com,
        Sean V Kelley <sean.v.kelley@...el.com>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        Qiuxu Zhuo <qiuxu.zhuo@...el.com>,
        Keith Busch <kbusch@...nel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v8 4/8] PCI/portdrv: Create pcie_is_port_dev() func from
 existing code

Hi Jim,

[...]
> +bool pcie_is_port_dev(struct pci_dev *dev)
> +{
> +	int type;
> +
> +	if (!dev)
> +		return false;
> +
> +	type = pci_pcie_type(dev);
> +
> +	return pci_is_pcie(dev) &&
> +		((type == PCI_EXP_TYPE_ROOT_PORT) ||
> +		 (type == PCI_EXP_TYPE_UPSTREAM) ||
> +		 (type == PCI_EXP_TYPE_DOWNSTREAM) ||
> +		 (type == PCI_EXP_TYPE_RC_EC));
> +}
> +EXPORT_SYMBOL_GPL(pcie_is_port_dev);

It would be really nice to document what the above function does (not that
some of the logic has been extracted from other function).  You know, for
the future generations of kernel hackers.

	Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ