From: Namjae Jeon namjae.jeon@samsung.com
mainline inclusion from mainline-5.15-rc1 commit 97d7f3d3e0e719db42c4f413531e4e417fadf0c1 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA
Reference: https://git.kernel.org/torvalds/linux/c/97d7f3d3e0e7
-------------------------------
Fix additional warnings from checkpatch.pl --strict.
Signed-off-by: Namjae Jeon namjae.jeon@samsung.com Signed-off-by: Steve French stfrench@microsoft.com Signed-off-by: Jason Yan yanaijie@huawei.com Signed-off-by: Zhong Jinghua zhongjinghua@huawei.com --- fs/cifsd/mgmt/share_config.c | 2 +- fs/cifsd/mgmt/share_config.h | 6 +++--- fs/cifsd/mgmt/tree_connect.c | 2 +- fs/cifsd/mgmt/user_session.h | 4 +--- 4 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/fs/cifsd/mgmt/share_config.c b/fs/cifsd/mgmt/share_config.c index 910d03516b73..bcc4ae4381b9 100644 --- a/fs/cifsd/mgmt/share_config.c +++ b/fs/cifsd/mgmt/share_config.c @@ -157,7 +157,7 @@ static struct ksmbd_share_config *share_config_request(char *name) ret = kern_path(share->path, 0, &share->vfs_path); if (ret) { ksmbd_debug(SMB, "failed to access '%s'\n", - share->path); + share->path); /* Avoid put_path() */ kfree(share->path); share->path = NULL; diff --git a/fs/cifsd/mgmt/share_config.h b/fs/cifsd/mgmt/share_config.h index 49ca89667991..953befc94e84 100644 --- a/fs/cifsd/mgmt/share_config.h +++ b/fs/cifsd/mgmt/share_config.h @@ -34,7 +34,7 @@ struct ksmbd_share_config { #define KSMBD_SHARE_INVALID_GID ((__u16)-1)
static inline int share_config_create_mode(struct ksmbd_share_config *share, - umode_t posix_mode) + umode_t posix_mode) { if (!share->force_create_mode) { if (!posix_mode) @@ -46,7 +46,7 @@ static inline int share_config_create_mode(struct ksmbd_share_config *share, }
static inline int share_config_directory_mode(struct ksmbd_share_config *share, - umode_t posix_mode) + umode_t posix_mode) { if (!share->force_directory_mode) { if (!posix_mode) @@ -64,7 +64,7 @@ static inline int test_share_config_flag(struct ksmbd_share_config *share, return share->flags & flag; }
-extern void __ksmbd_share_config_put(struct ksmbd_share_config *share); +void __ksmbd_share_config_put(struct ksmbd_share_config *share);
static inline void ksmbd_share_config_put(struct ksmbd_share_config *share) { diff --git a/fs/cifsd/mgmt/tree_connect.c b/fs/cifsd/mgmt/tree_connect.c index b9cd8fc46e5e..029a9e81e844 100644 --- a/fs/cifsd/mgmt/tree_connect.c +++ b/fs/cifsd/mgmt/tree_connect.c @@ -62,7 +62,7 @@ ksmbd_tree_conn_connect(struct ksmbd_session *sess, char *share_name) status.tree_conn = tree_conn;
ret = xa_err(xa_store(&sess->tree_conns, tree_conn->id, tree_conn, - GFP_KERNEL)); + GFP_KERNEL)); if (ret) { status.ret = -ENOMEM; goto out_error; diff --git a/fs/cifsd/mgmt/user_session.h b/fs/cifsd/mgmt/user_session.h index 1709563d718b..761bf4776cf1 100644 --- a/fs/cifsd/mgmt/user_session.h +++ b/fs/cifsd/mgmt/user_session.h @@ -12,7 +12,7 @@ #include "../smb_common.h" #include "../ntlmssp.h"
-#define CIFDS_SESSION_FLAG_SMB2 (1 << 1) +#define CIFDS_SESSION_FLAG_SMB2 BIT(1)
#define PREAUTH_HASHVALUE_SIZE 64
@@ -54,8 +54,6 @@ struct ksmbd_session { struct ida tree_conn_ida; struct list_head rpc_handle_list;
- - __u8 smb3encryptionkey[SMB3_ENC_DEC_KEY_SIZE]; __u8 smb3decryptionkey[SMB3_ENC_DEC_KEY_SIZE]; __u8 smb3signingkey[SMB3_SIGN_KEY_SIZE];