mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tanhuazhong <tanhuazhong@huawei.com>
To: Saeed Mahameed <saeedm@mellanox.com>,
	"davem@davemloft.net" <davem@davemloft.net>
Cc: "lipeng321@huawei.com" <lipeng321@huawei.com>,
	"yisen.zhuang@huawei.com" <yisen.zhuang@huawei.com>,
	"salil.mehta@huawei.com" <salil.mehta@huawei.com>,
	"linuxarm@huawei.com" <linuxarm@huawei.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"moyufeng@huawei.com" <moyufeng@huawei.com>
Subject: Re: [PATCH net-next 06/11] net: hns3: modify firmware version display format
Date: Fri, 26 Jul 2019 09:50:32 +0800	[thread overview]
Message-ID: <6c51adfc-b587-428a-2617-0532095d3d0a@huawei.com> (raw)
In-Reply-To: <d6a32434af7e9c883f104ae66e62b7b376abb39c.camel@mellanox.com>



On 2019/7/26 5:32, Saeed Mahameed wrote:
> On Thu, 2019-07-25 at 10:34 +0800, tanhuazhong wrote:
>>
>> On 2019/7/25 2:34, Saeed Mahameed wrote:
>>> On Wed, 2019-07-24 at 11:18 +0800, Huazhong Tan wrote:
>>>> From: Yufeng Mo <moyufeng@huawei.com>
>>>>
>>>> This patch modifies firmware version display format in
>>>> hclge(vf)_cmd_init() and hns3_get_drvinfo(). Also, adds
>>>> some optimizations for firmware version display format.
>>>>
>>>> Signed-off-by: Yufeng Mo <moyufeng@huawei.com>
>>>> Signed-off-by: Peng Li <lipeng321@huawei.com>
>>>> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
>>>> ---
>>>>    drivers/net/ethernet/hisilicon/hns3/hnae3.h              |  9
>>>> +++++++++
>>>>    drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c       | 15
>>>> +++++++++++++--
>>>>    drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c   | 10
>>>> +++++++++-
>>>>    drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c | 11
>>>> +++++++++--
>>>>    4 files changed, 40 insertions(+), 5 deletions(-)
>>>>
>>>>
> 
> [...]
> 
>>>> --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c
>>>> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c
>>>> @@ -419,7 +419,15 @@ int hclge_cmd_init(struct hclge_dev *hdev)
>>>>    	}
>>>>    	hdev->fw_version = version;
>>>>    
>>>> -	dev_info(&hdev->pdev->dev, "The firmware version is %08x\n",
>>>> version);
>>>> +	pr_info_once("The firmware version is %lu.%lu.%lu.%lu\n",
>>>> +		     hnae3_get_field(version,
>>>> HNAE3_FW_VERSION_BYTE3_MASK,
>>>> +				     HNAE3_FW_VERSION_BYTE3_SHIFT),
>>>> +		     hnae3_get_field(version,
>>>> HNAE3_FW_VERSION_BYTE2_MASK,
>>>> +				     HNAE3_FW_VERSION_BYTE2_SHIFT),
>>>> +		     hnae3_get_field(version,
>>>> HNAE3_FW_VERSION_BYTE1_MASK,
>>>> +				     HNAE3_FW_VERSION_BYTE1_SHIFT),
>>>> +		     hnae3_get_field(version,
>>>> HNAE3_FW_VERSION_BYTE0_MASK,
>>>> +				     HNAE3_FW_VERSION_BYTE0_SHIFT));
>>>>    
>>>
>>> Device name/string will not be printed now, what happens if i have
>>> multiple devices ? at least print the device name as it was before
>>>
>> Since on each board we only have one firmware, the firmware
>> version is same per device, and will not change when running.
>> So pr_info_once() looks good for this case.
>>
> 
> boards change too often to have such static assumption.

Ok, I will use dev_info instead of pr_info here.

> 
>> BTW, maybe we should change below print in the end of
>> hclge_init_ae_dev(), use dev_info() instead of pr_info(),
>> then we can know that which device has already initialized.
>> I will send other patch to do that, is it acceptable for you?
>>
>> "pr_info("%s driver initialization finished.\n", HCLGE_DRIVER_NAME);"
>>
> 
> I would avoid using pr_info when i can ! if you have the option to
> print with dev information as it was before that is preferable.
> 
> Thanks,
> Saeed.
> 

Thanks,
Huazhong.


  reply	other threads:[~2019-07-26  1:50 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-24  3:18 [PATCH net-next 00/11] net: hns3: some code optimizations & bugfixes & features Huazhong Tan
2019-07-24  3:18 ` [PATCH net-next 01/11] net: hns3: add reset checking before set channels Huazhong Tan
2019-07-24  3:18 ` [PATCH net-next 02/11] net: hns3: add a check for get_reset_level Huazhong Tan
2019-07-24  3:18 ` [PATCH net-next 03/11] net: hns3: remove upgrade reset level when reset fail Huazhong Tan
2019-07-24  3:18 ` [PATCH net-next 04/11] net: hns3: fix mis-counting IRQ vector numbers issue Huazhong Tan
2019-07-24 18:28   ` Saeed Mahameed
2019-07-25  2:04     ` tanhuazhong
2019-07-24  3:18 ` [PATCH net-next 05/11] net: hns3: change GFP flag during lock period Huazhong Tan
2019-07-24  3:18 ` [PATCH net-next 06/11] net: hns3: modify firmware version display format Huazhong Tan
2019-07-24 18:34   ` Saeed Mahameed
2019-07-25  2:34     ` tanhuazhong
2019-07-25 21:32       ` Saeed Mahameed
2019-07-26  1:50         ` tanhuazhong [this message]
2019-07-24  3:18 ` [PATCH net-next 07/11] net: hns3: adds debug messages to identify eth down cause Huazhong Tan
2019-07-24 19:12   ` Saeed Mahameed
2019-07-25 12:28     ` liuyonglong
2019-07-25 21:59       ` Saeed Mahameed
2019-07-26  1:28         ` Jakub Kicinski
2019-07-26  2:33           ` liuyonglong
2019-07-26  2:21         ` liuyonglong
2019-07-24  3:18 ` [PATCH net-next 08/11] net: hns3: add interrupt affinity support for misc interrupt Huazhong Tan
2019-07-24 19:24   ` Saeed Mahameed
2019-07-25  2:05     ` Yunsheng Lin
2019-07-26 23:18       ` Saeed Mahameed
2019-07-29 10:17         ` Yunsheng Lin
2019-07-29  9:18   ` Salil Mehta
2019-07-29 10:37     ` Yunsheng Lin
2019-07-24  3:18 ` [PATCH net-next 09/11] net: hns3: make hclge_service use delayed workqueue Huazhong Tan
2019-07-24  3:18 ` [PATCH net-next 10/11] net: hns3: Add support for using order 1 pages with a 4K buffer Huazhong Tan
2019-07-24  3:18 ` [PATCH net-next 11/11] net: hns3: add support for handling IMP error Huazhong Tan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c51adfc-b587-428a-2617-0532095d3d0a@huawei.com \
    --to=tanhuazhong@huawei.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=lipeng321@huawei.com \
    --cc=moyufeng@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=salil.mehta@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®