Fix multiple CHECK
cover Fix multiple CHECK
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(-)
Signature · 1 line
1.9.1
PATCH 1/2 staging: nvec: CHECK: No space is necessary after a cast
Remove a CHECK produced by checkpatch.pl
CHECK: No space is necessary after a cast
--- drivers/staging/nvec/nvec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/nvec/nvec.c +2 -2
@@ -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 ;
Signature · 1 line
1.9.1
Greg KH
maintainerRe: [Outreachy kernel] [PATCH 1/2] staging: nvec: CHECK: No space is necessary after a cast
Quoted 6 lines · Anchal Jain
Remove a CHECK produced by checkpatch.pl
CHECK: No space is necessary after a cast
Signed-off-by Anchal Jain <[email protected]>
Someone sent this before you did :(
PATCH 2/2 staging: nvec: Fixed NULL comparison style
In reply to Anchal JainRemove a CHECK produced by checkpatch.pl
CHECK: Comparison to NULL could be written "!msg"
CHECK: Comparison to NULL could be written "!nvec->rx"
--- drivers/staging/nvec/nvec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/nvec/nvec.c +2 -2
@@ -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 ; }
Signature · 1 line
1.9.1
Greg KH
maintainerRe: [Outreachy kernel] [PATCH 2/2] staging: nvec: Fixed NULL comparison style
Quoted 6 lines · Anchal Jain
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 <[email protected]>
Someone sent this before you did :(