Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [PATCH v1 1/1] lock_mount(): Remove unused function
@ 2025-09-15 16:02 Andy Shevchenko
  2025-09-16  1:25 ` Al Viro
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2025-09-15 16:02 UTC (permalink / raw)
  To: Christian Brauner, Al Viro, linux-fsdevel, linux-kernel, llvm
  Cc: Jan Kara, Nathan Chancellor, Nick Desaulniers, Bill Wendling,
	Justin Stitt, Andy Shevchenko

clang is not happy about unused function:

/fs/namespace.c:2856:20: error: unused function 'lock_mount' [-Werror,-Wunused-function]
 2856 | static inline void lock_mount(const struct path *path,
      |                    ^~~~~~~~~~
1 error generated.

Fix the compilation breakage (`make W=1` build) by removing unused function.

Fixes: d14b32629541 ("change calling conventions for lock_mount() et.al.")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 fs/namespace.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/fs/namespace.c b/fs/namespace.c
index 14924dd3a21b..ebd61d903a59 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2853,12 +2853,6 @@ static void do_lock_mount(const struct path *path,
 	} while (err == -EAGAIN);
 }
 
-static inline void lock_mount(const struct path *path,
-			      struct pinned_mountpoint *m)
-{
-	do_lock_mount(path, m, false);
-}
-
 static void __unlock_mount(struct pinned_mountpoint *m)
 {
 	inode_unlock(m->mp->m_dentry->d_inode);
-- 
2.50.1


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

* Re: [PATCH v1 1/1] lock_mount(): Remove unused function
  2025-09-15 16:02 [PATCH v1 1/1] lock_mount(): Remove unused function Andy Shevchenko
@ 2025-09-16  1:25 ` Al Viro
  2025-09-16 11:17   ` Andy Shevchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Al Viro @ 2025-09-16  1:25 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Christian Brauner, linux-fsdevel, linux-kernel, llvm, Jan Kara,
	Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt

On Mon, Sep 15, 2025 at 06:02:21PM +0200, Andy Shevchenko wrote:
> clang is not happy about unused function:
> 
> /fs/namespace.c:2856:20: error: unused function 'lock_mount' [-Werror,-Wunused-function]
>  2856 | static inline void lock_mount(const struct path *path,
>       |                    ^~~~~~~~~~
> 1 error generated.
> 
> Fix the compilation breakage (`make W=1` build) by removing unused function.
> 
> Fixes: d14b32629541 ("change calling conventions for lock_mount() et.al.")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Folded into commit in question to avoid bisect hazard

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

* Re: [PATCH v1 1/1] lock_mount(): Remove unused function
  2025-09-16  1:25 ` Al Viro
@ 2025-09-16 11:17   ` Andy Shevchenko
  2025-09-16 12:37     ` Andy Shevchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2025-09-16 11:17 UTC (permalink / raw)
  To: Al Viro
  Cc: Christian Brauner, linux-fsdevel, linux-kernel, llvm, Jan Kara,
	Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt

On Tue, Sep 16, 2025 at 02:25:37AM +0100, Al Viro wrote:
> On Mon, Sep 15, 2025 at 06:02:21PM +0200, Andy Shevchenko wrote:
> > clang is not happy about unused function:
> > 
> > /fs/namespace.c:2856:20: error: unused function 'lock_mount' [-Werror,-Wunused-function]
> >  2856 | static inline void lock_mount(const struct path *path,
> >       |                    ^~~~~~~~~~
> > 1 error generated.
> > 
> > Fix the compilation breakage (`make W=1` build) by removing unused function.
> > 
> > Fixes: d14b32629541 ("change calling conventions for lock_mount() et.al.")
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Folded into commit in question to avoid bisect hazard

Thank you!

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v1 1/1] lock_mount(): Remove unused function
  2025-09-16 11:17   ` Andy Shevchenko
@ 2025-09-16 12:37     ` Andy Shevchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2025-09-16 12:37 UTC (permalink / raw)
  To: Al Viro
  Cc: Christian Brauner, linux-fsdevel, linux-kernel, llvm, Jan Kara,
	Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt

On Tue, Sep 16, 2025 at 02:17:48PM +0300, Andy Shevchenko wrote:
> On Tue, Sep 16, 2025 at 02:25:37AM +0100, Al Viro wrote:
> > On Mon, Sep 15, 2025 at 06:02:21PM +0200, Andy Shevchenko wrote:
> > > clang is not happy about unused function:
> > > 
> > > /fs/namespace.c:2856:20: error: unused function 'lock_mount' [-Werror,-Wunused-function]
> > >  2856 | static inline void lock_mount(const struct path *path,
> > >       |                    ^~~~~~~~~~
> > > 1 error generated.
> > > 
> > > Fix the compilation breakage (`make W=1` build) by removing unused function.
> > > 
> > > Fixes: d14b32629541 ("change calling conventions for lock_mount() et.al.")
> > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > 
> > Folded into commit in question to avoid bisect hazard
> 
> Thank you!

It seems similar treatment needs for node_to_mnt_ns() as it's now unused after
the commit 96ff702edaec ("mnt: support ns lookup") if I'm not mistaken.

Should I send a patch?

-- 
With Best Regards,
Andy Shevchenko



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

end of thread, other threads:[~2025-09-16 12:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-15 16:02 [PATCH v1 1/1] lock_mount(): Remove unused function Andy Shevchenko
2025-09-16  1:25 ` Al Viro
2025-09-16 11:17   ` Andy Shevchenko
2025-09-16 12:37     ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox