linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs_context: fix parameter name in infofc() macro
@ 2025-06-17 23:09 RubenKelevra
  2025-06-18  9:20 ` Christian Brauner
  2025-06-18 15:31 ` Jan Kara
  0 siblings, 2 replies; 3+ messages in thread
From: RubenKelevra @ 2025-06-17 23:09 UTC (permalink / raw)
  To: viro, brauner; +Cc: jack, linux-fsdevel, linux-kernel, RubenKelevra

The macro takes a parameter called "p" but references "fc" internally.
This happens to compile as long as callers pass a variable named fc,
but breaks otherwise. Rename the first parameter to “fc” to match the
usage and to be consistent with warnfc() / errorfc().

Fixes: a3ff937b33d9 ("prefix-handling analogues of errorf() and friends")
Signed-off-by: RubenKelevra <rubenkelevra@gmail.com>
---
 include/linux/fs_context.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/fs_context.h b/include/linux/fs_context.h
index a19e4bd32e4d..7773eb870039 100644
--- a/include/linux/fs_context.h
+++ b/include/linux/fs_context.h
@@ -200,7 +200,7 @@ void logfc(struct fc_log *log, const char *prefix, char level, const char *fmt,
  */
 #define infof(fc, fmt, ...) __logfc(fc, 'i', fmt, ## __VA_ARGS__)
 #define info_plog(p, fmt, ...) __plog(p, 'i', fmt, ## __VA_ARGS__)
-#define infofc(p, fmt, ...) __plog((&(fc)->log), 'i', fmt, ## __VA_ARGS__)
+#define infofc(fc, fmt, ...) __plog((&(fc)->log), 'i', fmt, ## __VA_ARGS__)
 
 /**
  * warnf - Store supplementary warning message
-- 
2.49.0


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

* Re: [PATCH] fs_context: fix parameter name in infofc() macro
  2025-06-17 23:09 [PATCH] fs_context: fix parameter name in infofc() macro RubenKelevra
@ 2025-06-18  9:20 ` Christian Brauner
  2025-06-18 15:31 ` Jan Kara
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2025-06-18  9:20 UTC (permalink / raw)
  To: RubenKelevra; +Cc: Christian Brauner, jack, linux-fsdevel, linux-kernel, viro

On Wed, 18 Jun 2025 01:09:27 +0200, RubenKelevra wrote:
> The macro takes a parameter called "p" but references "fc" internally.
> This happens to compile as long as callers pass a variable named fc,
> but breaks otherwise. Rename the first parameter to “fc” to match the
> usage and to be consistent with warnfc() / errorfc().
> 
> 

Applied to the vfs-6.17.misc branch of the vfs/vfs.git tree.
Patches in the vfs-6.17.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-6.17.misc

[1/1] fs_context: fix parameter name in infofc() macro
      https://git.kernel.org/vfs/vfs/c/ffaf1bf3737f

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

* Re: [PATCH] fs_context: fix parameter name in infofc() macro
  2025-06-17 23:09 [PATCH] fs_context: fix parameter name in infofc() macro RubenKelevra
  2025-06-18  9:20 ` Christian Brauner
@ 2025-06-18 15:31 ` Jan Kara
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Kara @ 2025-06-18 15:31 UTC (permalink / raw)
  To: RubenKelevra; +Cc: viro, brauner, jack, linux-fsdevel, linux-kernel

On Wed 18-06-25 01:09:27, RubenKelevra wrote:
> The macro takes a parameter called "p" but references "fc" internally.
> This happens to compile as long as callers pass a variable named fc,
> but breaks otherwise. Rename the first parameter to “fc” to match the
> usage and to be consistent with warnfc() / errorfc().
> 
> Fixes: a3ff937b33d9 ("prefix-handling analogues of errorf() and friends")
> Signed-off-by: RubenKelevra <rubenkelevra@gmail.com>

Good catch. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  include/linux/fs_context.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/fs_context.h b/include/linux/fs_context.h
> index a19e4bd32e4d..7773eb870039 100644
> --- a/include/linux/fs_context.h
> +++ b/include/linux/fs_context.h
> @@ -200,7 +200,7 @@ void logfc(struct fc_log *log, const char *prefix, char level, const char *fmt,
>   */
>  #define infof(fc, fmt, ...) __logfc(fc, 'i', fmt, ## __VA_ARGS__)
>  #define info_plog(p, fmt, ...) __plog(p, 'i', fmt, ## __VA_ARGS__)
> -#define infofc(p, fmt, ...) __plog((&(fc)->log), 'i', fmt, ## __VA_ARGS__)
> +#define infofc(fc, fmt, ...) __plog((&(fc)->log), 'i', fmt, ## __VA_ARGS__)
>  
>  /**
>   * warnf - Store supplementary warning message
> -- 
> 2.49.0
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

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

end of thread, other threads:[~2025-06-18 15:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-17 23:09 [PATCH] fs_context: fix parameter name in infofc() macro RubenKelevra
2025-06-18  9:20 ` Christian Brauner
2025-06-18 15:31 ` Jan Kara

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