linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: CIFS <linux-cifs@vger.kernel.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	samba-technical <samba-technical@lists.samba.org>
Subject: Re: [cifs:for-next 1/1] fs/smbfs/ioctl.c:324:10: warning: variable 'caps' set but not used
Date: Mon, 13 Sep 2021 18:34:44 -0500	[thread overview]
Message-ID: <CAH2r5ms=ZmOWDNo1huZajeRrSmz8Cr0gwtx+Tt85d-f-6SYiZQ@mail.gmail.com> (raw)
In-Reply-To: <202109131721.EnzYJS4k-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 4911 bytes --]

[PATCH] cifs: fix incorrect kernel doc comments

Correct kernel-doc comments pointed out by the
automated kernel test robot - see attached patch.

Reported-by: kernel test robot <lkp@intel.com>

On Mon, Sep 13, 2021 at 4:13 AM kernel test robot <lkp@intel.com> wrote:
>
> Hi Steve,
>
> First bad commit (maybe != root cause):
>
> tree:   git://git.samba.org/sfrench/cifs-2.6.git for-next
> head:   bba805a46c91e7a8a1d04704e5409f890acf8b66
> commit: bba805a46c91e7a8a1d04704e5409f890acf8b66 [1/1] cifs: rename fs/cifs directory to fs/smbfs
> config: hexagon-randconfig-r045-20210913 (attached as .config)
> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a)
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git remote add cifs git://git.samba.org/sfrench/cifs-2.6.git
>         git fetch --no-tags cifs for-next
>         git checkout bba805a46c91e7a8a1d04704e5409f890acf8b66
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=hexagon
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> >> fs/smbfs/ioctl.c:324:10: warning: variable 'caps' set but not used [-Wunused-but-set-variable]
>            __u64   caps;
>                    ^
>    1 warning generated.
> --
> >> fs/smbfs/connect.c:1093: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
>     * Returns true if srcaddr isn't specified and rhs isn't specified, or
>    fs/smbfs/connect.c:1558: warning: Function parameter or member 'ses' not described in 'cifs_setup_ipc'
>    fs/smbfs/connect.c:1558: warning: Function parameter or member 'ctx' not described in 'cifs_setup_ipc'
>    fs/smbfs/connect.c:1618: warning: Function parameter or member 'ses' not described in 'cifs_free_ipc'
>    fs/smbfs/connect.c:1864: warning: Function parameter or member 'server' not described in 'cifs_get_smb_ses'
>    fs/smbfs/connect.c:1864: warning: Function parameter or member 'ctx' not described in 'cifs_get_smb_ses'
>    fs/smbfs/connect.c:2087: warning: Function parameter or member 'ses' not described in 'cifs_get_tcon'
>    fs/smbfs/connect.c:2087: warning: Function parameter or member 'ctx' not described in 'cifs_get_tcon'
>    fs/smbfs/connect.c:3046: warning: Function parameter or member 'xid' not described in 'expand_dfs_referral'
>    fs/smbfs/connect.c:3046: warning: Function parameter or member 'ses' not described in 'expand_dfs_referral'
>    fs/smbfs/connect.c:3046: warning: Function parameter or member 'ctx' not described in 'expand_dfs_referral'
>    fs/smbfs/connect.c:3046: warning: Function parameter or member 'cifs_sb' not described in 'expand_dfs_referral'
>    fs/smbfs/connect.c:3046: warning: Function parameter or member 'ref_path' not described in 'expand_dfs_referral'
>
>
> vim +/caps +324 fs/smbfs/ioctl.c
>
> 7ba3d1cdb7988c fs/cifs/ioctl.c Steve French    2021-05-02  312
> f9ddcca4cf7d95 fs/cifs/ioctl.c Steve French    2008-05-15  313  long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
> ^1da177e4c3f41 fs/cifs/ioctl.c Linus Torvalds  2005-04-16  314  {
> 496ad9aa8ef448 fs/cifs/ioctl.c Al Viro         2013-01-23  315          struct inode *inode = file_inode(filep);
> 7e7db86c7e1088 fs/cifs/ioctl.c Steve French    2019-09-19  316          struct smb3_key_debug_info pkey_inf;
> ^1da177e4c3f41 fs/cifs/ioctl.c Linus Torvalds  2005-04-16  317          int rc = -ENOTTY; /* strange error - but the precedent */
> 6d5786a34d98bf fs/cifs/ioctl.c Pavel Shilovsky 2012-06-20  318          unsigned int xid;
> ba00ba64cf0895 fs/cifs/ioctl.c Jeff Layton     2010-09-20  319          struct cifsFileInfo *pSMBFile = filep->private_data;
> 96daf2b09178d8 fs/cifs/ioctl.c Steve French    2011-05-27  320          struct cifs_tcon *tcon;
> a77592a70081ed fs/cifs/ioctl.c Ronnie Sahlberg 2020-07-09  321          struct tcon_link *tlink;
> d26c2ddd335696 fs/cifs/ioctl.c Steve French    2020-02-06  322          struct cifs_sb_info *cifs_sb;
> f654bac2227adc fs/cifs/ioctl.c Steve French    2005-04-28  323          __u64   ExtAttrBits = 0;
> 618763958b2291 fs/cifs/ioctl.c Jeff Layton     2010-11-08 @324          __u64   caps;
>
> :::::: The code at line 324 was first introduced by commit
> :::::: 618763958b2291a09057dbfa553da6ded93dcfad cifs: make cifs_ioctl handle NULL filp->private_data correctly
>
> :::::: TO: Jeff Layton <jlayton@redhat.com>
> :::::: CC: Steve French <sfrench@us.ibm.com>
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org



-- 
Thanks,

Steve

[-- Attachment #2: 0001-cifs-fix-incorrect-kernel-doc-comments.patch --]
[-- Type: text/x-patch, Size: 3224 bytes --]

From 4c51de1e8f928a5b05248714d832d7d991ac319a Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Mon, 13 Sep 2021 18:29:46 -0500
Subject: [PATCH] cifs: fix incorrect kernel doc comments

Correct kernel-doc comments pointed out by the
automated kernel test robot.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
---
 fs/cifs/connect.c | 12 ++++++++++--
 fs/cifs/ioctl.c   |  2 +-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 399a0f084573..7881115cfbee 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1089,7 +1089,7 @@ cifs_demultiplex_thread(void *p)
 	module_put_and_exit(0);
 }
 
-/**
+/*
  * Returns true if srcaddr isn't specified and rhs isn't specified, or
  * if srcaddr is specified and matches the IP address of the rhs argument
  */
@@ -1549,6 +1549,9 @@ static int match_session(struct cifs_ses *ses, struct smb3_fs_context *ctx)
 
 /**
  * cifs_setup_ipc - helper to setup the IPC tcon for the session
+ * @ses: smb session to issue the request on
+ * @ctx: the superblock configuration context to use for building the
+ *       new tree connection for the IPC (interprocess communication RPC)
  *
  * A new IPC connection is made and stored in the session
  * tcon_ipc. The IPC tcon has the same lifetime as the session.
@@ -1604,6 +1607,7 @@ cifs_setup_ipc(struct cifs_ses *ses, struct smb3_fs_context *ctx)
 
 /**
  * cifs_free_ipc - helper to release the session IPC tcon
+ * @ses: smb session to unmount the IPC from
  *
  * Needs to be called everytime a session is destroyed.
  *
@@ -1854,6 +1858,8 @@ cifs_set_cifscreds(struct smb3_fs_context *ctx __attribute__((unused)),
 
 /**
  * cifs_get_smb_ses - get a session matching @ctx data from @server
+ * @server: server to setup the session to
+ * @ctx: superblock configuration context to use to setup the session
  *
  * This function assumes it is being called from cifs_mount() where we
  * already got a server reference (server refcount +1). See
@@ -2064,6 +2070,8 @@ cifs_put_tcon(struct cifs_tcon *tcon)
 
 /**
  * cifs_get_tcon - get a tcon matching @ctx data from @ses
+ * @ses: smb session to issue the request on
+ * @ctx: the superblock configuration context to use for building the
  *
  * - tcon refcount is the number of mount points using the tcon.
  * - ses refcount is the number of tcon using the session.
@@ -3029,7 +3037,7 @@ build_unc_path_to_root(const struct smb3_fs_context *ctx,
 	return full_path;
 }
 
-/**
+/*
  * expand_dfs_referral - Perform a dfs referral query and update the cifs_sb
  *
  * If a referral is found, cifs_sb->ctx->mount_options will be (re-)allocated
diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c
index 44ae99454fb3..0359b604bdbc 100644
--- a/fs/cifs/ioctl.c
+++ b/fs/cifs/ioctl.c
@@ -358,7 +358,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
 			if (pSMBFile == NULL)
 				break;
 			tcon = tlink_tcon(pSMBFile->tlink);
-			caps = le64_to_cpu(tcon->fsUnixInfo.Capability);
+			/* caps = le64_to_cpu(tcon->fsUnixInfo.Capability); */
 
 			if (get_user(ExtAttrBits, (int __user *)arg)) {
 				rc = -EFAULT;
-- 
2.30.2


      reply	other threads:[~2021-09-13 23:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13  9:10 [cifs:for-next 1/1] fs/smbfs/ioctl.c:324:10: warning: variable 'caps' set but not used kernel test robot
2021-09-13 23:34 ` Steve French [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH2r5ms=ZmOWDNo1huZajeRrSmz8Cr0gwtx+Tt85d-f-6SYiZQ@mail.gmail.com' \
    --to=smfrench@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=samba-technical@lists.samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).