Commit 38c9d1a1 authored by goutongchen's avatar goutongchen
Browse files

tcp_comp: Fix compilation warnings generated by calling inet_sk

uos inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7TYVV



-------------------------------------------------

The following warnings are reported when compiling the kernel:

net/ipv4/tcp_comp.c: In function ‘tcp_syn_comp_enabled’:
./include/linux/container_of.h:33:2: error: initialization discards ‘const’ qualifier
from pointer target type [-Werror=discarded-qualifiers]
   33 |  _Generic(ptr,       \
      |  ^~~~~~~~
./include/net/inet_sock.h:310:22: note: in expansion of macro ‘container_of_const’
  310 | #define inet_sk(ptr) container_of_const(ptr, struct inet_sock, sk)
      |                      ^~~~~~~~~~~~~~~~~~
net/ipv4/tcp_comp.c:85:27: note: in expansion of macro ‘inet_sk’
   85 |  struct inet_sock *inet = inet_sk(sk);
      |                           ^~~~~~~
net/ipv4/tcp_comp.c: In function ‘tcp_synack_comp_enabled’:
./include/linux/container_of.h:33:2: error: initialization discards ‘const’ qualifier
from pointer target type [-Werror=discarded-qualifiers]
   33 |  _Generic(ptr,       \
      |  ^~~~~~~~
./include/net/inet_sock.h:310:22: note: in expansion of macro ‘container_of_const’
  310 | #define inet_sk(ptr) container_of_const(ptr, struct inet_sock, sk)
      |                      ^~~~~~~~~~~~~~~~~~
net/ipv4/tcp_comp.c:94:27: note: in expansion of macro ‘inet_sk’
   94 |  struct inet_sock *inet = inet_sk(sk);
      |                           ^~~~~~~

here we fix it

Signed-off-by: default avatargoutongchen <goutongchen@uniontech.com>
parent f00fcf81
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment