linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: staging: atomisp: add a blank line after declarations
@ 2018-06-16  4:30 JoonHwan.Kim
  2018-06-16  7:03 ` Greg KH
  2018-06-16  9:06 ` Dan Carpenter
  0 siblings, 2 replies; 5+ messages in thread
From: JoonHwan.Kim @ 2018-06-16  4:30 UTC (permalink / raw)
  To: alan, sakari.ailus, mchehab
  Cc: gregkh, andriy.shevchenko, aishpant, linux-media, devel,
	linux-kernel, kernel-janitors

fix checkpatch.pl warning:
  * Missing a blank line after declarations

Signed-off-by: Joonhwan Kim <spilit464@gmail.com>
---
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c
index 61bd550dafb9..4c8ff1c90f63 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c
@@ -1194,6 +1194,7 @@ static int atomisp_qbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
 	 */
 	if (buf->memory == V4L2_MEMORY_USERPTR) {
 		struct hrt_userbuffer_attr attributes;
+
 		vb = pipe->capq.bufs[buf->index];
 		vm_mem = vb->priv;
 		if (!vm_mem) {
@@ -1557,6 +1558,7 @@ int atomisp_stream_on_master_slave_sensor(struct atomisp_device *isp,
 	 */
 	for (i = 0; i < isp->num_of_streams; i++) {
 		int sensor_index = isp->asd[i].input_curr;
+
 		if (isp->inputs[sensor_index].camera_caps->
 				sensor[isp->asd[i].sensor_curr].is_slave)
 			slave = sensor_index;
@@ -1643,6 +1645,7 @@ static void atomisp_pause_buffer_event(struct atomisp_device *isp)
 
 	for (i = 0; i < isp->num_of_streams; i++) {
 		int sensor_index = isp->asd[i].input_curr;
+
 		if (isp->inputs[sensor_index].camera_caps->
 				sensor[isp->asd[i].sensor_curr].is_slave) {
 			v4l2_event_queue(isp->asd[i].subdev.devnode, &event);
@@ -1656,6 +1659,7 @@ static void atomisp_pause_buffer_event(struct atomisp_device *isp)
 /* invalidate. SW workaround for this is to set burst length */
 /* manually to 128 in case of 13MPx snapshot and to 1 otherwise. */
 static void atomisp_dma_burst_len_cfg(struct atomisp_sub_device *asd)
+
 {
 
 	struct v4l2_mbus_framefmt *sink;
@@ -2138,6 +2142,7 @@ int __atomisp_streamoff(struct file *file, void *fh, enum v4l2_buf_type type)
 	if (isp->sw_contex.power_state == ATOM_ISP_POWER_UP) {
 		unsigned int i;
 		bool recreate_streams[MAX_STREAM_NUM] = {0};
+
 		if (isp->isp_timeout)
 			dev_err(isp->dev, "%s: Resetting with WA activated",
 				__func__);
-- 
2.17.1





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

* Re: [PATCH] media: staging: atomisp: add a blank line after declarations
  2018-06-16  4:30 [PATCH] media: staging: atomisp: add a blank line after declarations JoonHwan.Kim
@ 2018-06-16  7:03 ` Greg KH
  2018-06-16  9:06 ` Dan Carpenter
  1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2018-06-16  7:03 UTC (permalink / raw)
  To: JoonHwan.Kim
  Cc: alan, sakari.ailus, mchehab, devel, kernel-janitors,
	linux-kernel, andriy.shevchenko, linux-media

On Sat, Jun 16, 2018 at 01:30:48PM +0900, JoonHwan.Kim wrote:
> fix checkpatch.pl warning:
>   * Missing a blank line after declarations
> 
> Signed-off-by: Joonhwan Kim <spilit464@gmail.com>
> ---
>  drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c | 5 +++++

Always work against the latest development tree so you do not duplicate
work.  This file is gone in Linus's tree, and in linux-next :(

thanks,

greg k-h

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

* Re: [PATCH] media: staging: atomisp: add a blank line after declarations
  2018-06-16  4:30 [PATCH] media: staging: atomisp: add a blank line after declarations JoonHwan.Kim
  2018-06-16  7:03 ` Greg KH
@ 2018-06-16  9:06 ` Dan Carpenter
  2018-06-16 10:20   ` 김준환
  1 sibling, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2018-06-16  9:06 UTC (permalink / raw)
  To: JoonHwan.Kim
  Cc: alan, sakari.ailus, mchehab, devel, gregkh, kernel-janitors,
	linux-kernel, andriy.shevchenko, linux-media

On Sat, Jun 16, 2018 at 01:30:48PM +0900, JoonHwan.Kim wrote:
> @@ -1656,6 +1659,7 @@ static void atomisp_pause_buffer_event(struct atomisp_device *isp)
>  /* invalidate. SW workaround for this is to set burst length */
>  /* manually to 128 in case of 13MPx snapshot and to 1 otherwise. */
>  static void atomisp_dma_burst_len_cfg(struct atomisp_sub_device *asd)
> +
>  {

This isn't right.

regards,
dan carpenter


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

* Re: [PATCH] media: staging: atomisp: add a blank line after declarations
  2018-06-16  9:06 ` Dan Carpenter
@ 2018-06-16 10:20   ` 김준환
  2018-06-16 12:46     ` Dan Carpenter
  0 siblings, 1 reply; 5+ messages in thread
From: 김준환 @ 2018-06-16 10:20 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: alan, sakari.ailus, mchehab, devel, Greg KH, kernel-janitors,
	linux-kernel, andriy.shevchenko, linux-media

Thank you for attention :)

I knew what I forgot before doing contribute

I updated it 'TODAY' and I'll never repeat this mistake again!

Sincerely,
JoonHwan

2018-06-16 18:06 GMT+09:00 Dan Carpenter <dan.carpenter@oracle.com>:
> On Sat, Jun 16, 2018 at 01:30:48PM +0900, JoonHwan.Kim wrote:
>> @@ -1656,6 +1659,7 @@ static void atomisp_pause_buffer_event(struct atomisp_device *isp)
>>  /* invalidate. SW workaround for this is to set burst length */
>>  /* manually to 128 in case of 13MPx snapshot and to 1 otherwise. */
>>  static void atomisp_dma_burst_len_cfg(struct atomisp_sub_device *asd)
>> +
>>  {
>
> This isn't right.
>
> regards,
> dan carpenter
>

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

* Re: [PATCH] media: staging: atomisp: add a blank line after declarations
  2018-06-16 10:20   ` 김준환
@ 2018-06-16 12:46     ` Dan Carpenter
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2018-06-16 12:46 UTC (permalink / raw)
  To: 김준환
  Cc: alan, sakari.ailus, mchehab, devel, Greg KH, kernel-janitors,
	linux-kernel, andriy.shevchenko, linux-media

On Sat, Jun 16, 2018 at 07:20:54PM +0900, 김준환 wrote:
> Thank you for attention :)
> 
> I knew what I forgot before doing contribute
> 
> I updated it 'TODAY' and I'll never repeat this mistake again!
> 

No rush.

This is a tiny mistake and doesn't affect runtime at all and we're all
human.  The thing to do is figure out which are avoidable mistakes,
right?

Like for me, when I was starting out I wrote some patches that added
some allocations but I forgot to add the kfree().  So then I made a QC
script that runs some static checkers over my patches and if I add any
line with "alloc" in it then my QC script asks me:

if git diff $fullname | grep ^+ | grep -qi alloc ; then
    qc "Have you freed all your mallocs?"
    qc "Have you checked all your mallocs for NULL returns?"
fi

And a couple weeks ago, I accidentally introduced a bug, which someone
caught during review, because I removed a cast that I thought was
unnecessary.

	for (i = 0; i < (int)limit; i++) {

I thought limit couldn't be negative but I was wrong.  So I wrote a
static checker test for that so I'll never do it again.  And I found
some similar bugs in other people's code and fixed those.  Static
analysis is sort of my thing but anyone could do it really.  Or ask
Julia and I to write a check.  But most people have the hardware and
could write a test program to trigger the bug and add it to their QC
process.

So making mistakes is fine and it's part of learning.  You should
definitely take the time to figure out where you went wrong and if it's
preventable.  But no one really gets annoyed about mistakes because it's
just part of life and being human.

regards,
dan carpenter


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

end of thread, other threads:[~2018-06-16 12:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-16  4:30 [PATCH] media: staging: atomisp: add a blank line after declarations JoonHwan.Kim
2018-06-16  7:03 ` Greg KH
2018-06-16  9:06 ` Dan Carpenter
2018-06-16 10:20   ` 김준환
2018-06-16 12:46     ` Dan Carpenter

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