From: Jakub Kicinski <kuba@kernel.org>
To: Matt Jan <zoo868e@gmail.com>
Cc: davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Matt Jan <matt_jan@trendmicro.com>
Subject: Re: [PATCH] connector: Fix invalid conversion in cn_proc.h
Date: Mon, 13 May 2024 17:53:55 -0700 [thread overview]
Message-ID: <20240513175355.2b34918e@kernel.org> (raw)
In-Reply-To: <20240510154919.874-1-zoo868e@gmail.com>
On Fri, 10 May 2024 23:49:19 +0800 Matt Jan wrote:
> From: Matt Jan <matt_jan@trendmicro.com>
>
> The implicit conversion from unsigned int to enum
> proc_cn_event is invalid, so explicitly cast it
> for compilation in a C++ compiler.
> /usr/include/linux/cn_proc.h: In function 'proc_cn_event valid_event(proc_cn_event)':
> /usr/include/linux/cn_proc.h:72:17: error: invalid conversion from 'unsigned int' to 'proc_cn_event' [-fpermissive]
> 72 | ev_type &= PROC_EVENT_ALL;
> | ^
> | |
> | unsigned int
>
> Signed-off-by: Matt Jan <zoo868e@gmail.com>
Why not. But please fix the checkpatch warning:
CHECK: No space is necessary after a cast
#36: FILE: include/uapi/linux/cn_proc.h:72:
+ return (enum proc_cn_event) (ev_type & PROC_EVENT_ALL);
--
pw-bot: cr
next prev parent reply other threads:[~2024-05-14 0:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-10 15:49 [PATCH] connector: Fix invalid conversion in cn_proc.h Matt Jan
2024-05-14 0:53 ` Jakub Kicinski [this message]
2024-05-14 4:10 ` [PATCH v2] " Matt Jan
2024-05-24 9:40 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240513175355.2b34918e@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matt_jan@trendmicro.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=zoo868e@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).