From: Joe Perches <joe@perches.com>
To: Harman Kalra <harman4linux@gmail.com>,
thomas.petazzoni@free-electrons.com, noralf@tronnes.org
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging : fbtft: Removed "line over 80 characters" Warnings
Date: Wed, 28 Sep 2016 14:27:37 -0700 [thread overview]
Message-ID: <1475098057.2685.15.camel@perches.com> (raw)
In-Reply-To: <1475094672-4895-1-git-send-email-harman4linux@gmail.com>
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__);
})
next prev parent reply other threads:[~2016-09-28 21:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-28 20:31 Harman Kalra
2016-09-28 21:27 ` Joe Perches [this message]
2016-10-02 15:15 ` Greg KH
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=1475098057.2685.15.camel@perches.com \
--to=joe@perches.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=harman4linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=noralf@tronnes.org \
--cc=thomas.petazzoni@free-electrons.com \
/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
Powered by JetHome