Re: [PATCH] Fix script/checkpatch.pl coding style issus.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 09, 2015 at 12:57:56AM +0800, Incarnation P. Lee wrote:
> ---
>  drivers/staging/lustre/lustre/obdclass/cl_page.c | 21 +++++++++++----------
>  1 file changed, 11 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/obdclass/cl_page.c b/drivers/staging/lustre/lustre/obdclass/cl_page.c
> index a7f3032..428c6b2 100644
> --- a/drivers/staging/lustre/lustre/obdclass/cl_page.c
> +++ b/drivers/staging/lustre/lustre/obdclass/cl_page.c
> @@ -51,13 +51,13 @@
>  static void cl_page_delete0(const struct lu_env *env, struct cl_page *pg,
>  			    int radix);
>  
> -# define PASSERT(env, page, expr)				       \
> -  do {								    \
> -	  if (unlikely(!(expr))) {				      \
> -		  CL_PAGE_DEBUG(D_ERROR, (env), (page), #expr "\n");    \
> -		  LASSERT(0);					   \
> -	  }							     \
> -  } while (0)
> +# define PASSERT(env, page, expr)					   \
> +	do {								   \
> +		if (unlikely(!(expr))) {				   \
> +			CL_PAGE_DEBUG(D_ERROR, (env), (page), #expr "\n"); \
> +			LASSERT(0);					   \
> +		}							   \
> +	} while (0)
>  
>  # define PINVRNT(env, page, exp) \
>  	((void)sizeof(env), (void)sizeof(page), (void)sizeof !!(exp))
> @@ -169,6 +169,7 @@ int cl_page_gang_lookup(const struct lu_env *env, struct cl_object *obj,
>  	while ((nr = radix_tree_gang_lookup(&hdr->coh_tree, (void **)pvec,
>  					    idx, CLT_PVEC_SIZE)) > 0) {
>  		int end_of_region = 0;
> +
>  		idx = pvec[nr - 1]->cp_index + 1;
>  		for (i = 0, j = 0; i < nr; ++i) {
>  			page = pvec[i];
> @@ -286,6 +287,7 @@ static struct cl_page *cl_page_alloc(const struct lu_env *env,
>  			GFP_NOFS);
>  	if (page != NULL) {
>  		int result = 0;
> +
>  		atomic_set(&page->cp_ref, 1);
>  		if (type == CPT_CACHEABLE) /* for radix tree */
>  			atomic_inc(&page->cp_ref);
> @@ -372,9 +374,8 @@ static struct cl_page *cl_page_find0(const struct lu_env *env,
>  						       idx) == page));
>  	}
>  
> -	if (page != NULL) {
> +	if (page != NULL)
>  		return page;
> -	}
>  
>  	/* allocate and initialize cl_page */
>  	page = cl_page_alloc(env, o, idx, vmpage, type);
> @@ -1425,7 +1426,7 @@ void cl_page_clip(const struct lu_env *env, struct cl_page *pg,
>  	CL_PAGE_HEADER(D_TRACE, env, pg, "%d %d\n", from, to);
>  	CL_PAGE_INVOID(env, pg, CL_PAGE_OP(cpo_clip),
>  		       (const struct lu_env *,
> -			const struct cl_page_slice *,int, int),
> +			const struct cl_page_slice *, int, int),
>  		       from, to);
>  }
>  EXPORT_SYMBOL(cl_page_clip);


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.

- 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 sent multiple patches, yet no indication of which ones should be
  applied in which order.  Greg could just guess, but if you are
  receiving this email, he guessed wrong and the patches didn't apply.
  Please read the section entitled "The canonical patch format" in the
  kernel file, Documentation/SubmittingPatches for a description of how
  to do this so that Greg has a chance to apply these correctly.

- 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
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux