public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Ian Kent <raven@themaw.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mark Brown <broonie@kernel.org>, Ingo Molnar <mingo@kernel.org>,
	NeilBrown <neilb@suse.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] autofs: small cleanup in autofs_getpath()
Date: Thu, 31 May 2018 06:51:07 -0500	[thread overview]
Message-ID: <878t80f3h0.fsf@xmission.com> (raw)
In-Reply-To: <20180531064736.lnisb55eajwjynvk@kili.mountain> (Dan Carpenter's message of "Thu, 31 May 2018 09:47:36 +0300")

Dan Carpenter <dan.carpenter@oracle.com> writes:

> We don't set "*name" so it's slightly nicer to just pass "name" instead
> of "&name".
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>

This seems like an obvious and reasonable cleanup.

> diff --git a/fs/autofs/waitq.c b/fs/autofs/waitq.c
> index 8c858126c751..f6385c6ef0a5 100644
> --- a/fs/autofs/waitq.c
> +++ b/fs/autofs/waitq.c
> @@ -179,7 +179,7 @@ static void autofs_notify_daemon(struct autofs_sb_info *sbi,
>  }
>  
>  static int autofs_getpath(struct autofs_sb_info *sbi,
> -			  struct dentry *dentry, char **name)
> +			  struct dentry *dentry, char *name)
>  {
>  	struct dentry *root = sbi->sb->s_root;
>  	struct dentry *tmp;
> @@ -189,7 +189,7 @@ static int autofs_getpath(struct autofs_sb_info *sbi,
>  	unsigned seq;
>  
>  rename_retry:
> -	buf = *name;
> +	buf = name;
>  	len = 0;
>  
>  	seq = read_seqbegin(&rename_lock);
> @@ -395,7 +395,7 @@ int autofs_wait(struct autofs_sb_info *sbi,
>  	if (IS_ROOT(dentry) && autofs_type_trigger(sbi->type))
>  		qstr.len = sprintf(name, "%p", dentry);
>  	else {
> -		qstr.len = autofs_getpath(sbi, dentry, &name);
> +		qstr.len = autofs_getpath(sbi, dentry, name);
>  		if (!qstr.len) {
>  			kfree(name);
>  			return -ENOENT;

      reply	other threads:[~2018-05-31 11:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-31  6:47 [PATCH] autofs: small cleanup in autofs_getpath() Dan Carpenter
2018-05-31 11:51 ` Eric W. Biederman [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=878t80f3h0.fsf@xmission.com \
    --to=ebiederm@xmission.com \
    --cc=akpm@linux-foundation.org \
    --cc=broonie@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=neilb@suse.com \
    --cc=raven@themaw.net \
    /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