linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Eric W. Biederman" <ebiederm@xmission.com>
To: Jiangshan Yi <13667453960@163.com>
Cc: viro@zeniv.linux.org.uk,  keescook@chromium.org,
	linux-fsdevel@vger.kernel.org,  linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	 Jiangshan Yi <yijiangshan@kylinos.cn>
Subject: Re: [PATCH] fs/binfmt_flat.c: use __func__ instead of function name
Date: Mon, 19 Sep 2022 08:52:17 -0500	[thread overview]
Message-ID: <87pmfr5v5a.fsf@email.froward.int.ebiederm.org> (raw)
In-Reply-To: <20220919025139.3623754-1-13667453960@163.com> (Jiangshan Yi's message of "Mon, 19 Sep 2022 10:51:39 +0800")

Jiangshan Yi <13667453960@163.com> writes:

> From: Jiangshan Yi <yijiangshan@kylinos.cn>
>
> It is better to use __func__ instead of function name.

Why?

Usually we leave these kinds of stylistic decisions to the people
actually working on and maintaining the code.

Unless this message is likely to be copied to another function
and it very much does not look like it is, this kind of change
looks like it will just make grepping for the error message more
difficult.

Not that I am working on the code and can speak but this just feels like
a gratuitous change to me and so I am asking questions to make certain
it is actually worth making.

Eric


> Signed-off-by: Jiangshan Yi <yijiangshan@kylinos.cn>
> ---
>  fs/binfmt_flat.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
> index c26545d71d39..4104c824e7b1 100644
> --- a/fs/binfmt_flat.c
> +++ b/fs/binfmt_flat.c
> @@ -184,7 +184,7 @@ static int decompress_exec(struct linux_binprm *bprm, loff_t fpos, char *dst,
>  	z_stream strm;
>  	int ret, retval;
>  
> -	pr_debug("decompress_exec(offset=%llx,buf=%p,len=%lx)\n", fpos, dst, len);
> +	pr_debug("%s(offset=%llx,buf=%p,len=%lx)\n", __func__, fpos, dst, len);
>  
>  	memset(&strm, 0, sizeof(strm));
>  	strm.workspace = kmalloc(zlib_inflate_workspacesize(), GFP_KERNEL);


      reply	other threads:[~2022-09-19 13:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-19  2:51 Jiangshan Yi
2022-09-19 13:52 ` 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=87pmfr5v5a.fsf@email.froward.int.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=13667453960@163.com \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yijiangshan@kylinos.cn \
    /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