Re: [PATCH 1/1] fix coding style

2017-06-23 Thread Greg Kroah-Hartman
On Fri, Jun 16, 2017 at 01:23:59PM +0800, Jhih-Ming Hunag wrote:
> Hi,
> 
> I fixed some coding style following scripts/checkpatch.pl suggestion.
> 
> Signed-off-by: Jhih-Ming Hunag 
> ---
>  drivers/staging/android/ion/ion.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/android/ion/ion.c 
> b/drivers/staging/android/ion/ion.c
> index 43ecb4a..a2d36b3 100644
> --- a/drivers/staging/android/ion/ion.c
> +++ b/drivers/staging/android/ion/ion.c
> @@ -66,7 +66,7 @@ static void ion_buffer_add(struct ion_device *dev,
>   p = &(*p)->rb_right;
>   } else {
>   pr_err("%s: buffer already found.", __func__);
> - BUG();
> + WARN_ON();
>   }
>   }
>  
> @@ -103,7 +103,7 @@ static struct ion_buffer *ion_buffer_create(struct 
> ion_heap *heap,
>   goto err2;
>   }
>  
> - if (buffer->sg_table == NULL) {
> + if (!buffer->sg_table) {
>   WARN_ONCE(1, "This heap needs to set the sgtable");
>   ret = -EINVAL;
>   goto err1;
> @@ -161,7 +161,7 @@ static void *ion_buffer_kmap_get(struct ion_buffer 
> *buffer)
>   return buffer->vaddr;
>   }
>   vaddr = buffer->heap->ops->map_kernel(buffer->heap, buffer);
> - if (WARN_ONCE(vaddr == NULL,
> + if (WARN_ONCE(!vaddr,
> "heap->ops->map_kernel should return ERR_PTR on error"))
>   return ERR_PTR(-EINVAL);
>   if (IS_ERR(vaddr))
> @@ -425,7 +425,7 @@ int ion_alloc(size_t len, unsigned int heap_id_mask, 
> unsigned int flags)
>   }
>   up_read(&dev->lock);
>  
> - if (buffer == NULL)
> + if (!buffer)
>   return -ENODEV;
>  
>   if (IS_ERR(buffer))
> -- 
> 2.7.4

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.

- You did not specify a description of why the patch is needed, or
  possibly, any description at all, in the email body.  Please read the
  section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what is needed in order to
  properly describe the change.

- You did not write a descriptive Subject: for the patch, allowing Greg,
  and everyone else, to know what this patch is all about.  Please read
  the section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what a proper Subject: line should
  look like.

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


Re: [PATCH 1/1] Fix coding style of driver/staging/ccree/ssi_aead.c

2017-06-17 Thread Gilad Ben-Yossef
Hello Jhin-Ming,

Thank your for your patch!

On Fri, Jun 16, 2017 at 4:48 PM, Jhih-Ming Hunag  wrote:
> I fix some coding style errors/warnings of drivers/staging/ccree/ssi_aead.c.
> From
> total: 54 errors, 109 warnings, 2769 lines checked
> to
> total: 0 errors, 69 warnings, 2766 lines checked
>
> All of remaining warning are 'WARNING: line over 80 characters'.
> I think those can be accepted for readability.
>
> I am new to send kernel patch.
> If I did something wrong, please kindly tell me.

Unfortunately, in order to properly be able to review patches, one patch
must only fix or change a single thing a time.

For example, I've noticed your patch fixes many cases of wrong placement of
curly brackets in the code. If the patch would ONLY fix this error where ever it
is it would be fine!

However, your patch also fixes other style errors at the same time, making it
difficult to review, so unfortunately it has to be rejected as it is now.

Please feel free to send a series of patches each fixing a different style error
instead.

Thanks,
Gilad



> Thanks
>


-- 
Gilad Ben-Yossef
Chief Coffee Drinker

"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
 -- Jean-Baptiste Queru


Re: [PATCH 1/1] fix coding style

2017-06-15 Thread Greg Kroah-Hartman
On Thu, Jun 15, 2017 at 10:52:03PM +0800, jm wrote:
> ---
>  drivers/staging/android/ion/ion.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/android/ion/ion.c 
> b/drivers/staging/android/ion/ion.c
> index 43ecb4a..a2d36b3 100644
> --- a/drivers/staging/android/ion/ion.c
> +++ b/drivers/staging/android/ion/ion.c
> @@ -66,7 +66,7 @@ static void ion_buffer_add(struct ion_device *dev,
>   p = &(*p)->rb_right;
>   } else {
>   pr_err("%s: buffer already found.", __func__);
> - BUG();
> + WARN_ON();
>   }
>   }
>  
> @@ -103,7 +103,7 @@ static struct ion_buffer *ion_buffer_create(struct 
> ion_heap *heap,
>   goto err2;
>   }
>  
> - if (buffer->sg_table == NULL) {
> + if (!buffer->sg_table) {
>   WARN_ONCE(1, "This heap needs to set the sgtable");
>   ret = -EINVAL;
>   goto err1;
> @@ -161,7 +161,7 @@ static void *ion_buffer_kmap_get(struct ion_buffer 
> *buffer)
>   return buffer->vaddr;
>   }
>   vaddr = buffer->heap->ops->map_kernel(buffer->heap, buffer);
> - if (WARN_ONCE(vaddr == NULL,
> + if (WARN_ONCE(!vaddr,
> "heap->ops->map_kernel should return ERR_PTR on error"))
>   return ERR_PTR(-EINVAL);
>   if (IS_ERR(vaddr))
> @@ -425,7 +425,7 @@ int ion_alloc(size_t len, unsigned int heap_id_mask, 
> unsigned int flags)
>   }
>   up_read(&dev->lock);
>  
> - if (buffer == NULL)
> + if (!buffer)
>   return -ENODEV;
>  
>   if (IS_ERR(buffer))
> -- 
> 2.7.4


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 does not have a Signed-off-by: line.  Please read the
  kernel file, Documentation/SubmittingPatches and resend it after
  adding that line.  Note, the line needs to be in the body of the
  email, before the patch, not at the bottom of the patch or in the
  email signature.

- You did not specify a description of why the patch is needed, or
  possibly, any description at all, in the email body.  Please read the
  section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what is needed in order to
  properly describe the change.

- You did not write a descriptive Subject: for the patch, allowing Greg,
  and everyone else, to know what this patch is all about.  Please read
  the section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what a proper Subject: line should
  look like.

- You did not use your real name.  Signed-off-by: and From: has to have
  a real name associated with it.  Use whatever you sign legal documents
  with, no anonymous patches are allowed.

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


Re: [PATCH 1/1] Fix coding style errors

2017-03-07 Thread Dan Carpenter

Resend with a better subject.

[PATCH] Staging: rtl8192u: clean up some white space issues

regards,
dan carpenter