All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix multiple CHECK
@ 2016-03-15 11:59 Anchal Jain
  2016-03-15 12:03 ` [PATCH 1/2] staging: nvec: CHECK: No space is necessary after a cast Anchal Jain
  2016-03-15 12:04 ` [PATCH 2/2] staging: nvec: Fixed NULL comparison style Anchal Jain
  0 siblings, 2 replies; 5+ messages in thread
From: Anchal Jain @ 2016-03-15 11:59 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: outreachy-kernel

This patchset updates the nvec driver in order to fix several
checkpatch issues detected in the source code.


Anchal Jain (2):
  staging: nvec: CHECK: No space is necessary after a cast
  staging: nvec: Fixed NULL comparison style

 drivers/staging/nvec/nvec.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] staging: nvec: CHECK: No space is necessary after a cast
  2016-03-15 11:59 [PATCH 0/2] Fix multiple CHECK Anchal Jain
@ 2016-03-15 12:03 ` Anchal Jain
  2016-03-21 19:41   ` [Outreachy kernel] " Greg KH
  2016-03-15 12:04 ` [PATCH 2/2] staging: nvec: Fixed NULL comparison style Anchal Jain
  1 sibling, 1 reply; 5+ messages in thread
From: Anchal Jain @ 2016-03-15 12:03 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: outreachy-kernel

Remove a CHECK produced by checkpatch.pl

CHECK: No space is necessary after a cast


Signed-off-by: Anchal Jain <anchalj109@gmail.com>
---
 drivers/staging/nvec/nvec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index c335ae2..7b7de5a 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -663,8 +663,8 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
 		} else {
 			dev_err(nvec->dev, "tx buffer underflow on %p (%u > %u)\n",
 				nvec->tx,
-				(uint) (nvec->tx ? nvec->tx->pos : 0),
-				(uint) (nvec->tx ? nvec->tx->size : 0));
+				(uint)(nvec->tx ? nvec->tx->pos : 0),
+				(uint)(nvec->tx ? nvec->tx->size : 0));
 			nvec->state = 0;
 		}
 		break;
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] staging: nvec: Fixed NULL comparison style
  2016-03-15 11:59 [PATCH 0/2] Fix multiple CHECK Anchal Jain
  2016-03-15 12:03 ` [PATCH 1/2] staging: nvec: CHECK: No space is necessary after a cast Anchal Jain
@ 2016-03-15 12:04 ` Anchal Jain
  2016-03-21 19:42   ` [Outreachy kernel] " Greg KH
  1 sibling, 1 reply; 5+ messages in thread
From: Anchal Jain @ 2016-03-15 12:04 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: outreachy-kernel

Remove a CHECK produced by checkpatch.pl

CHECK: Comparison to NULL could be written "!msg"
CHECK: Comparison to NULL could be written "!nvec->rx"

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
---
 drivers/staging/nvec/nvec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 7b7de5a..76cbc57 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -264,7 +264,7 @@ int nvec_write_async(struct nvec_chip *nvec, const unsigned char *data,
 
 	msg = nvec_msg_alloc(nvec, NVEC_MSG_TX);
 
-	if (msg == NULL)
+	if (!msg)
 		return -ENOMEM;
 
 	msg->data[0] = size;
@@ -620,7 +620,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
 		} else {
 			nvec->rx = nvec_msg_alloc(nvec, NVEC_MSG_RX);
 			/* Should not happen in a normal world */
-			if (unlikely(nvec->rx == NULL)) {
+			if (unlikely(!nvec->rx)) {
 				nvec->state = 0;
 				break;
 			}
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Outreachy kernel] [PATCH 1/2] staging: nvec: CHECK: No space is necessary after a cast
  2016-03-15 12:03 ` [PATCH 1/2] staging: nvec: CHECK: No space is necessary after a cast Anchal Jain
@ 2016-03-21 19:41   ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2016-03-21 19:41 UTC (permalink / raw)
  To: Anchal Jain; +Cc: outreachy-kernel

On Tue, Mar 15, 2016 at 05:33:02PM +0530, Anchal Jain wrote:
> Remove a CHECK produced by checkpatch.pl
> 
> CHECK: No space is necessary after a cast
> 
> 
> Signed-off-by: Anchal Jain <anchalj109@gmail.com>

Someone sent this before you did :(


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Outreachy kernel] [PATCH 2/2] staging: nvec: Fixed NULL comparison style
  2016-03-15 12:04 ` [PATCH 2/2] staging: nvec: Fixed NULL comparison style Anchal Jain
@ 2016-03-21 19:42   ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2016-03-21 19:42 UTC (permalink / raw)
  To: Anchal Jain; +Cc: outreachy-kernel

On Tue, Mar 15, 2016 at 05:34:25PM +0530, Anchal Jain wrote:
> Remove a CHECK produced by checkpatch.pl
> 
> CHECK: Comparison to NULL could be written "!msg"
> CHECK: Comparison to NULL could be written "!nvec->rx"
> 
> Signed-off-by: Anchal Jain <anchalj109@gmail.com>

Someone sent this before you did :(


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-21 19:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-15 11:59 [PATCH 0/2] Fix multiple CHECK Anchal Jain
2016-03-15 12:03 ` [PATCH 1/2] staging: nvec: CHECK: No space is necessary after a cast Anchal Jain
2016-03-21 19:41   ` [Outreachy kernel] " Greg KH
2016-03-15 12:04 ` [PATCH 2/2] staging: nvec: Fixed NULL comparison style Anchal Jain
2016-03-21 19:42   ` [Outreachy kernel] " Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.