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 B5CF2A04AF; Mon, 4 May 2020 11:02:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1461E1D17B; Mon, 4 May 2020 11:02:01 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 7182A1D179 for ; Mon, 4 May 2020 11:01:59 +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 0448vMdR009235; Mon, 4 May 2020 02:01:58 -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=8USxcQDdUZe8OvQwJpDacpDswk1Cy7FX1x9JWmQao2M=; b=BrrzLCPRJvSIcAu4AOiBAd8mh2s+KbmRrPx3itlc4P9Px7VxMCeDMx0yXXII1Gx71Jov 5MI2E4qyBSgxWELZZiC7FKvZVoGXGl4PNJH8P3Q2Cj0NmC0yz0lcCMEqiYYd+HjSF7Tb GPJN8D8iPMxj9vgKXUb+KYeSUVEkrLXPfM667/VoHSqZHgwYZ7e6QGj1gWsUXcBXISVM Zop8fdbDW5lnHLXEY5td9/IvnEtjFrnURhHGAyMNn70tLDejJhYXpiwq9BNoHZW74c9y cmZsW/t2MOAEcujNgCTyjKcXH8QngMOzbNM4Yt/8jrNO7YXVCW3kiF6hRbbBvOmxtiVK 5A== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 30s67q65ds-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 04 May 2020 02:01:58 -0700 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 4 May 2020 02:01:56 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.109) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Mon, 4 May 2020 02:01:56 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F+51GdMrk1Ii7nFfKPy10zjJu0nxHphTEIC0K8JFhPZm8RvJbT9r+SazTfyc1otqMQOkHZ2B6YahfgfQQgvQpo8ZAKicfNPAvJSRGdDqV4YImej/A1YcPCG/1p51y4GcpirWoRH+x636ZsuLSlTf3JYN47yoo5xsuRWl22t+QrXnO38dSJWIrRXj1Rf5jIWp0jgwRKFpUlS+0AXYmfG/shur///WBmzpVoxBBMLN+bpjVaWqYgpsIyDWA+25VYoegs7hNPbVVmnC2bdAPXQo4xdUrRJTQrCKFf2IgFgOpxl7/GgF5gpHG7DyLF/bioAgwxXfNBEcYYSxR2wxmRXlEg== 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=8USxcQDdUZe8OvQwJpDacpDswk1Cy7FX1x9JWmQao2M=; b=KVLTEcCkdSElOU1uQapqibqBBCr8TSbKBV2EYFt819Vdi9AdN6xNmfMEv3KNMtV8lh3NY13JY6+peLk/4a9HmHSTTbVQRU6xda/DYrOG675A2V7H2d4Ptd1WEnquvqLD9Z3NF0WqiaBlKx0hBcV1qactiaXFmsehKnxK7XtsBRpQGz7cDNci73DDgozBFerBqREt8h4Ei0E+HiXRarK4tKapAqGUqpq64z97tqF29+G6Ten3kq4SJo33YHrarVm/YB04uWVRUYaqK1roqENx+aVi8YIX8w4NrcROhoplv8Q4IOIC0ZK6nLzl2VEh43bkkn9J3cfpCglNYGhwk87CwA== 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=8USxcQDdUZe8OvQwJpDacpDswk1Cy7FX1x9JWmQao2M=; b=uM17slhoxMcC53fu7Ku+lz0lChIgBlv/1SwtGUEmvSUcb6Vg4N+C3r25oaBVuUcvNkcvnlVl9yO1XSQp3MdifffF44AIE06tO/vfYkjxzQAbYoza+7vhB2TTGOeb5FHqnrmwA6SWRPHnypwUeKBMJm7q0dDOBiaaJNCEWjZYiM8= Received: from BY5PR18MB3105.namprd18.prod.outlook.com (2603:10b6:a03:1a4::30) by BY5PR18MB3153.namprd18.prod.outlook.com (2603:10b6:a03:194::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.26; Mon, 4 May 2020 09:01:55 +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 09:01:55 +0000 From: Sunil Kumar Kori To: David Marchand , "dev@dpdk.org" CC: "thomas@monjalon.net" , Jerin Jacob Kollanukkaran Thread-Topic: [EXT] [PATCH 7/8] trace: remove string duplication Thread-Index: AQHWIYn86YtVazLjakOnIrYO1ugldqiXog/w Date: Mon, 4 May 2020 09:01:55 +0000 Message-ID: References: <20200503203135.6493-1-david.marchand@redhat.com> <20200503203135.6493-8-david.marchand@redhat.com> In-Reply-To: <20200503203135.6493-8-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: 0a3c5870-d569-4355-bc4d-08d7f009cb98 x-ms-traffictypediagnostic: BY5PR18MB3153: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:115; x-forefront-prvs: 03932714EB x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: kFEaFmZwACz4CsY9w6y+XkYDLkSdUq5jytX+aZIgzRGxxi8uXhmJbgui2CYGZXX/2cur3Wux41ejBAqDO03v1Ehvr26b68H/b7rdq5zgLrKqkMHEJe5Ndh3kqoC5t4anKBP2eNUJlAynFWcw6hZsLHXC88pmxCq5owPAWg1BsXOaDG7AdEVb60lqKRslZ363Q5dMQJx3ReSinYW7HmHMFFpZNMLPV5iHb2SgUBLIwlsjIiTaGFq9zEDbBd7kaflBDBM6PeNdVRfCnCh0Mrjkr3MtJQTrIagi7mjLeBZ7r0tJ8mrBEH6thm2RSB4As1QqxvEhH7pfe3PhkQ9t9NDAPfLtJRC5Is7wRxtutedZx0R3gUJ4c3WBldKGe7RooDSm7PjHdqYKyp8LS38pDVnLViWgHWiX3cEuspSXR3cYpoY1LncaskbotT4LNF6TVKgZ 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)(366004)(136003)(39850400004)(396003)(346002)(376002)(6506007)(5660300002)(55016002)(86362001)(478600001)(9686003)(33656002)(7696005)(186003)(66446008)(66476007)(66556008)(76116006)(66946007)(64756008)(2906002)(8936002)(107886003)(316002)(54906003)(110136005)(71200400001)(52536014)(8676002)(4326008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: MFaa91JkW84hhiIHfdr2iQ3G6qqAs9/Ri9VOwLZZRqAGDpT2ldVb/giKsO5gNSAx3/P//qByXVySqjzftTwHsAFx15AG+VLX8g7bZz6sVbk5GpAV0W7+Wb2LrzVgKaEI/08XuGOXrJReooafLPnvsvZjHHLywSHxOMcZ6sRtH2/WA4wJnb4dY34mm0byMCmI3MvON4R2vsrUJZJVpm70wj7G3dmbp4a07oCJOcuZpJPJJRUXopcXCU82HhNd5TiGPiYzpiHiw8BqVAUVwBVmpifo0dyDretnCrWDV2BFIDI20HU8MSgNFwzFJJlyn13IFbiFEFdOXjqLcs6QyTOM23izP1BcUilfvCyxxT0ukuM6rpwoV4JWuGpZk3EwKJdjl2P6vPIm+hAcaKkIF7x/HDWGEiB+VxdvHmsXExSgZntHxEZTlnTub6OZf8LONtPBCkZkvEGPpmlhix8gDM0BkuOye9PZZ+AAo9Q77PHotzzcZIbn2GW1yej4o9Gujxa99gWqYOKNXfaXLNw4NJkq6On7f3nP12ahw7tDwxisP1RsHsu0sx+l+oal6i29WX1t5DOFDDafYgQF58oL9ZUkilv80fjLpRyWdAJwryCrbS8hXlIBkaCyv82ZYQUvAEgC16p0sjLuTJsye23By/JKHqNdGUjkVg1udLSrzQ79Armj670eEyqsSYpQfeGT6Jzfag/V5LznTBMsqLE/zBTfJXBx/sUvX4ytVIz6x3IRDfHV+tYJ7fHxjWvD6HHop/MKo/G/dYSaqJjr8TPSz1dlMTUYBa2f9Ec/hTGzKXl7K0bxfSccMSbo4YR+KsuWktp60ha+ZBXNcV+B1psxYyxC5JT8ZLT8tF6XsK8l8w9fod+M/poTbU3+EluVZ9zFFuXZ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 0a3c5870-d569-4355-bc4d-08d7f009cb98 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 May 2020 09:01:55.6211 (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: dS5ghiQzljTbKqwUAj5G+kdHcY89ErfMhy4P4N+xcFXNAtWQgv0pya2KD353F3DbGOgyE3TfmBELNe0lwfTAZg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR18MB3153 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-05-04_05:2020-05-01, 2020-05-04 signatures=0 Subject: Re: [dpdk-dev] [EXT] [PATCH 7/8] trace: remove string duplication 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" >-----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 7/8] trace: remove string duplication > >External Email > >---------------------------------------------------------------------- >No need to duplicate an untouched string. > >Signed-off-by: David Marchand >--- > lib/librte_eal/common/eal_common_trace_utils.c | 12 ++---------- > 1 file changed, 2 insertions(+), 10 deletions(-) > >diff --git a/lib/librte_eal/common/eal_common_trace_utils.c >b/lib/librte_eal/common/eal_common_trace_utils.c >index 15384ce4f1..49cc8d7b1d 100644 >--- a/lib/librte_eal/common/eal_common_trace_utils.c >+++ b/lib/librte_eal/common/eal_common_trace_utils.c >@@ -172,19 +172,11 @@ eal_trace_args_free(void) int >trace_args_apply(const char *arg) { >- char *str; >- >- str =3D strdup(arg); >- if (str =3D=3D NULL) >- return -1; >- >- if (rte_trace_regexp(str, true) < 0) { >- trace_err("cannot enable trace for %s", str); >- free(str); >+ if (rte_trace_regexp(arg, true) < 0) { >+ trace_err("cannot enable trace for %s", arg); > return -1; > } > >- free(str); > return 0; > } > >-- Acked-by: Sunil Kumar Kori >2.23.0