public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: James Simmons <jsimmons@infradead.org>
Cc: devel@driverdev.osuosl.org,
	Andreas Dilger <andreas.dilger@intel.com>,
	Oleg Drokin <oleg.drokin@intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Lustre Development List <lustre-devel@lists.lustre.org>
Subject: Re: [PATCH 5/6] staging: lustre: lustre: several over 80 characters cleanups
Date: Sat, 24 Jun 2017 00:15:13 +0800	[thread overview]
Message-ID: <20170623161513.GB20104@kroah.com> (raw)
In-Reply-To: <1497452481-31124-6-git-send-email-jsimmons@infradead.org>

On Wed, Jun 14, 2017 at 11:01:20AM -0400, James Simmons wrote:
> -void ldlm_extent_policy_wire_to_local(const union ldlm_wire_policy_data *wpolicy,
> -				      union ldlm_policy_data *lpolicy)
> +void
> +ldlm_extent_policy_wire_to_local(const union ldlm_wire_policy_data *wpolicy,
> +				 union ldlm_policy_data *lpolicy)

Stuff like this is not really needed.

But you could work on making your function names smaller and more
concise, that is one major reason why you have so many line-length
issues in your codebase.


> -	LDLM_LRU_FLAG_AGED	= BIT(0), /* Cancel aged locks (non lru resize). */
> +	LDLM_LRU_FLAG_AGED	= BIT(0), /* Cancel aged locks (non lru resize).
> +					   */

Not needed to be changed.

> --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
> +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
> @@ -1035,7 +1035,8 @@ void ldlm_grant_lock(struct ldlm_lock *lock, struct list_head *work_list)
>  		ldlm_extent_add_lock(res, lock);
>  	else if (res->lr_type == LDLM_FLOCK) {
>  		/*
> -		 * We should not add locks to granted list in the following cases:
> +		 * We should not add locks to granted list in the following
> +		 * cases:

That's a good fix, as is:

>  		 * - this is an UNLOCK but not a real lock;
>  		 * - this is a TEST lock;
>  		 * - this is a F_CANCELLK lock (async flock has req_mode == 0)
> @@ -2050,13 +2051,16 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,
>  		libcfs_debug_vmsg2(msgdata, fmt, args,
>  				   " ns: \?\? lock: %p/%#llx lrc: %d/%d,%d mode: %s/%s res: \?\? rrc=\?\? type: \?\?\? flags: %#llx nid: %s remote: %#llx expref: %d pid: %u timeout: %lu lvb_type: %d\n",
>  				   lock,
> -				   lock->l_handle.h_cookie, atomic_read(&lock->l_refc),
> +				   lock->l_handle.h_cookie,
> +				   atomic_read(&lock->l_refc),

That one.

So do it where it maes the code better looking and easier to understand.
Not just where you have to work around crazy limitations.

Please fix this patch up and resend.

thanks,

greg k-h

  parent reply	other threads:[~2017-06-23 20:25 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-14 15:01 [PATCH 0/6] staging: lustre: lustre: assortment of checkpatch cleanups James Simmons
2017-06-14 15:01 ` [PATCH 1/6] staging: lustre: lustre: resolve "use spaces between elements" checkpatch errors James Simmons
2017-06-14 18:10   ` Joe Perches
2017-06-15 16:03     ` James Simmons
2017-06-15 16:19       ` Joe Perches
2017-06-15 16:57         ` James Simmons
2017-06-15 17:04           ` Joe Perches
2017-06-15 17:16             ` James Simmons
2017-06-14 15:01 ` [PATCH 2/6] staging: lustre: lustre: make all struct file_operations constant James Simmons
2017-06-14 15:01 ` [PATCH 3/6] staging: lustre: lustre: fix all bare unsigned usage James Simmons
2017-06-14 15:01 ` [PATCH 4/6] staging: lustre: lustre: add all missing indentifier names James Simmons
2017-06-14 15:01 ` [PATCH 5/6] staging: lustre: lustre: several over 80 characters cleanups James Simmons
2017-06-14 18:15   ` Joe Perches
2017-06-15 16:06     ` James Simmons
2017-06-15 16:12       ` Joe Perches
2017-06-23 16:12       ` Greg Kroah-Hartman
2017-06-23 16:15   ` Greg Kroah-Hartman [this message]
2017-06-14 15:01 ` [PATCH 6/6] staging: lustre: lustre: fix all braces issues reported by checkpatch James Simmons
2017-06-14 18:25   ` Joe Perches
2017-06-15 16:38     ` James Simmons
2017-06-15 16:58       ` Joe Perches
2017-06-23 16:17   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170623161513.GB20104@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=jsimmons@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    --cc=oleg.drokin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox