From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Gou Hao <gouhao@uniontech.com>, xiang@kernel.org, chao@kernel.org
Cc: linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org,
gouhaojake@163.com
Subject: Re: [PATCH 2/2] erofs: simplify declaration of the log functions
Date: Thu, 17 Oct 2024 11:42:07 +0800 [thread overview]
Message-ID: <714b8a53-587f-4cee-bff7-330cf0b32f7f@linux.alibaba.com> (raw)
In-Reply-To: <20241016152430.3456-2-gouhao@uniontech.com>
On 2024/10/16 23:24, Gou Hao wrote:
> remove the macro of the log declarations.
>
> Signed-off-by: Gou Hao <gouhao@uniontech.com>
> ---
> fs/erofs/internal.h | 13 +++++--------
> fs/erofs/super.c | 12 ++++++------
> 2 files changed, 11 insertions(+), 14 deletions(-)
>
> diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h
> index 4efd578d7c62..0c3d6b9f85b5 100644
> --- a/fs/erofs/internal.h
> +++ b/fs/erofs/internal.h
> @@ -24,14 +24,11 @@
> #undef pr_fmt
> #define pr_fmt(fmt) "erofs: " fmt
>
> -__printf(3, 4) void _erofs_err(struct super_block *sb,
> - const char *function, const char *fmt, ...);
> -#define erofs_err(sb, fmt, ...) \
> - _erofs_err(sb, __func__, fmt "\n", ##__VA_ARGS__)
> -__printf(3, 4) void _erofs_info(struct super_block *sb,
> - const char *function, const char *fmt, ...);
> -#define erofs_info(sb, fmt, ...) \
> - _erofs_info(sb, __func__, fmt "\n", ##__VA_ARGS__)
> +#define erofs_log_declare(name) \
> + __printf(2, 3) void erofs_##name(struct super_block *sb, const char *fmt, ...)
> +erofs_log_declare(err);
> +erofs_log_declare(info);
I guess it will make the code harder to read IMHO..
Thanks,
Gao Xiang
next prev parent reply other threads:[~2024-10-17 3:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-16 15:24 [PATCH 1/2] erofs: using macro instead of definition of " Gou Hao
2024-10-16 15:24 ` [PATCH 2/2] erofs: simplify declaration of the " Gou Hao
2024-10-17 3:42 ` Gao Xiang [this message]
2024-10-17 3:39 ` [PATCH 1/2] erofs: using macro instead of definition of " Gao Xiang
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=714b8a53-587f-4cee-bff7-330cf0b32f7f@linux.alibaba.com \
--to=hsiangkao@linux.alibaba.com \
--cc=chao@kernel.org \
--cc=gouhao@uniontech.com \
--cc=gouhaojake@163.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xiang@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®