linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/ntfs3: make ntfs3 compile with clang-12
@ 2021-05-19 13:43 torvic9
  2021-05-19 23:06 ` Nick Desaulniers
  0 siblings, 1 reply; 3+ messages in thread
From: torvic9 @ 2021-05-19 13:43 UTC (permalink / raw)
  To: linux-fsdevel, almaz.alexandrovich; +Cc: linux-kernel, ndesaulniers

Some of the ccflags in the fs/ntfs3 Makefile are for gcc only.
Replace them with clang alternatives if necessary.

Signed-off-by: Tor Vic <torvic9@mailbox.org>
---
 fs/ntfs3/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/ntfs3/Makefile b/fs/ntfs3/Makefile
index b06a06cc0..dae144033 100644
--- a/fs/ntfs3/Makefile
+++ b/fs/ntfs3/Makefile
@@ -4,7 +4,9 @@
 #
 
 # to check robot warnings
-ccflags-y += -Wunused-but-set-variable -Wold-style-declaration -Wint-to-pointer-cast
+ccflags-y += -Wint-to-pointer-cast \
+	$(call cc-option,-Wunused-but-set-variable,-Wunused-const-variable) \
+	$(call cc-option,-Wold-style-declaration,-Wout-of-line-declaration)
 
 obj-$(CONFIG_NTFS3_FS) += ntfs3.o
 
-- 
2.31.1

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

* Re: [PATCH] fs/ntfs3: make ntfs3 compile with clang-12
  2021-05-19 13:43 [PATCH] fs/ntfs3: make ntfs3 compile with clang-12 torvic9
@ 2021-05-19 23:06 ` Nick Desaulniers
  2021-05-20 14:53   ` torvic9
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Desaulniers @ 2021-05-19 23:06 UTC (permalink / raw)
  To: torvic9
  Cc: linux-fsdevel, almaz.alexandrovich, linux-kernel, clang-built-linux

On Wed, May 19, 2021 at 6:43 AM <torvic9@mailbox.org> wrote:
>
> Some of the ccflags in the fs/ntfs3 Makefile are for gcc only.
> Replace them with clang alternatives if necessary.
>
> Signed-off-by: Tor Vic <torvic9@mailbox.org>

Thanks for the patch. +clang-built-linux; please make sure to cc the
lists from ./scripts/get_maintainer.pl <patch file>.  It should
recommend our mailing list of the words clang or llvm appear anywhere
in the patch file. This helps spread around the review burden.

> ---
>  fs/ntfs3/Makefile | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/fs/ntfs3/Makefile b/fs/ntfs3/Makefile
> index b06a06cc0..dae144033 100644
> --- a/fs/ntfs3/Makefile
> +++ b/fs/ntfs3/Makefile
> @@ -4,7 +4,9 @@
>  #
>
>  # to check robot warnings
> -ccflags-y += -Wunused-but-set-variable -Wold-style-declaration -Wint-to-pointer-cast
> +ccflags-y += -Wint-to-pointer-cast \
> +       $(call cc-option,-Wunused-but-set-variable,-Wunused-const-variable) \
> +       $(call cc-option,-Wold-style-declaration,-Wout-of-line-declaration)

I think it would be better to leave off the second parameter of both
of these, which is the fallback.

>
>  obj-$(CONFIG_NTFS3_FS) += ntfs3.o
>
> --
> 2.31.1

-- 
Thanks,
~Nick Desaulniers

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

* Re: [PATCH] fs/ntfs3: make ntfs3 compile with clang-12
  2021-05-19 23:06 ` Nick Desaulniers
@ 2021-05-20 14:53   ` torvic9
  0 siblings, 0 replies; 3+ messages in thread
From: torvic9 @ 2021-05-20 14:53 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: linux-fsdevel, almaz.alexandrovich, linux-kernel, clang-built-linux


> Nick Desaulniers <ndesaulniers@google.com> hat am 20.05.2021 01:06 geschrieben:
> 
>  
> On Wed, May 19, 2021 at 6:43 AM <torvic9@mailbox.org> wrote:
> >
> > Some of the ccflags in the fs/ntfs3 Makefile are for gcc only.
> > Replace them with clang alternatives if necessary.
> >
> > Signed-off-by: Tor Vic <torvic9@mailbox.org>
> 
> Thanks for the patch. +clang-built-linux; please make sure to cc the
> lists from ./scripts/get_maintainer.pl <patch file>.  It should
> recommend our mailing list of the words clang or llvm appear anywhere
> in the patch file. This helps spread around the review burden.
> 

Cool, I didn't know about that script, thanks!

> > ---
> >  fs/ntfs3/Makefile | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletions(-)
> >
> > diff --git a/fs/ntfs3/Makefile b/fs/ntfs3/Makefile
> > index b06a06cc0..dae144033 100644
> > --- a/fs/ntfs3/Makefile
> > +++ b/fs/ntfs3/Makefile
> > @@ -4,7 +4,9 @@
> >  #
> >
> >  # to check robot warnings
> > -ccflags-y += -Wunused-but-set-variable -Wold-style-declaration -Wint-to-pointer-cast
> > +ccflags-y += -Wint-to-pointer-cast \
> > +       $(call cc-option,-Wunused-but-set-variable,-Wunused-const-variable) \
> > +       $(call cc-option,-Wold-style-declaration,-Wout-of-line-declaration)
> 
> I think it would be better to leave off the second parameter of both
> of these, which is the fallback.

OK, I will do that.
Thanks for your feedback!

> 
> >
> >  obj-$(CONFIG_NTFS3_FS) += ntfs3.o
> >
> > --
> > 2.31.1
> 
> -- 
> Thanks,
> ~Nick Desaulniers

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

end of thread, other threads:[~2021-05-20 14:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 13:43 [PATCH] fs/ntfs3: make ntfs3 compile with clang-12 torvic9
2021-05-19 23:06 ` Nick Desaulniers
2021-05-20 14:53   ` torvic9

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