]> git.ipfire.org Git - thirdparty/linux.git/commit
smb: smbdirect: introduce smbdirect_public.h with prototypes
authorStefan Metzmacher <metze@samba.org>
Mon, 27 Oct 2025 15:57:39 +0000 (16:57 +0100)
committerSteve French <stfrench@microsoft.com>
Thu, 16 Apr 2026 02:58:20 +0000 (21:58 -0500)
commitb2261ceedd4a4831957732ebae5ad33bf5c7fc80
treea4974be252d3ce238166b5f4b5c82ab5d7547cb7
parent5e4bf7fadd4a608cace7604b720483f051f8176f
smb: smbdirect: introduce smbdirect_public.h with prototypes

smbdirect_public.h contains functions which will be still be
eported when we move to an smbdirect.ko.

For now this uses the SMBDIRECT_USE_INLINE_C_FILES code path
and marks all function as '__maybe_unused static',
but this will make further changes easier.

Note this generates the following things from checkpatch.pl,
so I passed --ignore=FILE_PATH_CHANGES,EXPORT_SYMBOL,COMPLEX_MACRO

 ERROR: Macros with complex values should be enclosed in parentheses
 #514: FILE: fs/smb/common/smbdirect/smbdirect_public.h:18:
 +#define __SMBDIRECT_PUBLIC__ __maybe_unused static

 WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
 #515: FILE: fs/smb/common/smbdirect/smbdirect_public.h:19:
 +#define __SMBDIRECT_EXPORT_SYMBOL__(__sym)

 WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
 #518: FILE: fs/smb/common/smbdirect/smbdirect_public.h:22:
 +#define __SMBDIRECT_EXPORT_SYMBOL__(__sym) EXPORT_SYMBOL_FOR_MODULES(__sym, "cifs,ksmbd")

This is exactly what we want here, so we should ignore the
checkpatch.pl problems.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/common/smbdirect/smbdirect_accept.c
fs/smb/common/smbdirect/smbdirect_connect.c
fs/smb/common/smbdirect/smbdirect_connection.c
fs/smb/common/smbdirect/smbdirect_debug.c
fs/smb/common/smbdirect/smbdirect_internal.h
fs/smb/common/smbdirect/smbdirect_mr.c
fs/smb/common/smbdirect/smbdirect_public.h [new file with mode: 0644]
fs/smb/common/smbdirect/smbdirect_rw.c
fs/smb/common/smbdirect/smbdirect_socket.c
fs/smb/common/smbdirect/smbdirect_socket.h