Re: [PATCH] af_unix: move proto info out of CONFIG_BPF_SYSCALL

From: Simon Horman

Date: Wed Jun 24 2026 - 14:21:35 EST


On Tue, Jun 23, 2026 at 01:49:40PM +0100, Ben Dooks wrote:
> These two structs are defined even if CONFIG_BPF_SYSCALL but
> the header does not export them, so declare them anyway and
> move the check for CONFIG_BPF_SYSCALL lower into the file.
>
> This removes the two sparse warnings:
> net/unix/af_unix.c:1060:14: warning: symbol 'unix_dgram_proto' was not declared. Should it be static?
> net/unix/af_unix.c:1071:14: warning: symbol 'unix_stream_proto' was not declared. Should it be static?
>
> This change is less complicated than trying to make those two
> structs static based on the CONFIG_BPF_SYSCALL configuration.
>
> Signed-off-by: Ben Dooks <ben.dooks@xxxxxxxxxxxxxxx>

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>

Probably this is net-next material and if so
should be reposted once net-next reopens next week.