Skip to content

Commit af22194

Browse files
zoo868egregkh
authored andcommitted
connector: Fix invalid conversion in cn_proc.h
[ Upstream commit 06e785a ] 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> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent ad7c0bc commit af22194

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

include/uapi/linux/cn_proc.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ struct proc_input {
6969

7070
static inline enum proc_cn_event valid_event(enum proc_cn_event ev_type)
7171
{
72-
ev_type &= PROC_EVENT_ALL;
73-
return ev_type;
72+
return (enum proc_cn_event)(ev_type & PROC_EVENT_ALL);
7473
}
7574

7675
/*

0 commit comments

Comments
 (0)