On Thu, Feb 11, 2021 at 06:52:36PM -0800, Randy Dunlap wrote:
>>> arch/alpha/lib/csum_partial_copy.c:328:1: error: no
previous prototype for 'csum_and_copy_from_user' [-Werror=missing-prototypes]
> 328 | csum_and_copy_from_user(const void __user *src, void *dst, int len,
> | ^~~~~~~~~~~~~~~~~~~~~~~
> arch/alpha/lib/csum_partial_copy.c:375:1: error: no previous prototype for
'csum_partial_copy_nocheck' [-Werror=missing-prototypes]
> 375 | csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum
sum)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
I can't reproduce this (wrong version of gcc) but it looks like adding
#include <asm/checksum.h>
to arch/alpha/lib/csum_partial_copy.c should fix the warnings.
I'd rather go with net/checksum.h; converting all includes outside of
net/checksum.h itself would have to wait, but let's not breed more of
those without a good reason...