lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 7 Aug 2018 21:30:10 -0300
From:   Leonardo Brás <leobras.c@...il.com>
To:     Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2 15/15] staging: fbtft: Replaces custom debug macro with
 dev_dbg().

Changes custom macro to dev_dbg to avoid parameter multiple usage and use of typeof().

Signed-off-by: Leonardo Brás <leobras.c@...il.com>
---
 drivers/staging/fbtft/fbtft.h | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index 2b2988d2f73e..0699c164b0d4 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -407,22 +407,15 @@ module_exit(fbtft_driver_module_exit)
 #define DEBUG_REQUEST_GPIOS_MATCH	BIT(30)
 #define DEBUG_VERIFY_GPIOS		BIT(31)
 
-#define fbtft_init_dbg(dev, format, arg...)                  \
-do {                                                         \
-	if (unlikely((dev)->platform_data &&                 \
-	    (((struct fbtft_platform_data *)(dev)->platform_data)->display.debug & DEBUG_DRIVER_INIT_FUNCTIONS))) \
-		dev_info(dev, format, ##arg);                \
-} while (0)
+#define fbtft_init_dbg(dev, format, arg...)				\
+	dev_dbg(dev, format, ##arg)
 
-#define fbtft_par_dbg(level, par, format, arg...)            \
-do {                                                         \
-	if (unlikely(par->debug & level))                    \
-		dev_info(par->info->device, format, ##arg);  \
-} while (0)
+#define fbtft_par_dbg(level, par, format, arg...)			\
+	dev_dbg(par->info->device, format, ##arg)
 
 #define fbtft_par_dbg_hex(level, par, dev, type, buf, num, format, arg...) \
 do {                                                                       \
-	if (unlikely((par)->debug & (level)))                                  \
+	if (unlikely((par)->debug & (level)))                              \
 		fbtft_dbg_hex(dev, sizeof(type), buf,\
 			      (num) * sizeof(type), format, ##arg); \
 } while (0)
-- 
2.18.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ