From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wes1-so2.wedos.net (wes1-so2.wedos.net [46.28.106.16]) by dpdk.org (Postfix) with ESMTP id BA8572C10 for ; Mon, 4 Jul 2016 15:24:36 +0200 (CEST) Received: from pcviktorin.fit.vutbr.cz (pcviktorin.fit.vutbr.cz [147.229.13.147]) by wes1-so2.wedos.net (Postfix) with ESMTPSA id 3rjnmh2bxFz9QC; Mon, 4 Jul 2016 15:24:36 +0200 (CEST) Date: Mon, 4 Jul 2016 15:24:40 +0200 From: Jan Viktorin To: Shreyansh Jain Cc: "dev@dpdk.org" , David Marchand , Thomas Monjalon , Bruce Richardson , Declan Doherty , "jianbo.liu@linaro.org" , "jerin.jacob@caviumnetworks.com" , "Keith Wiles" , Stephen Hemminger Message-ID: <20160704152440.4380fab4@pcviktorin.fit.vutbr.cz> In-Reply-To: References: <20160613162431.714e56ae@pcviktorin.fit.vutbr.cz> <20160615115626.31bdd784@pcviktorin.fit.vutbr.cz> Organization: RehiveTech MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v1 02/28] eal: extract function eal_parse_sysfs_valuef X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jul 2016 13:24:36 -0000 Hello Shreyansh, On Thu, 16 Jun 2016 11:47:29 +0000 Shreyansh Jain wrote: > Sorry, didn't notice this email earlier... > Comments inline > > > -----Original Message----- > > From: Jan Viktorin [mailto:viktorin@rehivetech.com] > > Sent: Wednesday, June 15, 2016 3:26 PM > > To: Shreyansh Jain > > Cc: dev@dpdk.org; David Marchand ; Thomas Monjalon > > ; Bruce Richardson ; > > Declan Doherty ; jianbo.liu@linaro.org; > > jerin.jacob@caviumnetworks.com; Keith Wiles ; Stephen > > Hemminger > > Subject: Re: [dpdk-dev] [PATCH v1 02/28] eal: extract function > > eal_parse_sysfs_valuef > > > > On Tue, 14 Jun 2016 04:30:57 +0000 > > Shreyansh Jain wrote: > > > > > Hi Jan, > > > > > [...] > > > > > > > > > > > > I almost skipped the '..f' in the name and wondered how two functions > > > > having same name exist :D > > > > > > > > I agree that a better name would be nice here. This convention was based > > on > > > > the libc naming > > > > (fopen, fclose) but the "f" letter could not be at the beginning. > > > > > > > > What about one of those? > > > > > > > > * eal_parse_sysfs_fd_value > > > > * eal_parse_sysfs_file_value > > > > > > I don't have any better idea than above. > > > > > > Though, I still feel that 'eal_parse_sysfs_value -> > > eal_parse_sysfs_file_value' would be slightly asymmetrical - but again, this > > is highly subjective argument. > > > > I don't see any asymmetry here. The functions equal, just the new one accepts > > a file pointer instead of a path > > and we don't have function name overloading in C. > > Asymmetrical because cascading function names maybe additive for easy reading/recall. > > 'eal_parse_sysfs_value ==> eal_parse_sysfs_value_ ==> eal_parse_sysfs_value__' > > Obviously, this is not a rule - it just makes reading and recalling of cascade easier. > As for: > > eal_parse_sysfs_value => eal_parse_sysfs_file_value > > inserts an identifier between a name, making it (slightly) difficult to correlate. > > Again, as I mentioned earlier, this is subjective argument and matter of (personal!) choice. > > > > > > > > > Or, eal_parse_sysfs_value -> eal_parse_sysfs_value_read() may be... > > > > I think, I'll go with eal_parse_sysfs_file_value for v2. Ideally, it should > > be > > eal_parse_sysfs_path_value and eal_parse_sysfs_file_value. Thus, this looks > > like > > a good way. > > > > > > > > But, eal_parse_sysfs_file_value is still preferred than > > eal_parse_sysfs_fd_value, for me. > > > > Agree. > > > [...] I've finally returned to your idea to name it eal_parse_sysfs_value_read. Thanks. Jan > > - > Shreyansh -- Jan Viktorin E-mail: Viktorin@RehiveTech.com System Architect Web: www.RehiveTech.com RehiveTech Brno, Czech Republic