Skip to contentSkip to conversation

staging/atomisp: fix minor coding style warnings

PATCH In review smklearn 3 participants 6 messages Jul 13, 2017 – Jul 17, 2017

Subsystems (4)
lore
Share & tools
lore

smklearn

author
#0 lore raw

PATCH 1/1 staging/atomisp: fix minor coding style warnings

Below were the minor issues flagged by checkpatch.pl:
- WARNING: Block comments use * on subsequent lines
- ERROR: space prohibited after that open parenthesis '('

---
 .../css2400/runtime/isys/src/ibuf_ctrl_rmgr.c      | 26 +++++++++++-----------
 1 file changed, 13 insertions(+), 13 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c +13 -13
index 76d9142..856fb6e 100644
@@ -14,18 +14,18 @@
  */
 #else
 /**
-Support for Intel Camera Imaging ISP subsystem.
-Copyright (c) 2010 - 2015, Intel Corporation.
-
-This program is free software; you can redistribute it and/or modify it
-under the terms and conditions of the GNU General Public License,
-version 2, as published by the Free Software Foundation.
-
-This program is distributed in the hope it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-more details.
-*/
+ * Support for Intel Camera Imaging ISP subsystem.
+ * Copyright (c) 2010 - 2015, Intel Corporation.
+
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ */
 #endif
 
 #include "system_global.h"
@@ -131,7 +131,7 @@ void ia_css_isys_ibuf_rmgr_release(
 	for (i = 0; i < ibuf_rsrc.num_allocated; i++) {
 		handle = getHandle(i);
 		if ((handle->start_addr == *start_addr)
-		    && ( true == handle->active)) {
+		    && (true == handle->active)) {
 			handle->active = false;
 			ibuf_rsrc.num_active--;
 			break;
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 3 lines · smklearn

Below were the minor issues flagged by checkpatch.pl:
- WARNING: Block comments use * on subsequent lines
- ERROR: space prohibited after that open parenthesis '('

Don't do multiple things in the same patch please, this should be multiple patches.

Quoted 1 line

This name doesn't match your "From:" name in the email :(

thanks,

greg k-h

author
#2 lore raw

PATCH 1/2 staging/atomisp: fixed trivial coding style warning

Below was the trivial wanrning flagged by checkpatch.pl
WARNING: Block comments use * on subsequent lines

---
 .../css2400/runtime/isys/src/ibuf_ctrl_rmgr.c      | 24 +++++++++++-----------
 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c +12 -12
index 76d9142..bb9f5cd 100644
@@ -14,18 +14,18 @@
  */
 #else
 /**
-Support for Intel Camera Imaging ISP subsystem.
-Copyright (c) 2010 - 2015, Intel Corporation.
-
-This program is free software; you can redistribute it and/or modify it
-under the terms and conditions of the GNU General Public License,
-version 2, as published by the Free Software Foundation.
-
-This program is distributed in the hope it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-more details.
-*/
+ * Support for Intel Camera Imaging ISP subsystem.
+ * Copyright (c) 2010 - 2015, Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ */
 #endif
 
 #include "system_global.h"
Signature · 1 line
1.9.1
author
#3 lore raw

PATCH 2/2 staging/atomisp: fixed trivial coding style issue

In reply to Greg KH

Below was the trival error flagged by checkpatch.pl:
ERROR: space prohibited after that open parenthesis '('

---
 .../atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c +1 -1
index bb9f5cd..99edb81 100644
@@ -131,7 +131,7 @@ void ia_css_isys_ibuf_rmgr_release(
 	for (i = 0; i < ibuf_rsrc.num_allocated; i++) {
 		handle = getHandle(i);
 		if ((handle->start_addr == *start_addr)
-		    && ( true == handle->active)) {
+		    && (true == handle->active)) {
 			handle->active = false;
 			ibuf_rsrc.num_active--;
 			break;
Signature · 1 line
1.9.1
#4 lore raw

Re: [PATCH 2/2] [media] staging/atomisp: fixed trivial coding style issue

Quoted 2 lines · Shy More

Below was the trival error flagged by checkpatch.pl:
ERROR: space prohibited after that open parenthesis '('

[]

drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c

Quoted 1 line
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c +0 -0

[]

drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c void ia_css_isys_ibuf_rmgr_release( · line 137

Quoted 9 lines
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c +1 -1
@@ -131,7 +131,7 @@ void ia_css_isys_ibuf_rmgr_release(
 	for (i = 0; i < ibuf_rsrc.num_allocated; i++) {
 		handle = getHandle(i);
 		if ((handle->start_addr == *start_addr)
-		    && ( true == handle->active)) {
+		    && (true == handle->active)) {
 			handle->active = false;
 			ibuf_rsrc.num_active--;
 			break;

Better would have been to remove the comparison to true

		if (handle->start_addr == *start_addr && handle->active)

but this would probably read better and perhaps be marginally faster on some processors if written like:

		if (handle->active && handle->start_addr == *start_addr)
author
#5 lore raw

PATCH v2 1/1 staging/atomisp: fixed trivial coding style issue

Below was the trival error flagged by checkpatch.pl:
ERROR: space prohibited after that open parenthesis '('

---
changes in v2:
- made the suggested corrections

---
 .../atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c     | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c +1 -2
index bb9f5cd..faef976 100644
@@ -130,8 +130,7 @@ void ia_css_isys_ibuf_rmgr_release(
 
 	for (i = 0; i < ibuf_rsrc.num_allocated; i++) {
 		handle = getHandle(i);
-		if ((handle->start_addr == *start_addr)
-		    && ( true == handle->active)) {
+		if (handle->active && handle->start_addr == *start_addr) {
 			handle->active = false;
 			ibuf_rsrc.num_active--;
 			break;
Signature · 1 line
1.9.1