DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: Natanael Copa <ncopa@alpinelinux.org>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v3 13/15] crypto/dpaa2_sec: simplify pr_{debug, err, warn} macros
Date: Fri, 10 Jul 2020 05:11:41 +0000	[thread overview]
Message-ID: <AM6PR04MB4456DEE9FFCB13164DF57EBE89650@AM6PR04MB4456.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20190313170657.16688-14-ncopa@alpinelinux.org>

Change it to new location drivers/common/dpaax/caamflib/compat.h

Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

-----Original Message-----
From: dev <dev-bounces@dpdk.org> On Behalf Of Natanael Copa
Sent: Wednesday, March 13, 2019 10:37 PM
To: dev@dpdk.org
Cc: Natanael Copa <ncopa@alpinelinux.org>
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 <ncopa@alpinelinux.org>
---
 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_sec/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
 
+#if defined(SUPPRESS_PRINTS)
+#define pr_msg(l, fmt, ...) do { } while (0) #else #define pr_msg(l, 
+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 */
 
 #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 */
 
 #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 */
 
 /**
--
2.21.0


  parent reply	other threads:[~2020-07-10  5:11 UTC|newest]

Thread overview: 140+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-13 17:06 [dpdk-dev] [PATCH v3 00/15] Build fixes for musl libc Natanael Copa
2019-03-13 17:06 ` [dpdk-dev] [PATCH v3 01/15] app/testpmd: replace uint with unsigned int Natanael Copa
2019-03-26 16:59   ` Iremonger, Bernard
2019-03-26 16:59     ` Iremonger, Bernard
2019-03-30 22:17   ` Thomas Monjalon
2019-03-30 22:17     ` Thomas Monjalon
2019-07-04  9:20     ` Iremonger, Bernard
2019-03-13 17:06 ` [dpdk-dev] [PATCH v3 02/15] net/cxgbe: " Natanael Copa
2019-03-13 17:06 ` [dpdk-dev] [PATCH v3 03/15] bus/pci: add fallback for out[lwb]_p for non GNU libc Natanael Copa
2019-03-30 22:22   ` Thomas Monjalon
2019-03-30 22:22     ` Thomas Monjalon
2019-07-04 12:16     ` Natanael Copa
2019-07-04 13:20       ` Thomas Monjalon
2019-07-04 15:30         ` Natanael Copa
2019-03-13 17:06 ` [dpdk-dev] [PATCH v3 04/15] bus/pci: factor out various ifdefs in pci_uio_ioport_{read, write} Natanael Copa
2019-03-30 22:25   ` Thomas Monjalon
2019-03-30 22:25     ` Thomas Monjalon
2019-03-13 17:06 ` [dpdk-dev] [PATCH v3 05/15] bus/fslmc: fix compile error with musl libc Natanael Copa
2019-03-13 17:06 ` [dpdk-dev] [PATCH v3 06/15] bus/fslmc: remove unused include of error.h Natanael Copa
2019-03-13 17:06 ` [dpdk-dev] [PATCH v3 07/15] net/nfp: build fix for musl libc Natanael Copa
2019-03-21  9:48   ` Alejandro Lucero
2019-03-21  9:48     ` Alejandro Lucero
2019-03-13 17:06 ` [dpdk-dev] [PATCH v3 08/15] app/test: include fcntl.h due to use of O_RDONLY Natanael Copa
2019-03-13 17:06 ` [dpdk-dev] [PATCH v3 09/15] app/test: fix setting of -D_GNU_SOURCE with meson Natanael Copa
2019-03-13 17:06 ` [dpdk-dev] [PATCH v3 10/15] bus/dpaa: use warn(3) instead of error(3) to improve portability Natanael Copa
2019-03-30 22:33   ` Thomas Monjalon
2019-03-30 22:33     ` Thomas Monjalon
2020-07-10  5:13   ` Hemant Agrawal
2021-03-19  9:56     ` Thomas Monjalon
2019-03-13 17:06 ` [dpdk-dev] [PATCH v3 11/15] bus/dpaa: fix warning: "__WORDSIZE" is not defined, evaluates to 0 Natanael Copa
2019-03-30 22:36   ` Thomas Monjalon
2019-03-30 22:36     ` Thomas Monjalon
2020-07-10  5:10   ` Hemant Agrawal
2019-03-13 17:06 ` [dpdk-dev] [PATCH v3 12/15] crypto/dpaa2_sec: build fix for musl libc Natanael Copa
2020-07-10  5:11   ` Hemant Agrawal
2019-03-13 17:06 ` [dpdk-dev] [PATCH v3 13/15] crypto/dpaa2_sec: simplify pr_{debug, err, warn} macros Natanael Copa
2019-03-30 22:39   ` Thomas Monjalon
2019-03-30 22:39     ` Thomas Monjalon
2020-07-10  5:09   ` Hemant Agrawal
2020-07-10  5:11   ` Hemant Agrawal [this message]
2019-03-13 17:06 ` [dpdk-dev] [PATCH v3 14/15] net/netvsc: fix compile warning for fcntl.h include Natanael Copa
2019-03-13 17:06 ` [dpdk-dev] [PATCH v3 15/15] eal/linux: simplify debug message in sigbus_handler Natanael Copa
2019-03-14 17:09 ` [dpdk-dev] [PATCH v3 00/15] Build fixes for musl libc Sirvys, Andrius
2019-03-14 17:09   ` Sirvys, Andrius
2019-03-30 23:57 ` Thomas Monjalon
2019-03-30 23:57   ` Thomas Monjalon
2019-07-05  8:03   ` David Marchand
2020-11-05 21:17   ` [dpdk-dev] " Natanael Copa
2020-11-05 21:17     ` [dpdk-dev] [PATCH v4 1/8] app/testpmd: fix uint build error with " Natanael Copa
2020-11-06  9:22       ` [dpdk-dev] [PATCH v4 1/8] app/testpmd: fix uint build error withmusl libc Morten Brørup
2020-11-05 21:17     ` [dpdk-dev] [PATCH v4 2/8] net/cxgbe: fix uint build error with musl libc Natanael Copa
2020-11-06  9:24       ` [dpdk-dev] [PATCH v4 2/8] net/cxgbe: fix uint build error with musllibc Morten Brørup
2020-11-05 21:17     ` [dpdk-dev] [PATCH v4 3/8] bus/pci: add fallback for out* for non GNU libc Natanael Copa
2020-11-05 21:17     ` [dpdk-dev] [PATCH v4 4/8] bus/dpaa: use warn instead of error to improve portability Natanael Copa
2020-11-10 14:41       ` Fabrizio D'Angelo
2020-11-05 21:17     ` [dpdk-dev] [PATCH v4 5/8] bus/dpaa: fix detection of 64 bit arch Natanael Copa
2020-11-05 21:17     ` [dpdk-dev] [PATCH v4 6/8] common/dpaax: build fix for musl libc Natanael Copa
2020-11-05 21:17     ` [dpdk-dev] [PATCH v4 7/8] common/dpaax: simplify pr debug/err/warn macros Natanael Copa
2020-11-05 21:17     ` [dpdk-dev] [PATCH v4 8/8] eal: add missing include to fix build with musl libc Natanael Copa
2020-11-06 10:11     ` [dpdk-dev] Build fixes for " Thomas Monjalon
2020-11-06 10:44     ` David Marchand
2021-02-18 16:13       ` Thomas Monjalon
2021-02-20  8:51         ` Natanael Copa
2021-02-25  9:41           ` Thomas Monjalon
2021-02-25 18:22 ` [dpdk-dev] [PATCH v5 00/17] Alpine/musl build support Thomas Monjalon
2021-02-25 18:22   ` [dpdk-dev] [PATCH v5 01/17] eal: fix comment of OS-specific header files Thomas Monjalon
2021-02-25 18:22   ` [dpdk-dev] [PATCH v5 02/17] buildtools: fix build with busybox Thomas Monjalon
2021-02-26  9:11     ` Bruce Richardson
2021-02-25 18:22   ` [dpdk-dev] [PATCH v5 03/17] build: detect execinfo library on Linux Thomas Monjalon
2021-02-26  9:08     ` Bruce Richardson
2021-02-25 18:22   ` [dpdk-dev] [PATCH v5 04/17] build: define _GNU_SOURCE globally Thomas Monjalon
2021-02-26  9:08     ` Bruce Richardson
2021-02-26  9:40       ` Thomas Monjalon
2021-02-26  9:46         ` Bruce Richardson
2021-02-26 10:04           ` Thomas Monjalon
2021-02-28 12:53             ` Thomas Monjalon
2021-02-25 18:22   ` [dpdk-dev] [PATCH v5 05/17] eal/linux: fix build with musl Thomas Monjalon
2021-02-25 18:22   ` [dpdk-dev] [PATCH v5 06/17] drivers: fix header includes for musl Thomas Monjalon
2021-02-25 18:22   ` [dpdk-dev] [PATCH v5 07/17] drivers: replace page size definitions with function Thomas Monjalon
2021-02-25 18:22   ` [dpdk-dev] [PATCH v5 08/17] bus/pci: support I/O port operations with musl Thomas Monjalon
2021-02-25 18:22   ` [dpdk-dev] [PATCH v5 09/17] bus/dpaa: fix 64-bit arch detection Thomas Monjalon
2021-02-25 18:22   ` [dpdk-dev] [PATCH v5 10/17] bus/dpaa: fix build with musl Thomas Monjalon
2021-02-25 18:22   ` [dpdk-dev] [PATCH v5 11/17] common/dpaax/caamflib: " Thomas Monjalon
2021-02-25 18:22   ` [dpdk-dev] [PATCH v5 12/17] common/dpaax/caamflib: simplify log macros Thomas Monjalon
2021-02-25 18:22   ` [dpdk-dev] [PATCH v5 13/17] net/cxgbe: remove use of uint type Thomas Monjalon
2021-02-25 18:22   ` [dpdk-dev] [PATCH v5 14/17] net/igc: " Thomas Monjalon
2021-02-26  0:49     ` Wang, Haiyue
2021-02-25 18:22   ` [dpdk-dev] [PATCH v5 15/17] vdpa/mlx5: replace pthread functions unavailable in musl Thomas Monjalon
2021-03-01  7:30     ` Matan Azrad
2021-02-25 18:22   ` [dpdk-dev] [PATCH v5 16/17] app/testpmd: fix build with musl Thomas Monjalon
2021-02-25 18:22   ` [dpdk-dev] [PATCH v5 17/17] examples/bbdev: fix header include for musl Thomas Monjalon
2021-02-28 12:53 ` [dpdk-dev] [PATCH v6 00/17] Alpine/musl build support Thomas Monjalon
2021-02-28 12:53   ` [dpdk-dev] [PATCH v6 01/17] eal: fix comment of OS-specific header files Thomas Monjalon
2021-02-28 12:53   ` [dpdk-dev] [PATCH v6 02/17] buildtools: fix build with busybox Thomas Monjalon
2021-02-28 12:53   ` [dpdk-dev] [PATCH v6 03/17] build: detect execinfo library on Linux Thomas Monjalon
2021-02-28 12:53   ` [dpdk-dev] [PATCH v6 04/17] build: remove redundant _GNU_SOURCE definitions Thomas Monjalon
2021-02-28 12:53   ` [dpdk-dev] [PATCH v6 05/17] eal: fix build with musl Thomas Monjalon
2021-02-28 12:53   ` [dpdk-dev] [PATCH v6 06/17] drivers: fix header includes for musl Thomas Monjalon
2021-02-28 12:53   ` [dpdk-dev] [PATCH v6 07/17] drivers: replace page size definitions with function Thomas Monjalon
2021-03-01  9:41     ` Bruce Richardson
2021-03-01  9:53       ` Thomas Monjalon
2021-03-01 10:09         ` Bruce Richardson
2021-03-01 14:22     ` Andrew Boyer
2021-02-28 12:53   ` [dpdk-dev] [PATCH v6 08/17] bus/pci: support I/O port operations with musl Thomas Monjalon
2021-02-28 12:53   ` [dpdk-dev] [PATCH v6 09/17] bus/dpaa: fix 64-bit arch detection Thomas Monjalon
2021-02-28 12:53   ` [dpdk-dev] [PATCH v6 10/17] bus/dpaa: fix build with musl Thomas Monjalon
2021-02-28 12:53   ` [dpdk-dev] [PATCH v6 11/17] common/dpaax/caamflib: " Thomas Monjalon
2021-02-28 12:53   ` [dpdk-dev] [PATCH v6 12/17] common/dpaax/caamflib: simplify log macros Thomas Monjalon
2021-02-28 12:53   ` [dpdk-dev] [PATCH v6 13/17] net/cxgbe: remove use of uint type Thomas Monjalon
2021-02-28 12:53   ` [dpdk-dev] [PATCH v6 14/17] net/igc: " Thomas Monjalon
2021-02-28 12:53   ` [dpdk-dev] [PATCH v6 15/17] vdpa/mlx5: replace pthread functions unavailable in musl Thomas Monjalon
2021-02-28 12:53   ` [dpdk-dev] [PATCH v6 16/17] app/testpmd: fix build with musl Thomas Monjalon
2021-02-28 12:53   ` [dpdk-dev] [PATCH v6 17/17] examples/bbdev: fix header include for musl Thomas Monjalon
2021-03-17 22:42   ` [dpdk-dev] [PATCH v6 00/17] Alpine/musl build support Thomas Monjalon
2021-03-18  8:12     ` Andrew Rybchenko
2021-03-18  8:56     ` David Marchand
2021-03-19 14:57 ` [dpdk-dev] [PATCH v7 " Thomas Monjalon
2021-03-19 14:57   ` [dpdk-dev] [PATCH v7 01/17] eal: fix comment of OS-specific header files Thomas Monjalon
2021-03-19 14:57   ` [dpdk-dev] [PATCH v7 02/17] buildtools: fix build with busybox Thomas Monjalon
2021-03-22  8:52     ` Kinsella, Ray
2021-03-22  8:55       ` Thomas Monjalon
2021-03-22  9:01         ` Kinsella, Ray
2021-03-19 14:57   ` [dpdk-dev] [PATCH v7 03/17] build: detect execinfo library on Linux Thomas Monjalon
2021-03-19 14:57   ` [dpdk-dev] [PATCH v7 04/17] build: remove redundant _GNU_SOURCE definitions Thomas Monjalon
2021-03-19 14:57   ` [dpdk-dev] [PATCH v7 05/17] eal: fix build with musl Thomas Monjalon
2021-03-19 14:57   ` [dpdk-dev] [PATCH v7 06/17] drivers: replace page size definitions with function Thomas Monjalon
2021-03-19 15:47     ` McDaniel, Timothy
2021-03-19 14:57   ` [dpdk-dev] [PATCH v7 07/17] common/dpaax/caamflib: fix build with musl Thomas Monjalon
2021-03-19 14:57   ` [dpdk-dev] [PATCH v7 08/17] common/dpaax/caamflib: simplify log macros Thomas Monjalon
2021-03-19 14:57   ` [dpdk-dev] [PATCH v7 09/17] bus/dpaa: fix 64-bit arch detection Thomas Monjalon
2021-03-19 14:57   ` [dpdk-dev] [PATCH v7 10/17] bus/dpaa: fix build with musl Thomas Monjalon
2021-03-19 14:57   ` [dpdk-dev] [PATCH v7 11/17] bus/pci: support I/O port operations " Thomas Monjalon
2021-03-19 14:57   ` [dpdk-dev] [PATCH v7 12/17] net/cxgbe: remove use of uint type Thomas Monjalon
2021-03-19 14:57   ` [dpdk-dev] [PATCH v7 13/17] net/igc: " Thomas Monjalon
2021-03-19 14:57   ` [dpdk-dev] [PATCH v7 14/17] vdpa/mlx5: replace pthread functions unavailable in musl Thomas Monjalon
2021-03-19 14:57   ` [dpdk-dev] [PATCH v7 15/17] event/dlb: fix header includes for musl Thomas Monjalon
2021-03-19 15:47     ` McDaniel, Timothy
2021-03-19 14:57   ` [dpdk-dev] [PATCH v7 16/17] app/testpmd: fix build with musl Thomas Monjalon
2021-03-19 14:57   ` [dpdk-dev] [PATCH v7 17/17] examples/bbdev: fix header include for musl Thomas Monjalon
2021-03-23 10:02   ` [dpdk-dev] [PATCH v7 00/17] Alpine/musl build support Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM6PR04MB4456DEE9FFCB13164DF57EBE89650@AM6PR04MB4456.eurprd04.prod.outlook.com \
    --to=hemant.agrawal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=ncopa@alpinelinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).