From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753237AbdGLPeH (ORCPT ); Wed, 12 Jul 2017 11:34:07 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:52129 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752443AbdGLPeG (ORCPT ); Wed, 12 Jul 2017 11:34:06 -0400 Date: Wed, 12 Jul 2017 17:34:04 +0200 From: Andrew Lunn To: Aviad Krawczyk Cc: davem@davemloft.net, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bc.y@huawei.com, victor.gissin@huawei.com, zhaochen6@huawei.com, tony.qu@huawei.com Subject: Re: [PATCH net 02/20] nic/hinic: Initialize hw device components Message-ID: <20170712153404.GG2557@lunn.ch> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +/** > + * 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