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 6F274A0526; Fri, 10 Jul 2020 07:11:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 504431D721; Fri, 10 Jul 2020 07:11:43 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10072.outbound.protection.outlook.com [40.107.1.72]) by dpdk.org (Postfix) with ESMTP id 357891D719 for ; Fri, 10 Jul 2020 07:11:42 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Old6RyQw31E8baIOtTvsFqnpbOBXUCzNFqsssiImlGVoMeYxbP30fm8q7tB3irLiOU/N+QYM3iEGxUdbkGK0F2KgKouwO8ZtraQS+VhvdKhqrj5OF4U215pUuSjdjf3gL6iZtv1j1mg9lqlJrTwpRe7VH+2SYCUblruZ+NILIX7ImpTGIWP3Mb7b2mrmr+CpHkj8gF5M1UJptVedkCv74BVnt+5SL8lrpAe3n/HEFBZc3I9f7ZQDffXmO5S5NVOjIJCvg2fQWU32hedp4KjipMxua2s6U70Cw4ffuGC2mQwvaGxfvIZTHGvP7FsoQAMgD51Kg91d1QKAh0yKMNp0lg== 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=MqWa6iQC3kOgklE0yTrgk1k8bi5eMFeIsPpIO+ktbKA=; b=HRHzcJAtjXIm0JwK4cQMRedfv1LWd4Lb36LXSbr6OxvqD08wh41G0ibXtzYhHs3V4vgNKQF4BwY7kRlhpNW1MNzxa+iK6Uqe4EiS9t09paWaDOX5JSPBmLPbUMnbgi0+87s1UoB9wrl80TclcJQyCojvh8wiHuNgsPL2FqflpS4XXwTtXZ5httDcPLC+NrtZQTn5mP8pPytHdO4LeBubICY9fBcJspc5lzhV4d4ge9q99g0QaxOoYarCpgu7rLn6rDWyhiGrlQLxv7CYgNIpCpazpRd1WH1GPZPqjya8Wldmi5vK2L5XVI+vOaOMaYv5fp9+MHBisQKkSxJcwdVCSA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MqWa6iQC3kOgklE0yTrgk1k8bi5eMFeIsPpIO+ktbKA=; b=JYrMcQhOgC0K71hxcbmd0bJABgJM+q3Pz9Xe/Zpeb0n5mLyzUESIXhZgcLwsRU7HxxxTHRueLk59S8xtknaeV/IDJaLeAry3Utzpwg+O6o6kI30g3GikbDFtG+nQZ35lG6j01pTS3SigNwgcUlzYa1H+HJdgxtV5GDqJWAgJNyY= Received: from AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) by AM5PR04MB3044.eurprd04.prod.outlook.com (2603:10a6:206:9::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.22; Fri, 10 Jul 2020 05:11:41 +0000 Received: from AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::52:2324:96c9:f3ae]) by AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::52:2324:96c9:f3ae%7]) with mapi id 15.20.3153.029; Fri, 10 Jul 2020 05:11:41 +0000 From: Hemant Agrawal To: Natanael Copa , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3 13/15] crypto/dpaa2_sec: simplify pr_{debug, err, warn} macros Thread-Index: AQHU2b+K1wkRfCYAuEi03tm6r/62bqkDPZwA Date: Fri, 10 Jul 2020 05:11:41 +0000 Message-ID: References: <20190313170657.16688-1-ncopa@alpinelinux.org> <20190313170657.16688-14-ncopa@alpinelinux.org> In-Reply-To: <20190313170657.16688-14-ncopa@alpinelinux.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: alpinelinux.org; dkim=none (message not signed) header.d=none;alpinelinux.org; dmarc=none action=none header.from=nxp.com; x-originating-ip: [182.69.104.93] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 438f7bf8-247a-4ba5-8fe0-08d8248fbb5a x-ms-traffictypediagnostic: AM5PR04MB3044: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:366; x-forefront-prvs: 046060344D x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: j5lfC2sePEKUwOI1MThItQPMgbQwSBM1KxqP56wtE8njw0ruq3YZNzAx0LldBnBSYt860v9fveWxh2KOeKInGfl2q4Tk5LLMhsq6kwXLKJgOSwGnQcPdch99UWjeVtRhZ57zfiH89R67L/eYPLopxoftS/4RGBWQsuwAA/4XNAODhxAoyXpXTPG6vv6r7df08Zh1C9iwq8rBbEGdtg8JwIDq9NRlpWOCvyyiMO1avPjiU3t9q+7VfPllefRqrOSVJsFpvfaHDK2lvrrTrMaO0srmUcIys+XeIrz+yd9L3N6eqUh2YOpdLthQ5gczjXFvYImGZ3cOX0cA37VzFz4E0Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4456.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(366004)(346002)(376002)(136003)(39860400002)(33656002)(7696005)(110136005)(316002)(9686003)(2906002)(55016002)(52536014)(44832011)(71200400001)(186003)(26005)(478600001)(8936002)(83380400001)(86362001)(6506007)(53546011)(5660300002)(66946007)(66446008)(76116006)(66556008)(64756008)(66476007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: 3FIdRAFkDbUfcLHx+2G1Wqfho7OzPijwPe1dXZJj5l5qP3QY17Z7+X5qlKPoHU/Fua6rEgGo9LN5sd7MNFeCtaD6SbFekUcmf+LFdrCkPAClWB8lk5SfhsqP3t602GbpzW+3T+SeL995KYMJanqC3XL0rkwqyiRnt/j82Qgq/fjtlblja2ybXsjzOsNii6SG/g7oIJu+vwPZrul5qWfkAE3u3vnzWRJnn7wUd1QNWZLwp7WNxf7VMxGGAfgXjFn7kS/tWqPwX+40fO2jKWd+WqRZGo8AnM/lXaMscVds02znOKUNQQY8g7a2BMsXtYyLzgkzgXRvvtzRgKTpRsWdUmV2Sal8d4Hz1s8IsA3DVclD4Xn1zygm99ldRH0IFBh8PBGpidmkjSIZsg2yL32v81rhlrPcxyrNnnhPuCDR4DMA3iebhflMsNap37XUGL6t4jDm9/AYVuAPXqTLm4jHA1+F4r000RQcJR2Y4ehmXJcC0V4jcHNzhqsGIGjS3F4A x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4456.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 438f7bf8-247a-4ba5-8fe0-08d8248fbb5a X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Jul 2020 05:11:41.3453 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: izlh2ePjrAXwoOJp7AjeQJ/u897e942uk1N55CdXraXGajcwQhmsa3gsuTrIObug7RL6t2jNdlt4nEqHhY64SQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR04MB3044 Subject: Re: [dpdk-dev] [PATCH v3 13/15] crypto/dpaa2_sec: simplify pr_{debug, err, warn} macros 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" Change it to new location drivers/common/dpaax/caamflib/compat.h Acked-by: Hemant Agrawal -----Original Message----- From: dev On Behalf Of Natanael Copa Sent: Wednesday, March 13, 2019 10:37 PM To: dev@dpdk.org Cc: Natanael Copa Subject: [dpdk-dev] [PATCH v3 13/15] crypto/dpaa2_sec: simplify pr_{debug, = err, warn} macros Simplify pr_debug, pr_err and pr_warn macros by add an intermediate pr_msg = macro. This way we only need test for SUPPRESS_PRINTS once. Signed-off-by: Natanael Copa --- drivers/crypto/dpaa2_sec/hw/compat.h | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/drivers/crypto/dpaa2_sec/hw/compat.h b/drivers/crypto/dpaa2_se= c/hw/compat.h index 1362045ca..e36229f5f 100644 --- a/drivers/crypto/dpaa2_sec/hw/compat.h +++ b/drivers/crypto/dpaa2_sec/hw/compat.h @@ -40,31 +40,27 @@ #define __maybe_unused __attribute__((unused)) #endif =20 +#if defined(SUPPRESS_PRINTS) +#define pr_msg(l, fmt, ...) do { } while (0) #else #define pr_msg(l,=20 +fmt, ...) \ + RTE_LOG(l, PMD, "%s(): " fmt "\n", __func__, ##__VA_ARGS__) #endif + #if !defined(pr_debug) -#if !defined(SUPPRESS_PRINTS) && defined(RTA_DEBUG) -#define pr_debug(fmt,= ...) \ - RTE_LOG(DEBUG, PMD, "%s(): " fmt "\n", __func__, ##__VA_ARGS__) +#if defined(RTA_DEBUG) +#define pr_debug(fmt, ...) pr_msg(DEBUG, fmt, ##__VA_ARGS__) #else -#define pr_debug(fmt, ...) do { } while (0) +#define pr_debug(fmt, ...) do { } while (0) #endif #endif /* pr_debug */ =20 #if !defined(pr_err) -#if !defined(SUPPRESS_PRINTS) -#define pr_err(fmt, ...) \ - RTE_LOG(ERR, PMD, "%s(): " fmt "\n", __func__, ##__VA_ARGS__) -#else -#define pr_err(fmt, ...) do { } while (0) -#endif +#define pr_err(fmt, ...) pr_msg(ERR, fmt, ##__VA_ARGS__) #endif /* pr_err */ =20 #if !defined(pr_warn) -#if !defined(SUPPRESS_PRINTS) -#define pr_warn(fmt, ...) \ - RTE_LOG(WARNING, PMD, "%s(): " fmt "\n", __func__, ##__VA_ARGS__) -#else -#define pr_warn(fmt, ...) do { } while (0) -#endif +#define pr_warn(fmt, ...) pr_msg(WARNING, fmt, ##__VA_ARGS__) #endif /* pr_warn */ =20 /** -- 2.21.0