From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0083.outbound.protection.outlook.com [104.47.0.83]) by dpdk.org (Postfix) with ESMTP id C7BFBB424 for ; Thu, 16 Jun 2016 13:47:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=e7wAR0nYuVE3FAcHClofCuDRpxXHiTchSt0QsCkDzr4=; b=o6/yT+JbjBEKfYS4CBEV4ACaqv/e1D12qqMwxnc0n6J649Xkt7EWMn0YpWI2Lg3p/U3X4Y7dYUEFbX2gnRxRn79FpvRobIhiUEkNxI5e5iID247b9V/kNiqj71z/58xHlXnWeMtaCVNL79gqNtDdEWDnJZk2FB8vfoC7buurvPQ= Received: from DB5PR0401MB2054.eurprd04.prod.outlook.com (10.166.11.137) by DB5PR0401MB2056.eurprd04.prod.outlook.com (10.166.11.139) with Microsoft SMTP Server (TLS) id 15.1.517.8; Thu, 16 Jun 2016 11:47:55 +0000 Received: from DB5PR0401MB2054.eurprd04.prod.outlook.com ([10.166.11.137]) by DB5PR0401MB2054.eurprd04.prod.outlook.com ([10.166.11.137]) with mapi id 15.01.0517.014; Thu, 16 Jun 2016 11:47:56 +0000 From: Shreyansh Jain To: Jan Viktorin CC: "dev@dpdk.org" , David Marchand , Thomas Monjalon , Bruce Richardson , Declan Doherty , "jianbo.liu@linaro.org" , "jerin.jacob@caviumnetworks.com" , "Keith Wiles" , Stephen Hemminger Thread-Topic: [dpdk-dev] [PATCH v1 02/28] eal: extract function eal_parse_sysfs_valuef Thread-Index: AQHRxYAFwsGnVKsKjkWuKvqF/+arRJ/oXhTwgAHvSACAAa6osA== Date: Thu, 16 Jun 2016 11:47:29 +0000 Deferred-Delivery: Thu, 16 Jun 2016 11:47:19 +0000 Message-ID: References: <20160613162431.714e56ae@pcviktorin.fit.vutbr.cz> <20160615115626.31bdd784@pcviktorin.fit.vutbr.cz> In-Reply-To: <20160615115626.31bdd784@pcviktorin.fit.vutbr.cz> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; x-originating-ip: [192.88.169.1] x-ms-office365-filtering-correlation-id: 7ddb59cb-dda9-44fa-7ecc-08d395dc0ea6 x-microsoft-exchange-diagnostics: 1; DB5PR0401MB2056; 6:r+zbQRTz5keS2m5PcS/2UE1TCzzwUo9Zlo3fMWBT6xR18ElQf5p9feS7swWA2lHHr5w3BD8Ds2aMbfogvjDRk/SH2aThc0pcLs1Kr+keRxM20u63ONK42AA6wDPjPsG1n3jUkB3usjKaLVBL9DPaG3Mu8cLTnJNMumvrfGVdNzjQVN8U1nKZUQhUC9WCpqkzvNCLUDUwmIYnWIXr3Es5NJpIf/k33FB7/SMmhXm/JivUfaDqQvK22GUNZgEAUTvtx/xMDDBXqcIVGvPihdbCVZdnO/v18MBLL9MPdwbO4Pb3AXoqn5AFxVDzN4aObBZSdE/derPkYUeqYayL9phVKQ==; 5:c/k0f8SXc849pqioYchw/sgb2V7/lmwEfq6kTrwvmExdu7j/8iT4fX7DpmVMG1vlqkmeLeHp2bfPbtQMDoH9i7V3h0wwOowjUDtptVVpj60V5zuNXHISQAp9oNNEaPWWxLfZSXF4BNbV3mE5U0/iJw==; 24:kOOEtLDMs6ssLvySZiPEThiLSGqSFk6wJBYCxyxfpah8g9JHMKV9uBjcdOVHhuKBcesSfGDp+4TaXqPwgii2+E8fDI2HeTdK/sGGJYXwiUA=; 7:uTipHzPxonDTa6CsJysK27LhA0ytXH5PhpbO/0oOxvLTduMpoC7TlHY9TTISQltcAcRFOIwpZLeiAr2cQot09aTusejOLRiC6kaA0YdIGiNER0D+nAXBgj2W+1xwJHViApb8RxBwQHJPpFHUaZD2cjC7vHHfRU5H8++gaC5gX6qRRR1ul8T2ptXjCnFGH8lxstGnqoJSPBhB6AuvANDePw== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB5PR0401MB2056; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:DB5PR0401MB2056; BCL:0; PCL:0; RULEID:; SRVR:DB5PR0401MB2056; x-forefront-prvs: 09752BC779 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(199003)(13464003)(24454002)(189002)(377454003)(3660700001)(5008740100001)(101416001)(87936001)(92566002)(122556002)(10400500002)(76576001)(33656002)(77096005)(19580395003)(74316001)(2900100001)(9686002)(68736007)(2950100001)(6116002)(3280700002)(102836003)(3846002)(586003)(76176999)(93886004)(19580405001)(8676002)(189998001)(66066001)(106356001)(50986999)(5002640100001)(86362001)(105586002)(4326007)(81166006)(81156014)(5004730100002)(106116001)(2906002)(54356999)(97736004)(5003600100002)(110136002)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR0401MB2056; H:DB5PR0401MB2054.eurprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; CAT:NONE; LANG:en; CAT:NONE; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jun 2016 11:47:55.9367 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR0401MB2056 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: Thu, 16 Jun 2016 11:47:58 -0000 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 Monja= lon > ; Bruce Richardson ; > Declan Doherty ; jianbo.liu@linaro.org; > jerin.jacob@caviumnetworks.com; Keith Wiles ; Step= hen > Hemminger > Subject: Re: [dpdk-dev] [PATCH v1 02/28] eal: extract function > eal_parse_sysfs_valuef >=20 > On Tue, 14 Jun 2016 04:30:57 +0000 > Shreyansh Jain wrote: >=20 > > Hi Jan, > > [...] > > > > > > > > I almost skipped the '..f' in the name and wondered how two functio= ns > > > having same name exist :D > > > > > > I agree that a better name would be nice here. This convention was ba= sed > 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, t= his > is highly subjective argument. >=20 > I don't see any asymmetry here. The functions equal, just the new one acc= epts > 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 readi= ng/recall. 'eal_parse_sysfs_value =3D=3D> eal_parse_sysfs_value_ =3D=3D> eal_parse= _sysfs_value__' Obviously, this is not a rule - it just makes reading and recalling of casc= ade easier. As for: eal_parse_sysfs_value =3D> eal_parse_sysfs_file_value inserts an identifier between a name, making it (slightly) difficult to cor= relate. Again, as I mentioned earlier, this is subjective argument and matter of (p= ersonal!) choice. >=20 > > > > Or, eal_parse_sysfs_value -> eal_parse_sysfs_value_read() may be... >=20 > I think, I'll go with eal_parse_sysfs_file_value for v2. Ideally, it shou= ld > be > eal_parse_sysfs_path_value and eal_parse_sysfs_file_value. Thus, this loo= ks > like > a good way. >=20 > > > > But, eal_parse_sysfs_file_value is still preferred than > eal_parse_sysfs_fd_value, for me. >=20 > Agree. >=20 [...] - Shreyansh