linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/binfmt_flat.c: use __func__ instead of function name
@ 2022-09-19  2:51 Jiangshan Yi
  2022-09-19 13:52 ` Eric W. Biederman
  0 siblings, 1 reply; 2+ messages in thread
From: Jiangshan Yi @ 2022-09-19  2:51 UTC (permalink / raw)
  To: viro
  Cc: ebiederm, keescook, linux-fsdevel, linux-mm, linux-kernel, Jiangshan Yi

From: Jiangshan Yi <yijiangshan@kylinos.cn>

It is better to use __func__ instead of function name.

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);
-- 
2.27.0


No virus found
		Checked by Hillstone Network AntiVirus


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fs/binfmt_flat.c: use __func__ instead of function name
  2022-09-19  2:51 [PATCH] fs/binfmt_flat.c: use __func__ instead of function name Jiangshan Yi
@ 2022-09-19 13:52 ` Eric W. Biederman
  0 siblings, 0 replies; 2+ messages in thread
From: Eric W. Biederman @ 2022-09-19 13:52 UTC (permalink / raw)
  To: Jiangshan Yi
  Cc: viro, keescook, linux-fsdevel, linux-mm, linux-kernel, Jiangshan Yi

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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-19 13:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-19  2:51 [PATCH] fs/binfmt_flat.c: use __func__ instead of function name Jiangshan Yi
2022-09-19 13:52 ` Eric W. Biederman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).