All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Removes several pointer comparisons to 0 in queue API
@ 2017-03-15  4:02 Tahia Khan
  2017-03-15  4:03 ` [PATCH 1/3] staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_enqueue Tahia Khan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tahia Khan @ 2017-03-15  4:02 UTC (permalink / raw)
  To: outreachy-kernel, mchehab, gregkh

Replaces pointer comparisons to 0 with NULL in multiple queue 
API methods. Identified using coccinelle script 'badzero.cocci'.

Tahia Khan (3):
  staging: atomisp: Removes pointer comparison to 0 in
    ia_css_queue_enqueue
  staging: atomisp: Removes pointer comparison to 0 in
    ia_css_queue_dequeue
  staging: atomisp: Removes pointer comparison to 0 in
    ia_css_queue_get_size

 .../media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.7.4



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

* [PATCH 1/3] staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_enqueue
  2017-03-15  4:02 [PATCH 0/3] Removes several pointer comparisons to 0 in queue API Tahia Khan
@ 2017-03-15  4:03 ` Tahia Khan
  2017-03-15  4:03 ` [PATCH 2/3] staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_dequeue Tahia Khan
  2017-03-15  4:03 ` [PATCH 3/3] staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_get_size Tahia Khan
  2 siblings, 0 replies; 4+ messages in thread
From: Tahia Khan @ 2017-03-15  4:03 UTC (permalink / raw)
  To: outreachy-kernel, mchehab, gregkh

Repaces pointer comparison to 0 with NULL in ia_css_queue_enqueue
to improve code readability. Identified with coccinelle script
'badzero.cocci'.

Signed-off-by: Tahia Khan <tahia.khan@gmail.com>
---
 .../media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c
index 06667bd..e4f589f 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c
@@ -88,7 +88,7 @@ int ia_css_queue_enqueue(
 			uint32_t item)
 {
 	int error = 0;
-	if (0 == qhandle)
+	if (NULL == qhandle)
 		return EINVAL;
 
 	/* 1. Load the required queue object */
-- 
2.7.4



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

* [PATCH 2/3] staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_dequeue
  2017-03-15  4:02 [PATCH 0/3] Removes several pointer comparisons to 0 in queue API Tahia Khan
  2017-03-15  4:03 ` [PATCH 1/3] staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_enqueue Tahia Khan
@ 2017-03-15  4:03 ` Tahia Khan
  2017-03-15  4:03 ` [PATCH 3/3] staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_get_size Tahia Khan
  2 siblings, 0 replies; 4+ messages in thread
From: Tahia Khan @ 2017-03-15  4:03 UTC (permalink / raw)
  To: outreachy-kernel, mchehab, gregkh

Repaces pointer comparison to 0 with NULL in ia_css_queue_dequeue
to improve code readability. Identified with coccinelle script
'badzero.cocci'.

Signed-off-by: Tahia Khan <tahia.khan@gmail.com>
---
 .../media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c
index e4f589f..f397a8c 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c
@@ -146,7 +146,7 @@ int ia_css_queue_dequeue(
 			uint32_t *item)
 {
 	int error = 0;
-	if (qhandle == 0 || NULL == item)
+	if (qhandle == NULL || NULL == item)
 		return EINVAL;
 
 	/* 1. Load the required queue object */
-- 
2.7.4



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

* [PATCH 3/3] staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_get_size
  2017-03-15  4:02 [PATCH 0/3] Removes several pointer comparisons to 0 in queue API Tahia Khan
  2017-03-15  4:03 ` [PATCH 1/3] staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_enqueue Tahia Khan
  2017-03-15  4:03 ` [PATCH 2/3] staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_dequeue Tahia Khan
@ 2017-03-15  4:03 ` Tahia Khan
  2 siblings, 0 replies; 4+ messages in thread
From: Tahia Khan @ 2017-03-15  4:03 UTC (permalink / raw)
  To: outreachy-kernel, mchehab, gregkh

Repaces pointer comparison to 0 with NULL in ia_css_queue_get_size
to improve code readability. Identified with coccinelle script
'badzero.cocci'.

Signed-off-by: Tahia Khan <tahia.khan@gmail.com>
---
 .../media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c
index f397a8c..606376f 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c
@@ -383,7 +383,7 @@ int ia_css_queue_get_size(
 			uint32_t *size)
 {
 	int error = 0;
-	if ((qhandle == 0) || (size == NULL))
+	if ((qhandle == NULL) || (size == NULL))
 		return EINVAL;
 
 	/* 1. Load the required queue object */
-- 
2.7.4



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

end of thread, other threads:[~2017-03-15  4:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-15  4:02 [PATCH 0/3] Removes several pointer comparisons to 0 in queue API Tahia Khan
2017-03-15  4:03 ` [PATCH 1/3] staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_enqueue Tahia Khan
2017-03-15  4:03 ` [PATCH 2/3] staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_dequeue Tahia Khan
2017-03-15  4:03 ` [PATCH 3/3] staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_get_size Tahia Khan

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.