linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/9] staging: media: atomisp: code cleanup fixes
@ 2021-04-28 18:04 Deepak R Varma
  2021-04-28 18:05 ` [PATCH v4 2/9] staging: media: atomisp: balance braces around if...else block Deepak R Varma
  2021-04-30  6:43 ` [PATCH v4 0/9] staging: media: atomisp: code cleanup fixes Sakari Ailus
  0 siblings, 2 replies; 3+ messages in thread
From: Deepak R Varma @ 2021-04-28 18:04 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Sakari Ailus, Greg Kroah-Hartman
  Cc: linux-media, linux-staging, linux-kernel, drv

This patch set addresses multiple issues reported by  of checkpatch script as
WARNING and CHECK complaints. Other feedback received from the
maintainers is incorporated as well.

Note:
   - The patches should be applied in the ascending order.
   - Patch count revised to 9 from 6
   - patch 1/9 is not being sent since it was already submitted by
     another developer.

Changes since v3:
   Generic change:
   1. Dropped patch 1/9 since it was already submitted to Hans by
      another developer.
   2. Split patch 2 into patch 2 & 3 since they are doing two different
      things.
   3. Added patch 8 & 9 for extended clean up based on patch set feedback
      received.

   Patch Specific change:
   1. patch 1/9 : dropped
   2. patch 2/9 : split into patch 2 & 3
   3. patch 3/9 : introduced
   4. patch 4/9 : none
   5. patch 5/9 : include header file in the clean up
   6. patch 6/9 : none 
   7. patch 7/9 : include dev_info() for replacements 
   8. patch 8/9 : introduced 
   9. patch 9/9 : introduced

Changes since v2:
   Generic change:
   1. Correct patch versioning in patch subject

   Patch Specific change:
   1. patch 1/6 : none
   2. patch 2/6 : none
   3. patch 3/6 : none
   4. patch 4/6 :
        a. Tag Fabio Auito for the patch suggestion

   5. patch 5/6 : none
   6. patch 6/6:
        a. Tag Fabio Auito for the patch suggestion

Changes since v1:
   Generic change:
   1. The patch set is being resent from an email account that matches with
      the patch signed-of-by tag. Issue highlighted by Hans Verkuil.

   Patch specific changes:
   1. patch 1/6 : none
   2. patch 2/6 : none
   3. patch 3/6 : none
   4. patch 4/6 : implement following changes suggested by Fabio Aiuto
        a. Corrected commenting style
        b. Similar style implemented for other comment blocks in
           the same files.
   5. patch 5/6 : none
   6. patch 6/6: implement following changes suggested by Fabio Aiuto
        a. use dev_info instead of pr_info
        b. update patch log message accordingly


Deepak R Varma (9):
  staging: media: atomisp: improve function argument alignment
  staging: media: atomisp: balance braces around if...else block
  staging: media: atomisp: remove unnecessary braces
  staging: media: atomisp: use __func__ over function names
  staging: media: atomisp: reformat code comment blocks
  staging: media: atomisp: fix CamelCase variable naming
  staging: media: atomisp: replace raw pr_*() by dev_dbg()
  staging: media: atomisp: remove unnecessary pr_info calls
  staging: media: atomisp: remove unwanted dev_*() calls

 .../media/atomisp/i2c/atomisp-gc0310.c        |  57 +++------
 .../media/atomisp/i2c/atomisp-gc2235.c        |  29 ++---
 .../atomisp/i2c/atomisp-libmsrlisthelper.c    |   6 +-
 .../media/atomisp/i2c/atomisp-lm3554.c        |   2 +-
 .../media/atomisp/i2c/atomisp-mt9m114.c       | 108 ++++++++++--------
 .../media/atomisp/i2c/atomisp-ov2680.c        |  41 ++++---
 .../media/atomisp/i2c/atomisp-ov2722.c        |  10 +-
 drivers/staging/media/atomisp/i2c/mt9m114.h   |   3 +-
 drivers/staging/media/atomisp/i2c/ov2680.h    |  10 +-
 9 files changed, 130 insertions(+), 136 deletions(-)

-- 
2.31.1




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

* [PATCH v4 2/9] staging: media: atomisp: balance braces around if...else block
  2021-04-28 18:04 [PATCH v4 0/9] staging: media: atomisp: code cleanup fixes Deepak R Varma
@ 2021-04-28 18:05 ` Deepak R Varma
  2021-04-30  6:43 ` [PATCH v4 0/9] staging: media: atomisp: code cleanup fixes Sakari Ailus
  1 sibling, 0 replies; 3+ messages in thread
From: Deepak R Varma @ 2021-04-28 18:05 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Sakari Ailus, Greg Kroah-Hartman
  Cc: linux-media, linux-staging, linux-kernel, drv

Balance braces around the if else blocks as per the code style guidelines.
Add braces to branches where it is missing. Resolves checkpatch script
CHECK / WARNING feedback messages.

Signed-off-by: Deepak R Varma <drv@mailo.com>
---

Changes since v3:
   - Split this patch into patch 2 and 3.
   - patch 2 now only adds missing braces.
   - Removing unwanted braces is moved into patch 3 
Changes since v2:
   - None.
Changes since v1:
   - None.


 drivers/staging/media/atomisp/i2c/atomisp-gc0310.c  | 4 ++--
 drivers/staging/media/atomisp/i2c/atomisp-gc2235.c  | 4 ++--
 drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c | 4 ++--
 drivers/staging/media/atomisp/i2c/atomisp-ov2722.c  | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
index 6be3ee1d93a5..d68a2bcc9ae1 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
@@ -872,9 +872,9 @@ static int gc0310_s_power(struct v4l2_subdev *sd, int on)
 {
 	int ret;
 
-	if (on == 0)
+	if (on == 0) {
 		return power_down(sd);
-	else {
+	} else {
 		ret = power_up(sd);
 		if (!ret)
 			return gc0310_init(sd);
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
index 6ba4a8adff7c..e722c639b60d 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
@@ -658,9 +658,9 @@ static int gc2235_s_power(struct v4l2_subdev *sd, int on)
 {
 	int ret;
 
-	if (on == 0)
+	if (on == 0) {
 		ret = power_down(sd);
-	else {
+	} else {
 		ret = power_up(sd);
 		if (!ret)
 			ret = __gc2235_init(sd);
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c b/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c
index f5de81132177..465fc4468442 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c
@@ -568,9 +568,9 @@ static int power_down(struct v4l2_subdev *sd)
 
 static int mt9m114_s_power(struct v4l2_subdev *sd, int power)
 {
-	if (power == 0)
+	if (power == 0) {
 		return power_down(sd);
-	else {
+	} else {
 		if (power_up(sd))
 			return -EINVAL;
 
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
index aec7392fd1de..d046a9804f63 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
@@ -772,9 +772,9 @@ static int ov2722_s_power(struct v4l2_subdev *sd, int on)
 {
 	int ret;
 
-	if (on == 0)
+	if (on == 0) {
 		return power_down(sd);
-	else {
+	} else {
 		ret = power_up(sd);
 		if (!ret)
 			return ov2722_init(sd);
-- 
2.31.1




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

* Re: [PATCH v4 0/9] staging: media: atomisp: code cleanup fixes
  2021-04-28 18:04 [PATCH v4 0/9] staging: media: atomisp: code cleanup fixes Deepak R Varma
  2021-04-28 18:05 ` [PATCH v4 2/9] staging: media: atomisp: balance braces around if...else block Deepak R Varma
@ 2021-04-30  6:43 ` Sakari Ailus
  1 sibling, 0 replies; 3+ messages in thread
From: Sakari Ailus @ 2021-04-30  6:43 UTC (permalink / raw)
  To: Deepak R Varma
  Cc: Mauro Carvalho Chehab, Greg Kroah-Hartman, linux-media,
	linux-staging, linux-kernel

Hi Deepak,

On Wed, Apr 28, 2021 at 11:34:29PM +0530, Deepak R Varma wrote:
> This patch set addresses multiple issues reported by  of checkpatch script as
> WARNING and CHECK complaints. Other feedback received from the
> maintainers is incorporated as well.
> 
> Note:
>    - The patches should be applied in the ascending order.
>    - Patch count revised to 9 from 6
>    - patch 1/9 is not being sent since it was already submitted by
>      another developer.

Then what is now the 2nd patch should have been the first. No need to
resend because of just that though.

For the rest of the patches apart from 5th,

Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>

-- 
Sakari Ailus

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

end of thread, other threads:[~2021-04-30  6:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-28 18:04 [PATCH v4 0/9] staging: media: atomisp: code cleanup fixes Deepak R Varma
2021-04-28 18:05 ` [PATCH v4 2/9] staging: media: atomisp: balance braces around if...else block Deepak R Varma
2021-04-30  6:43 ` [PATCH v4 0/9] staging: media: atomisp: code cleanup fixes Sakari Ailus

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).