From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH 2/5] eal: extract function eal_parse_sysfs_valuef Date: Wed, 31 Aug 2016 23:30:10 -0700 Message-ID: <20160831233010.5d78d262@xeon-e3> References: <1472704915-13112-1-git-send-email-shreyansh.jain@nxp.com> <1472704915-13112-3-git-send-email-shreyansh.jain@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: , , To: Shreyansh Jain Return-path: Received: from mail-pf0-f176.google.com (mail-pf0-f176.google.com [209.85.192.176]) by dpdk.org (Postfix) with ESMTP id 1FF752946 for ; Thu, 1 Sep 2016 08:30:00 +0200 (CEST) Received: by mail-pf0-f176.google.com with SMTP id p64so27895804pfb.1 for ; Wed, 31 Aug 2016 23:30:00 -0700 (PDT) In-Reply-To: <1472704915-13112-3-git-send-email-shreyansh.jain@nxp.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 1 Sep 2016 10:11:52 +0530 Shreyansh Jain wrote: > From: Jan Viktorin > > From: Jan Viktorin > > The eal_parse_sysfs_value function accepts a filename however, such > interface introduces race-conditions to the code. Introduce the > variant of this function that accepts an already opened file instead of > a filename. > > Signed-off-by: Jan Viktorin > Signed-off-by: Shreyansh Jain > --- You introduce new API, but don't use it in your other patches. I don't see where passing filename is racy. sysfs files only get created/destroyed when device is added/removed.