All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: vc04_services: Fix trivial style issues
@ 2017-12-04  6:17 Genki Sky
  2017-12-04  7:31 ` Greg Kroah-Hartman
  2017-12-04 10:52 ` Dan Carpenter
  0 siblings, 2 replies; 8+ messages in thread
From: Genki Sky @ 2017-12-04  6:17 UTC (permalink / raw)
  To: linux-arm-kernel

In bcm2835-camera, handle the following checkpatch.pl types:
  - EMBEDDED_FUNCTION_NAME
  - MULTILINE_DEREFERENCE
  - SPLIT_STRING

[ note: this is for Task 10 of http://eudyptula-challenge.org/ ]

Signed-off-by: Genki Sky <sky@genki.is>
---
 .../vc04_services/bcm2835-camera/bcm2835-camera.c  | 23 +++++++++-------------
 .../vc04_services/bcm2835-camera/mmal-vchiq.c      |  7 +++----
 2 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index d8766b166675..e26895dc052e 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -328,11 +328,9 @@ static void buffer_cb(struct vchiq_mmal_instance *instance,
 				pr_debug("Grab another frame");
 				vchiq_mmal_port_parameter_set(
 					instance,
-					dev->capture.
-					camera_port,
+					dev->capture.camera_port,
 					MMAL_PARAMETER_CAPTURE,
-					&dev->capture.
-					frame_count,
+					&dev->capture.frame_count,
 					sizeof(dev->capture.frame_count));
 			}
 		} else {
@@ -349,8 +347,7 @@ static void buffer_cb(struct vchiq_mmal_instance *instance,
 				timestamp = ktime_add_us(dev->capture.kernel_start_ts,
 							 runtime_us);
 				v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev,
-					 "Convert start time %llu and %llu "
-					 "with offset %llu to %llu\n",
+					 "Convert start time %llu and %llu with offset %llu to %llu\n",
 					 ktime_to_ns(dev->capture.kernel_start_ts),
 					 dev->capture.vc_start_timestamp, pts,
 					 ktime_to_ns(timestamp));
@@ -368,11 +365,9 @@ static void buffer_cb(struct vchiq_mmal_instance *instance,
 					 "Grab another frame as buffer has EOS");
 				vchiq_mmal_port_parameter_set(
 					instance,
-					dev->capture.
-					camera_port,
+					dev->capture.camera_port,
 					MMAL_PARAMETER_CAPTURE,
-					&dev->capture.
-					frame_count,
+					&dev->capture.frame_count,
 					sizeof(dev->capture.frame_count));
 			}
 		} else {
@@ -536,8 +531,8 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count)
 	    vchiq_mmal_port_enable(dev->instance, dev->capture.port, buffer_cb);
 	if (ret) {
 		v4l2_err(&dev->v4l2_dev,
-			"Failed to enable capture port - error %d. "
-			"Disabling camera port again\n", ret);
+			"Failed to enable capture port - error %d. Disabling camera port again\n",
+			ret);

 		vchiq_mmal_port_disable(dev->instance,
 					dev->capture.camera_port);
@@ -1194,8 +1189,8 @@ static int mmal_setup_components(struct bm2835_mmal_dev *dev,
 					port->current_buffer.size =
 					    (f->fmt.pix.sizeimage <
 					     (100 << 10))
-					    ? (100 << 10) : f->fmt.pix.
-					    sizeimage;
+					    ? (100 << 10)
+					    : f->fmt.pix.sizeimage;
 				}
 				v4l2_dbg(1, bcm2835_v4l2_debug,
 					 &dev->v4l2_dev,
diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
index 6ea7fb0ea50e..6c4d8b4c7cd9 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
@@ -618,8 +618,8 @@ static void buffer_to_host_cb(struct vchiq_mmal_instance *instance,
 	struct mmal_msg_context *msg_context;
 	u32 handle;

-	pr_debug("buffer_to_host_cb: instance:%p msg:%p msg_len:%d\n",
-		 instance, msg, msg_len);
+	pr_debug("%s: instance:%p msg:%p msg_len:%d\n",
+		 __func__, instance, msg, msg_len);

 	if (msg->u.buffer_from_host.drvbuf.magic == MMAL_MAGIC) {
 		handle = msg->u.buffer_from_host.drvbuf.client_context;
@@ -1360,8 +1360,7 @@ static int port_action_handle(struct vchiq_mmal_instance *instance,

 	ret = -rmsg->u.port_action_reply.status;

-	pr_debug("%s:result:%d component:0x%x port:%d action:%s(%d)" \
-		 " connect component:0x%x connect port:%d\n",
+	pr_debug("%s:result:%d component:0x%x port:%d action:%s(%d) connect component:0x%x connect port:%d\n",
 		 __func__,
 		 ret, port->component->handle, port->handle,
 		 port_action_type_names[action_type],
--
2.15.1

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

* [PATCH] staging: vc04_services: Fix trivial style issues
  2017-12-04  6:17 [PATCH] staging: vc04_services: Fix trivial style issues Genki Sky
@ 2017-12-04  7:31 ` Greg Kroah-Hartman
  2017-12-04 10:52 ` Dan Carpenter
  1 sibling, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2017-12-04  7:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Dec 04, 2017 at 01:17:36AM -0500, Genki Sky wrote:
> In bcm2835-camera, handle the following checkpatch.pl types:
>   - EMBEDDED_FUNCTION_NAME
>   - MULTILINE_DEREFERENCE
>   - SPLIT_STRING
> 
> [ note: this is for Task 10 of http://eudyptula-challenge.org/ ]
> 
> Signed-off-by: Genki Sky <sky@genki.is>
> ---
>  .../vc04_services/bcm2835-camera/bcm2835-camera.c  | 23 +++++++++-------------
>  .../vc04_services/bcm2835-camera/mmal-vchiq.c      |  7 +++----
>  2 files changed, 12 insertions(+), 18 deletions(-)

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch did many different things all at once, making it difficult
  to review.  All Linux kernel patches need to only do one thing at a
  time.  If you need to do multiple things (such as clean up all coding
  style issues in a file/driver), do it in a sequence of patches, each
  one doing only one thing.  This will make it easier to review the
  patches to ensure that they are correct, and to help alleviate any
  merge issues that larger patches can cause.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

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

* [PATCH] staging: vc04_services: Fix trivial style issues
  2017-12-04  6:17 [PATCH] staging: vc04_services: Fix trivial style issues Genki Sky
  2017-12-04  7:31 ` Greg Kroah-Hartman
@ 2017-12-04 10:52 ` Dan Carpenter
  2017-12-05  2:39   ` [PATCH v2 0/3] " Genki Sky
  1 sibling, 1 reply; 8+ messages in thread
From: Dan Carpenter @ 2017-12-04 10:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Dec 04, 2017 at 01:17:36AM -0500, Genki Sky wrote:
> In bcm2835-camera, handle the following checkpatch.pl types:
>   - EMBEDDED_FUNCTION_NAME
>   - MULTILINE_DEREFERENCE
>   - SPLIT_STRING
> 
> [ note: this is for Task 10 of http://eudyptula-challenge.org/ ]

Leave this part out or put it under the --- cut off.  We don't want it
in the final git log.

> 
> Signed-off-by: Genki Sky <sky@genki.is>

Split it up and resend.  Then it's a nice little cleanup.  It's cool
that checkpatch.pl started complaining about MULTILINE_DEREFERENCEs.

regards,
dan carpenter

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

* [PATCH v2 0/3] staging: vc04_services: Fix trivial style issues
  2017-12-04 10:52 ` Dan Carpenter
@ 2017-12-05  2:39   ` Genki Sky
  2017-12-05  2:39     ` [PATCH v2 1/3] staging: vc04_services: Join multiline dereferences Genki Sky
                       ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Genki Sky @ 2017-12-05  2:39 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

This is v2 of a patch series to fix some checkpatch.pl warnings in
drivers/staging/vc04_services/bcm2835-camera/*

Changes from v1 [1]:
- Split single patch into multiple patches
- Remove reference to eudyptula in commit message

[1]: https://lkml.kernel.org/r/<30cc7b48def470f1bec8d8d255044f4f220531ee.1512368114.git.sky@genki.is>

[ aside: this is for task-10 of http://eudyptula-challenge.org/ ]

Genki Sky (3):
  staging: vc04_services: Join multiline dereferences
  staging: vc04_services: Unsplit user-visible strings
  staging: vc04_services: Use __func__

 .../vc04_services/bcm2835-camera/bcm2835-camera.c  | 23 +++++++++-------------
 .../vc04_services/bcm2835-camera/mmal-vchiq.c      |  7 +++----
 2 files changed, 12 insertions(+), 18 deletions(-)

--
2.15.1

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

* [PATCH v2 1/3] staging: vc04_services: Join multiline dereferences
  2017-12-05  2:39   ` [PATCH v2 0/3] " Genki Sky
@ 2017-12-05  2:39     ` Genki Sky
  2017-12-05  6:17       ` Greg Kroah-Hartman
  2017-12-05  2:39     ` [PATCH v2 2/3] staging: vc04_services: Unsplit user-visible strings Genki Sky
  2017-12-05  2:39     ` [PATCH v2 3/3] staging: vc04_services: Use __func__ Genki Sky
  2 siblings, 1 reply; 8+ messages in thread
From: Genki Sky @ 2017-12-05  2:39 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Genki Sky <sky@genki.is>
---
 .../vc04_services/bcm2835-camera/bcm2835-camera.c        | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index d8766b166675..4ed3b449f97f 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -328,11 +328,9 @@ static void buffer_cb(struct vchiq_mmal_instance *instance,
 				pr_debug("Grab another frame");
 				vchiq_mmal_port_parameter_set(
 					instance,
-					dev->capture.
-					camera_port,
+					dev->capture.camera_port,
 					MMAL_PARAMETER_CAPTURE,
-					&dev->capture.
-					frame_count,
+					&dev->capture.frame_count,
 					sizeof(dev->capture.frame_count));
 			}
 		} else {
@@ -368,11 +366,9 @@ static void buffer_cb(struct vchiq_mmal_instance *instance,
 					 "Grab another frame as buffer has EOS");
 				vchiq_mmal_port_parameter_set(
 					instance,
-					dev->capture.
-					camera_port,
+					dev->capture.camera_port,
 					MMAL_PARAMETER_CAPTURE,
-					&dev->capture.
-					frame_count,
+					&dev->capture.frame_count,
 					sizeof(dev->capture.frame_count));
 			}
 		} else {
@@ -1194,8 +1190,8 @@ static int mmal_setup_components(struct bm2835_mmal_dev *dev,
 					port->current_buffer.size =
 					    (f->fmt.pix.sizeimage <
 					     (100 << 10))
-					    ? (100 << 10) : f->fmt.pix.
-					    sizeimage;
+					    ? (100 << 10)
+					    : f->fmt.pix.sizeimage;
 				}
 				v4l2_dbg(1, bcm2835_v4l2_debug,
 					 &dev->v4l2_dev,
-- 
2.15.1

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

* [PATCH v2 2/3] staging: vc04_services: Unsplit user-visible strings
  2017-12-05  2:39   ` [PATCH v2 0/3] " Genki Sky
  2017-12-05  2:39     ` [PATCH v2 1/3] staging: vc04_services: Join multiline dereferences Genki Sky
@ 2017-12-05  2:39     ` Genki Sky
  2017-12-05  2:39     ` [PATCH v2 3/3] staging: vc04_services: Use __func__ Genki Sky
  2 siblings, 0 replies; 8+ messages in thread
From: Genki Sky @ 2017-12-05  2:39 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Genki Sky <sky@genki.is>
---
 drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 7 +++----
 drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c     | 3 +--
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index 4ed3b449f97f..e26895dc052e 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -347,8 +347,7 @@ static void buffer_cb(struct vchiq_mmal_instance *instance,
 				timestamp = ktime_add_us(dev->capture.kernel_start_ts,
 							 runtime_us);
 				v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev,
-					 "Convert start time %llu and %llu "
-					 "with offset %llu to %llu\n",
+					 "Convert start time %llu and %llu with offset %llu to %llu\n",
 					 ktime_to_ns(dev->capture.kernel_start_ts),
 					 dev->capture.vc_start_timestamp, pts,
 					 ktime_to_ns(timestamp));
@@ -532,8 +531,8 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count)
 	    vchiq_mmal_port_enable(dev->instance, dev->capture.port, buffer_cb);
 	if (ret) {
 		v4l2_err(&dev->v4l2_dev,
-			"Failed to enable capture port - error %d. "
-			"Disabling camera port again\n", ret);
+			"Failed to enable capture port - error %d. Disabling camera port again\n",
+			ret);
 
 		vchiq_mmal_port_disable(dev->instance,
 					dev->capture.camera_port);
diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
index 6ea7fb0ea50e..5ddea4f54bf7 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
@@ -1360,8 +1360,7 @@ static int port_action_handle(struct vchiq_mmal_instance *instance,
 
 	ret = -rmsg->u.port_action_reply.status;
 
-	pr_debug("%s:result:%d component:0x%x port:%d action:%s(%d)" \
-		 " connect component:0x%x connect port:%d\n",
+	pr_debug("%s:result:%d component:0x%x port:%d action:%s(%d) connect component:0x%x connect port:%d\n",
 		 __func__,
 		 ret, port->component->handle, port->handle,
 		 port_action_type_names[action_type],
-- 
2.15.1

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

* [PATCH v2 3/3] staging: vc04_services: Use __func__
  2017-12-05  2:39   ` [PATCH v2 0/3] " Genki Sky
  2017-12-05  2:39     ` [PATCH v2 1/3] staging: vc04_services: Join multiline dereferences Genki Sky
  2017-12-05  2:39     ` [PATCH v2 2/3] staging: vc04_services: Unsplit user-visible strings Genki Sky
@ 2017-12-05  2:39     ` Genki Sky
  2 siblings, 0 replies; 8+ messages in thread
From: Genki Sky @ 2017-12-05  2:39 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Genki Sky <sky@genki.is>
---
 drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
index 5ddea4f54bf7..6c4d8b4c7cd9 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
@@ -618,8 +618,8 @@ static void buffer_to_host_cb(struct vchiq_mmal_instance *instance,
 	struct mmal_msg_context *msg_context;
 	u32 handle;
 
-	pr_debug("buffer_to_host_cb: instance:%p msg:%p msg_len:%d\n",
-		 instance, msg, msg_len);
+	pr_debug("%s: instance:%p msg:%p msg_len:%d\n",
+		 __func__, instance, msg, msg_len);
 
 	if (msg->u.buffer_from_host.drvbuf.magic == MMAL_MAGIC) {
 		handle = msg->u.buffer_from_host.drvbuf.client_context;
-- 
2.15.1

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

* [PATCH v2 1/3] staging: vc04_services: Join multiline dereferences
  2017-12-05  2:39     ` [PATCH v2 1/3] staging: vc04_services: Join multiline dereferences Genki Sky
@ 2017-12-05  6:17       ` Greg Kroah-Hartman
  0 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2017-12-05  6:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Dec 04, 2017 at 09:39:05PM -0500, Genki Sky wrote:
> Signed-off-by: Genki Sky <sky@genki.is>
> ---
>  .../vc04_services/bcm2835-camera/bcm2835-camera.c        | 16 ++++++----------
>  1 file changed, 6 insertions(+), 10 deletions(-)

I can't take patches without any changelog text at all, sorry.

greg k-h

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

end of thread, other threads:[~2017-12-05  6:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-04  6:17 [PATCH] staging: vc04_services: Fix trivial style issues Genki Sky
2017-12-04  7:31 ` Greg Kroah-Hartman
2017-12-04 10:52 ` Dan Carpenter
2017-12-05  2:39   ` [PATCH v2 0/3] " Genki Sky
2017-12-05  2:39     ` [PATCH v2 1/3] staging: vc04_services: Join multiline dereferences Genki Sky
2017-12-05  6:17       ` Greg Kroah-Hartman
2017-12-05  2:39     ` [PATCH v2 2/3] staging: vc04_services: Unsplit user-visible strings Genki Sky
2017-12-05  2:39     ` [PATCH v2 3/3] staging: vc04_services: Use __func__ Genki Sky

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.