From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9564CA04AF; Mon, 4 May 2020 09:55:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1052F1D40A; Mon, 4 May 2020 09:55:33 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id B08E01D405 for ; Mon, 4 May 2020 09:55:30 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0447o7ig032684; Mon, 4 May 2020 00:55:29 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=FCKLYUJWKBHIvu+z+Y94E7nABsC3rNxCpGQACj+eHwk=; b=EJhoqkAHDowvrLaUiDp2peFPkS390UTdEGEufhebmfeMRCu6IVJ6Y33D01cr20VgWfs8 POKxEN3c9SjbrJx0F4qCj/HGgQCdTJWr7N96jN2Ezq29oGrEoQju4DsLepGUJvEDGorT vy3XDEWclGtpC+bUCWRrQVKiOE1IgRUNKRpi+sfOT/sDsuhRcFGDored5aRy6SDl8zi7 zXEMUcTD5dxthh0i17YuT2nkoo2/d6e545v3Pdh8Fus8I77CJD6kyQ7gV3R6eC4NFLWl K+CECjBUz0h9C9M0+i4Uuve9fIXLJXbQI8/fQUXYz+mR36MyAP5RNDsNkdbfBjFwWgkH UQ== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 30s67q5yt2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 04 May 2020 00:55:29 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 4 May 2020 00:55:28 -0700 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (104.47.46.51) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Mon, 4 May 2020 00:55:27 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fUSGL1frcNZiOaHD2GOyRwp0mRESWDLTNomCJqS0J9j5OB+UK+0xRGhzoN1tnSx4iJKaAIDVpqT2MWtaVEnhDdAv5pTEgOX2xyauE2aTHdFn0wcO13aXUyvKgndThM4LONRyzKetaStmD4tIqo33CCb2ATjytelae0XfVsPHF8fMCNERSX4+PPHiJmK7MavmL1dDaeWFEu/5OR9pqTBGLVc30Zf4Azs0auAMyrmuk70/eFkMYeTPVG81pXFwZoTO1aueD4MFrSgZgMsKGBeFJkGGmkgrNX+IMgpO7MzeVyOcAxAxJykgPEE+MNqKn5y46yWx8sBeW5iW2XjvyHKAFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FCKLYUJWKBHIvu+z+Y94E7nABsC3rNxCpGQACj+eHwk=; b=EDxjJAuqmcKkQTijOHmWzVqiEhvDT8hiswRy7LrjigZSpD3aH49vuojY+YOmub+Wz3joCDvTG2Tw9+BICv9rMH3ioUZb79OcXv/VmfTCPL7Y2TmqLPpHJgCgBUd/e/tci9/X5P2awpUxw9W+JimbsubwD8HB1zQP3nS78gUqLlAqATQT1p0TD2w4vcWFeUiFNmVBRNBEMahpXq/6PxwMPV03NqbcFV3FhPKiUv1Ip5zxKF6wMMppH1/MaPQKAUYgRHdHDw73EH7H06CL+T0dL7eAxk5mwddq1xMAl/pUWWg5j7BlEc6KuNJQ2dKBFUHpnv3/pgJUDkp6XJHYuiCU/A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FCKLYUJWKBHIvu+z+Y94E7nABsC3rNxCpGQACj+eHwk=; b=DeSBZFVgXAWRFQTqKEKieXW/jLX3k+UZOXQN2fbnZyZd+C9sAz1kOymBlTCrfWHtwyMjNH9CJAJx4v9VZa0S/J+YDIL0jUwV6DCLS8+jSqJmE5CAGM571ujgCkTajMPAxBuPeFa6HgtaKDGU6RuMciKQBJAdwMwaurnuaeOadO0= Received: from BY5PR18MB3105.namprd18.prod.outlook.com (2603:10b6:a03:1a4::30) by BY5PR18MB3251.namprd18.prod.outlook.com (2603:10b6:a03:1a6::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20; Mon, 4 May 2020 07:55:26 +0000 Received: from BY5PR18MB3105.namprd18.prod.outlook.com ([fe80::cc6:c7ae:dc40:7ddf]) by BY5PR18MB3105.namprd18.prod.outlook.com ([fe80::cc6:c7ae:dc40:7ddf%7]) with mapi id 15.20.2958.030; Mon, 4 May 2020 07:55:26 +0000 From: Sunil Kumar Kori To: David Marchand , "dev@dpdk.org" CC: "thomas@monjalon.net" , Jerin Jacob Kollanukkaran Thread-Topic: [EXT] [PATCH 4/8] trace: avoid confusion on optarg Thread-Index: AQHWIYn2a7TPvpH1K0WikheIuoMwE6iXjtmg Date: Mon, 4 May 2020 07:55:26 +0000 Message-ID: References: <20200503203135.6493-1-david.marchand@redhat.com> <20200503203135.6493-5-david.marchand@redhat.com> In-Reply-To: <20200503203135.6493-5-david.marchand@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=marvell.com; x-originating-ip: [2401:4900:1699:86aa:a1b6:3b55:e266:80e3] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2fe7b8ac-03fe-492c-efe6-08d7f00081ea x-ms-traffictypediagnostic: BY5PR18MB3251: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:519; x-forefront-prvs: 03932714EB x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xYd7/qSmaZtQJGnd6qVAxJTlvtDfUjZ6V0+RRU4dTlS3Vn2tTpHdL/CQGy1+mQMfR2lSi0BlQCgJhwYegKnUivNyESdV3hEPMC5gzToCrPOlxoo+S8eLsly8WeTJUy//cCKRQ2eqwGBOtafSOVFaTEiIZqxuDd6u0GWDaprUJ4VSVsgAtwZDJ0+GQSe0PVOXwi1Vmtki+Qrj8N60oA4/Y9LKZB/OQg+7WNY/Uma1Yle3x+bDvhXFBitRupBhw8lU73t1R1OdddmtMTxfqyxaSlpmEST3ywAhj3cRTU9eR+l2DFdE+VFGZ9LRFx3xPJPWGevo/hfr6WKIluTHiZ1/lnVX9vtzv/7yFSMFBaGW+WchBUw4Q431JtByIKbzRfiR0hj+6wJsym6/gqgcJleYtPLi/yn2NR0rOkJ6/LGQxO3kSzsTQ2gsmlu27gA92oEpg87LWrZ9MA6311bLcnxCUeYFaS6ps4tvdu/5dwwhkwvmOffFZoCtv3JMBTXjHq07 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR18MB3105.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(376002)(136003)(39850400004)(366004)(346002)(478600001)(110136005)(316002)(76116006)(52536014)(7696005)(6506007)(54906003)(71200400001)(5660300002)(186003)(9686003)(55016002)(4326008)(8676002)(33656002)(8936002)(86362001)(107886003)(2906002)(64756008)(66476007)(66946007)(66446008)(66556008)(21314003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: 2IFmfkD3JMjotWW0bX8xBptH+z/TDuLl00d0RHTAwLNcK8vE9QSZ2vanfMAuEEherlcUqnuneEZaExsMESsI3KFXUPK148d66gcbWZCqJ5lpqOejtBPP3W5gXKxZglcR6HgFzXIP5ryiFI8BEcRtjhG2XM3hDDiIXxPOtGhC/drGgaxRjaLN+t04lu7J+b/JMSCBOWeXPwtYd0b+eHLmeGsiHMfQ1epdZxWND2cMVYoMBHTj6gDHFcM2Ov55qJ1rbzjefxwvbiX0RFogXhqOqkjkz83VS0plNof/6EQfxQkobAsd8Ra9orTzkHJm0dzrpKPtD1IutaCA/5PIxzdUK2mXg3XQVOOKYV1s8IfWW29ouKhfDiKk4JxD+0WLQ19ApkBQ+hbLKbMVwCRwckey6HABj/Kk86A+a+v2QhVs3dRIaiTzpXY3Ypsp0oZpDKWh46NU8rx4ASgwRN4KejX4F983iSV+HywNPw10rwIXe6RsUvQj7gLO1KeO6RDR4heOAcwIbErop9hVKuTC6LQHfr/pogYPljPAhPsMSVceJjDVMWd9wNRP1q+0LN9UsuPBXsSrizUruHSO8ownwHtGv4U6lXLdgUKpp0x53cn4wob25+U9lidsvzApa8iK7XksH5j6osu1hzSi7JEOe32tm9CPYQu+xptqO6+PGQz67VYIJ3x1UJ41ecjhOIDlJVf75R+bO8zKo+xk6tvvnJscY2h8ptwg/cRRQGaxuLlN1kNjv/7IK6hWJHCVZEi8m6mPoKXLiIq6FhUmtJ3QzigJidF2okZpEfn1gdtYMDVgtTCmhBKHuQyb54yyOtxcYnfu1+noexNG3HIt67WqNsV7i22a1buY53tV07aLk1lGitZR7KhAQghRdwkY6yGuyN1q Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 2fe7b8ac-03fe-492c-efe6-08d7f00081ea X-MS-Exchange-CrossTenant-originalarrivaltime: 04 May 2020 07:55:26.5119 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: VXi12+1w5POm4LCzTwctU5aSBWmBTGsqV4tb/hHGQkUvKxQEL9dXvuTr1YqdcVYCAApD25LfcTZ6JCdA3N1TSQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR18MB3251 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-05-04_04:2020-05-01, 2020-05-04 signatures=0 Subject: Re: [dpdk-dev] [EXT] [PATCH 4/8] trace: avoid confusion on optarg 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Overall, it looks okay but I think "args" will be more relevant as each API= says XXX_args_save(). What do you say ? Regards Sunil Kumar Kori >-----Original Message----- >From: David Marchand >Sent: Monday, May 4, 2020 2:02 AM >To: dev@dpdk.org >Cc: thomas@monjalon.net; Jerin Jacob Kollanukkaran ; >Sunil Kumar Kori >Subject: [EXT] [PATCH 4/8] trace: avoid confusion on optarg > >External Email > >---------------------------------------------------------------------- >Prefer a local name to optarg which is a global symbol from the C library. > >Fixes: 8c8066ea6a7b ("trace: add trace mode configuration parameter") > >Signed-off-by: David Marchand >--- > .../common/eal_common_trace_utils.c | 32 +++++++++---------- > lib/librte_eal/common/eal_trace.h | 8 ++--- > 2 files changed, 20 insertions(+), 20 deletions(-) > >diff --git a/lib/librte_eal/common/eal_common_trace_utils.c >b/lib/librte_eal/common/eal_common_trace_utils.c >index fce8892c38..a7c5893b00 100644 >--- a/lib/librte_eal/common/eal_common_trace_utils.c >+++ b/lib/librte_eal/common/eal_common_trace_utils.c >@@ -135,7 +135,7 @@ trace_dir_update(const char *str) } > > int >-eal_trace_args_save(const char *optarg) >+eal_trace_args_save(const char *val) > { > struct trace *trace =3D trace_obj_get(); > char *trace_args; >@@ -144,17 +144,17 @@ eal_trace_args_save(const char *optarg) > nb_args =3D trace->args.nb_args; > > if (nb_args >=3D TRACE_MAX_ARGS) { >- trace_err("ignoring trace %s as limit exceeds", optarg); >+ trace_err("ignoring trace %s as limit exceeds", val); > return 0; > } > >- trace_args =3D calloc(1, (strlen(optarg) + 1)); >+ trace_args =3D calloc(1, (strlen(val) + 1)); > if (trace_args =3D=3D NULL) { >- trace_err("fail to allocate memory for %s", optarg); >+ trace_err("fail to allocate memory for %s", val); > return -ENOMEM; > } > >- memcpy(trace_args, optarg, strlen(optarg)); >+ memcpy(trace_args, val, strlen(val)); > trace->args.args[nb_args++] =3D trace_args; > trace->args.nb_args =3D nb_args; > return 0; [snip] >2.23.0