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]
Message-ID: <1406224354.27221.53.camel@joe-AO725>
Date:	Thu, 24 Jul 2014 10:52:34 -0700
From:	Joe Perches <joe@...ches.com>
To:	Seunghun Lee <waydi1@...il.com>
Cc:	gregkh@...uxfoundation.org, lidza.louina@...il.com,
	markh@...pro.net, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] staging: dgng: Fix Macros with complex values
 should be enclosed in parenthesis

On Fri, 2014-07-25 at 00:26 +0900, Seunghun Lee wrote:
> This patch fixes a checkpatch errors
> "Macros with complex values should be enclosed in parenthesis"
[]
> diff --git a/drivers/staging/dgnc/dgnc_driver.h b/drivers/staging/dgnc/dgnc_driver.h

> @@ -111,32 +111,32 @@
>  #endif
>  
>  #if defined TRC_TO_KMEM
> -#define PRINTF_TO_KMEM(args) dgnc_tracef args
> +#define PRINTF_TO_KMEM(args) do { dgnc_tracef args } while (0)

All this _TO_KMEM code is #if 0 in dgnc_trace.h

It'd be good to change the dgnc_tracef prototype to use
__printf(1, 2)

and this code in drivers/staging/dgnc/dgnc_driver.h:

#if defined TRC_TO_CONSOLE
#define PRINTF_TO_CONSOLE(args) { printk(DRVSTR": "); printk args; }
#else /* !defined TRACE_TO_CONSOLE */
#define PRINTF_TO_CONSOLE(args)
#endif

should really consolidate the printk to something like:

#define PRINTF_TO_CONSOLE(fmt, ...)			\
	printk(KERN_INFO DRVSTR ": " fmt, ##__VA_ARGS__)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ