From patchwork Thu Dec 8 22:14:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 1713929 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=linux-cifs-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=QgTr2c/Z; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4NSpPN6LQ9z23pG for ; Fri, 9 Dec 2022 09:15:20 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229982AbiLHWPS (ORCPT ); Thu, 8 Dec 2022 17:15:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230081AbiLHWPP (ORCPT ); Thu, 8 Dec 2022 17:15:15 -0500 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A85379C07 for ; Thu, 8 Dec 2022 14:15:12 -0800 (PST) Received: by mail-lf1-x129.google.com with SMTP id bp15so4142852lfb.13 for ; Thu, 08 Dec 2022 14:15:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=g9xmW1UggWnZTp85GQL/J0JoRg9OP7OyQyiVbELdzIg=; b=QgTr2c/ZKcGE9eyoGLmAAlYTVlbcRFVPOyR6SVG6F/0NPZKR7e9ObYd2BtaWDfM7h+ F33stNV8cws+k2bMxKJj5dAqLG5wMDt5rqMH+MH/O6L3j9ed0Eo/Xxg2Jw3hY6KBgx9Q y+0DI/IU7KrCsFcnbgKQyDqs60OkH5ZZklnoObpvaMHjGuUkcsZTXTtozE/ZytZ1Jesr SHZPQ7cSvdv0Jtr9YEqcIpMjclGpdoli4YMgsI5gAdmoKHhwZN10FvAUqQKwGCvYyaFy JC3hTYgV6K9Lp4hQzGmtd/hMsv8LnBQ/ssAGdvU0H1jCzG1kUAK0drHi7r3vw5W9MFKa a3Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=g9xmW1UggWnZTp85GQL/J0JoRg9OP7OyQyiVbELdzIg=; b=hETrUZPtargJPd5SjzWMo282FJA3kp5l4Vxh4UpWr+A/xFVbVgY9wRfFVgCy3yaLnZ BwX/4PnIH0eqFFKI0IJBUByBXgURi/OtriEdfuwQS5wiN46aKsWxSTIE6vMyxSaUzwLO EH0oSkKBpt7wl0Jlr5UL4yMtS0dAEPvnqdVTAhQnm9O2hm0yfLA9wr6P4Nr0eje7778u 4SHdhX+0Ka3VXfaP/Hp8iCVcbRY836VSQ9CWvN2e+Ut4mUiuqrk+5lhwuTqUXRvVIVmI hYDp0Cu2TgAOCg6mgC0mh1oALbEBykE4lqLwV/WJai87//hq92IDqGYTTPOsZdLD7Cgr AfLw== X-Gm-Message-State: ANoB5pnTsWuqsJdPPymhwTYHBpQ0JzRrr43Td/JIp8AWrmBR8NaS6AP/ 5pDf7xi2WZh6To+GdL6vpV6KJ5hgh3ctT68a/j34mHH+8OY= X-Google-Smtp-Source: AA0mqf7yU5e8J8Uw4y78wT5Ll4da6U0OhpdB1aRn+WjKiwkaxp6Iaue8nQtw21JAJePUDcG2NhApX4EC2LMYsfgHHt4= X-Received: by 2002:ac2:4bd1:0:b0:4a2:4dc3:a2e with SMTP id o17-20020ac24bd1000000b004a24dc30a2emr26932422lfq.403.1670537710041; Thu, 08 Dec 2022 14:15:10 -0800 (PST) MIME-Version: 1.0 From: Steve French Date: Thu, 8 Dec 2022 16:14:58 -0600 Message-ID: Subject: [[PATCH][CIFS] minor cleanup of some headers pointed out by checkpatch To: CIFS X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org See attached for minor cleanup of some cifs.ko headers From ecde7850040cc6579170d36ffe6a40c90fd7e4c9 Mon Sep 17 00:00:00 2001 From: Steve French Date: Thu, 8 Dec 2022 16:11:00 -0600 Subject: [PATCH] cifs: minor cleanup of some headers checkpatch showed formatting problems with extra spaces, and extra semicolon and some missing blank lines in some cifs headers. Signed-off-by: Steve French --- fs/cifs/cifs_ioctl.h | 2 +- fs/cifs/cifsfs.h | 4 ++-- fs/cifs/cifsglob.h | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/fs/cifs/cifs_ioctl.h b/fs/cifs/cifs_ioctl.h index d86d78d5bfdc..332588e77c31 100644 --- a/fs/cifs/cifs_ioctl.h +++ b/fs/cifs/cifs_ioctl.h @@ -108,7 +108,7 @@ struct smb3_notify_info { #define CIFS_IOC_NOTIFY _IOW(CIFS_IOCTL_MAGIC, 9, struct smb3_notify) #define CIFS_DUMP_FULL_KEY _IOWR(CIFS_IOCTL_MAGIC, 10, struct smb3_full_key_debug_info) #define CIFS_IOC_NOTIFY_INFO _IOWR(CIFS_IOCTL_MAGIC, 11, struct smb3_notify_info) -#define CIFS_IOC_SHUTDOWN _IOR ('X', 125, __u32) +#define CIFS_IOC_SHUTDOWN _IOR('X', 125, __u32) /* * Flags for going down operation diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h index 388b745a978e..00a573e0ad0e 100644 --- a/fs/cifs/cifsfs.h +++ b/fs/cifs/cifsfs.h @@ -105,8 +105,8 @@ extern int cifs_lock(struct file *, int, struct file_lock *); extern int cifs_fsync(struct file *, loff_t, loff_t, int); extern int cifs_strict_fsync(struct file *, loff_t, loff_t, int); extern int cifs_flush(struct file *, fl_owner_t id); -extern int cifs_file_mmap(struct file * , struct vm_area_struct *); -extern int cifs_file_strict_mmap(struct file * , struct vm_area_struct *); +extern int cifs_file_mmap(struct file *file, struct vm_area_struct *vma); +extern int cifs_file_strict_mmap(struct file *file, struct vm_area_struct *vma); extern const struct file_operations cifs_dir_ops; extern int cifs_dir_open(struct inode *inode, struct file *file); extern int cifs_readdir(struct file *file, struct dir_context *ctx); diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 1420acf987f0..cd3a173e65b1 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -785,6 +785,7 @@ static inline unsigned int in_flight(struct TCP_Server_Info *server) { unsigned int num; + spin_lock(&server->req_lock); num = server->in_flight; spin_unlock(&server->req_lock); @@ -795,6 +796,7 @@ static inline bool has_credits(struct TCP_Server_Info *server, int *credits, int num_credits) { int num; + spin_lock(&server->req_lock); num = *credits; spin_unlock(&server->req_lock); @@ -1025,7 +1027,7 @@ struct cifs_ses { struct TCP_Server_Info *server; /* pointer to server info */ int ses_count; /* reference counter */ enum ses_status_enum ses_status; /* updates protected by cifs_tcp_ses_lock */ - unsigned overrideSecFlg; /* if non-zero override global sec flags */ + unsigned int overrideSecFlg; /* if non-zero override global sec flags */ char *serverOS; /* name of operating system underlying server */ char *serverNOS; /* name of network operating system of server */ char *serverDomain; /* security realm of server */ @@ -1381,7 +1383,7 @@ struct cifsFileInfo { __u32 pid; /* process id who opened file */ struct cifs_fid fid; /* file id from remote */ struct list_head rlist; /* reconnect list */ - /* BB add lock scope info here if needed */ ; + /* BB add lock scope info here if needed */ /* lock scope id (0 if none) */ struct dentry *dentry; struct tcon_link *tlink; @@ -1769,6 +1771,7 @@ static inline void free_dfs_info_array(struct dfs_info3_param *param, int number_of_items) { int i; + if ((number_of_items == 0) || (param == NULL)) return; for (i = 0; i < number_of_items; i++) { -- 2.34.1