Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [PATCH v2] libbpf: workaround -Wmaybe-uninitialized false positive
From: Sam James @ 2024-08-09 17:26 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt
  Cc: Jose E . Marchesi, Andrew Pinski, Kacper Słomiński,
	Arsen Arsenović, Sam James, bpf, linux-kernel, llvm

In `elf_close`, we get this with GCC 15 -O3 (at least):
```
In function ‘elf_close’,
    inlined from ‘elf_close’ at elf.c:53:6,
    inlined from ‘elf_find_func_offset_from_file’ at elf.c:384:2:
elf.c:57:9: warning: ‘elf_fd.elf’ may be used uninitialized [-Wmaybe-uninitialized]
   57 |         elf_end(elf_fd->elf);
      |         ^~~~~~~~~~~~~~~~~~~~
elf.c: In function ‘elf_find_func_offset_from_file’:
elf.c:377:23: note: ‘elf_fd.elf’ was declared here
  377 |         struct elf_fd elf_fd;
      |                       ^~~~~~
In function ‘elf_close’,
    inlined from ‘elf_close’ at elf.c:53:6,
    inlined from ‘elf_find_func_offset_from_file’ at elf.c:384:2:
elf.c:58:9: warning: ‘elf_fd.fd’ may be used uninitialized [-Wmaybe-uninitialized]
   58 |         close(elf_fd->fd);
      |         ^~~~~~~~~~~~~~~~~
elf.c: In function ‘elf_find_func_offset_from_file’:
elf.c:377:23: note: ‘elf_fd.fd’ was declared here
  377 |         struct elf_fd elf_fd;
      |                       ^~~~~~
```

In reality, our use is fine, it's just that GCC doesn't model errno
here (see linked GCC bug). Suppress -Wmaybe-uninitialized accordingly.

Link: https://gcc.gnu.org/PR114952
Signed-off-by: Sam James <sam@gentoo.org>
---
v2: Fix Clang build.

Range-diff against v1:
1:  3ebbe7a4e93a ! 1:  8f5c3b173e4c libbpf: workaround -Wmaybe-uninitialized false positive
    @@ tools/lib/bpf/elf.c: long elf_find_func_offset(Elf *elf, const char *binary_path
      	return ret;
      }
      
    ++#if !defined(__clang__)
     +#pragma GCC diagnostic push
     +/* https://gcc.gnu.org/PR114952 */
     +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
    ++#endif
      /* Find offset of function name in ELF object specified by path. "name" matches
       * symbol name or name@@LIB for library functions.
       */
    @@ tools/lib/bpf/elf.c: long elf_find_func_offset_from_file(const char *binary_path
      	elf_close(&elf_fd);
      	return ret;
      }
    ++#if !defined(__clang__)
     +#pragma GCC diagnostic pop
    ++#endif
      
      struct symbol {
      	const char *name;

 tools/lib/bpf/elf.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/lib/bpf/elf.c b/tools/lib/bpf/elf.c
index c92e02394159..7058425ca85b 100644
--- a/tools/lib/bpf/elf.c
+++ b/tools/lib/bpf/elf.c
@@ -369,6 +369,11 @@ long elf_find_func_offset(Elf *elf, const char *binary_path, const char *name)
 	return ret;
 }
 
+#if !defined(__clang__)
+#pragma GCC diagnostic push
+/* https://gcc.gnu.org/PR114952 */
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
 /* Find offset of function name in ELF object specified by path. "name" matches
  * symbol name or name@@LIB for library functions.
  */
@@ -384,6 +389,9 @@ long elf_find_func_offset_from_file(const char *binary_path, const char *name)
 	elf_close(&elf_fd);
 	return ret;
 }
+#if !defined(__clang__)
+#pragma GCC diagnostic pop
+#endif
 
 struct symbol {
 	const char *name;
-- 
2.45.2


^ permalink raw reply related

* Re: [PATCH] smb/client: avoid possible NULL dereference in cifs_free_subrequest()
From: Steve French @ 2024-08-09 15:46 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Su Hui, David Howells, sfrench, pc, ronniesahlberg, sprasad, tom,
	bharathsm, nathan, ndesaulniers, morbo, justinstitt, linux-cifs,
	samba-technical, linux-kernel, llvm, kernel-janitors
In-Reply-To: <CAH2r5msS8_Jc0hRXqY==OGiaoJKyjqkh7HT0esSKcEvsxht46Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2239 bytes --]

Updated patch to change Fixes tag and Cc: David


On Fri, Aug 9, 2024 at 10:42 AM Steve French <smfrench@gmail.com> wrote:
>
> On Fri, Aug 9, 2024 at 10:11 AM Dan Carpenter <dan.carpenter@linaro.org> wrote:
> >
> > On Fri, Aug 09, 2024 at 06:00:26PM +0300, Dan Carpenter wrote:
> > > On Thu, Aug 08, 2024 at 08:23:32PM +0800, Su Hui wrote:
> > > > Clang static checker (scan-build) warning:
> > > >     cifsglob.h:line 890, column 3
> > > >     Access to field 'ops' results in a dereference of a null pointer.
> > > >
> > > > Commit 519be989717c ("cifs: Add a tracepoint to track credits involved in
> > > > R/W requests") adds a check for 'rdata->server', and let clang throw this
> > > > warning about NULL dereference.
> > > >
> > > > When 'rdata->credits.value != 0 && rdata->server == NULL' happens,
> > > > add_credits_and_wake_if() will call rdata->server->ops->add_credits().
> > > > This will cause NULL dereference problem. Add a check for 'rdata->server'
> > > > to avoid NULL dereference.
> > > >
> > > > Signed-off-by: Su Hui <suhui@nfschina.com>
> > >
> > > Needs a Fixes tag.
> > >
> > > Also when you add a Fixes tag, then get_maintainer will add the David Howells
> > > automatically.  I've added him manually.
> > >
> >
> > Actually, David should have been CC'd but the fixes tag wouldn't have pointed
> > to his patch.
> >
> > This is an inconsistent NULL checking warning.  It's not clear to me if the NULL
> > checks should be removed or more added.  If David were trying to fix a NULL
> > pointer dereference and accidentally left one unchecked dereference out then the
> > Fixes tag would point to his patch.  Since David was doing something unrelated
>
> Looks like (if this is even possible for server to to be null) then I
> will need to change
> the fixes to commit 69c3c023af25. I will update the tag in the current
> patch in for-next
>
> Author: David Howells <dhowells@redhat.com>
> Date:   Fri Oct 6 18:16:15 2023 +0100
>
>     cifs: Implement netfslib hooks
>
>     Provide implementation of the netfslib hooks that will be used by netfslib
>     to ask cifs to set up and perform operations.
> --
> Thanks,
>
> Steve



-- 
Thanks,

Steve

[-- Attachment #2: 0001-smb-client-avoid-possible-NULL-dereference-in-cifs_f.patch --]
[-- Type: text/x-patch, Size: 2025 bytes --]

From 59ac1aac1550731ca241007af660fc5278c88136 Mon Sep 17 00:00:00 2001
From: Su Hui <suhui@nfschina.com>
Date: Thu, 8 Aug 2024 20:23:32 +0800
Subject: [PATCH] smb/client: avoid possible NULL dereference in
 cifs_free_subrequest()

Clang static checker (scan-build) warning:
	cifsglob.h:line 890, column 3
	Access to field 'ops' results in a dereference of a null pointer.

Commit 519be989717c ("cifs: Add a tracepoint to track credits involved in
R/W requests") adds a check for 'rdata->server', and let clang throw this
warning about NULL dereference.

When 'rdata->credits.value != 0 && rdata->server == NULL' happens,
add_credits_and_wake_if() will call rdata->server->ops->add_credits().
This will cause NULL dereference problem. Add a check for 'rdata->server'
to avoid NULL dereference.

Cc: stable@vger.kernel.org
Fixes: 69c3c023af25 ("cifs: Implement netfslib hooks")
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Su Hui <suhui@nfschina.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
---
 fs/smb/client/file.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c
index b2405dd4d4d4..45459af5044d 100644
--- a/fs/smb/client/file.c
+++ b/fs/smb/client/file.c
@@ -315,7 +315,7 @@ static void cifs_free_subrequest(struct netfs_io_subrequest *subreq)
 #endif
 	}
 
-	if (rdata->credits.value != 0)
+	if (rdata->credits.value != 0) {
 		trace_smb3_rw_credits(rdata->rreq->debug_id,
 				      rdata->subreq.debug_index,
 				      rdata->credits.value,
@@ -323,8 +323,12 @@ static void cifs_free_subrequest(struct netfs_io_subrequest *subreq)
 				      rdata->server ? rdata->server->in_flight : 0,
 				      -rdata->credits.value,
 				      cifs_trace_rw_credits_free_subreq);
+		if (rdata->server)
+			add_credits_and_wake_if(rdata->server, &rdata->credits, 0);
+		else
+			rdata->credits.value = 0;
+	}
 
-	add_credits_and_wake_if(rdata->server, &rdata->credits, 0);
 	if (rdata->have_xid)
 		free_xid(rdata->xid);
 }
-- 
2.43.0


^ permalink raw reply related

* Re: [PATCH] smb/client: avoid possible NULL dereference in cifs_free_subrequest()
From: Steve French @ 2024-08-09 15:42 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Su Hui, David Howells, sfrench, pc, ronniesahlberg, sprasad, tom,
	bharathsm, nathan, ndesaulniers, morbo, justinstitt, linux-cifs,
	samba-technical, linux-kernel, llvm, kernel-janitors
In-Reply-To: <a08c6b03-6d23-4711-a891-14b0250b90be@stanley.mountain>

On Fri, Aug 9, 2024 at 10:11 AM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> On Fri, Aug 09, 2024 at 06:00:26PM +0300, Dan Carpenter wrote:
> > On Thu, Aug 08, 2024 at 08:23:32PM +0800, Su Hui wrote:
> > > Clang static checker (scan-build) warning:
> > >     cifsglob.h:line 890, column 3
> > >     Access to field 'ops' results in a dereference of a null pointer.
> > >
> > > Commit 519be989717c ("cifs: Add a tracepoint to track credits involved in
> > > R/W requests") adds a check for 'rdata->server', and let clang throw this
> > > warning about NULL dereference.
> > >
> > > When 'rdata->credits.value != 0 && rdata->server == NULL' happens,
> > > add_credits_and_wake_if() will call rdata->server->ops->add_credits().
> > > This will cause NULL dereference problem. Add a check for 'rdata->server'
> > > to avoid NULL dereference.
> > >
> > > Signed-off-by: Su Hui <suhui@nfschina.com>
> >
> > Needs a Fixes tag.
> >
> > Also when you add a Fixes tag, then get_maintainer will add the David Howells
> > automatically.  I've added him manually.
> >
>
> Actually, David should have been CC'd but the fixes tag wouldn't have pointed
> to his patch.
>
> This is an inconsistent NULL checking warning.  It's not clear to me if the NULL
> checks should be removed or more added.  If David were trying to fix a NULL
> pointer dereference and accidentally left one unchecked dereference out then the
> Fixes tag would point to his patch.  Since David was doing something unrelated

Looks like (if this is even possible for server to to be null) then I
will need to change
the fixes to commit 69c3c023af25. I will update the tag in the current
patch in for-next

Author: David Howells <dhowells@redhat.com>
Date:   Fri Oct 6 18:16:15 2023 +0100

    cifs: Implement netfslib hooks

    Provide implementation of the netfslib hooks that will be used by netfslib
    to ask cifs to set up and perform operations.
-- 
Thanks,

Steve

^ permalink raw reply

* Re: [PATCH] smb/client: avoid possible NULL dereference in cifs_free_subrequest()
From: Steve French @ 2024-08-09 15:38 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Su Hui, David Howells, sfrench, pc, ronniesahlberg, sprasad, tom,
	bharathsm, nathan, ndesaulniers, morbo, justinstitt, linux-cifs,
	samba-technical, linux-kernel, llvm, kernel-janitors
In-Reply-To: <893f2ebb-2979-4e34-bdab-a7cbb0c7e7b8@stanley.mountain>

On Fri, Aug 9, 2024 at 10:01 AM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> On Thu, Aug 08, 2024 at 08:23:32PM +0800, Su Hui wrote:
> > Clang static checker (scan-build) warning:
> >       cifsglob.h:line 890, column 3
> >       Access to field 'ops' results in a dereference of a null pointer.
> >
> > Commit 519be989717c ("cifs: Add a tracepoint to track credits involved in
> > R/W requests") adds a check for 'rdata->server', and let clang throw this
> > warning about NULL dereference.
> >
> > When 'rdata->credits.value != 0 && rdata->server == NULL' happens,
> > add_credits_and_wake_if() will call rdata->server->ops->add_credits().
> > This will cause NULL dereference problem. Add a check for 'rdata->server'
> > to avoid NULL dereference.
> >
> > Signed-off-by: Su Hui <suhui@nfschina.com>
>
> Needs a Fixes tag.

I had added a fixes tag

> Also when you add a Fixes tag, then get_maintainer will add the David Howells
> automatically.  I've added him manually.
>
> > ---
> >  fs/smb/client/file.c | 8 ++++++--
> >  1 file changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c
> > index b2405dd4d4d4..45459af5044d 100644
> > --- a/fs/smb/client/file.c
> > +++ b/fs/smb/client/file.c
> > @@ -315,7 +315,7 @@ static void cifs_free_subrequest(struct netfs_io_subrequest *subreq)
> >  #endif
> >       }
> >
> > -     if (rdata->credits.value != 0)
> > +     if (rdata->credits.value != 0) {
> >               trace_smb3_rw_credits(rdata->rreq->debug_id,
> >                                     rdata->subreq.debug_index,
> >                                     rdata->credits.value,
> > @@ -323,8 +323,12 @@ static void cifs_free_subrequest(struct netfs_io_subrequest *subreq)
> >                                     rdata->server ? rdata->server->in_flight : 0,
> >                                     -rdata->credits.value,
> >                                     cifs_trace_rw_credits_free_subreq);
> > +             if (rdata->server)
> > +                     add_credits_and_wake_if(rdata->server, &rdata->credits, 0);
> > +             else
> > +                     rdata->credits.value = 0;
>                         ^^^^^^^^^^^^^^^^^^^^^^^^^
> Why do this?

add_credits_and_wake() has the effect of setting credits->value to 0
so seems reasonable here
(in the case where add_credits_and_wake can not be safely called),
even if an extremely unlikely for rdata->server to be null.





-- 
Thanks,

Steve

^ permalink raw reply

* Re: [PATCH] smb/client: avoid possible NULL dereference in cifs_free_subrequest()
From: Dan Carpenter @ 2024-08-09 15:11 UTC (permalink / raw)
  To: Su Hui, David Howells
  Cc: sfrench, pc, ronniesahlberg, sprasad, tom, bharathsm, nathan,
	ndesaulniers, morbo, justinstitt, linux-cifs, samba-technical,
	linux-kernel, llvm, kernel-janitors
In-Reply-To: <893f2ebb-2979-4e34-bdab-a7cbb0c7e7b8@stanley.mountain>

On Fri, Aug 09, 2024 at 06:00:26PM +0300, Dan Carpenter wrote:
> On Thu, Aug 08, 2024 at 08:23:32PM +0800, Su Hui wrote:
> > Clang static checker (scan-build) warning:
> > 	cifsglob.h:line 890, column 3
> > 	Access to field 'ops' results in a dereference of a null pointer.
> > 
> > Commit 519be989717c ("cifs: Add a tracepoint to track credits involved in
> > R/W requests") adds a check for 'rdata->server', and let clang throw this
> > warning about NULL dereference.
> > 
> > When 'rdata->credits.value != 0 && rdata->server == NULL' happens,
> > add_credits_and_wake_if() will call rdata->server->ops->add_credits().
> > This will cause NULL dereference problem. Add a check for 'rdata->server'
> > to avoid NULL dereference.
> > 
> > Signed-off-by: Su Hui <suhui@nfschina.com>
> 
> Needs a Fixes tag.
> 
> Also when you add a Fixes tag, then get_maintainer will add the David Howells
> automatically.  I've added him manually.
> 

Actually, David should have been CC'd but the fixes tag wouldn't have pointed
to his patch.

This is an inconsistent NULL checking warning.  It's not clear to me if the NULL
checks should be removed or more added.  If David were trying to fix a NULL
pointer dereference and accidentally left one unchecked dereference out then the
Fixes tag would point to his patch.  Since David was doing something unrelated
then we don't point to his patch.  Instead it would point to the first patch to
introduce the dereference.

regards,
dan carpenter


^ permalink raw reply

* Re: [PATCH] smb/client: avoid possible NULL dereference in cifs_free_subrequest()
From: Dan Carpenter @ 2024-08-09 15:00 UTC (permalink / raw)
  To: Su Hui, David Howells
  Cc: sfrench, pc, ronniesahlberg, sprasad, tom, bharathsm, nathan,
	ndesaulniers, morbo, justinstitt, linux-cifs, samba-technical,
	linux-kernel, llvm, kernel-janitors
In-Reply-To: <20240808122331.342473-1-suhui@nfschina.com>

On Thu, Aug 08, 2024 at 08:23:32PM +0800, Su Hui wrote:
> Clang static checker (scan-build) warning:
> 	cifsglob.h:line 890, column 3
> 	Access to field 'ops' results in a dereference of a null pointer.
> 
> Commit 519be989717c ("cifs: Add a tracepoint to track credits involved in
> R/W requests") adds a check for 'rdata->server', and let clang throw this
> warning about NULL dereference.
> 
> When 'rdata->credits.value != 0 && rdata->server == NULL' happens,
> add_credits_and_wake_if() will call rdata->server->ops->add_credits().
> This will cause NULL dereference problem. Add a check for 'rdata->server'
> to avoid NULL dereference.
> 
> Signed-off-by: Su Hui <suhui@nfschina.com>

Needs a Fixes tag.

Also when you add a Fixes tag, then get_maintainer will add the David Howells
automatically.  I've added him manually.

> ---
>  fs/smb/client/file.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c
> index b2405dd4d4d4..45459af5044d 100644
> --- a/fs/smb/client/file.c
> +++ b/fs/smb/client/file.c
> @@ -315,7 +315,7 @@ static void cifs_free_subrequest(struct netfs_io_subrequest *subreq)
>  #endif
>  	}
>  
> -	if (rdata->credits.value != 0)
> +	if (rdata->credits.value != 0) {
>  		trace_smb3_rw_credits(rdata->rreq->debug_id,
>  				      rdata->subreq.debug_index,
>  				      rdata->credits.value,
> @@ -323,8 +323,12 @@ static void cifs_free_subrequest(struct netfs_io_subrequest *subreq)
>  				      rdata->server ? rdata->server->in_flight : 0,
>  				      -rdata->credits.value,
>  				      cifs_trace_rw_credits_free_subreq);
> +		if (rdata->server)
> +			add_credits_and_wake_if(rdata->server, &rdata->credits, 0);
> +		else
> +			rdata->credits.value = 0;
                        ^^^^^^^^^^^^^^^^^^^^^^^^^
Why do this?

regards,
dan carpenter


^ permalink raw reply

* Re: [PATCH 11/12] tty/vt: conmakehash requires linux/limits.h
From: Daniel Gomez (Samsung) @ 2024-08-09 13:47 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: da.gomez, Nathan Chancellor, Nicolas Schier, Lucas De Marchi,
	Thomas Hellström, Rodrigo Vivi, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
	William Hubbs, Chris Brannon, Kirk Reiser, Samuel Thibault,
	Paul Moore, Stephen Smalley, Ondrej Mosnacek, Catalin Marinas,
	Will Deacon, Marc Zyngier, Oliver Upton, James Morse,
	Suzuki K Poulose, Zenghui Yu, Greg Kroah-Hartman, Jiri Slaby,
	Nick Desaulniers, Bill Wendling, Justin Stitt, linux-kernel,
	linux-kbuild, intel-xe, dri-devel, speakup, selinux,
	linux-arm-kernel, kvmarm, linux-serial, llvm, Finn Behrens,
	gost.dev
In-Reply-To: <CAK7LNARafZ=zFMeoDdiMh=ZRU_XiJ08Naf=oAdYpOiUN02HizQ@mail.gmail.com>

On Fri, Aug 9, 2024 at 2:15 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Wed, Aug 7, 2024 at 8:10 AM Daniel Gomez via B4 Relay
> <devnull+da.gomez.samsung.com@kernel.org> wrote:
> >
> > From: Daniel Gomez <da.gomez@samsung.com>
> >
> > macOS hosts do not provide the linux/limits.h header required for
> > conmakehash. To address this, ensure that usr/include is included in
> > the conmakehash HOSTCFLAGS. This will provide the necessary header for
> > successful compilation on macOS.
> >
> > Fixes error:
> > HOSTCC  drivers/tty/vt/conmakehash - due to target missing
> >   clang -Wp,-MMD,drivers/tty/vt/.conmakehash.d -Wall
> > -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
> > -std=gnu11   -I ./scripts/include     -o drivers/tty/vt/conmakehash
> > drivers/tty/vt/conmakehash.c
> > drivers/tty/vt/conmakehash.c:15:10: fatal error: 'linux/
> >    limits.h' file not found 15 | #include <linux/limits.h>    |
> >    ^~~~~~~~~~~~~~~~
>
>
> The error is reported at line 15 of drivers/tty/vt/conmakehash.c
>
>
> The line 15 is #include <stdlib.h>:
>
> https://github.com/torvalds/linux/blob/v6.11-rc1/drivers/tty/vt/conmakehash.c#L15

The patches were sent using the latest linux-next at the moment of
sending, so next-20240806.
B4 adds the baseline [1] used at the bottom.

[1] base-commit: 1e391b34f6aa043c7afa40a2103163a0ef06d179

So line 15 is linux/limits.h header in this case:
https://github.com/torvalds/linux/blob/1e391b34f6aa043c7afa40a2103163a0ef06d179/drivers/tty/vt/conmakehash.c#L15
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/vt/conmakehash.c?h=1e391b34f6aa043c7afa40a2103163a0ef06d179#n15

This patch adds the header:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/tty/vt/conmakehash.c?h=next-20240809&id=6e20753da6bc651e02378a0cdb78f16c42098c88

>
>
> So, host programs cannot include <stdlib.h> on your build machine.
>
>
>
> drivers/tty/vt/conmakehash.c has only 5 include directives:
>
> #include <stdio.h>
> #include <stdlib.h>
> #include <sysexits.h>
> #include <string.h>
> #include <ctype.h>
>
>
> You cannot build this, your build machine cannot build anything.
>
>
>
>
>
>
>
>
>
> > 1 error generated.
> > make[5]: *** [scripts/Makefile.host:116: drivers/tty/vt/conmakehash]
> > Error 1
> > make[4]: *** [scripts/Makefile.build:485: drivers/tty/vt] Error 2
> > make[3]: *** [scripts/Makefile.build:485: drivers/tty] Error 2
> > make[2]: *** [scripts/Makefile.build:485: drivers] Error 2
> > make[1]: *** [/Volumes/src/kernel/linux-next/Makefile:1925: .] Error 2
> > make: *** [Makefile:224: __sub-make] Error 2
> >
> > Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
> > ---
> >  drivers/tty/vt/Makefile | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/tty/vt/Makefile b/drivers/tty/vt/Makefile
> > index 2c8ce8b592ed..d266895357e5 100644
> > --- a/drivers/tty/vt/Makefile
> > +++ b/drivers/tty/vt/Makefile
> > @@ -13,6 +13,7 @@ obj-$(CONFIG_CONSOLE_TRANSLATIONS)    += consolemap.o consolemap_deftbl.o
> >  clean-files := consolemap_deftbl.c defkeymap.c
> >
> >  hostprogs += conmakehash
> > +HOSTCFLAGS_conmakehash.o = -I$(srctree)/usr/include
> >
> >  quiet_cmd_conmk = CONMK   $@
> >        cmd_conmk = $(obj)/conmakehash $< > $@
> >
> > --
> > Git-146)
> >
> >
>
>
> --
> Best Regards
> Masahiro Yamada

^ permalink raw reply

* Re: [PATCH] usb: typec: ucsi: Add DATA_RESET option of Connector Reset command
From: kernel test robot @ 2024-08-09 13:00 UTC (permalink / raw)
  To: Venkat Jayaraman, linux-usb
  Cc: llvm, oe-kbuild-all, gregkh, venkat.jayaraman, Heikki Krogerus,
	Przemek Kitszel
In-Reply-To: <20240808231443.1772374-1-venkat.jayaraman@intel.com>

Hi Venkat,

kernel test robot noticed the following build warnings:

[auto build test WARNING on usb/usb-testing]
[also build test WARNING on usb/usb-next usb/usb-linus westeri-thunderbolt/next linus/master v6.11-rc2 next-20240809]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Venkat-Jayaraman/usb-typec-ucsi-Add-DATA_RESET-option-of-Connector-Reset-command/20240809-122908
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link:    https://lore.kernel.org/r/20240808231443.1772374-1-venkat.jayaraman%40intel.com
patch subject: [PATCH] usb: typec: ucsi: Add DATA_RESET option of Connector Reset command
config: i386-buildonly-randconfig-005-20240809 (https://download.01.org/0day-ci/archive/20240809/202408092049.X5fsVaNn-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240809/202408092049.X5fsVaNn-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408092049.X5fsVaNn-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/usb/typec/ucsi/ucsi.c:1347: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
    * Hard Reset bit field was defined with value 1 in UCSI spec version 1.0.


vim +1347 drivers/usb/typec/ucsi/ucsi.c

  1345	
  1346	/**
> 1347	 * Hard Reset bit field was defined with value 1 in UCSI spec version 1.0.
  1348	 * Starting with spec version 1.1, Hard Reset bit field was removed from the
  1349	 * CONNECTOR_RESET command, until spec 2.0 reintroduced it with value 0, so, in effect,
  1350	 * the value to pass in to the command for a Hard Reset is different depending
  1351	 * on the supported UCSI version by the LPM.
  1352	 *
  1353	 * For performing a Data Reset on LPMs supporting version 2.0 and greater,
  1354	 * this function needs to be called with the second argument set to 0.
  1355	 */
  1356	static int ucsi_reset_connector(struct ucsi_connector *con, bool hard)
  1357	{
  1358		u64 command;
  1359	
  1360		command = UCSI_CONNECTOR_RESET | UCSI_CONNECTOR_NUMBER(con->num);
  1361	
  1362		if (con->ucsi->version < UCSI_VERSION_1_1)
  1363			command |= hard ? UCSI_CONNECTOR_RESET_HARD_VER_1_0 : 0;
  1364		else if (con->ucsi->version >= UCSI_VERSION_2_0)
  1365			command |= hard ? 0 : UCSI_CONNECTOR_RESET_DATA_VER_2_0;
  1366	
  1367		return ucsi_send_command(con->ucsi, command, NULL, 0);
  1368	}
  1369	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply

* Re: [PATCH 11/12] tty/vt: conmakehash requires linux/limits.h
From: Masahiro Yamada @ 2024-08-09 12:15 UTC (permalink / raw)
  To: da.gomez
  Cc: Nathan Chancellor, Nicolas Schier, Lucas De Marchi,
	Thomas Hellström, Rodrigo Vivi, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
	William Hubbs, Chris Brannon, Kirk Reiser, Samuel Thibault,
	Paul Moore, Stephen Smalley, Ondrej Mosnacek, Catalin Marinas,
	Will Deacon, Marc Zyngier, Oliver Upton, James Morse,
	Suzuki K Poulose, Zenghui Yu, Greg Kroah-Hartman, Jiri Slaby,
	Nick Desaulniers, Bill Wendling, Justin Stitt, linux-kernel,
	linux-kbuild, intel-xe, dri-devel, speakup, selinux,
	linux-arm-kernel, kvmarm, linux-serial, llvm, Finn Behrens,
	Daniel Gomez (Samsung), gost.dev
In-Reply-To: <20240807-macos-build-support-v1-11-4cd1ded85694@samsung.com>

On Wed, Aug 7, 2024 at 8:10 AM Daniel Gomez via B4 Relay
<devnull+da.gomez.samsung.com@kernel.org> wrote:
>
> From: Daniel Gomez <da.gomez@samsung.com>
>
> macOS hosts do not provide the linux/limits.h header required for
> conmakehash. To address this, ensure that usr/include is included in
> the conmakehash HOSTCFLAGS. This will provide the necessary header for
> successful compilation on macOS.
>
> Fixes error:
> HOSTCC  drivers/tty/vt/conmakehash - due to target missing
>   clang -Wp,-MMD,drivers/tty/vt/.conmakehash.d -Wall
> -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
> -std=gnu11   -I ./scripts/include     -o drivers/tty/vt/conmakehash
> drivers/tty/vt/conmakehash.c
> drivers/tty/vt/conmakehash.c:15:10: fatal error: 'linux/
>    limits.h' file not found 15 | #include <linux/limits.h>    |
>    ^~~~~~~~~~~~~~~~


The error is reported at line 15 of drivers/tty/vt/conmakehash.c


The line 15 is #include <stdlib.h>:

https://github.com/torvalds/linux/blob/v6.11-rc1/drivers/tty/vt/conmakehash.c#L15


So, host programs cannot include <stdlib.h> on your build machine.



drivers/tty/vt/conmakehash.c has only 5 include directives:

#include <stdio.h>
#include <stdlib.h>
#include <sysexits.h>
#include <string.h>
#include <ctype.h>


You cannot build this, your build machine cannot build anything.









> 1 error generated.
> make[5]: *** [scripts/Makefile.host:116: drivers/tty/vt/conmakehash]
> Error 1
> make[4]: *** [scripts/Makefile.build:485: drivers/tty/vt] Error 2
> make[3]: *** [scripts/Makefile.build:485: drivers/tty] Error 2
> make[2]: *** [scripts/Makefile.build:485: drivers] Error 2
> make[1]: *** [/Volumes/src/kernel/linux-next/Makefile:1925: .] Error 2
> make: *** [Makefile:224: __sub-make] Error 2
>
> Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
> ---
>  drivers/tty/vt/Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/tty/vt/Makefile b/drivers/tty/vt/Makefile
> index 2c8ce8b592ed..d266895357e5 100644
> --- a/drivers/tty/vt/Makefile
> +++ b/drivers/tty/vt/Makefile
> @@ -13,6 +13,7 @@ obj-$(CONFIG_CONSOLE_TRANSLATIONS)    += consolemap.o consolemap_deftbl.o
>  clean-files := consolemap_deftbl.c defkeymap.c
>
>  hostprogs += conmakehash
> +HOSTCFLAGS_conmakehash.o = -I$(srctree)/usr/include
>
>  quiet_cmd_conmk = CONMK   $@
>        cmd_conmk = $(obj)/conmakehash $< > $@
>
> --
> Git-146)
>
>


--
Best Regards
Masahiro Yamada

^ permalink raw reply

* Re: [PATCH v5] docs/zh_CN: Add dev-tools/kcsan Chinese translation
From: YanTeng Si @ 2024-08-09 10:57 UTC (permalink / raw)
  To: Haoyang Liu, Jonathan Corbet, Alex Shi, Yanteng Si,
	Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt
  Cc: hust-os-kernel-patches, linux-doc, linux-kernel, llvm
In-Reply-To: <25b4c3e0-784d-41ea-8ff3-8cb175983676@linux.dev>


在 2024/8/9 18:44, YanTeng Si 写道:
> Hi Haoyang,
>
> 在 2024/8/8 0:48, Haoyang Liu 写道:
>>
>> 在 2024/8/8 0:45, Jonathan Corbet 写道:
>>> Haoyang Liu <tttturtleruss@hust.edu.cn> writes:
>>>
>>>> This is a mistake but I missed it before sending this patch.
>>>>
>>>> What should I do to revert or correct this patch?
>>>>
>>>> Thanks for your help and patience.
>>> Send a v6 with the correction made - but wait a while for other reviews
>>> first.
>>
>> OK.
>>
> The doc is good enough for me, so you can send a v6 after fix the typo.
>
>
> Reviewed-by: Yanteng Si <siyanteng@loongson.cn>

I am Sorry! It seems that I've permanently lost access to 
siyanteng@loongson.cn account,

So you need use  --suppress-cc=sob when you send-email and pick my 
Reviewed-by tag.


Thanks,

Yanteng

>
>
> Thanks,
>
> Yanteng
>
>>
>> Thank you,
>>
>> Haoyang
>>
>>>
>>> Thanks,
>>>
>>> jon
>>
>>
>

^ permalink raw reply

* Re: [PATCH v5] docs/zh_CN: Add dev-tools/kcsan Chinese translation
From: YanTeng Si @ 2024-08-09 10:44 UTC (permalink / raw)
  To: Haoyang Liu, Jonathan Corbet, Alex Shi, Yanteng Si,
	Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt
  Cc: hust-os-kernel-patches, linux-doc, linux-kernel, llvm
In-Reply-To: <c4ffaae1-59a0-4837-a965-441af4851d2a@hust.edu.cn>

Hi Haoyang,

在 2024/8/8 0:48, Haoyang Liu 写道:
>
> 在 2024/8/8 0:45, Jonathan Corbet 写道:
>> Haoyang Liu <tttturtleruss@hust.edu.cn> writes:
>>
>>> This is a mistake but I missed it before sending this patch.
>>>
>>> What should I do to revert or correct this patch?
>>>
>>> Thanks for your help and patience.
>> Send a v6 with the correction made - but wait a while for other reviews
>> first.
>
> OK.
>
The doc is good enough for me, so you can send a v6 after fix the typo.


Reviewed-by: Yanteng Si <siyanteng@loongson.cn>


Thanks,

Yanteng

>
> Thank you,
>
> Haoyang
>
>>
>> Thanks,
>>
>> jon
>
>

^ permalink raw reply

* Re: [PATCH] slab: Introduce kmalloc_obj() and family
From: Vlastimil Babka @ 2024-08-09  8:59 UTC (permalink / raw)
  To: Kees Cook
  Cc: Christoph Lameter, Pekka Enberg, David Rientjes, Joonsoo Kim,
	Andrew Morton, Roman Gushchin, Hyeonggon Yoo,
	Gustavo A . R . Silva, Bill Wendling, Justin Stitt, Jann Horn,
	Przemek Kitszel, Marco Elver, linux-mm, Nathan Chancellor,
	Nick Desaulniers, linux-kernel, llvm, linux-hardening
In-Reply-To: <20240807235433.work.317-kees@kernel.org>

On 8/8/24 01:54, Kees Cook wrote:
> Introduce type-aware kmalloc-family helpers to replace the common
> idioms for single, array, and flexible object allocations:
> 
> 	ptr = kmalloc(sizeof(*ptr), gfp);
> 	ptr = kcalloc(count, sizeof(*ptr), gfp);
> 	ptr = kmalloc_array(count, sizeof(*ptr), gfp);
> 	ptr = kcalloc(count, sizeof(*ptr), gfp);
> 	ptr = kmalloc(struct_size(ptr, flex_member, count), gfp);
> 
> These become, respectively:
> 
> 	kmalloc_obj(p, gfp);
> 	kzalloc_obj(p, count, gfp);
> 	kmalloc_obj(p, count, gfp);
> 	kzalloc_obj(p, count, gfp);
> 	kmalloc_obj(p, flex_member, count, gfp);

So I'm not a huge fan in hiding the assignment, but I understand there's
value in having guaranteed the target of the assignment is really the same
thing as the one used for sizeof() etc.

But returning size seems awkward, it would be IMHO less confusing if it
still returned the object pointer, that could be then also assigned
elsewhere if needed, tested for NULL and ZERO_SIZE_PTR (now it's both 0?).

I'm also not sure that having it all called kmalloc_obj() with 3 variants of
how many parameters it takes is such a win? e.g. kmalloc_obj(),
kcalloc_obj() and kcalloc_obj_flex() would be more obvious?

> These each return the size of the allocation, so that other common
> idioms can be converted easily as well. For example:
> 
> 	info->size = struct_size(ptr, flex_member, count);
> 	ptr = kmalloc(info->size, gfp);
> 
> becomes:
> 
> 	info->size = kmalloc_obj(ptr, flex_member, count, gfp);

How about instead taking an &info->size parameter that assigns size to it,
so the ptr can be still returned but we also can record the size?

Also the last time David asked for documentation, you say you would try, but
there's nothing new here? Dunno if the kerneldocs are feasible but there's
at least Documentation/core-api/memory-allocation.rst ...

Thanks,
Vlastimil

> Internal introspection of allocated type also becomes possible, allowing
> for alignment-aware choices and future hardening work. For example,
> adding __alignof(*ptr) as an argument to the internal allocators so that
> appropriate/efficient alignment choices can be made, or being able to
> correctly choose per-allocation offset randomization within a bucket
> that does not break alignment requirements.
> 
> Additionally, once __builtin_get_counted_by() is added by GCC[1] and
> Clang[2], it will be possible to automatically set the counted member of
> a struct with a counted_by FAM, further eliminating open-coded redundant
> initializations, and can internally check for "too large" allocations
> based on the type size of the counter variable:
> 
> 	if (count > type_max(ptr->flex_count))
> 		fail...;
> 	info->size = struct_size(ptr, flex_member, count);
> 	ptr = kmalloc(info->size, gfp);
> 	ptr->flex_count = count;
> 
> becomes (i.e. unchanged from earlier example):
> 
> 	info->size = kmalloc_obj(ptr, flex_member, count, gfp);
> 
> Replacing all existing simple code patterns found via Coccinelle[3]
> shows what could be replaced immediately (saving roughly 1,500 lines):
> 
>  7040 files changed, 14128 insertions(+), 15557 deletions(-)
> 
> Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016 [1]
> Link: https://github.com/llvm/llvm-project/issues/99774 [2]
> Link: https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/kmalloc_obj-assign-size.cocci [3]
> Signed-off-by: Kees Cook <kees@kernel.org>
> ---
> Cc: Vlastimil Babka <vbabka@suse.cz>
> Cc: Christoph Lameter <cl@linux.com>
> Cc: Pekka Enberg <penberg@kernel.org>
> Cc: David Rientjes <rientjes@google.com>
> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Roman Gushchin <roman.gushchin@linux.dev>
> Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>
> Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
> Cc: Bill Wendling <morbo@google.com>
> Cc: Justin Stitt <justinstitt@google.com>
> Cc: Jann Horn <jannh@google.com>
> Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Cc: Marco Elver <elver@google.com>
> Cc: linux-mm@kvack.org
> ---
>  include/linux/slab.h | 38 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 38 insertions(+)
> 
> diff --git a/include/linux/slab.h b/include/linux/slab.h
> index eb2bf4629157..46801c28908e 100644
> --- a/include/linux/slab.h
> +++ b/include/linux/slab.h
> @@ -686,6 +686,44 @@ static __always_inline __alloc_size(1) void *kmalloc_noprof(size_t size, gfp_t f
>  }
>  #define kmalloc(...)				alloc_hooks(kmalloc_noprof(__VA_ARGS__))
>  
> +#define __alloc_obj3(ALLOC, P, COUNT, FLAGS)			\
> +({								\
> +	size_t __obj_size = size_mul(sizeof(*P), COUNT);	\
> +	void *__obj_ptr;					\
> +	(P) = __obj_ptr = ALLOC(__obj_size, FLAGS);		\
> +	if (!__obj_ptr)						\
> +		__obj_size = 0;					\
> +	__obj_size;						\
> +})
> +
> +#define __alloc_obj2(ALLOC, P, FLAGS)	__alloc_obj3(ALLOC, P, 1, FLAGS)
> +
> +#define __alloc_obj4(ALLOC, P, FAM, COUNT, FLAGS)		\
> +({								\
> +	size_t __obj_size = struct_size(P, FAM, COUNT);		\
> +	void *__obj_ptr;					\
> +	(P) = __obj_ptr = ALLOC(__obj_size, FLAGS);		\
> +	if (!__obj_ptr)						\
> +		__obj_size = 0;					\
> +	__obj_size;						\
> +})
> +
> +#define kmalloc_obj(...)					\
> +	CONCATENATE(__alloc_obj,				\
> +		    COUNT_ARGS(__VA_ARGS__))(kmalloc, __VA_ARGS__)
> +
> +#define kzalloc_obj(...)					\
> +	CONCATENATE(__alloc_obj,				\
> +		    COUNT_ARGS(__VA_ARGS__))(kzalloc, __VA_ARGS__)
> +
> +#define kvmalloc_obj(...)					\
> +	CONCATENATE(__alloc_obj,				\
> +		    COUNT_ARGS(__VA_ARGS__))(kvmalloc, __VA_ARGS__)
> +
> +#define kvzalloc_obj(...)					\
> +	CONCATENATE(__alloc_obj,				\
> +		    COUNT_ARGS(__VA_ARGS__))(kvzalloc, __VA_ARGS__)
> +
>  #define kmem_buckets_alloc(_b, _size, _flags)	\
>  	alloc_hooks(__kmalloc_node_noprof(PASS_BUCKET_PARAMS(_size, _b), _flags, NUMA_NO_NODE))
>  


^ permalink raw reply

* [mcgrof-next:20240808-large-block-misc 15388/15390] fs/xfs/xfs_super.c:1655:27: warning: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int')
From: kernel test robot @ 2024-08-09  8:43 UTC (permalink / raw)
  To: Pankaj Raghav; +Cc: llvm, oe-kbuild-all, Luis Chamberlain, Darrick J. Wong

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git 20240808-large-block-misc
head:   f87d6ccd9d1e95abe5c254c89b52d42e6a99ca81
commit: c85bf06395ffe514c6312414a1ab6a9a5c2e16c1 [15388/15390] xfs: enable block size larger than page size support
config: i386-buildonly-randconfig-002-20240809 (https://download.01.org/0day-ci/archive/20240809/202408091606.cZeaSAvg-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240809/202408091606.cZeaSAvg-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408091606.cZeaSAvg-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/xfs/xfs_super.c:1655:27: warning: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
    1654 | "block size (%u bytes) not supported; Only block size (%ld) or less is supported",
         |                                                        ~~~
         |                                                        %zu
    1655 |                         mp->m_sb.sb_blocksize, max_folio_size);
         |                                                ^~~~~~~~~~~~~~
   fs/xfs/xfs_message.h:27:49: note: expanded from macro 'xfs_warn'
      27 |         xfs_printk_index_wrap(KERN_WARNING, mp, fmt, ##__VA_ARGS__)
         |                                                 ~~~    ^~~~~~~~~~~
   fs/xfs/xfs_message.h:16:42: note: expanded from macro 'xfs_printk_index_wrap'
      16 |         xfs_printk_level(kern_level, mp, fmt, ##__VA_ARGS__);   \
         |                                          ~~~    ^~~~~~~~~~~
   1 warning generated.


vim +1655 fs/xfs/xfs_super.c

  1496	
  1497	static int
  1498	xfs_fs_fill_super(
  1499		struct super_block	*sb,
  1500		struct fs_context	*fc)
  1501	{
  1502		struct xfs_mount	*mp = sb->s_fs_info;
  1503		struct inode		*root;
  1504		int			flags = 0, error;
  1505	
  1506		mp->m_super = sb;
  1507	
  1508		/*
  1509		 * Copy VFS mount flags from the context now that all parameter parsing
  1510		 * is guaranteed to have been completed by either the old mount API or
  1511		 * the newer fsopen/fsconfig API.
  1512		 */
  1513		if (fc->sb_flags & SB_RDONLY)
  1514			set_bit(XFS_OPSTATE_READONLY, &mp->m_opstate);
  1515		if (fc->sb_flags & SB_DIRSYNC)
  1516			mp->m_features |= XFS_FEAT_DIRSYNC;
  1517		if (fc->sb_flags & SB_SYNCHRONOUS)
  1518			mp->m_features |= XFS_FEAT_WSYNC;
  1519	
  1520		error = xfs_fs_validate_params(mp);
  1521		if (error)
  1522			return error;
  1523	
  1524		sb_min_blocksize(sb, BBSIZE);
  1525		sb->s_xattr = xfs_xattr_handlers;
  1526		sb->s_export_op = &xfs_export_operations;
  1527	#ifdef CONFIG_XFS_QUOTA
  1528		sb->s_qcop = &xfs_quotactl_operations;
  1529		sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP | QTYPE_MASK_PRJ;
  1530	#endif
  1531		sb->s_op = &xfs_super_operations;
  1532	
  1533		/*
  1534		 * Delay mount work if the debug hook is set. This is debug
  1535		 * instrumention to coordinate simulation of xfs mount failures with
  1536		 * VFS superblock operations
  1537		 */
  1538		if (xfs_globals.mount_delay) {
  1539			xfs_notice(mp, "Delaying mount for %d seconds.",
  1540				xfs_globals.mount_delay);
  1541			msleep(xfs_globals.mount_delay * 1000);
  1542		}
  1543	
  1544		if (fc->sb_flags & SB_SILENT)
  1545			flags |= XFS_MFSI_QUIET;
  1546	
  1547		error = xfs_open_devices(mp);
  1548		if (error)
  1549			return error;
  1550	
  1551		if (xfs_debugfs) {
  1552			mp->m_debugfs = xfs_debugfs_mkdir(mp->m_super->s_id,
  1553							  xfs_debugfs);
  1554		} else {
  1555			mp->m_debugfs = NULL;
  1556		}
  1557	
  1558		error = xfs_init_mount_workqueues(mp);
  1559		if (error)
  1560			goto out_shutdown_devices;
  1561	
  1562		error = xfs_init_percpu_counters(mp);
  1563		if (error)
  1564			goto out_destroy_workqueues;
  1565	
  1566		error = xfs_inodegc_init_percpu(mp);
  1567		if (error)
  1568			goto out_destroy_counters;
  1569	
  1570		/* Allocate stats memory before we do operations that might use it */
  1571		mp->m_stats.xs_stats = alloc_percpu(struct xfsstats);
  1572		if (!mp->m_stats.xs_stats) {
  1573			error = -ENOMEM;
  1574			goto out_destroy_inodegc;
  1575		}
  1576	
  1577		error = xchk_mount_stats_alloc(mp);
  1578		if (error)
  1579			goto out_free_stats;
  1580	
  1581		error = xfs_readsb(mp, flags);
  1582		if (error)
  1583			goto out_free_scrub_stats;
  1584	
  1585		error = xfs_finish_flags(mp);
  1586		if (error)
  1587			goto out_free_sb;
  1588	
  1589		error = xfs_setup_devices(mp);
  1590		if (error)
  1591			goto out_free_sb;
  1592	
  1593		/*
  1594		 * V4 support is undergoing deprecation.
  1595		 *
  1596		 * Note: this has to use an open coded m_features check as xfs_has_crc
  1597		 * always returns false for !CONFIG_XFS_SUPPORT_V4.
  1598		 */
  1599		if (!(mp->m_features & XFS_FEAT_CRC)) {
  1600			if (!IS_ENABLED(CONFIG_XFS_SUPPORT_V4)) {
  1601				xfs_warn(mp,
  1602		"Deprecated V4 format (crc=0) not supported by kernel.");
  1603				error = -EINVAL;
  1604				goto out_free_sb;
  1605			}
  1606			xfs_warn_once(mp,
  1607		"Deprecated V4 format (crc=0) will not be supported after September 2030.");
  1608		}
  1609	
  1610		/* ASCII case insensitivity is undergoing deprecation. */
  1611		if (xfs_has_asciici(mp)) {
  1612	#ifdef CONFIG_XFS_SUPPORT_ASCII_CI
  1613			xfs_warn_once(mp,
  1614		"Deprecated ASCII case-insensitivity feature (ascii-ci=1) will not be supported after September 2030.");
  1615	#else
  1616			xfs_warn(mp,
  1617		"Deprecated ASCII case-insensitivity feature (ascii-ci=1) not supported by kernel.");
  1618			error = -EINVAL;
  1619			goto out_free_sb;
  1620	#endif
  1621		}
  1622	
  1623		/* Filesystem claims it needs repair, so refuse the mount. */
  1624		if (xfs_has_needsrepair(mp)) {
  1625			xfs_warn(mp, "Filesystem needs repair.  Please run xfs_repair.");
  1626			error = -EFSCORRUPTED;
  1627			goto out_free_sb;
  1628		}
  1629	
  1630		/*
  1631		 * Don't touch the filesystem if a user tool thinks it owns the primary
  1632		 * superblock.  mkfs doesn't clear the flag from secondary supers, so
  1633		 * we don't check them at all.
  1634		 */
  1635		if (mp->m_sb.sb_inprogress) {
  1636			xfs_warn(mp, "Offline file system operation in progress!");
  1637			error = -EFSCORRUPTED;
  1638			goto out_free_sb;
  1639		}
  1640	
  1641		if (mp->m_sb.sb_blocksize > PAGE_SIZE) {
  1642			size_t max_folio_size = mapping_max_folio_size_supported();
  1643	
  1644			if (!xfs_has_crc(mp)) {
  1645				xfs_warn(mp,
  1646	"V4 Filesystem with blocksize %d bytes. Only pagesize (%ld) or less is supported.",
  1647					mp->m_sb.sb_blocksize, PAGE_SIZE);
  1648				error = -ENOSYS;
  1649				goto out_free_sb;
  1650			}
  1651	
  1652			if (mp->m_sb.sb_blocksize > max_folio_size) {
  1653				xfs_warn(mp,
  1654	"block size (%u bytes) not supported; Only block size (%ld) or less is supported",
> 1655				mp->m_sb.sb_blocksize, max_folio_size);
  1656				error = -ENOSYS;
  1657				goto out_free_sb;
  1658			}
  1659	
  1660			xfs_warn(mp,
  1661	"EXPERIMENTAL: V5 Filesystem with Large Block Size (%d bytes) enabled.",
  1662				mp->m_sb.sb_blocksize);
  1663		}
  1664	
  1665		/* Ensure this filesystem fits in the page cache limits */
  1666		if (xfs_sb_validate_fsb_count(&mp->m_sb, mp->m_sb.sb_dblocks) ||
  1667		    xfs_sb_validate_fsb_count(&mp->m_sb, mp->m_sb.sb_rblocks)) {
  1668			xfs_warn(mp,
  1669			"file system too large to be mounted on this system.");
  1670			error = -EFBIG;
  1671			goto out_free_sb;
  1672		}
  1673	
  1674		/*
  1675		 * XFS block mappings use 54 bits to store the logical block offset.
  1676		 * This should suffice to handle the maximum file size that the VFS
  1677		 * supports (currently 2^63 bytes on 64-bit and ULONG_MAX << PAGE_SHIFT
  1678		 * bytes on 32-bit), but as XFS and VFS have gotten the s_maxbytes
  1679		 * calculation wrong on 32-bit kernels in the past, we'll add a WARN_ON
  1680		 * to check this assertion.
  1681		 *
  1682		 * Avoid integer overflow by comparing the maximum bmbt offset to the
  1683		 * maximum pagecache offset in units of fs blocks.
  1684		 */
  1685		if (!xfs_verify_fileoff(mp, XFS_B_TO_FSBT(mp, MAX_LFS_FILESIZE))) {
  1686			xfs_warn(mp,
  1687	"MAX_LFS_FILESIZE block offset (%llu) exceeds extent map maximum (%llu)!",
  1688				 XFS_B_TO_FSBT(mp, MAX_LFS_FILESIZE),
  1689				 XFS_MAX_FILEOFF);
  1690			error = -EINVAL;
  1691			goto out_free_sb;
  1692		}
  1693	
  1694		error = xfs_filestream_mount(mp);
  1695		if (error)
  1696			goto out_free_sb;
  1697	
  1698		/*
  1699		 * we must configure the block size in the superblock before we run the
  1700		 * full mount process as the mount process can lookup and cache inodes.
  1701		 */
  1702		sb->s_magic = XFS_SUPER_MAGIC;
  1703		sb->s_blocksize = mp->m_sb.sb_blocksize;
  1704		sb->s_blocksize_bits = ffs(sb->s_blocksize) - 1;
  1705		sb->s_maxbytes = MAX_LFS_FILESIZE;
  1706		sb->s_max_links = XFS_MAXLINK;
  1707		sb->s_time_gran = 1;
  1708		if (xfs_has_bigtime(mp)) {
  1709			sb->s_time_min = xfs_bigtime_to_unix(XFS_BIGTIME_TIME_MIN);
  1710			sb->s_time_max = xfs_bigtime_to_unix(XFS_BIGTIME_TIME_MAX);
  1711		} else {
  1712			sb->s_time_min = XFS_LEGACY_TIME_MIN;
  1713			sb->s_time_max = XFS_LEGACY_TIME_MAX;
  1714		}
  1715		trace_xfs_inode_timestamp_range(mp, sb->s_time_min, sb->s_time_max);
  1716		sb->s_iflags |= SB_I_CGROUPWB;
  1717	
  1718		set_posix_acl_flag(sb);
  1719	
  1720		/* version 5 superblocks support inode version counters. */
  1721		if (xfs_has_crc(mp))
  1722			sb->s_flags |= SB_I_VERSION;
  1723	
  1724		if (xfs_has_dax_always(mp)) {
  1725			error = xfs_setup_dax_always(mp);
  1726			if (error)
  1727				goto out_filestream_unmount;
  1728		}
  1729	
  1730		if (xfs_has_discard(mp) && !bdev_max_discard_sectors(sb->s_bdev)) {
  1731			xfs_warn(mp,
  1732		"mounting with \"discard\" option, but the device does not support discard");
  1733			mp->m_features &= ~XFS_FEAT_DISCARD;
  1734		}
  1735	
  1736		if (xfs_has_reflink(mp)) {
  1737			if (mp->m_sb.sb_rblocks) {
  1738				xfs_alert(mp,
  1739		"reflink not compatible with realtime device!");
  1740				error = -EINVAL;
  1741				goto out_filestream_unmount;
  1742			}
  1743	
  1744			if (xfs_globals.always_cow) {
  1745				xfs_info(mp, "using DEBUG-only always_cow mode.");
  1746				mp->m_always_cow = true;
  1747			}
  1748		}
  1749	
  1750		if (xfs_has_rmapbt(mp) && mp->m_sb.sb_rblocks) {
  1751			xfs_alert(mp,
  1752		"reverse mapping btree not compatible with realtime device!");
  1753			error = -EINVAL;
  1754			goto out_filestream_unmount;
  1755		}
  1756	
  1757		if (xfs_has_exchange_range(mp))
  1758			xfs_warn(mp,
  1759		"EXPERIMENTAL exchange-range feature enabled. Use at your own risk!");
  1760	
  1761		if (xfs_has_parent(mp))
  1762			xfs_warn(mp,
  1763		"EXPERIMENTAL parent pointer feature enabled. Use at your own risk!");
  1764	
  1765		error = xfs_mountfs(mp);
  1766		if (error)
  1767			goto out_filestream_unmount;
  1768	
  1769		root = igrab(VFS_I(mp->m_rootip));
  1770		if (!root) {
  1771			error = -ENOENT;
  1772			goto out_unmount;
  1773		}
  1774		sb->s_root = d_make_root(root);
  1775		if (!sb->s_root) {
  1776			error = -ENOMEM;
  1777			goto out_unmount;
  1778		}
  1779	
  1780		return 0;
  1781	
  1782	 out_filestream_unmount:
  1783		xfs_filestream_unmount(mp);
  1784	 out_free_sb:
  1785		xfs_freesb(mp);
  1786	 out_free_scrub_stats:
  1787		xchk_mount_stats_free(mp);
  1788	 out_free_stats:
  1789		free_percpu(mp->m_stats.xs_stats);
  1790	 out_destroy_inodegc:
  1791		xfs_inodegc_free_percpu(mp);
  1792	 out_destroy_counters:
  1793		xfs_destroy_percpu_counters(mp);
  1794	 out_destroy_workqueues:
  1795		xfs_destroy_mount_workqueues(mp);
  1796	 out_shutdown_devices:
  1797		xfs_shutdown_devices(mp);
  1798		return error;
  1799	
  1800	 out_unmount:
  1801		xfs_filestream_unmount(mp);
  1802		xfs_unmountfs(mp);
  1803		goto out_free_sb;
  1804	}
  1805	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply

* Re: [PATCH v4 2/2] cxl: avoid duplicated report from MCE & device
From: kernel test robot @ 2024-08-09  7:31 UTC (permalink / raw)
  To: Shiyang Ruan, qemu-devel, linux-cxl, linux-edac, linux-mm,
	dan.j.williams, vishal.l.verma, Jonathan.Cameron,
	alison.schofield
  Cc: llvm, oe-kbuild-all, bp, dave.jiang, dave, ira.weiny, james.morse,
	linmiaohe, mchehab, nao.horiguchi, rric, tony.luck, ruansy.fnst
In-Reply-To: <20240808151328.707869-3-ruansy.fnst@fujitsu.com>

Hi Shiyang,

kernel test robot noticed the following build errors:

[auto build test ERROR on tip/x86/core]
[also build test ERROR on cxl/next linus/master v6.11-rc2 next-20240809]
[cannot apply to cxl/pending]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Shiyang-Ruan/cxl-core-introduce-device-reporting-poison-hanlding/20240809-013658
base:   tip/x86/core
patch link:    https://lore.kernel.org/r/20240808151328.707869-3-ruansy.fnst%40fujitsu.com
patch subject: [PATCH v4 2/2] cxl: avoid duplicated report from MCE & device
config: um-allmodconfig (https://download.01.org/0day-ci/archive/20240809/202408091543.UNFvPFFl-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project f86594788ce93b696675c94f54016d27a6c21d18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240809/202408091543.UNFvPFFl-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408091543.UNFvPFFl-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   In file included from drivers/cxl/core/mbox.c:3:
   In file included from include/linux/security.h:33:
   In file included from include/linux/mm.h:2228:
   include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   In file included from drivers/cxl/core/mbox.c:3:
   In file included from include/linux/security.h:35:
   In file included from include/linux/bpf.h:31:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:25:
   In file included from include/linux/kernel_stat.h:8:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/um/include/asm/hardirq.h:5:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:14:
   In file included from arch/um/include/asm/io.h:24:
   include/asm-generic/io.h:548:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     548 |         val = __raw_readb(PCI_IOBASE + addr);
         |                           ~~~~~~~~~~ ^
   include/asm-generic/io.h:561:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     561 |         val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
      37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
         |                                                   ^
   In file included from drivers/cxl/core/mbox.c:3:
   In file included from include/linux/security.h:35:
   In file included from include/linux/bpf.h:31:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:25:
   In file included from include/linux/kernel_stat.h:8:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/um/include/asm/hardirq.h:5:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:14:
   In file included from arch/um/include/asm/io.h:24:
   include/asm-generic/io.h:574:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     574 |         val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
      35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
         |                                                   ^
   In file included from drivers/cxl/core/mbox.c:3:
   In file included from include/linux/security.h:35:
   In file included from include/linux/bpf.h:31:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:25:
   In file included from include/linux/kernel_stat.h:8:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/um/include/asm/hardirq.h:5:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:14:
   In file included from arch/um/include/asm/io.h:24:
   include/asm-generic/io.h:585:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     585 |         __raw_writeb(value, PCI_IOBASE + addr);
         |                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:595:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     595 |         __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   include/asm-generic/io.h:605:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     605 |         __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   include/asm-generic/io.h:693:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     693 |         readsb(PCI_IOBASE + addr, buffer, count);
         |                ~~~~~~~~~~ ^
   include/asm-generic/io.h:701:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     701 |         readsw(PCI_IOBASE + addr, buffer, count);
         |                ~~~~~~~~~~ ^
   include/asm-generic/io.h:709:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     709 |         readsl(PCI_IOBASE + addr, buffer, count);
         |                ~~~~~~~~~~ ^
   include/asm-generic/io.h:718:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     718 |         writesb(PCI_IOBASE + addr, buffer, count);
         |                 ~~~~~~~~~~ ^
   include/asm-generic/io.h:727:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     727 |         writesw(PCI_IOBASE + addr, buffer, count);
         |                 ~~~~~~~~~~ ^
   include/asm-generic/io.h:736:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     736 |         writesl(PCI_IOBASE + addr, buffer, count);
         |                 ~~~~~~~~~~ ^
   In file included from drivers/cxl/core/mbox.c:8:
>> arch/x86/include/asm/mce.h:219:43: warning: declaration of 'struct cpuinfo_x86' will not be visible outside of this function [-Wvisibility]
     219 | static inline void mcheck_cpu_init(struct cpuinfo_x86 *c) {}
         |                                           ^
   arch/x86/include/asm/mce.h:220:44: warning: declaration of 'struct cpuinfo_x86' will not be visible outside of this function [-Wvisibility]
     220 | static inline void mcheck_cpu_clear(struct cpuinfo_x86 *c) {}
         |                                            ^
   arch/x86/include/asm/mce.h:240:50: warning: declaration of 'struct cpuinfo_x86' will not be visible outside of this function [-Wvisibility]
     240 | static inline void mce_intel_feature_init(struct cpuinfo_x86 *c) { }
         |                                                  ^
   arch/x86/include/asm/mce.h:241:51: warning: declaration of 'struct cpuinfo_x86' will not be visible outside of this function [-Wvisibility]
     241 | static inline void mce_intel_feature_clear(struct cpuinfo_x86 *c) { }
         |                                                   ^
   arch/x86/include/asm/mce.h:248:26: warning: declaration of 'struct cpuinfo_x86' will not be visible outside of this function [-Wvisibility]
     248 | int mce_available(struct cpuinfo_x86 *c);
         |                          ^
   arch/x86/include/asm/mce.h:355:48: warning: declaration of 'struct cpuinfo_x86' will not be visible outside of this function [-Wvisibility]
     355 | static inline void mce_amd_feature_init(struct cpuinfo_x86 *c)          { }
         |                                                ^
   arch/x86/include/asm/mce.h:358:50: warning: declaration of 'struct cpuinfo_x86' will not be visible outside of this function [-Wvisibility]
     358 | static inline void mce_hygon_feature_init(struct cpuinfo_x86 *c)        { return mce_amd_feature_init(c); }
         |                                                  ^
>> arch/x86/include/asm/mce.h:358:96: error: incompatible pointer types passing 'struct cpuinfo_x86 *' to parameter of type 'struct cpuinfo_x86 *' [-Werror,-Wincompatible-pointer-types]
     358 | static inline void mce_hygon_feature_init(struct cpuinfo_x86 *c)        { return mce_amd_feature_init(c); }
         |                                                                                                       ^
   arch/x86/include/asm/mce.h:355:61: note: passing argument to parameter 'c' here
     355 | static inline void mce_amd_feature_init(struct cpuinfo_x86 *c)          { }
         |                                                             ^
>> drivers/cxl/core/mbox.c:1553:20: error: no member named 'x86_phys_bits' in 'struct cpuinfo_um'
    1553 |         hpa = mce->addr & MCI_ADDR_PHYSADDR;
         |                           ^~~~~~~~~~~~~~~~~
   arch/x86/include/asm/mce.h:94:53: note: expanded from macro 'MCI_ADDR_PHYSADDR'
      94 | #define MCI_ADDR_PHYSADDR       GENMASK_ULL(boot_cpu_data.x86_phys_bits - 1, 0)
         |                                             ~~~~~~~~~~~~~ ^
   include/linux/bits.h:37:23: note: expanded from macro 'GENMASK_ULL'
      37 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_ULL(h, l))
         |                              ^
   include/linux/bits.h:25:25: note: expanded from macro 'GENMASK_INPUT_CHECK'
      25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
         |                                       ^
   include/linux/compiler.h:290:48: note: expanded from macro '__is_constexpr'
     290 |         (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
         |                                                       ^
   include/linux/build_bug.h:16:62: note: expanded from macro 'BUILD_BUG_ON_ZERO'
      16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
         |                                                              ^
>> drivers/cxl/core/mbox.c:1553:20: error: no member named 'x86_phys_bits' in 'struct cpuinfo_um'
    1553 |         hpa = mce->addr & MCI_ADDR_PHYSADDR;
         |                           ^~~~~~~~~~~~~~~~~
   arch/x86/include/asm/mce.h:94:53: note: expanded from macro 'MCI_ADDR_PHYSADDR'
      94 | #define MCI_ADDR_PHYSADDR       GENMASK_ULL(boot_cpu_data.x86_phys_bits - 1, 0)
         |                                             ~~~~~~~~~~~~~ ^
   include/linux/bits.h:37:23: note: expanded from macro 'GENMASK_ULL'
      37 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_ULL(h, l))
         |                              ^
   include/linux/bits.h:25:37: note: expanded from macro 'GENMASK_INPUT_CHECK'
      25 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
         |                                                   ^
   include/linux/build_bug.h:16:62: note: expanded from macro 'BUILD_BUG_ON_ZERO'
      16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
         |                                                              ^
>> drivers/cxl/core/mbox.c:1553:20: error: no member named 'x86_phys_bits' in 'struct cpuinfo_um'
    1553 |         hpa = mce->addr & MCI_ADDR_PHYSADDR;
         |                           ^~~~~~~~~~~~~~~~~
   arch/x86/include/asm/mce.h:94:53: note: expanded from macro 'MCI_ADDR_PHYSADDR'
      94 | #define MCI_ADDR_PHYSADDR       GENMASK_ULL(boot_cpu_data.x86_phys_bits - 1, 0)
         |                                             ~~~~~~~~~~~~~ ^
   include/linux/bits.h:37:45: note: expanded from macro 'GENMASK_ULL'
      37 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_ULL(h, l))
         |                                                    ^
   include/uapi/linux/bits.h:13:52: note: expanded from macro '__GENMASK_ULL'
      13 |          (~_ULL(0) >> (__BITS_PER_LONG_LONG - 1 - (h))))
         |                                                    ^
   20 warnings and 4 errors generated.


vim +358 arch/x86/include/asm/mce.h

4a24d80b8c3e9f8 arch/x86/include/asm/mce.h Smita Koralahalli         2020-11-19  210  
58995d2d58e8e55 arch/x86/include/asm/mce.h Hidetoshi Seto            2009-06-15  211  #ifdef CONFIG_X86_MCE
a2202aa29289db6 arch/x86/include/asm/mce.h Yong Wang                 2009-11-10  212  int mcheck_init(void);
5e09954a9acc3b4 arch/x86/include/asm/mce.h Borislav Petkov           2009-10-16  213  void mcheck_cpu_init(struct cpuinfo_x86 *c);
8838eb6c0bf3b6a arch/x86/include/asm/mce.h Ashok Raj                 2015-08-12  214  void mcheck_cpu_clear(struct cpuinfo_x86 *c);
4a24d80b8c3e9f8 arch/x86/include/asm/mce.h Smita Koralahalli         2020-11-19  215  int apei_smca_report_x86_error(struct cper_ia_proc_ctx *ctx_info,
4a24d80b8c3e9f8 arch/x86/include/asm/mce.h Smita Koralahalli         2020-11-19  216  			       u64 lapic_id);
58995d2d58e8e55 arch/x86/include/asm/mce.h Hidetoshi Seto            2009-06-15  217  #else
a2202aa29289db6 arch/x86/include/asm/mce.h Yong Wang                 2009-11-10  218  static inline int mcheck_init(void) { return 0; }
5e09954a9acc3b4 arch/x86/include/asm/mce.h Borislav Petkov           2009-10-16 @219  static inline void mcheck_cpu_init(struct cpuinfo_x86 *c) {}
8838eb6c0bf3b6a arch/x86/include/asm/mce.h Ashok Raj                 2015-08-12  220  static inline void mcheck_cpu_clear(struct cpuinfo_x86 *c) {}
4a24d80b8c3e9f8 arch/x86/include/asm/mce.h Smita Koralahalli         2020-11-19  221  static inline int apei_smca_report_x86_error(struct cper_ia_proc_ctx *ctx_info,
4a24d80b8c3e9f8 arch/x86/include/asm/mce.h Smita Koralahalli         2020-11-19  222  					     u64 lapic_id) { return -EINVAL; }
58995d2d58e8e55 arch/x86/include/asm/mce.h Hidetoshi Seto            2009-06-15  223  #endif
58995d2d58e8e55 arch/x86/include/asm/mce.h Hidetoshi Seto            2009-06-15  224  
b5f2fa4ea00a179 arch/x86/include/asm/mce.h Andi Kleen                2009-02-12  225  void mce_setup(struct mce *m);
e2f430291fe23a4 include/asm-x86/mce.h      Thomas Gleixner           2007-10-17  226  void mce_log(struct mce *m);
d6126ef5f31ca54 arch/x86/include/asm/mce.h Greg Kroah-Hartman        2012-01-26  227  DECLARE_PER_CPU(struct device *, mce_device);
e2f430291fe23a4 include/asm-x86/mce.h      Thomas Gleixner           2007-10-17  228  
a0bc32b3cacf194 arch/x86/include/asm/mce.h Akshay Gupta              2020-08-28  229  /* Maximum number of MCA banks per CPU. */
a0bc32b3cacf194 arch/x86/include/asm/mce.h Akshay Gupta              2020-08-28  230  #define MAX_NR_BANKS 64
41fdff322e26c4a arch/x86/include/asm/mce.h Andi Kleen                2009-02-12  231  
e2f430291fe23a4 include/asm-x86/mce.h      Thomas Gleixner           2007-10-17  232  #ifdef CONFIG_X86_MCE_INTEL
e2f430291fe23a4 include/asm-x86/mce.h      Thomas Gleixner           2007-10-17  233  void mce_intel_feature_init(struct cpuinfo_x86 *c);
8838eb6c0bf3b6a arch/x86/include/asm/mce.h Ashok Raj                 2015-08-12  234  void mce_intel_feature_clear(struct cpuinfo_x86 *c);
88ccbedd9ca85d1 arch/x86/include/asm/mce.h Andi Kleen                2009-02-12  235  void cmci_clear(void);
88ccbedd9ca85d1 arch/x86/include/asm/mce.h Andi Kleen                2009-02-12  236  void cmci_reenable(void);
7a0c819d28f5c91 arch/x86/include/asm/mce.h Srivatsa S. Bhat          2013-03-20  237  void cmci_rediscover(void);
88ccbedd9ca85d1 arch/x86/include/asm/mce.h Andi Kleen                2009-02-12  238  void cmci_recheck(void);
e2f430291fe23a4 include/asm-x86/mce.h      Thomas Gleixner           2007-10-17  239  #else
e2f430291fe23a4 include/asm-x86/mce.h      Thomas Gleixner           2007-10-17  240  static inline void mce_intel_feature_init(struct cpuinfo_x86 *c) { }
8838eb6c0bf3b6a arch/x86/include/asm/mce.h Ashok Raj                 2015-08-12  241  static inline void mce_intel_feature_clear(struct cpuinfo_x86 *c) { }
88ccbedd9ca85d1 arch/x86/include/asm/mce.h Andi Kleen                2009-02-12  242  static inline void cmci_clear(void) {}
88ccbedd9ca85d1 arch/x86/include/asm/mce.h Andi Kleen                2009-02-12  243  static inline void cmci_reenable(void) {}
7a0c819d28f5c91 arch/x86/include/asm/mce.h Srivatsa S. Bhat          2013-03-20  244  static inline void cmci_rediscover(void) {}
88ccbedd9ca85d1 arch/x86/include/asm/mce.h Andi Kleen                2009-02-12  245  static inline void cmci_recheck(void) {}
e2f430291fe23a4 include/asm-x86/mce.h      Thomas Gleixner           2007-10-17  246  #endif
e2f430291fe23a4 include/asm-x86/mce.h      Thomas Gleixner           2007-10-17  247  
38736072d45488f arch/x86/include/asm/mce.h H. Peter Anvin            2009-05-28  248  int mce_available(struct cpuinfo_x86 *c);
2d1f406139ec203 arch/x86/include/asm/mce.h Borislav Petkov           2017-05-19  249  bool mce_is_memory_error(struct mce *m);
5d96c9342c23ee1 arch/x86/include/asm/mce.h Vishal Verma              2018-10-25  250  bool mce_is_correctable(struct mce *m);
1bae0cfe4a171cc arch/x86/include/asm/mce.h Yazen Ghannam             2023-06-13  251  bool mce_usable_address(struct mce *m);
88ccbedd9ca85d1 arch/x86/include/asm/mce.h Andi Kleen                2009-02-12  252  
01ca79f1411eae2 arch/x86/include/asm/mce.h Andi Kleen                2009-05-27  253  DECLARE_PER_CPU(unsigned, mce_exception_count);
ca84f69697da0f0 arch/x86/include/asm/mce.h Andi Kleen                2009-05-27  254  DECLARE_PER_CPU(unsigned, mce_poll_count);
01ca79f1411eae2 arch/x86/include/asm/mce.h Andi Kleen                2009-05-27  255  
ee031c31d6381d0 arch/x86/include/asm/mce.h Andi Kleen                2009-02-12  256  typedef DECLARE_BITMAP(mce_banks_t, MAX_NR_BANKS);
ee031c31d6381d0 arch/x86/include/asm/mce.h Andi Kleen                2009-02-12  257  DECLARE_PER_CPU(mce_banks_t, mce_poll_banks);
ee031c31d6381d0 arch/x86/include/asm/mce.h Andi Kleen                2009-02-12  258  
b79109c3bbcf52c arch/x86/include/asm/mce.h Andi Kleen                2009-02-12  259  enum mcp_flags {
3f2f0680d1161df arch/x86/include/asm/mce.h Borislav Petkov           2015-01-13  260  	MCP_TIMESTAMP	= BIT(0),	/* log time stamp */
3f2f0680d1161df arch/x86/include/asm/mce.h Borislav Petkov           2015-01-13  261  	MCP_UC		= BIT(1),	/* log uncorrected errors */
3f2f0680d1161df arch/x86/include/asm/mce.h Borislav Petkov           2015-01-13  262  	MCP_DONTLOG	= BIT(2),	/* only clear, don't log */
3bff147b187d5df arch/x86/include/asm/mce.h Borislav Petkov           2021-08-23  263  	MCP_QUEUE_LOG	= BIT(3),	/* only queue to genpool */
b79109c3bbcf52c arch/x86/include/asm/mce.h Andi Kleen                2009-02-12  264  };
5b9d292ea87c836 arch/x86/include/asm/mce.h Yazen Ghannam             2024-05-23  265  
5b9d292ea87c836 arch/x86/include/asm/mce.h Yazen Ghannam             2024-05-23  266  void machine_check_poll(enum mcp_flags flags, mce_banks_t *b);
b79109c3bbcf52c arch/x86/include/asm/mce.h Andi Kleen                2009-02-12  267  
9ff36ee9668ff41 arch/x86/include/asm/mce.h Andi Kleen                2009-05-27  268  int mce_notify_irq(void);
e2f430291fe23a4 include/asm-x86/mce.h      Thomas Gleixner           2007-10-17  269  
ea149b36c7f511d arch/x86/include/asm/mce.h Andi Kleen                2009-04-29  270  DECLARE_PER_CPU(struct mce, injectm);
66f5ddf30a59f81 arch/x86/include/asm/mce.h Tony Luck                 2011-11-03  271  
c3d1fb567a634dc arch/x86/include/asm/mce.h Naveen N Rao              2013-07-01  272  /* Disable CMCI/polling for MCA bank claimed by firmware */
c3d1fb567a634dc arch/x86/include/asm/mce.h Naveen N Rao              2013-07-01  273  extern void mce_disable_bank(int bank);
c3d1fb567a634dc arch/x86/include/asm/mce.h Naveen N Rao              2013-07-01  274  
58995d2d58e8e55 arch/x86/include/asm/mce.h Hidetoshi Seto            2009-06-15  275  /*
58995d2d58e8e55 arch/x86/include/asm/mce.h Hidetoshi Seto            2009-06-15  276   * Exception handler
58995d2d58e8e55 arch/x86/include/asm/mce.h Hidetoshi Seto            2009-06-15  277   */
8cd501c1facc159 arch/x86/include/asm/mce.h Thomas Gleixner           2020-02-25  278  void do_machine_check(struct pt_regs *pt_regs);
58995d2d58e8e55 arch/x86/include/asm/mce.h Hidetoshi Seto            2009-06-15  279  
58995d2d58e8e55 arch/x86/include/asm/mce.h Hidetoshi Seto            2009-06-15  280  /*
58995d2d58e8e55 arch/x86/include/asm/mce.h Hidetoshi Seto            2009-06-15  281   * Threshold handler
58995d2d58e8e55 arch/x86/include/asm/mce.h Hidetoshi Seto            2009-06-15  282   */
b276268631af3a1 arch/x86/include/asm/mce.h Andi Kleen                2009-02-12  283  extern void (*mce_threshold_vector)(void);
b276268631af3a1 arch/x86/include/asm/mce.h Andi Kleen                2009-02-12  284  
24fd78a81f6d3fe arch/x86/include/asm/mce.h Aravind Gopalakrishnan    2015-05-06  285  /* Deferred error interrupt handler */
24fd78a81f6d3fe arch/x86/include/asm/mce.h Aravind Gopalakrishnan    2015-05-06  286  extern void (*deferred_error_int_vector)(void);
24fd78a81f6d3fe arch/x86/include/asm/mce.h Aravind Gopalakrishnan    2015-05-06  287  
d334a49113a4a33 arch/x86/include/asm/mce.h Huang Ying                2010-05-18  288  /*
d334a49113a4a33 arch/x86/include/asm/mce.h Huang Ying                2010-05-18  289   * Used by APEI to report memory error via /dev/mcelog
d334a49113a4a33 arch/x86/include/asm/mce.h Huang Ying                2010-05-18  290   */
d334a49113a4a33 arch/x86/include/asm/mce.h Huang Ying                2010-05-18  291  
d334a49113a4a33 arch/x86/include/asm/mce.h Huang Ying                2010-05-18  292  struct cper_sec_mem_err;
d334a49113a4a33 arch/x86/include/asm/mce.h Huang Ying                2010-05-18  293  extern void apei_mce_report_mem_error(int corrected,
d334a49113a4a33 arch/x86/include/asm/mce.h Huang Ying                2010-05-18  294  				      struct cper_sec_mem_err *mem_err);
d334a49113a4a33 arch/x86/include/asm/mce.h Huang Ying                2010-05-18  295  
be0aec23bf4624f arch/x86/include/asm/mce.h Aravind Gopalakrishnan    2016-03-07  296  /*
be0aec23bf4624f arch/x86/include/asm/mce.h Aravind Gopalakrishnan    2016-03-07  297   * Enumerate new IP types and HWID values in AMD processors which support
be0aec23bf4624f arch/x86/include/asm/mce.h Aravind Gopalakrishnan    2016-03-07  298   * Scalable MCA.
be0aec23bf4624f arch/x86/include/asm/mce.h Aravind Gopalakrishnan    2016-03-07  299   */
be0aec23bf4624f arch/x86/include/asm/mce.h Aravind Gopalakrishnan    2016-03-07  300  #ifdef CONFIG_X86_MCE_AMD
5896820e0aa3257 arch/x86/include/asm/mce.h Yazen Ghannam             2016-09-12  301  
5896820e0aa3257 arch/x86/include/asm/mce.h Yazen Ghannam             2016-09-12  302  /* These may be used by multiple smca_hwid_mcatypes */
5896820e0aa3257 arch/x86/include/asm/mce.h Yazen Ghannam             2016-09-12  303  enum smca_bank_types {
5896820e0aa3257 arch/x86/include/asm/mce.h Yazen Ghannam             2016-09-12  304  	SMCA_LS = 0,	/* Load Store */
94a311ce248e0b5 arch/x86/include/asm/mce.h Muralidhara M K           2021-05-26  305  	SMCA_LS_V2,
5896820e0aa3257 arch/x86/include/asm/mce.h Yazen Ghannam             2016-09-12  306  	SMCA_IF,	/* Instruction Fetch */
5896820e0aa3257 arch/x86/include/asm/mce.h Yazen Ghannam             2016-09-12  307  	SMCA_L2_CACHE,	/* L2 Cache */
5896820e0aa3257 arch/x86/include/asm/mce.h Yazen Ghannam             2016-09-12  308  	SMCA_DE,	/* Decoder Unit */
68627a697c19593 arch/x86/include/asm/mce.h Yazen Ghannam             2018-02-21  309  	SMCA_RESERVED,	/* Reserved */
5896820e0aa3257 arch/x86/include/asm/mce.h Yazen Ghannam             2016-09-12  310  	SMCA_EX,	/* Execution Unit */
5896820e0aa3257 arch/x86/include/asm/mce.h Yazen Ghannam             2016-09-12  311  	SMCA_FP,	/* Floating Point */
5896820e0aa3257 arch/x86/include/asm/mce.h Yazen Ghannam             2016-09-12  312  	SMCA_L3_CACHE,	/* L3 Cache */
5896820e0aa3257 arch/x86/include/asm/mce.h Yazen Ghannam             2016-09-12  313  	SMCA_CS,	/* Coherent Slave */
94a311ce248e0b5 arch/x86/include/asm/mce.h Muralidhara M K           2021-05-26  314  	SMCA_CS_V2,
5896820e0aa3257 arch/x86/include/asm/mce.h Yazen Ghannam             2016-09-12  315  	SMCA_PIE,	/* Power, Interrupts, etc. */
be0aec23bf4624f arch/x86/include/asm/mce.h Aravind Gopalakrishnan    2016-03-07  316  	SMCA_UMC,	/* Unified Memory Controller */
94a311ce248e0b5 arch/x86/include/asm/mce.h Muralidhara M K           2021-05-26  317  	SMCA_UMC_V2,
47b744ea5e3cf85 arch/x86/include/asm/mce.h Muralidhara M K           2023-11-02  318  	SMCA_MA_LLC,	/* Memory Attached Last Level Cache */
be0aec23bf4624f arch/x86/include/asm/mce.h Aravind Gopalakrishnan    2016-03-07  319  	SMCA_PB,	/* Parameter Block */
be0aec23bf4624f arch/x86/include/asm/mce.h Aravind Gopalakrishnan    2016-03-07  320  	SMCA_PSP,	/* Platform Security Processor */
94a311ce248e0b5 arch/x86/include/asm/mce.h Muralidhara M K           2021-05-26  321  	SMCA_PSP_V2,
be0aec23bf4624f arch/x86/include/asm/mce.h Aravind Gopalakrishnan    2016-03-07  322  	SMCA_SMU,	/* System Management Unit */
94a311ce248e0b5 arch/x86/include/asm/mce.h Muralidhara M K           2021-05-26  323  	SMCA_SMU_V2,
cbfa447edd6a382 arch/x86/include/asm/mce.h Yazen Ghannam             2019-02-01  324  	SMCA_MP5,	/* Microprocessor 5 Unit */
5176a93ab27aef1 arch/x86/include/asm/mce.h Yazen Ghannam             2021-12-16  325  	SMCA_MPDMA,	/* MPDMA Unit */
cbfa447edd6a382 arch/x86/include/asm/mce.h Yazen Ghannam             2019-02-01  326  	SMCA_NBIO,	/* Northbridge IO Unit */
cbfa447edd6a382 arch/x86/include/asm/mce.h Yazen Ghannam             2019-02-01  327  	SMCA_PCIE,	/* PCI Express Unit */
94a311ce248e0b5 arch/x86/include/asm/mce.h Muralidhara M K           2021-05-26  328  	SMCA_PCIE_V2,
94a311ce248e0b5 arch/x86/include/asm/mce.h Muralidhara M K           2021-05-26  329  	SMCA_XGMI_PCS,	/* xGMI PCS Unit */
5176a93ab27aef1 arch/x86/include/asm/mce.h Yazen Ghannam             2021-12-16  330  	SMCA_NBIF,	/* NBIF Unit */
5176a93ab27aef1 arch/x86/include/asm/mce.h Yazen Ghannam             2021-12-16  331  	SMCA_SHUB,	/* System HUB Unit */
5176a93ab27aef1 arch/x86/include/asm/mce.h Yazen Ghannam             2021-12-16  332  	SMCA_SATA,	/* SATA Unit */
5176a93ab27aef1 arch/x86/include/asm/mce.h Yazen Ghannam             2021-12-16  333  	SMCA_USB,	/* USB Unit */
47b744ea5e3cf85 arch/x86/include/asm/mce.h Muralidhara M K           2023-11-02  334  	SMCA_USR_DP,	/* Ultra Short Reach Data Plane Controller */
47b744ea5e3cf85 arch/x86/include/asm/mce.h Muralidhara M K           2023-11-02  335  	SMCA_USR_CP,	/* Ultra Short Reach Control Plane Controller */
5176a93ab27aef1 arch/x86/include/asm/mce.h Yazen Ghannam             2021-12-16  336  	SMCA_GMI_PCS,	/* GMI PCS Unit */
94a311ce248e0b5 arch/x86/include/asm/mce.h Muralidhara M K           2021-05-26  337  	SMCA_XGMI_PHY,	/* xGMI PHY Unit */
94a311ce248e0b5 arch/x86/include/asm/mce.h Muralidhara M K           2021-05-26  338  	SMCA_WAFL_PHY,	/* WAFL PHY Unit */
5176a93ab27aef1 arch/x86/include/asm/mce.h Yazen Ghannam             2021-12-16  339  	SMCA_GMI_PHY,	/* GMI PHY Unit */
5896820e0aa3257 arch/x86/include/asm/mce.h Yazen Ghannam             2016-09-12  340  	N_SMCA_BANK_TYPES
be0aec23bf4624f arch/x86/include/asm/mce.h Aravind Gopalakrishnan    2016-03-07  341  };
be0aec23bf4624f arch/x86/include/asm/mce.h Aravind Gopalakrishnan    2016-03-07  342  
c6708d50f166bea arch/x86/include/asm/mce.h Yazen Ghannam             2017-12-18  343  extern bool amd_mce_is_memory_error(struct mce *m);
e71c3978d6f9765 arch/x86/include/asm/mce.h Linus Torvalds            2016-12-12  344  
4d7b02d58c40005 arch/x86/include/asm/mce.h Sebastian Andrzej Siewior 2016-11-10  345  extern int mce_threshold_create_device(unsigned int cpu);
4d7b02d58c40005 arch/x86/include/asm/mce.h Sebastian Andrzej Siewior 2016-11-10  346  extern int mce_threshold_remove_device(unsigned int cpu);
e71c3978d6f9765 arch/x86/include/asm/mce.h Linus Torvalds            2016-12-12  347  
9308fd4074551f2 arch/x86/include/asm/mce.h Yazen Ghannam             2019-03-22  348  void mce_amd_feature_init(struct cpuinfo_x86 *c);
91f75eb481cfaee arch/x86/include/asm/mce.h Yazen Ghannam             2021-12-16  349  enum smca_bank_types smca_get_bank_type(unsigned int cpu, unsigned int bank);
4d7b02d58c40005 arch/x86/include/asm/mce.h Sebastian Andrzej Siewior 2016-11-10  350  #else
5896820e0aa3257 arch/x86/include/asm/mce.h Yazen Ghannam             2016-09-12  351  
4d7b02d58c40005 arch/x86/include/asm/mce.h Sebastian Andrzej Siewior 2016-11-10  352  static inline int mce_threshold_create_device(unsigned int cpu)		{ return 0; };
4d7b02d58c40005 arch/x86/include/asm/mce.h Sebastian Andrzej Siewior 2016-11-10  353  static inline int mce_threshold_remove_device(unsigned int cpu)		{ return 0; };
c6708d50f166bea arch/x86/include/asm/mce.h Yazen Ghannam             2017-12-18  354  static inline bool amd_mce_is_memory_error(struct mce *m)		{ return false; };
9308fd4074551f2 arch/x86/include/asm/mce.h Yazen Ghannam             2019-03-22  355  static inline void mce_amd_feature_init(struct cpuinfo_x86 *c)		{ }
be0aec23bf4624f arch/x86/include/asm/mce.h Aravind Gopalakrishnan    2016-03-07  356  #endif
be0aec23bf4624f arch/x86/include/asm/mce.h Aravind Gopalakrishnan    2016-03-07  357  
9308fd4074551f2 arch/x86/include/asm/mce.h Yazen Ghannam             2019-03-22 @358  static inline void mce_hygon_feature_init(struct cpuinfo_x86 *c)	{ return mce_amd_feature_init(c); }
e9c2a283e7d9d4e arch/x86/include/asm/mce.h Arnd Bergmann             2023-05-16  359  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply

* Re: [PATCH 2/2] tty: serial: samsung_tty: cast the interrupt's void *id just once
From: kernel test robot @ 2024-08-09  7:21 UTC (permalink / raw)
  To: André Draszik, Krzysztof Kozlowski, Alim Akhtar,
	Greg Kroah-Hartman, Jiri Slaby
  Cc: llvm, oe-kbuild-all, Peter Griffin, Tudor Ambarus, Will McVicker,
	kernel-team, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-serial, André Draszik
In-Reply-To: <20240806-samsung-tty-cleanup-v1-2-a68d3abf31fe@linaro.org>

Hi André,

kernel test robot noticed the following build errors:

[auto build test ERROR on 1e391b34f6aa043c7afa40a2103163a0ef06d179]

url:    https://github.com/intel-lab-lkp/linux/commits/Andr-Draszik/tty-serial-samsung_tty-drop-unused-argument-to-irq-handlers/20240806-234342
base:   1e391b34f6aa043c7afa40a2103163a0ef06d179
patch link:    https://lore.kernel.org/r/20240806-samsung-tty-cleanup-v1-2-a68d3abf31fe%40linaro.org
patch subject: [PATCH 2/2] tty: serial: samsung_tty: cast the interrupt's void *id just once
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240809/202408091530.vvvqEiPv-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240809/202408091530.vvvqEiPv-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408091530.vvvqEiPv-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/tty/serial/samsung_tty.c:948:31: error: passing 'const struct s3c24xx_uart_port *' to parameter of type 'struct s3c24xx_uart_port *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
     948 |                 ret = s3c24xx_serial_rx_irq(ourport);
         |                                             ^~~~~~~
   drivers/tty/serial/samsung_tty.c:856:68: note: passing argument to parameter 'ourport' here
     856 | static irqreturn_t s3c24xx_serial_rx_irq(struct s3c24xx_uart_port *ourport)
         |                                                                    ^
   drivers/tty/serial/samsung_tty.c:952:31: error: passing 'const struct s3c24xx_uart_port *' to parameter of type 'struct s3c24xx_uart_port *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
     952 |                 ret = s3c24xx_serial_tx_irq(ourport);
         |                                             ^~~~~~~
   drivers/tty/serial/samsung_tty.c:927:68: note: passing argument to parameter 'ourport' here
     927 | static irqreturn_t s3c24xx_serial_tx_irq(struct s3c24xx_uart_port *ourport)
         |                                                                    ^
   drivers/tty/serial/samsung_tty.c:969:31: error: passing 'const struct s3c24xx_uart_port *' to parameter of type 'struct s3c24xx_uart_port *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
     969 |                 ret = s3c24xx_serial_rx_irq(ourport);
         |                                             ^~~~~~~
   drivers/tty/serial/samsung_tty.c:856:68: note: passing argument to parameter 'ourport' here
     856 | static irqreturn_t s3c24xx_serial_rx_irq(struct s3c24xx_uart_port *ourport)
         |                                                                    ^
   drivers/tty/serial/samsung_tty.c:973:31: error: passing 'const struct s3c24xx_uart_port *' to parameter of type 'struct s3c24xx_uart_port *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
     973 |                 ret = s3c24xx_serial_tx_irq(ourport);
         |                                             ^~~~~~~
   drivers/tty/serial/samsung_tty.c:927:68: note: passing argument to parameter 'ourport' here
     927 | static irqreturn_t s3c24xx_serial_tx_irq(struct s3c24xx_uart_port *ourport)
         |                                                                    ^
   4 errors generated.


vim +948 drivers/tty/serial/samsung_tty.c

   938	
   939	/* interrupt handler for s3c64xx and later SoC's.*/
   940	static irqreturn_t s3c64xx_serial_handle_irq(int irq, void *id)
   941	{
   942		const struct s3c24xx_uart_port *ourport = id;
   943		const struct uart_port *port = &ourport->port;
   944		u32 pend = rd_regl(port, S3C64XX_UINTP);
   945		irqreturn_t ret = IRQ_HANDLED;
   946	
   947		if (pend & S3C64XX_UINTM_RXD_MSK) {
 > 948			ret = s3c24xx_serial_rx_irq(ourport);
   949			wr_regl(port, S3C64XX_UINTP, S3C64XX_UINTM_RXD_MSK);
   950		}
   951		if (pend & S3C64XX_UINTM_TXD_MSK) {
   952			ret = s3c24xx_serial_tx_irq(ourport);
   953			wr_regl(port, S3C64XX_UINTP, S3C64XX_UINTM_TXD_MSK);
   954		}
   955		return ret;
   956	}
   957	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply

* Re: [PATCH RFC 1/2] mm: collect the number of anon large folios
From: kernel test robot @ 2024-08-09  5:28 UTC (permalink / raw)
  To: Barry Song; +Cc: llvm, oe-kbuild-all
In-Reply-To: <20240808010457.228753-2-21cnbao@gmail.com>

Hi Barry,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build errors:

[auto build test ERROR on next-20240807]
[also build test ERROR on v6.11-rc2]
[cannot apply to akpm-mm/mm-everything linus/master v6.11-rc2 v6.11-rc1 v6.10]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Barry-Song/mm-collect-the-number-of-anon-large-folios/20240808-090627
base:   next-20240807
patch link:    https://lore.kernel.org/r/20240808010457.228753-2-21cnbao%40gmail.com
patch subject: [PATCH RFC 1/2] mm: collect the number of anon large folios
config: s390-allnoconfig (https://download.01.org/0day-ci/archive/20240809/202408091324.ZqWOIwKo-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project f86594788ce93b696675c94f54016d27a6c21d18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240809/202408091324.ZqWOIwKo-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408091324.ZqWOIwKo-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from mm/rmap.c:56:
   In file included from include/linux/mm.h:2199:
   include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   In file included from mm/rmap.c:77:
   include/linux/mm_inline.h:47:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
      47 |         __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
         |                                    ~~~~~~~~~~~ ^ ~~~
   include/linux/mm_inline.h:49:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
      49 |                                 NR_ZONE_LRU_BASE + lru, nr_pages);
         |                                 ~~~~~~~~~~~~~~~~ ^ ~~~
>> mm/rmap.c:1470:2: error: call to undeclared function 'mod_mthp_stat'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1470 |         mod_mthp_stat(folio_order(folio), MTHP_STAT_NR_ANON, 1);
         |         ^
>> mm/rmap.c:1470:36: error: use of undeclared identifier 'MTHP_STAT_NR_ANON'
    1470 |         mod_mthp_stat(folio_order(folio), MTHP_STAT_NR_ANON, 1);
         |                                           ^
   mm/rmap.c:1587:3: error: call to undeclared function 'mod_mthp_stat'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1587 |                 mod_mthp_stat(folio_order(folio), MTHP_STAT_NR_ANON, -1);
         |                 ^
   mm/rmap.c:1587:37: error: use of undeclared identifier 'MTHP_STAT_NR_ANON'
    1587 |                 mod_mthp_stat(folio_order(folio), MTHP_STAT_NR_ANON, -1);
         |                                                   ^
   3 warnings and 4 errors generated.


vim +/mod_mthp_stat +1470 mm/rmap.c

  1402	
  1403	/**
  1404	 * folio_add_new_anon_rmap - Add mapping to a new anonymous folio.
  1405	 * @folio:	The folio to add the mapping to.
  1406	 * @vma:	the vm area in which the mapping is added
  1407	 * @address:	the user virtual address mapped
  1408	 * @flags:	The rmap flags
  1409	 *
  1410	 * Like folio_add_anon_rmap_*() but must only be called on *new* folios.
  1411	 * This means the inc-and-test can be bypassed.
  1412	 * The folio doesn't necessarily need to be locked while it's exclusive
  1413	 * unless two threads map it concurrently. However, the folio must be
  1414	 * locked if it's shared.
  1415	 *
  1416	 * If the folio is pmd-mappable, it is accounted as a THP.
  1417	 */
  1418	void folio_add_new_anon_rmap(struct folio *folio, struct vm_area_struct *vma,
  1419			unsigned long address, rmap_t flags)
  1420	{
  1421		const int nr = folio_nr_pages(folio);
  1422		const bool exclusive = flags & RMAP_EXCLUSIVE;
  1423		int nr_pmdmapped = 0;
  1424	
  1425		VM_WARN_ON_FOLIO(folio_test_hugetlb(folio), folio);
  1426		VM_WARN_ON_FOLIO(!exclusive && !folio_test_locked(folio), folio);
  1427		VM_BUG_ON_VMA(address < vma->vm_start ||
  1428				address + (nr << PAGE_SHIFT) > vma->vm_end, vma);
  1429	
  1430		/*
  1431		 * VM_DROPPABLE mappings don't swap; instead they're just dropped when
  1432		 * under memory pressure.
  1433		 */
  1434		if (!folio_test_swapbacked(folio) && !(vma->vm_flags & VM_DROPPABLE))
  1435			__folio_set_swapbacked(folio);
  1436		__folio_set_anon(folio, vma, address, exclusive);
  1437	
  1438		if (likely(!folio_test_large(folio))) {
  1439			/* increment count (starts at -1) */
  1440			atomic_set(&folio->_mapcount, 0);
  1441			if (exclusive)
  1442				SetPageAnonExclusive(&folio->page);
  1443		} else if (!folio_test_pmd_mappable(folio)) {
  1444			int i;
  1445	
  1446			for (i = 0; i < nr; i++) {
  1447				struct page *page = folio_page(folio, i);
  1448	
  1449				/* increment count (starts at -1) */
  1450				atomic_set(&page->_mapcount, 0);
  1451				if (exclusive)
  1452					SetPageAnonExclusive(page);
  1453			}
  1454	
  1455			/* increment count (starts at -1) */
  1456			atomic_set(&folio->_large_mapcount, nr - 1);
  1457			atomic_set(&folio->_nr_pages_mapped, nr);
  1458		} else {
  1459			/* increment count (starts at -1) */
  1460			atomic_set(&folio->_entire_mapcount, 0);
  1461			/* increment count (starts at -1) */
  1462			atomic_set(&folio->_large_mapcount, 0);
  1463			atomic_set(&folio->_nr_pages_mapped, ENTIRELY_MAPPED);
  1464			if (exclusive)
  1465				SetPageAnonExclusive(&folio->page);
  1466			nr_pmdmapped = nr;
  1467		}
  1468	
  1469		__folio_mod_stat(folio, nr, nr_pmdmapped);
> 1470		mod_mthp_stat(folio_order(folio), MTHP_STAT_NR_ANON, 1);
  1471	}
  1472	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply

* Re: ERROR: modpost: "__popcountsi2" [fs/bcachefs/bcachefs.ko] undefined!
From: Philip Li @ 2024-08-09  2:09 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: kernel test robot, Kent Overstreet, llvm, oe-kbuild-all,
	linux-kernel
In-Reply-To: <20240809003901.GA3870107@thelio-3990X>

On Thu, Aug 08, 2024 at 05:39:01PM -0700, Nathan Chancellor wrote:
> On Thu, Aug 08, 2024 at 11:28:22AM +0800, Philip Li wrote:
> > On Wed, Aug 07, 2024 at 08:36:16AM -0700, Nathan Chancellor wrote:
> > > On Wed, Aug 07, 2024 at 04:43:13AM +0800, kernel test robot wrote:
> > > > Hi Kent,
> > > > 
> > > > First bad commit (maybe != root cause):
> > > > 
> > > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > > > head:   eb5e56d1491297e0881c95824e2050b7c205f0d4
> > > > commit: 9ae82fe6ace1b267005758ccfb2347a4a6aa4398 bcachefs: Inline make_bfloat() into __build_ro_aux_tree()
> > > > date:   10 months ago
> > > > config: arm-randconfig-002-20240805 (https://download.01.org/0day-ci/archive/20240807/202408070432.X6n56VaY-lkp@intel.com/config)
> > > > compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 423aec6573df4424f90555468128e17073ddc69e)
> > > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240807/202408070432.X6n56VaY-lkp@intel.com/reproduce)
> > > > 
> > > > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > > > the same patch/commit), kindly add following tags
> > > > | Reported-by: kernel test robot <lkp@intel.com>
> > > > | Closes: https://lore.kernel.org/oe-kbuild-all/202408070432.X6n56VaY-lkp@intel.com/
> > > > 
> > > > All errors (new ones prefixed by >>, old ones prefixed by <<):
> > > ...
> > > > ERROR: modpost: "__popcountsi2" [fs/ext4/ext4.ko] undefined!
> > > > ERROR: modpost: "__popcountsi2" [fs/fat/fat.ko] undefined!
> > > > ERROR: modpost: "__popcountsi2" [fs/hfsplus/hfsplus.ko] undefined!
> > > > ERROR: modpost: "__popcountsi2" [fs/xfs/xfs.ko] undefined!
> > > > ERROR: modpost: "__popcountsi2" [fs/gfs2/gfs2.ko] undefined!
> > > > >> ERROR: modpost: "__popcountsi2" [fs/bcachefs/bcachefs.ko] undefined!
> > > > ERROR: modpost: "__aeabi_uldivmod" [fs/bcachefs/bcachefs.ko] undefined!
> > > > ERROR: modpost: "__popcountsi2" [drivers/block/virtio_blk.ko] undefined!
> > > > ERROR: modpost: "__popcountsi2" [drivers/net/ipa/ipa.ko] undefined!
> > > > ERROR: modpost: "__popcountsi2" [drivers/memory/emif.ko] undefined!
> > > > WARNING: modpost: suppressed 5 unresolved symbol warnings because there were too many)
> > > 
> > > Intel folks, can you upgrade your build of Clang main to
> > > https://github.com/llvm/llvm-project/commit/4527fba9ad6bc682eceda603150bfaec65ec6916?
> > 
> > Got it, we will update clang to this version 4527fba9.
> 
> Thanks a lot! Is there a way to notice when a compiler upgrade causes a
> lot of similar reports to be generated? If so, would it be possible to

Sorry, this is not supported yet as an automatic approach. So far, we add
pattern to the configuration to indicate low confidence issue after getting
feedback or noticing abnormal pattern. Such issues will be only sent to
llvm@lists.linux.dev.

> send the reports that would be generated to only me and
> llvm@lists.linux.dev? We want to get notified when there would be a lot
> of reports generated after a compiler upgrade (because that usually
> points to a compiler regression) but kernel developers shouldn't get
> notified (since there is not anything for them to do).

Got it, we will think of this to reduce the impact.

> 
> > > The current revision is broken and unrelated changes are getting
> > > notified. There might be one more regression that I am looking into, so
> > > consider not going further than that revision.
> > 
> > Ok, we will keep at 4527fba9, and kindly let us know if we can move to
> > latest head.
> 
> You should be able to move to the latest whenever now, the regression I
> noticed was fixed with a revert (it has since been reapplied with a
> fix).

Thanks for the info.

> 
> Cheers,
> Nathan

^ permalink raw reply

* Re: ERROR: modpost: "__popcountsi2" [fs/bcachefs/bcachefs.ko] undefined!
From: Nathan Chancellor @ 2024-08-09  0:39 UTC (permalink / raw)
  To: Philip Li
  Cc: kernel test robot, Kent Overstreet, llvm, oe-kbuild-all,
	linux-kernel
In-Reply-To: <ZrQ7Vj4hf8Fbxa6j@rli9-mobl>

On Thu, Aug 08, 2024 at 11:28:22AM +0800, Philip Li wrote:
> On Wed, Aug 07, 2024 at 08:36:16AM -0700, Nathan Chancellor wrote:
> > On Wed, Aug 07, 2024 at 04:43:13AM +0800, kernel test robot wrote:
> > > Hi Kent,
> > > 
> > > First bad commit (maybe != root cause):
> > > 
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > > head:   eb5e56d1491297e0881c95824e2050b7c205f0d4
> > > commit: 9ae82fe6ace1b267005758ccfb2347a4a6aa4398 bcachefs: Inline make_bfloat() into __build_ro_aux_tree()
> > > date:   10 months ago
> > > config: arm-randconfig-002-20240805 (https://download.01.org/0day-ci/archive/20240807/202408070432.X6n56VaY-lkp@intel.com/config)
> > > compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 423aec6573df4424f90555468128e17073ddc69e)
> > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240807/202408070432.X6n56VaY-lkp@intel.com/reproduce)
> > > 
> > > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > > the same patch/commit), kindly add following tags
> > > | Reported-by: kernel test robot <lkp@intel.com>
> > > | Closes: https://lore.kernel.org/oe-kbuild-all/202408070432.X6n56VaY-lkp@intel.com/
> > > 
> > > All errors (new ones prefixed by >>, old ones prefixed by <<):
> > ...
> > > ERROR: modpost: "__popcountsi2" [fs/ext4/ext4.ko] undefined!
> > > ERROR: modpost: "__popcountsi2" [fs/fat/fat.ko] undefined!
> > > ERROR: modpost: "__popcountsi2" [fs/hfsplus/hfsplus.ko] undefined!
> > > ERROR: modpost: "__popcountsi2" [fs/xfs/xfs.ko] undefined!
> > > ERROR: modpost: "__popcountsi2" [fs/gfs2/gfs2.ko] undefined!
> > > >> ERROR: modpost: "__popcountsi2" [fs/bcachefs/bcachefs.ko] undefined!
> > > ERROR: modpost: "__aeabi_uldivmod" [fs/bcachefs/bcachefs.ko] undefined!
> > > ERROR: modpost: "__popcountsi2" [drivers/block/virtio_blk.ko] undefined!
> > > ERROR: modpost: "__popcountsi2" [drivers/net/ipa/ipa.ko] undefined!
> > > ERROR: modpost: "__popcountsi2" [drivers/memory/emif.ko] undefined!
> > > WARNING: modpost: suppressed 5 unresolved symbol warnings because there were too many)
> > 
> > Intel folks, can you upgrade your build of Clang main to
> > https://github.com/llvm/llvm-project/commit/4527fba9ad6bc682eceda603150bfaec65ec6916?
> 
> Got it, we will update clang to this version 4527fba9.

Thanks a lot! Is there a way to notice when a compiler upgrade causes a
lot of similar reports to be generated? If so, would it be possible to
send the reports that would be generated to only me and
llvm@lists.linux.dev? We want to get notified when there would be a lot
of reports generated after a compiler upgrade (because that usually
points to a compiler regression) but kernel developers shouldn't get
notified (since there is not anything for them to do).

> > The current revision is broken and unrelated changes are getting
> > notified. There might be one more regression that I am looking into, so
> > consider not going further than that revision.
> 
> Ok, we will keep at 4527fba9, and kindly let us know if we can move to
> latest head.

You should be able to move to the latest whenever now, the regression I
noticed was fixed with a revert (it has since been reapplied with a
fix).

Cheers,
Nathan

^ permalink raw reply

* [leon-rdma:rdma-next 24/37] drivers/infiniband/hw/mlx5/main.c:3219:17: warning: variable 'portnum' is used uninitialized whenever 'for' loop exits because its condition is false
From: kernel test robot @ 2024-08-09  0:20 UTC (permalink / raw)
  To: Chiara Meiohas; +Cc: llvm, oe-kbuild-all, Leon Romanovsky

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git rdma-next
head:   8f867b8b95b4aab452108f77167fae8d7e0d5056
commit: ee9ed4c68fd8349b2c53b0b6452423944da7c822 [24/37] RDMA/mlx5: Use IB set_netdev and get_netdev functions
config: s390-defconfig (https://download.01.org/0day-ci/archive/20240809/202408090843.g93uWYj8-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 4527fba9ad6bc682eceda603150bfaec65ec6916)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240809/202408090843.g93uWYj8-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408090843.g93uWYj8-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/infiniband/hw/mlx5/main.c:8:
   In file included from include/linux/highmem.h:10:
   In file included from include/linux/mm.h:2228:
   include/linux/vmstat.h:500:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     500 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     501 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:507:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     507 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     508 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:519:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     519 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     520 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:528:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     528 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     529 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/infiniband/hw/mlx5/main.c:12:
   In file included from include/linux/pci.h:39:
   In file included from include/linux/io.h:14:
   In file included from arch/s390/include/asm/io.h:93:
   include/asm-generic/io.h:548:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     548 |         val = __raw_readb(PCI_IOBASE + addr);
         |                           ~~~~~~~~~~ ^
   include/asm-generic/io.h:561:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     561 |         val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:37:59: note: expanded from macro '__le16_to_cpu'
      37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
         |                                                           ^
   include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
     102 | #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
         |                                                      ^
   In file included from drivers/infiniband/hw/mlx5/main.c:12:
   In file included from include/linux/pci.h:39:
   In file included from include/linux/io.h:14:
   In file included from arch/s390/include/asm/io.h:93:
   include/asm-generic/io.h:574:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     574 |         val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:35:59: note: expanded from macro '__le32_to_cpu'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                                                           ^
   include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
     115 | #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
         |                                                      ^
   In file included from drivers/infiniband/hw/mlx5/main.c:12:
   In file included from include/linux/pci.h:39:
   In file included from include/linux/io.h:14:
   In file included from arch/s390/include/asm/io.h:93:
   include/asm-generic/io.h:585:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     585 |         __raw_writeb(value, PCI_IOBASE + addr);
         |                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:595:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     595 |         __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   include/asm-generic/io.h:605:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     605 |         __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   include/asm-generic/io.h:693:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     693 |         readsb(PCI_IOBASE + addr, buffer, count);
         |                ~~~~~~~~~~ ^
   include/asm-generic/io.h:701:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     701 |         readsw(PCI_IOBASE + addr, buffer, count);
         |                ~~~~~~~~~~ ^
   include/asm-generic/io.h:709:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     709 |         readsl(PCI_IOBASE + addr, buffer, count);
         |                ~~~~~~~~~~ ^
   include/asm-generic/io.h:718:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     718 |         writesb(PCI_IOBASE + addr, buffer, count);
         |                 ~~~~~~~~~~ ^
   include/asm-generic/io.h:727:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     727 |         writesw(PCI_IOBASE + addr, buffer, count);
         |                 ~~~~~~~~~~ ^
   include/asm-generic/io.h:736:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     736 |         writesl(PCI_IOBASE + addr, buffer, count);
         |                 ~~~~~~~~~~ ^
>> drivers/infiniband/hw/mlx5/main.c:3219:17: warning: variable 'portnum' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized]
    3219 |                                 for (i = 0; i < dev->num_ports; i++) {
         |                                             ^~~~~~~~~~~~~~~~~~
   drivers/infiniband/hw/mlx5/main.c:3229:10: note: uninitialized use occurs here
    3229 |                                                    portnum + 1);
         |                                                    ^~~~~~~
   drivers/infiniband/hw/mlx5/main.c:3219:17: note: remove the condition if it is always true
    3219 |                                 for (i = 0; i < dev->num_ports; i++) {
         |                                             ^~~~~~~~~~~~~~~~~~
   drivers/infiniband/hw/mlx5/main.c:3210:13: note: initialize the variable 'portnum' to silence this warning
    3210 |         int portnum, i, err;
         |                    ^
         |                     = 0
   18 warnings generated.


vim +3219 drivers/infiniband/hw/mlx5/main.c

  3202	
  3203	static int lag_event(struct notifier_block *nb, unsigned long event, void *data)
  3204	{
  3205		struct mlx5_ib_dev *dev = container_of(nb, struct mlx5_ib_dev,
  3206						       lag_events);
  3207		struct mlx5_core_dev *mdev = dev->mdev;
  3208		struct mlx5_ib_port *port;
  3209		struct net_device *ndev;
  3210		int portnum, i, err;
  3211	
  3212		switch (event) {
  3213		case MLX5_DRIVER_EVENT_ACTIVE_BACKUP_LAG_CHANGE_LOWERSTATE:
  3214			ndev = data;
  3215			if (ndev) {
  3216				if (mlx5_lag_is_roce(mdev))
  3217					portnum = 0;
  3218				else { // sriov lag
> 3219					for (i = 0; i < dev->num_ports; i++) {
  3220						port = &dev->port[i];
  3221						if (port->rep && port->rep->vport ==
  3222						    MLX5_VPORT_UPLINK) {
  3223							portnum = i;
  3224							break;
  3225						}
  3226					}
  3227				}
  3228				err = ib_device_set_netdev(&dev->ib_dev, ndev,
  3229							   portnum + 1);
  3230				dev_put(ndev);
  3231				if (err)
  3232					return err;
  3233			}
  3234			break;
  3235		default:
  3236			return NOTIFY_DONE;
  3237		}
  3238		return NOTIFY_OK;
  3239	}
  3240	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply

* [tiwai-sound:for-next 69/83] sound/pcmcia/vx/vxpocket.c:273:12: error: use of undeclared identifier 'pdev'; did you mean 'p_dev'?
From: kernel test robot @ 2024-08-09  0:20 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: llvm, oe-kbuild-all, alsa-devel, Jaroslav Kysela

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
head:   c46fc83e3f3c89f18962e43890de90b1c304747a
commit: 2acbb5e57230830016e0fb2d61886e7a8c7f59ce [69/83] ALSA: vxpocket: Use standard print API
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240809/202408090809.TAYiyrqJ-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240809/202408090809.TAYiyrqJ-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408090809.TAYiyrqJ-lkp@intel.com/

Note: the tiwai-sound/for-next HEAD c46fc83e3f3c89f18962e43890de90b1c304747a builds fine.
      It only hurts bisectability.

All errors (new ones prefixed by >>):

   sound/pcmcia/vx/vxpocket.c:207:8: error: no member named 'dev' in 'struct vx_core'
     207 |         chip->dev = &link->dev;
         |         ~~~~  ^
>> sound/pcmcia/vx/vxpocket.c:273:12: error: use of undeclared identifier 'pdev'; did you mean 'p_dev'?
     273 |                 dev_err(&pdev->dev, "vxpocket: cannot create a card instance\n");
         |                          ^~~~
         |                          p_dev
   include/linux/dev_printk.h:154:44: note: expanded from macro 'dev_err'
     154 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                   ^
   include/linux/dev_printk.h:110:11: note: expanded from macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                         ^
   sound/pcmcia/vx/vxpocket.c:251:49: note: 'p_dev' declared here
     251 | static int vxpocket_probe(struct pcmcia_device *p_dev)
         |                                                 ^
   2 errors generated.


vim +273 sound/pcmcia/vx/vxpocket.c

   247	
   248	
   249	/*
   250	 */
   251	static int vxpocket_probe(struct pcmcia_device *p_dev)
   252	{
   253		struct snd_card *card;
   254		struct snd_vxpocket *vxp;
   255		int i, err;
   256	
   257		/* find an empty slot from the card list */
   258		for (i = 0; i < SNDRV_CARDS; i++) {
   259			if (!(card_alloc & (1 << i)))
   260				break;
   261		}
   262		if (i >= SNDRV_CARDS) {
   263			dev_err(&p_dev->dev, "vxpocket: too many cards found\n");
   264			return -EINVAL;
   265		}
   266		if (! enable[i])
   267			return -ENODEV; /* disabled explicitly */
   268	
   269		/* ok, create a card instance */
   270		err = snd_card_new(&p_dev->dev, index[i], id[i], THIS_MODULE,
   271				   0, &card);
   272		if (err < 0) {
 > 273			dev_err(&pdev->dev, "vxpocket: cannot create a card instance\n");
   274			return err;
   275		}
   276	
   277		err = snd_vxpocket_new(card, ibl[i], p_dev, &vxp);
   278		if (err < 0) {
   279			snd_card_free(card);
   280			return err;
   281		}
   282		card->private_data = vxp;
   283	
   284		vxp->index = i;
   285		card_alloc |= 1 << i;
   286	
   287		vxp->p_dev = p_dev;
   288	
   289		return vxpocket_config(p_dev);
   290	}
   291	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply

* Re: [PATCH 3/3] ARM64: ACPI: Move the NUMA code to drivers/acpi/arm64/
From: kernel test robot @ 2024-08-08 23:49 UTC (permalink / raw)
  To: Hanjun Guo, Sudeep Holla, Lorenzo Pieralisi, Rafael J . Wysocki
  Cc: llvm, oe-kbuild-all, Will Deacon, Catalin Marinas, linux-acpi,
	linux-arm-kernel, Hanjun Guo
In-Reply-To: <20240808131522.1032431-4-guohanjun@huawei.com>

Hi Hanjun,

kernel test robot noticed the following build errors:

[auto build test ERROR on arm64/for-next/core]
[also build test ERROR on rafael-pm/linux-next rafael-pm/bleeding-edge linus/master v6.11-rc2 next-20240808]
[cannot apply to arm-perf/for-next/perf]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Hanjun-Guo/ARM64-ACPI-Remove-the-leftover-acpi_init_cpus/20240808-212154
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
patch link:    https://lore.kernel.org/r/20240808131522.1032431-4-guohanjun%40huawei.com
patch subject: [PATCH 3/3] ARM64: ACPI: Move the NUMA code to drivers/acpi/arm64/
config: riscv-defconfig (https://download.01.org/0day-ci/archive/20240809/202408090735.Oa78ciK8-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 4527fba9ad6bc682eceda603150bfaec65ec6916)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240809/202408090735.Oa78ciK8-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408090735.Oa78ciK8-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/nvme/host/pci.c:7:
>> include/linux/acpi.h:260:19: error: redefinition of 'acpi_numa_get_nid'
     260 | static inline int acpi_numa_get_nid(unsigned int cpu) { return NUMA_NO_NODE; }
         |                   ^
   arch/riscv/include/asm/acpi.h:68:19: note: previous definition is here
      68 | static inline int acpi_numa_get_nid(unsigned int cpu) { return NUMA_NO_NODE; }
         |                   ^
   In file included from drivers/nvme/host/pci.c:9:
   In file included from include/linux/blkdev.h:9:
   In file included from include/linux/blk_types.h:10:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:8:
   In file included from include/linux/cacheflush.h:5:
   In file included from arch/riscv/include/asm/cacheflush.h:9:
   In file included from include/linux/mm.h:2253:
   include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   drivers/nvme/host/pci.c:2982:41: warning: shift count >= width of type [-Wshift-count-overflow]
    2982 |                 dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
         |                                                       ^~~~~~~~~~~~~~~~
   include/linux/dma-mapping.h:77:54: note: expanded from macro 'DMA_BIT_MASK'
      77 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
         |                                                      ^ ~~~
   2 warnings and 1 error generated.


vim +/acpi_numa_get_nid +260 include/linux/acpi.h

   254	
   255	#ifdef CONFIG_ARM64
   256	int acpi_numa_get_nid(unsigned int cpu);
   257	void acpi_map_cpus_to_nodes(void);
   258	void acpi_numa_gicc_affinity_init(struct acpi_srat_gicc_affinity *pa);
   259	#else
 > 260	static inline int acpi_numa_get_nid(unsigned int cpu) { return NUMA_NO_NODE; }
   261	static inline void acpi_map_cpus_to_nodes(void) { }
   262	static inline void
   263	acpi_numa_gicc_affinity_init(struct acpi_srat_gicc_affinity *pa) { }
   264	#endif
   265	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply

* Re: [net-next v1] net: wwan: t7xx: PCIe reset rescan
From: kernel test robot @ 2024-08-08 23:08 UTC (permalink / raw)
  To: Jinjian Song, chandrashekar.devegowda, chiranjeevi.rapolu,
	haijun.liu, m.chetan.kumar, ricardo.martinez, loic.poulain,
	ryazanov.s.a, johannes, davem, edumazet, kuba, pabeni
  Cc: llvm, oe-kbuild-all, linux-kernel, netdev, linux-doc,
	angelogioacchino.delregno, linux-arm-kernel, matthias.bgg, corbet,
	linux-mediatek, danielwinkler, korneld, Jinjian Song
In-Reply-To: <20240808111801.8514-1-jinjian.song@fibocom.com>

Hi Jinjian,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Jinjian-Song/net-wwan-t7xx-PCIe-reset-rescan/20240808-192313
base:   net-next/main
patch link:    https://lore.kernel.org/r/20240808111801.8514-1-jinjian.song%40fibocom.com
patch subject: [net-next v1] net: wwan: t7xx: PCIe reset rescan
config: i386-buildonly-randconfig-004-20240809 (https://download.01.org/0day-ci/archive/20240809/202408090610.w01C56AC-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240809/202408090610.w01C56AC-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408090610.w01C56AC-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/net/wwan/t7xx/t7xx_modem_ops.c:204:13: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
     204 |         } else if (type == PLDR) {
         |                    ^~~~~~~~~~~~
   drivers/net/wwan/t7xx/t7xx_modem_ops.c:215:9: note: uninitialized use occurs here
     215 |         return ret;
         |                ^~~
   drivers/net/wwan/t7xx/t7xx_modem_ops.c:204:9: note: remove the 'if' if its condition is always true
     204 |         } else if (type == PLDR) {
         |                ^~~~~~~~~~~~~~~~~
     205 |                 ret = t7xx_acpi_reset(t7xx_dev, "MRST._RST");
     206 |         } else if (type == FASTBOOT) {
         |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     207 |                 t7xx_host_event_notify(t7xx_dev, FASTBOOT_DL_NOTIFY);
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     208 |                 t7xx_mhccif_h2d_swint_trigger(t7xx_dev, H2D_CH_DEVICE_RESET);
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     209 |                 msleep(FASTBOOT_RESET_DELAY_MS);
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     210 |         }
         |         ~
   drivers/net/wwan/t7xx/t7xx_modem_ops.c:196:9: note: initialize the variable 'ret' to silence this warning
     196 |         int ret;
         |                ^
         |                 = 0
   1 warning generated.


vim +204 drivers/net/wwan/t7xx/t7xx_modem_ops.c

   193	
   194	int t7xx_reset_device(struct t7xx_pci_dev *t7xx_dev, enum reset_type type)
   195	{
   196		int ret;
   197	
   198		pci_save_state(t7xx_dev->pdev);
   199		t7xx_pci_reprobe_early(t7xx_dev);
   200		t7xx_mode_update(t7xx_dev, T7XX_RESET);
   201	
   202		if (type == FLDR) {
   203			ret = t7xx_acpi_reset(t7xx_dev, "_RST");
 > 204		} else if (type == PLDR) {
   205			ret = t7xx_acpi_reset(t7xx_dev, "MRST._RST");
   206		} else if (type == FASTBOOT) {
   207			t7xx_host_event_notify(t7xx_dev, FASTBOOT_DL_NOTIFY);
   208			t7xx_mhccif_h2d_swint_trigger(t7xx_dev, H2D_CH_DEVICE_RESET);
   209			msleep(FASTBOOT_RESET_DELAY_MS);
   210		}
   211	
   212		pci_restore_state(t7xx_dev->pdev);
   213		t7xx_pci_reprobe(t7xx_dev, true);
   214	
   215		return ret;
   216	}
   217	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply

* ❌ FAIL: Test report for master (6.11.0-rc2, mainline.kernel.org-clang, ee9a43b7)
From: cki-project @ 2024-08-08 22:23 UTC (permalink / raw)
  To: llvm

Hi, we tested your kernel and here are the results:

    Overall result: FAILED
             Merge: OK
           Compile: FAILED


Kernel information:
    Commit message: Merge tag 'net-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

You can find all the details about the test run at
    https://datawarehouse.cki-project.org/kcidb/checkouts/redhat:1406410739

One or more kernel builds failed:
    Unrecognized or new issues:
         ppc64le - https://datawarehouse.cki-project.org/kcidb/builds/redhat:1406410739-ppc64le-kernel
           s390x - https://datawarehouse.cki-project.org/kcidb/builds/redhat:1406410739-s390x-kernel
          x86_64 (debug) - https://datawarehouse.cki-project.org/kcidb/builds/redhat:1406410739-x86_64-kernel-debug


If you find a failure unrelated to your changes, please ask the test maintainer to review it.
This will prevent the failures from being incorrectly reported in the future.

Please reply to this email if you have any questions about the tests that we
ran or if you have any suggestions on how to make future tests more effective.

        ,-.   ,-.
       ( C ) ( K )  Continuous
        `-',-.`-'   Kernel
          ( I )     Integration
           `-'
______________________________________________________________________________


^ permalink raw reply

* [tiwai-sound:for-next 32/83] sound/pcmcia/vx/vxpocket.c:208:8: error: no member named 'dev' in 'struct vx_core'
From: kernel test robot @ 2024-08-08 22:17 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: llvm, oe-kbuild-all, alsa-devel, Jaroslav Kysela

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
head:   c46fc83e3f3c89f18962e43890de90b1c304747a
commit: b426b3ba9f6fe17990893c5324727dd217d420b6 [32/83] ALSA: vx_core: Drop unused dev field
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240809/202408090607.58bm8VK5-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240809/202408090607.58bm8VK5-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408090607.58bm8VK5-lkp@intel.com/

Note: the tiwai-sound/for-next HEAD c46fc83e3f3c89f18962e43890de90b1c304747a builds fine.
      It only hurts bisectability.

All errors (new ones prefixed by >>):

>> sound/pcmcia/vx/vxpocket.c:208:8: error: no member named 'dev' in 'struct vx_core'
     208 |         chip->dev = &link->dev;
         |         ~~~~  ^
   1 error generated.


vim +208 sound/pcmcia/vx/vxpocket.c

6d00a3127972e7 Takashi Iwai      2005-06-30  170  
6d00a3127972e7 Takashi Iwai      2005-06-30  171  
6d00a3127972e7 Takashi Iwai      2005-06-30  172  /*
6d00a3127972e7 Takashi Iwai      2005-06-30  173   * configuration callback
6d00a3127972e7 Takashi Iwai      2005-06-30  174   */
6d00a3127972e7 Takashi Iwai      2005-06-30  175  
15b99ac1729503 Dominik Brodowski 2006-03-31  176  static int vxpocket_config(struct pcmcia_device *link)
6d00a3127972e7 Takashi Iwai      2005-06-30  177  {
af26367f69a474 Takashi Iwai      2005-11-17  178  	struct vx_core *chip = link->priv;
7c5af6ffd69bb2 Dominik Brodowski 2009-10-24  179  	int ret;
6d00a3127972e7 Takashi Iwai      2005-06-30  180  
6d00a3127972e7 Takashi Iwai      2005-06-30  181  	snd_printdd(KERN_DEBUG "vxpocket_config called\n");
6d00a3127972e7 Takashi Iwai      2005-06-30  182  
6d00a3127972e7 Takashi Iwai      2005-06-30  183  	/* redefine hardware record according to the VERSION1 string */
af2b3b503ad1b0 Dominik Brodowski 2006-10-25  184  	if (!strcmp(link->prod_id[1], "VX-POCKET")) {
6d00a3127972e7 Takashi Iwai      2005-06-30  185  		snd_printdd("VX-pocket is detected\n");
6d00a3127972e7 Takashi Iwai      2005-06-30  186  	} else {
6d00a3127972e7 Takashi Iwai      2005-06-30  187  		snd_printdd("VX-pocket 440 is detected\n");
6d00a3127972e7 Takashi Iwai      2005-06-30  188  		/* overwrite the hardware information */
6d00a3127972e7 Takashi Iwai      2005-06-30  189  		chip->hw = &vxp440_hw;
6d00a3127972e7 Takashi Iwai      2005-06-30  190  		chip->type = vxp440_hw.type;
6d00a3127972e7 Takashi Iwai      2005-06-30  191  		strcpy(chip->card->driver, vxp440_hw.name);
6d00a3127972e7 Takashi Iwai      2005-06-30  192  	}
6d00a3127972e7 Takashi Iwai      2005-06-30  193  
90abdc3b973229 Dominik Brodowski 2010-07-24  194  	ret = pcmcia_request_io(link);
7c5af6ffd69bb2 Dominik Brodowski 2009-10-24  195  	if (ret)
db0a5214b8d6cc Takashi Iwai      2014-09-09  196  		goto failed_preirq;
7c5af6ffd69bb2 Dominik Brodowski 2009-10-24  197  
db0a5214b8d6cc Takashi Iwai      2014-09-09  198  	ret = request_threaded_irq(link->irq, snd_vx_irq_handler,
db0a5214b8d6cc Takashi Iwai      2014-09-09  199  				   snd_vx_threaded_irq_handler,
db0a5214b8d6cc Takashi Iwai      2014-09-09  200  				   IRQF_SHARED, link->devname, link->priv);
7c5af6ffd69bb2 Dominik Brodowski 2009-10-24  201  	if (ret)
db0a5214b8d6cc Takashi Iwai      2014-09-09  202  		goto failed_preirq;
7c5af6ffd69bb2 Dominik Brodowski 2009-10-24  203  
1ac71e5a35eebe Dominik Brodowski 2010-07-29  204  	ret = pcmcia_enable_device(link);
7c5af6ffd69bb2 Dominik Brodowski 2009-10-24  205  	if (ret)
7c5af6ffd69bb2 Dominik Brodowski 2009-10-24  206  		goto failed;
6d00a3127972e7 Takashi Iwai      2005-06-30  207  
dd2e5a156525f1 Dominik Brodowski 2009-11-03 @208  	chip->dev = &link->dev;
6d00a3127972e7 Takashi Iwai      2005-06-30  209  
9a017a910346af Dominik Brodowski 2010-07-24  210  	if (snd_vxpocket_assign_resources(chip, link->resource[0]->start,
9a017a910346af Dominik Brodowski 2010-07-24  211  						link->irq) < 0)
6d00a3127972e7 Takashi Iwai      2005-06-30  212  		goto failed;
6d00a3127972e7 Takashi Iwai      2005-06-30  213  
79ca4f3f625e14 Takashi Iwai      2006-04-12  214  	return 0;
6d00a3127972e7 Takashi Iwai      2005-06-30  215  
6d00a3127972e7 Takashi Iwai      2005-06-30  216   failed:
db0a5214b8d6cc Takashi Iwai      2014-09-09  217  	free_irq(link->irq, link->priv);
db0a5214b8d6cc Takashi Iwai      2014-09-09  218  failed_preirq:
fba395eee7d3f3 Dominik Brodowski 2006-03-31  219  	pcmcia_disable_device(link);
15b99ac1729503 Dominik Brodowski 2006-03-31  220  	return -ENODEV;
6d00a3127972e7 Takashi Iwai      2005-06-30  221  }
6d00a3127972e7 Takashi Iwai      2005-06-30  222  

:::::: The code at line 208 was first introduced by commit
:::::: dd2e5a156525f11754d9b1e0583f6bb49c253d62 pcmcia: remove deprecated handle_to_dev() macro

:::::: TO: Dominik Brodowski <linux@dominikbrodowski.net>
:::::: CC: Dominik Brodowski <linux@dominikbrodowski.net>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply

* [leon-rdma:rdma-next 25/37] drivers/infiniband/core/nldev.c:2782:2: warning: unannotated fall-through between switch labels
From: kernel test robot @ 2024-08-08 22:17 UTC (permalink / raw)
  To: Chiara Meiohas; +Cc: llvm, oe-kbuild-all, Leon Romanovsky

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git rdma-next
head:   8f867b8b95b4aab452108f77167fae8d7e0d5056
commit: 917eed2ac05a89c1c663e22dc744b8ae64d84ac7 [25/37] RDMA/nldev: Add support for RDMA monitoring
config: i386-buildonly-randconfig-004-20240809 (https://download.01.org/0day-ci/archive/20240809/202408090634.vvrFPOUe-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240809/202408090634.vvrFPOUe-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408090634.vvrFPOUe-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/infiniband/core/nldev.c:2782:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
    2782 |         default:
         |         ^
   drivers/infiniband/core/nldev.c:2782:2: note: insert 'break;' to avoid fall-through
    2782 |         default:
         |         ^
         |         break; 
   1 warning generated.


vim +2782 drivers/infiniband/core/nldev.c

  2756	
  2757	static void rdma_nl_notify_err_msg(struct ib_device *device, u32 port_num,
  2758					    enum rdma_nl_notify_event_type type)
  2759	{
  2760		struct net_device *netdev;
  2761	
  2762		switch (type) {
  2763		case RDMA_REGISTER_EVENT:
  2764			dev_warn_ratelimited(&device->dev,
  2765					     "Failed to send RDMA monitor register device event\n");
  2766			break;
  2767		case RDMA_UNREGISTER_EVENT:
  2768			dev_warn_ratelimited(&device->dev,
  2769					     "Failed to send RDMA monitor unregister device event\n");
  2770			break;
  2771		case RDMA_NETDEV_ATTACH_EVENT:
  2772			netdev = ib_device_get_netdev(device, port_num);
  2773			dev_warn_ratelimited(&device->dev,
  2774					     "Failed to send RDMA monitor netdev attach event: port %d netdev %d\n",
  2775					     port_num, netdev->ifindex);
  2776			dev_put(netdev);
  2777			break;
  2778		case RDMA_NETDEV_DETACH_EVENT:
  2779			dev_warn_ratelimited(&device->dev,
  2780					     "Failed to send RDMA monitor netdev detach event: port %d\n",
  2781					     port_num);
> 2782		default:
  2783			break;
  2784		};
  2785	}
  2786	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply


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