Commit 32a60868 authored by David Howells's avatar David Howells Committed by Steve French
Browse files

cifs: Do some preparation prior to organising the function declarations



Make some preparatory cleanups prior to running a script to organise the
function declarations within the fs/smb/client/ headers.  These include:

 (1) Remove "inline" from the dummy cifs_proc_init/clean() functions as
     they are in a .c file.

 (2) Move should_compress()'s kdoc comment to the .c file and remove kdoc
     markers from the comments.

 (3) Rename CIFS_ALLOW_INSECURE_LEGACY in #endif comments to have CONFIG_
     on the front to allow the script to recognise it.

 (4) Don't let comments have bare words at the left margin as that confused
     the simplistic function detection code in the script.

 (5) Adjust some argument lists so that when and if the cleanup script is
     run they don't end up over 100 chars.

 (6) Fix a few comments to have missing '*' added or the "*/" moved to
     their own lines so that checkpatch doesn't moan over the cleanup
     script patch.

 (7) Move struct cifs_calc_sig_ctx to cifsglob.h.

 (8) Remove some __KERNEL__ conditionals.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Reviewed-by: default avatarPaulo Alcantara (Red Hat) <pc@manguebit.org>
cc: linux-cifs@vger.kernel.org
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent f80ac7ed
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1318,11 +1318,11 @@ static const struct proc_ops cifs_mount_params_proc_ops = {
};

#else
inline void cifs_proc_init(void)
void cifs_proc_init(void)
{
}

inline void cifs_proc_clean(void)
void cifs_proc_clean(void)
{
}
#endif /* PROC_FS */
+0 −2
Original line number Diff line number Diff line
@@ -27,10 +27,8 @@ struct cifs_spnego_msg {
	uint8_t		data[];
};

#ifdef __KERNEL__
extern struct key_type cifs_spnego_key_type;
extern struct key *cifs_get_spnego_key(struct cifs_ses *sesInfo,
				       struct TCP_Server_Info *server);
#endif /* KERNEL */

#endif /* _CIFS_SPNEGO_H */
+0 −3
Original line number Diff line number Diff line
@@ -54,7 +54,6 @@
#define SFM_MAP_UNI_RSVD	1
#define SFU_MAP_UNI_RSVD	2

#ifdef __KERNEL__
int cifs_from_utf16(char *to, const __le16 *from, int tolen, int fromlen,
		    const struct nls_table *cp, int map_type);
int cifs_utf16_bytes(const __le16 *from, int maxbytes,
@@ -69,8 +68,6 @@ extern int cifs_remap(struct cifs_sb_info *cifs_sb);
extern __le16 *cifs_strndup_to_utf16(const char *src, const int maxlen,
				     int *utf16_len, const struct nls_table *cp,
				     int remap);
#endif

wchar_t cifs_toupper(wchar_t in);

#endif /* _CIFS_UNICODE_H */
+3 −2
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@
#include <linux/splice.h>
#include <linux/uuid.h>
#include <linux/xattr.h>
#include <linux/mm.h>
#include <linux/key-type.h>
#include <uapi/linux/magic.h>
#include <net/ipv6.h>
#include "cifsfs.h"
@@ -35,10 +37,9 @@
#define DECLARE_GLOBALS_HERE
#include "cifsglob.h"
#include "cifsproto.h"
#include "smb2proto.h"
#include "cifs_debug.h"
#include "cifs_fs_sb.h"
#include <linux/mm.h>
#include <linux/key-type.h>
#include "cifs_spnego.h"
#include "fscache.h"
#ifdef CONFIG_CIFS_DFS_UPCALL
+7 −1
Original line number Diff line number Diff line
@@ -2118,7 +2118,7 @@ extern struct smb_version_operations smb1_operations;
extern struct smb_version_values smb1_values;
extern struct smb_version_operations smb20_operations;
extern struct smb_version_values smb20_values;
#endif /* CIFS_ALLOW_INSECURE_LEGACY */
#endif /* CONFIG_CIFS_ALLOW_INSECURE_LEGACY */
extern struct smb_version_operations smb21_operations;
extern struct smb_version_values smb21_values;
extern struct smb_version_values smbdefault_values;
@@ -2286,4 +2286,10 @@ static inline void mid_execute_callback(struct TCP_Server_Info *server,
	 (le32_to_cpu((tcon)->fsAttrInfo.Attributes) & \
	  FILE_SUPPORTS_REPARSE_POINTS))

struct cifs_calc_sig_ctx {
	struct md5_ctx *md5;
	struct hmac_sha256_ctx *hmac;
	struct shash_desc *shash;
};

#endif	/* _CIFS_GLOB_H */
Loading