Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1685868

Re: [PATCH net 02/20] nic/hinic: Initialize hw device components

From Andrew Lunn <andrew@lunn.ch>
Newsgroups linux.kernel
Subject Re: [PATCH net 02/20] nic/hinic: Initialize hw device components
Date 2017-07-12 17:40 +0200
Message-ID <u2rU6-1Av-25@gated-at.bofh.it> (permalink)
References <u2qEF-Q6-9@gated-at.bofh.it> <u2qEF-Q6-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> +/**
> + * get_dev_cap - get device capabilities
> + * @hwdev: the NIC HW device to get capabilities for
> + *
> + * Return 0 - Success, negative - Failure
> + **/
> +static int get_dev_cap(struct hinic_hwdev *hwdev)
> +{
> +	struct hinic_pfhwdev *pfhwdev;
> +	struct hinic_hwif *hwif = hwdev->hwif;
> +	struct pci_dev *pdev = hwif->pdev;
> +	int err;
> +
> +	switch (HINIC_FUNC_TYPE(hwif)) {
> +	case HINIC_PPF:
> +	case HINIC_PF:
> +		pfhwdev = container_of(hwdev, struct hinic_pfhwdev, hwdev);
> +
> +		err = get_cap_from_fw(pfhwdev);
> +		if (err) {
> +			dev_err(&pdev->dev, "Failed to get capability from FW\n");
> +			return err;
> +		}
> +		break;
> +
> +	default:
> +		pr_err("Unsupported PCI Function type\n");

Hi Aviad

more pr_err(). Please go through all the patches and use dev_err(), or
netif_err() if appropriate.

    Thanks
	Andrew

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH net 02/20] nic/hinic: Initialize hw device components Aviad Krawczyk <aviad.krawczyk@huawei.com> - 2017-07-12 16:20 +0200
  Re: [PATCH net 02/20] nic/hinic: Initialize hw device components Andrew Lunn <andrew@lunn.ch> - 2017-07-12 17:40 +0200

csiph-web