* [PATCH v3] staging: fbtft: Fix checkpatch warning
@ 2016-09-29 10:13 Carlos Palminha
2016-09-29 11:27 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Carlos Palminha @ 2016-09-29 10:13 UTC (permalink / raw)
To: devel, linux-kernel; +Cc: thomas.petazzoni, noralf, gregkh, CARLOS.PALMINHA
Fixed the following checkpatch warnings (task #10 of eudyptula challenge):
- removed unnecessary blank line after open brace
- NULL comparison rewritten to use '!' operator
Signed-off-by: Carlos Palminha <palminha@synopsys.com>
---
Changes v2->v3:
- Improved explanation text.
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-29 11:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-29 10:13 [PATCH v3] staging: fbtft: Fix checkpatch warning Carlos Palminha
2016-09-29 11:27 ` Greg KH
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®