Skip to content

Commit

Permalink
ipv6: mcast: make annotations for ip6_mc_msfget() consistent
Browse files Browse the repository at this point in the history
Commit 931ca7a ("ip*_mc_gsfget(): lift copyout of struct group_filter
into callers") adjusted the type annotations for ip6_mc_msfget() at its
declaration, but missed the type annotations at its definition.

Hence, sparse complains on ./net/ipv6/mcast.c:

  mcast.c:550:5: error: symbol 'ip6_mc_msfget' redeclared with different type \
  (incompatible argument 3 (different address spaces))

Make ip6_mc_msfget() annotations consistent, which also resolves this
warning from sparse:

  mcast.c:607:34: warning: incorrect type in argument 1 (different address spaces)
  mcast.c:607:34:    expected void [noderef] __user *to
  mcast.c:607:34:    got struct __kernel_sockaddr_storage *p

No functional change. No change in object code.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Link: https://lore.kernel.org/r/20201028115349.6855-1-lukas.bulwahn@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Lukas Bulwahn authored and Jakub Kicinski committed Oct 30, 2020
1 parent 09b5678 commit 400490a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/mcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf,
}

int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf,
struct sockaddr_storage *p)
struct sockaddr_storage __user *p)
{
int err, i, count, copycount;
const struct in6_addr *group;
Expand Down

0 comments on commit 400490a

Please sign in to comment.