RE: [PATCH 06/16] x86/amd_nb: Simplify root device search

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Yazen Ghannam <yazen.ghannam@xxxxxxx>
> [...]
> +struct pci_dev *amd_node_get_root(u16 node) {
> +	struct pci_dev *df_f0 __free(pci_dev_put) = NULL;

NULL pointer initialization is not necessary.

> +	struct pci_dev *root;
> +	u16 cntl_off;
> +	u8 bus;
> +
> +	if (!boot_cpu_has(X86_FEATURE_ZEN))
> +		return NULL;
> +
> +	/*
> +	 * D18F0xXXX [Config Address Control] (DF::CfgAddressCntl)
> +	 * Bits [7:0] (SecBusNum) holds the bus number of the root device for
> +	 * this Data Fabric instance. The segment, device, and function will be
> 0.
> +	 */
> +	df_f0 = amd_node_get_func(node, 0);
> +	if (!df_f0)
> +		return NULL;
> [...]





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux