mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Carlos Palminha <CARLOS.PALMINHA@synopsys.com>
To: <devel@driverdev.osuosl.org>, <linux-kernel@vger.kernel.org>
Cc: <thomas.petazzoni@free-electrons.com>, <noralf@tronnes.org>,
	<gregkh@linuxfoundation.org>, <CARLOS.PALMINHA@synopsys.com>
Subject: [PATCH] staging: fbtft: Fix checkpatch warning
Date: Wed, 28 Sep 2016 10:59:46 +0100	[thread overview]
Message-ID: <20160928095946.845-1-palminha@synopsys.com> (raw)

Improve code readability.

Signed-off-by: Carlos Palminha <palminha@synopsys.com>
---
Changes v1->v2:
- Added signed-off-by and comment.

 drivers/staging/fbtft/fbtft_device.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c
index e9f25dd..0883715 100644
--- a/drivers/staging/fbtft/fbtft_device.c
+++ b/drivers/staging/fbtft/fbtft_device.c
@@ -841,7 +841,6 @@ static struct fbtft_device_display displays[] = {
 			}
 		}
 	}, {
-
 		.name = "piscreen",
 		.spi = &(struct spi_board_info) {
 			.modalias = "fb_ili9486",
@@ -1418,14 +1417,14 @@ static int __init fbtft_device_init(void)
 
 	/* parse module parameter: gpios */
 	while ((p_gpio = strsep(&gpios, ","))) {
-		if (strchr(p_gpio, ':') == NULL) {
+		if (!strchr(p_gpio, ':')) {
 			pr_err("error: missing ':' in gpios parameter: %s\n",
 			       p_gpio);
 			return -EINVAL;
 		}
 		p_num = p_gpio;
 		p_name = strsep(&p_num, ":");
-		if (p_name == NULL || p_num == NULL) {
+		if (!p_name || !p_num) {
 			pr_err("something bad happened parsing gpios parameter: %s\n",
 			       p_gpio);
 			return -EINVAL;
@@ -1586,7 +1585,6 @@ static void __exit fbtft_device_exit(void)
 
 	if (p_device)
 		platform_device_unregister(p_device);
-
 }
 
 arch_initcall(fbtft_device_init);
-- 
2.9.3

             reply	other threads:[~2016-09-28 10:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28  9:59 Carlos Palminha [this message]
2016-09-28 10:05 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2017-03-24  9:02 [PATCH] Staging: " Anar Adilova
2017-03-27 12:06 ` Greg KH
2016-09-28  9:43 [PATCH] staging: " Carlos Palminha

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=20160928095946.845-1-palminha@synopsys.com \
    --to=carlos.palminha@synopsys.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --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

all inboxes | Powered by JetHome®