From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tan, Jianfeng" Subject: Re: [PATCH] pmd_virtio: Unchecked return value from library Date: Mon, 16 Oct 2017 22:51:36 +0800 Message-ID: References: <1505821646-33594-1-git-send-email-sebastianx.basierski@intel.com> <3A7E81AC661B4646A4CE6F2E09B7B74E4BAA2B@HASMSX106.ger.corp.intel.com> <3A7E81AC661B4646A4CE6F2E09B7B74E4BBC3F@HASMSX106.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: "'dev@dpdk.org'" , "Jain, Deepak K" To: "Basierski, SebastianX" , "'skhare@vmware.com'" Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 2143D1B74F for ; Mon, 16 Oct 2017 16:51:38 +0200 (CEST) In-Reply-To: <3A7E81AC661B4646A4CE6F2E09B7B74E4BBC3F@HASMSX106.ger.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Sebastian, Sorry for the late response. I missed the previous emails. On 10/16/2017 4:32 PM, Basierski, SebastianX wrote: >> flags = fcntl(dev->vhostfd, F_GETFL); >> - fcntl(dev->vhostfd, F_SETFL, flags | O_NONBLOCK); >> + if (fcntl(dev->vhostfd, F_SETFL, >> + flags | O_NONBLOCK) == -1) >> + return; > Actually, even it fails, I still prefer to continue instead of "return" here. Maybe, we can report an error message here. > > Thanks, > Jianfeng > > > > Hi Jianfeng, > > I'like to continue with the task. > So please let me know if You are certain with Your option: > continue instead of return (and add error report), despite possibility of returning error from fcntl. Even "return" directly, please add an error message here so that users can notice such error. Besides, the subject can be changed to: "net/virtio: fix unchecked return value" Thanks, Jianfeng