From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 701282C5 for ; Thu, 6 Apr 2017 11:02:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491469351; x=1523005351; h=subject:to:references:cc:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=rD6w58tJ51JkXB4JtL35d4oGJ9y/XBxZ/K16OG/KsG0=; b=EuIgdGfg8EHw0bXG+/fulQfuf2+6fT8Q0RxGgtV8236KraJ4WBky5dKB wb3bUw+bT6DI5VfmZwwMZmmNdtK28g==; Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Apr 2017 02:02:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,283,1488873600"; d="scan'208";a="1116141407" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.122]) ([10.237.220.122]) by orsmga001.jf.intel.com with ESMTP; 06 Apr 2017 02:02:25 -0700 To: "Zhang, Helin" , caihe References: <1491398393-14200-1-git-send-email-caihe@huawei.com> <453363AE6316CC428D594009B784F90503366F8A@SZXEMI508-MBS.china.huawei.com> <453363AE6316CC428D594009B784F90503367192@SZXEMI508-MBS.china.huawei.com> Cc: "dev@dpdk.org" , "Wu, Jingjing" , Zhoujingbin From: Ferruh Yigit Message-ID: Date: Thu, 6 Apr 2017 10:02:25 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v3] net/i40e: fix return value check issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Apr 2017 09:02:31 -0000 On 4/6/2017 9:27 AM, Zhang, Helin wrote: > Hi Henry > > I don't know why. > > Hi Ferruh > > Do you have any idea on this warning? Does Henry need to fix that? That is because commit log has a long line, line should be less than 72chars. I can fix it while applying. Thanks, ferruh > > Regards, > Helin > >> -----Original Message----- >> From: caihe [mailto:caihe@huawei.com] >> Sent: Thursday, April 6, 2017 3:27 PM >> To: Zhang, Helin >> Cc: dev@dpdk.org; Wu, Jingjing; Zhoujingbin >> Subject: 答复: [PATCH v3] net/i40e: fix return value check issue >> >> The warning as below: >> WARNING: Possible unwrapped commit description (prefer a maximum 75 >> chars per line) >> #6: >> function i40evf_add_del_all_mac_addr without check return value of >> rte_zmalloc >> >> total: 0 errors, 1 warnings, 0 checks, 10 lines checked >> >> And the waring line content is: >> + PMD_DRV_LOG(ERR, "fail to allocate memory"); >> >> I have no idea how to fix it, and have tried some alternative ways to avoid the >> warning, but fails with another different warning. >> I even doubt some configurations is wrong in my local environment, so I post >> the patch, but fail with the same warning. >> >> Could you offer some advice to avoid this warning, else we should avoid this >> warning with another different patch? >> >> Thanks >> Henry >> >> -----邮件原件----- >> 发件人: Zhang, Helin [mailto:helin.zhang@intel.com] >> 发送时间: 2017年4月6日 14:35 >> 收件人: caihe >> 抄送: dev@dpdk.org; Wu, Jingjing; Zhoujingbin >> 主题: RE: [PATCH v3] net/i40e: fix return value check issue >> >> >> >>> -----Original Message----- >>> From: caihe [mailto:caihe@huawei.com] >>> Sent: Thursday, April 6, 2017 9:06 AM >>> To: Zhang, Helin >>> Cc: dev@dpdk.org; Wu, Jingjing; Zhoujingbin >>> Subject: 答复: [PATCH v3] net/i40e: fix return value check issue >>> >>> Do you have any idea to fix the patch check warning, this is already >>> the perfect way? >> Basically we use Linux script tool of checkpatch.pl to check the patch before >> sending it out. >> But what's the issue you mentioned above? I don't see anything. >> >> Thanks, >> Helin >>> >>> -----邮件原件----- >>> 发件人: Zhang, Helin [mailto:helin.zhang@intel.com] >>> 发送时间: 2017年4月5日 23:34 >>> 收件人: caihe >>> 抄送: dev@dpdk.org; Wu, Jingjing; Zhoujingbin >>> 主题: RE: [PATCH v3] net/i40e: fix return value check issue >>> >>> >>> >>>> -----Original Message----- >>>> From: henry [mailto:caihe@huawei.com] >>>> Sent: Wednesday, April 5, 2017 9:20 PM >>>> To: Zhang, Helin >>>> Cc: dev@dpdk.org; Wu, Jingjing; zhoujingbin@huawei.com; henry cai >>>> Subject: [PATCH v3] net/i40e: fix return value check issue >>>> >>>> From: henry cai >>>> >>>> function i40evf_add_del_all_mac_addr without check return value of >>>> rte_zmalloc >>>> >>>> Fixes: 97ac72aa71a9 ("i40e: support setting VF MAC address ") >>>> >>>> Signed-off-by: henry cai >>> Acked-by: Helin Zhang >>>> --- >>>> drivers/net/i40e/i40e_ethdev_vf.c | 4 ++++ >>>> 1 file changed, 4 insertions(+) >>>> >>>> diff --git a/drivers/net/i40e/i40e_ethdev_vf.c >>>> b/drivers/net/i40e/i40e_ethdev_vf.c >>>> index d3659c9..3e0e2e1 100644 >>>> --- a/drivers/net/i40e/i40e_ethdev_vf.c >>>> +++ b/drivers/net/i40e/i40e_ethdev_vf.c >>>> @@ -2016,6 +2016,10 @@ static int i40evf_dev_xstats_get(struct >>>> rte_eth_dev *dev, >>>> } >>>> >>>> list = rte_zmalloc("i40evf_del_mac_buffer", len, 0); >>>> + if (!list) { >>>> + PMD_DRV_LOG(ERR, "fail to allocate memory"); >>>> + return; >>>> + } >>>> >>>> for (i = begin; i < next_begin; i++) { >>>> addr = &dev->data->mac_addrs[i]; >>>> -- >>>> 1.8.3.1 >>>> >