mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@hammerspace.com>
To: "namrata.janawade@gmail.com" <namrata.janawade@gmail.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"chuck.lever@oracle.com" <chuck.lever@oracle.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"bfields@fieldses.org" <bfields@fieldses.org>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	"anna.schumaker@netapp.com" <anna.schumaker@netapp.com>
Subject: Re: [PATCH] net: sunrpc: fixed function and extra line coding styles
Date: Tue, 16 Mar 2021 20:38:33 +0000	[thread overview]
Message-ID: <dcf799c9eb7d1ba4a30e2b1452b48d68cfe97802.camel@hammerspace.com> (raw)
In-Reply-To: <20210316195833.5063-1-namrata.janawade@gmail.com>

On Tue, 2021-03-16 at 12:58 -0700, namratajanawade wrote:
> Block comments written in format suggested by checkpatch.pl.
> Removed trailing semicolon in macros definition as macros should not
> use a trailing semicolon.
> Open braces shifted to new line (as suggested by checkpatch.pl).
> 
> Signed-off-by: namratajanawade <namrata.janawade@gmail.com>
> ---
>  net/sunrpc/auth.c | 36 ++++++++++++++----------------------
>  1 file changed, 14 insertions(+), 22 deletions(-)
> 
> diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
> index a9f0d17fdb0d..6ef9481a0d2d 100644
> --- a/net/sunrpc/auth.c
> +++ b/net/sunrpc/auth.c
> @@ -45,8 +45,7 @@ static struct cred machine_cred = {
>  #endif
>  };
>  
> -/*
> - * Return the machine_cred pointer to be used whenever
> +/* Return the machine_cred pointer to be used whenever
>   * the a generic machine credential is needed.
>   */
>  const struct cred *rpc_machine_cred(void)
> @@ -84,7 +83,7 @@ static int param_get_hashtbl_sz(char *buffer, const
> struct kernel_param *kp)
>         return sprintf(buffer, "%u\n", 1U << nbits);
>  }
>  
> -#define param_check_hashtbl_sz(name, p) __param_check(name, p,
> unsigned int);
> +#define param_check_hashtbl_sz(name, p) __param_check(name, p,
> unsigned int)
>  
>  static const struct kernel_param_ops param_ops_hashtbl_sz = {
>         .set = param_set_hashtbl_sz,
> @@ -99,7 +98,8 @@ module_param(auth_max_cred_cachesize, ulong, 0644);
>  MODULE_PARM_DESC(auth_max_cred_cachesize, "RPC credential maximum
> total cache size");
>  
>  static u32
> -pseudoflavor_to_flavor(u32 flavor) {
> +pseudoflavor_to_flavor(u32 flavor) 
> +{
>         if (flavor > RPC_AUTH_MAXFLAVOR)
>                 return RPC_AUTH_GSS;
>         return flavor;
> @@ -256,8 +256,7 @@ rpcauth_release(struct rpc_auth *auth)
>  
>  static DEFINE_SPINLOCK(rpc_credcache_lock);
>  
> -/*
> - * On success, the caller is responsible for freeing the reference
> +/* On success, the caller is responsible for freeing the reference
>   * held by the hashtable
>   */
>  static bool
> @@ -284,8 +283,7 @@ rpcauth_unhash_cred(struct rpc_cred *cred)
>         return ret;
>  }
>  
> -/*
> - * Initialize RPC credential cache
> +/* Initialize RPC credential cache
>   */
>  int
>  rpcauth_init_credcache(struct rpc_auth *auth)
> @@ -320,8 +318,7 @@ rpcauth_stringify_acceptor(struct rpc_cred *cred)
>  }
>  EXPORT_SYMBOL_GPL(rpcauth_stringify_acceptor);
>  
> -/*
> - * Destroy a list of credentials
> +/* Destroy a list of credentials
>   */
>  static inline
>  void rpcauth_destroy_credlist(struct list_head *head)
> @@ -373,8 +370,7 @@ rpcauth_lru_remove(struct rpc_cred *cred)
>         spin_unlock(&rpc_credcache_lock);
>  }
>  
> -/*
> - * Clear the RPC credential cache, and delete those credentials
> +/* Clear the RPC credential cache, and delete those credentials
>   * that are not referenced.
>   */
>  void
> @@ -403,8 +399,7 @@ rpcauth_clear_credcache(struct rpc_cred_cache
> *cache)
>         rpcauth_destroy_credlist(&free);
>  }
>  
> -/*
> - * Destroy the RPC credential cache
> +/* Destroy the RPC credential cache
>   */
>  void
>  rpcauth_destroy_credcache(struct rpc_auth *auth)
> @@ -423,8 +418,7 @@ EXPORT_SYMBOL_GPL(rpcauth_destroy_credcache);
>  
>  #define RPC_AUTH_EXPIRY_MORATORIUM (60 * HZ)
>  
> -/*
> - * Remove stale credentials. Avoid sleeping inside the loop.
> +/* Remove stale credentials. Avoid sleeping inside the loop.
>   */
>  static long
>  rpcauth_prune_expired(struct list_head *free, int nr_to_scan)
> @@ -441,8 +435,7 @@ rpcauth_prune_expired(struct list_head *free, int
> nr_to_scan)
>                         rpcauth_lru_remove_locked(cred);
>                         continue;
>                 }
> -               /*
> -                * Enforce a 60 second garbage collection moratorium
> +               /* Enforce a 60 second garbage collection moratorium
>                  * Note that the cred_unused list must be time-
> ordered.
>                  */
>                 if (!time_in_range(cred->cr_expire, expired,
> jiffies))
> @@ -471,8 +464,7 @@ rpcauth_cache_do_shrink(int nr_to_scan)
>         return freed;
>  }
>  
> -/*
> - * Run memory cache shrinker.
> +/* Run memory cache shrinker.
>   */
>  static unsigned long
>  rpcauth_cache_shrink_scan(struct shrinker *shrink, struct
> shrink_control *sc)
> @@ -510,8 +502,7 @@ rpcauth_cache_enforce_limit(void)
>         rpcauth_cache_do_shrink(nr_to_scan);
>  }
>  
> -/*
> - * Look up a process' credentials in the authentication cache
> +/* Look up a process' credentials in the authentication cache
>   */
>  struct rpc_cred *
>  rpcauth_lookup_credcache(struct rpc_auth *auth, struct auth_cred *
> acred,
> @@ -566,6 +557,7 @@ rpcauth_lookup_credcache(struct rpc_auth *auth,
> struct auth_cred * acred,
>             cred->cr_ops->cr_init != NULL &&
>             !(flags & RPCAUTH_LOOKUP_NEW)) {
>                 int res = cred->cr_ops->cr_init(auth, cred);
> +
>                 if (res < 0) {
>                         put_rpccred(cred);
>                         cred = ERR_PTR(res);

NACK. This is not consistent with the preferred style for NFS and
SUNRPC (or the preferred style in Documentation/process/coding-
style.rst).

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com



      reply	other threads:[~2021-03-16 20:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 19:58 namratajanawade
2021-03-16 20:38 ` Trond Myklebust [this message]

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=dcf799c9eb7d1ba4a30e2b1452b48d68cfe97802.camel@hammerspace.com \
    --to=trondmy@hammerspace.com \
    --cc=anna.schumaker@netapp.com \
    --cc=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=namrata.janawade@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®