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:   Wed, 28 Sep 2016 14:27:37 -0700
From:   Joe Perches <joe@...ches.com>
To:     Harman Kalra <harman4linux@...il.com>,
        thomas.petazzoni@...e-electrons.com, noralf@...nnes.org
Cc:     gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging : fbtft: Removed "line over 80 characters"
 Warnings

On Thu, 2016-09-29 at 02:01 +0530, Harman Kalra wrote:
> Removed "line over 80 characters" Warnings using checkpatch.pl
[]
> diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
[]
> @@ -402,7 +407,9 @@ static void __exit fbtft_driver_module_exit(void)                          \
>  #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))) \
> +	    (((struct fbtft_platform_data *) \
> +		(dev)->platform_data)->display.debug \
> +		& DEBUG_DRIVER_INIT_FUNCTIONS))) \
>  		dev_info(dev, format, ##arg);                \
>  } while (0)

A nicer way to do might be a statement expression macro

#define fbtft_init_dbg(dev, format, ...)				\
({									\
	struct fbtft_platform_data *pdata;				\
	pdata = (struct fbtft_platform_data *)((dev)->platform_data);	\
	if (unlikely(pdata &&						\
		     pdata->display.debug & DEBUG_DRIVER_INIT_FUNCTIONS)) \
		dev_info(dev, format, ##__VA_ARGS__);
})

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ