Re: [PATCH v2 1/2] smb: client: let enum smb_eio_trace grow past 128 entries

Namjae Jeon <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.kernel.cifs,gmane.network.samba.internals
Message-ID <CAKYAXd_L597uCWw3VF-pGoiYAhuAEN5hfVgX0OEdyK+yZpKRgw@mail.gmail.com>
On Fri, Aug 21, 2026 at 11:25 AM Bryam Vargas via B4 Relay
<[email protected]> wrote:
>
> From: Bryam Vargas <[email protected]>
>
> enum smb_eio_trace is __mode(byte) and the list has held exactly 128
> entries since it was added, so the last sits at index 127 and a 129th has
> no representable value.  clang gives the enum a signed underlying type and
> converts the overflowing value to -128; x86_64 defconfig turns that into a
> build failure because it sets CONFIG_WERROR=y, and where it does not, the
> value stops matching the __print_symbolic() table and those events print a
> raw number.  gcc picks an unsigned underlying type and reports nothing.
>
> Drop the attribute.  On x86_64 the record does not grow: the field
> precedes an unsigned long at offset 8 of struct trace_event_raw_smb3_eio,
> so sizeof() stays 32 either way.
>
> Reported-by: kernel test robot <[email protected]>
> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
> Fixes: f80ac7eda1cf ("cifs: Add a tracepoint to log EIO errors")
> Cc: [email protected]
> Signed-off-by: Bryam Vargas <[email protected]>
> ---
>  fs/smb/client/trace.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/smb/client/trace.h b/fs/smb/client/trace.h
> index 5b21ad3c15fb..0a91d3aaa079 100644
> --- a/fs/smb/client/trace.h
> +++ b/fs/smb/client/trace.h
> @@ -213,7 +213,7 @@
>  #define EM(a, b) a,
>  #define E_(a, b) a
>
> -enum smb_eio_trace             { smb_eio_traces } __mode(byte);
> +enum smb_eio_trace             { smb_eio_traces };
Looks ok. But these patches should be squashed because 0001 patch is
only required to make the new enum added by 0002 patch build
correctly.
Thanks.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.