LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Vandana BN <bnvandana@gmail.com>
To: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org, lukas.bulwahn@gmail.com
Cc: skhan@linuxfoundation.org,
	linux-kernel-mentees@lists.linuxfoundation.org,
	Vandana BN <bnvandana@gmail.com>
Subject: [PATCH v2 5/8] Staging: kpc2000: kpc_dma: Resolve coding style error reported by checkpatch
Date: Mon, 13 May 2019 05:09:57 +0530	[thread overview]
Message-ID: <20190512234000.16555-5-bnvandana@gmail.com> (raw)
In-Reply-To: <20190512234000.16555-1-bnvandana@gmail.com>

This patch fixes below errors reported by checkpath
ERROR: Macros with complex values should be enclosed in parentheses
CHECK: Prefer using the BIT macro
ERROR: trailing statements should be on next line
ERROR: trailing statements should be on next line

Signed-off-by: Vandana BN <bnvandana@gmail.com>
---
 drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c
index 0b8dcf046136..e996ced77bd6 100644
--- a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c
+++ b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c
@@ -14,7 +14,7 @@ MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Matt.Sickler@daktronics.com");
 
 #define KPC_DMA_CHAR_MAJOR    UNNAMED_MAJOR
-#define KPC_DMA_NUM_MINORS    1 << MINORBITS
+#define KPC_DMA_NUM_MINORS    BIT(MINORBITS)
 static DEFINE_MUTEX(kpc_dma_mtx);
 static int assigned_major_num;
 static LIST_HEAD(kpc_dma_list);
@@ -55,9 +55,11 @@ static ssize_t  show_engine_regs(struct device *dev, struct device_attribute *at
 {
 	struct kpc_dma_device *ldev;
 	struct platform_device *pldev = to_platform_device(dev);
-	if (!pldev) return 0;
+	if (!pldev)
+		return 0;
 	ldev = platform_get_drvdata(pldev);
-	if (!ldev) return 0;
+	if (!ldev)
+		return 0;
 
 	return scnprintf(buf, PAGE_SIZE,
 		"EngineControlStatus      = 0x%08x\n"
-- 
2.17.1


  parent reply	other threads:[~2019-05-12 23:40 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-10 19:38 [PATCH] Staging: kpc2000: kpc_dma: resolve checkpath errors and warnings Vandana BN
2019-05-10 20:34 ` [Linux-kernel-mentees] " Lukas Bulwahn
2019-05-12 15:48   ` Vandana BN
2019-05-11  6:04 ` Greg KH
2019-05-12 23:39 ` [PATCH v2 1/8] Staging: kpc2000: kpc_dma: resolve trailing whitespace error reported by checkpatch Vandana BN
2019-05-12 23:39   ` [PATCH v2 2/8] Staging: kpc2000: kpc_dma: Resolve coding style errors " Vandana BN
2019-05-13  8:42     ` Greg KH
2019-05-13 10:43       ` Vandana BN
2019-05-12 23:39   ` [PATCH v2 3/8] " Vandana BN
2019-05-12 23:39   ` [PATCH v2 4/8] Staging: kpc2000: kpc_dma: Resolve code indent error " Vandana BN
2019-05-12 23:39   ` Vandana BN [this message]
2019-05-12 23:39   ` [PATCH v2 6/8] Staging: kpc2000: kpc_dma: Resolve coding style warning " Vandana BN
2019-05-12 23:39   ` [PATCH v2 7/8] " Vandana BN
2019-05-12 23:40   ` [PATCH v2 8/8] " Vandana BN
2019-05-13 10:26 ` [PATCH v3 1/8] Staging: kpc2000: kpc_dma: Resolve trailing whitespace error " Vandana BN
2019-05-13 10:26   ` [PATCH v3 2/8] Staging: kpc2000: kpc_dma: Resolve space errors around pointers and function declarations " Vandana BN
2019-05-13 10:26   ` [PATCH v3 3/8] Staging: kpc2000: kpc_dma: Resolve checkpatch space errors around brace '{','!' and open paranthesis '(' Vandana BN
2019-05-13 10:26   ` [PATCH v3 4/8] Staging: kpc2000: kpc_dma: Resolve code indent and trailing statements on next line errors reported by checkpatch Vandana BN
2019-05-13 10:26   ` [PATCH v3 5/8] Staging: kpc2000: kpc_dma: Resolve checkpath errors Macros in paranthesis & trailing statements on next line Vandana BN
2019-05-13 10:26   ` [PATCH v3 6/8] Staging: kpc2000: kpc_dma: Resolve warning Missing blank line after declarations & labels not to be indented Vandana BN
2019-05-13 10:26   ` [PATCH v3 7/8] Staging: kpc2000: kpc_dma: Resolve warning to use __func__ insted of funtion name reported by checkpatch Vandana BN
2019-05-13 10:26   ` [PATCH v3 8/8] Staging: kpc2000: kpc_dma: Resolve cast warning and use const for file_operation Vandana BN
2019-05-13 10:49   ` [PATCH v3 1/8] Staging: kpc2000: kpc_dma: Resolve trailing whitespace error reported by checkpatch Dan Carpenter
2019-05-13 12:00     ` Vandana BN
2019-05-13 13:43 ` [PATCH v4 " Vandana BN
2019-05-13 13:43   ` [PATCH v4 2/8] Staging: kpc2000: kpc_dma: Resolve space errors around pointers and function declarations " Vandana BN
2019-05-13 13:43   ` [PATCH v4 3/8] Staging: kpc2000: kpc_dma: Resolve checkpatch space errors around brace '{','!' and open paranthesis '(' Vandana BN
2019-05-13 13:43   ` [PATCH v4 4/8] Staging: kpc2000: kpc_dma: Resolve code indent and trailing statements on next line errors reported by checkpatch Vandana BN
2019-05-13 13:43   ` [PATCH v4 5/8] Staging: kpc2000: kpc_dma: Resolve checkpath errors Macros in paranthesis & trailing statements on next line Vandana BN
2019-05-13 13:43   ` [PATCH v4 6/8] Staging: kpc2000: kpc_dma: Resolve warning Missing blank line after declarations & labels not to be indented Vandana BN
2019-05-13 13:43   ` [PATCH v4 7/8] Staging: kpc2000: kpc_dma: Resolve warning to use __func__ insted of funtion name reported by checkpatch Vandana BN
2019-05-13 13:43   ` [PATCH v4 8/8] Staging: kpc2000: kpc_dma: Resolve cast warning and use const for file_operation Vandana BN

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=20190512234000.16555-5-bnvandana@gmail.com \
    --to=bnvandana@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=skhan@linuxfoundation.org \
    --subject='Re: [PATCH v2 5/8] Staging: kpc2000: kpc_dma: Resolve coding style error reported by checkpatch' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).