2018-05-24 08:55:44

by kernel test robot

[permalink] [raw]
Subject: [cifs:for-next 16/19] fs/cifs/cifsfs.c:903:25: sparse: symbol 'smb3_fs_type' was not declared. Should it be static?

tree: git://git.samba.org/sfrench/cifs-2.6.git for-next
head: fd65f4d1d6b9daaf5265f965640b221701d088f8
commit: 64a051adf5911e8a71a46413c60beaf17ce7143d [16/19] smb3: add module alias for smb3 to cifs.ko
reproduce:
# apt-get install sparse
git checkout 64a051adf5911e8a71a46413c60beaf17ce7143d
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

fs/cifs/cifsglob.h:1658:41: sparse: symbol 'cifs_tcp_ses_list' was not declared. Should it be static?
fs/cifs/cifsglob.h:1669:41: sparse: symbol 'cifs_tcp_ses_lock' was not declared. Should it be static?
fs/cifs/cifsglob.h:1681:28: sparse: symbol 'GlobalCurrentXid' was not declared. Should it be static?
fs/cifs/cifsglob.h:1682:28: sparse: symbol 'GlobalTotalActiveXid' was not declared. Should it be static?
fs/cifs/cifsglob.h:1683:28: sparse: symbol 'GlobalMaxActiveXid' was not declared. Should it be static?
fs/cifs/cifsglob.h:1684:26: sparse: symbol 'GlobalMid_Lock' was not declared. Should it be static?
fs/cifs/cifsglob.h:1689:24: sparse: symbol 'sesInfoAllocCount' was not declared. Should it be static?
fs/cifs/cifsglob.h:1690:24: sparse: symbol 'tconInfoAllocCount' was not declared. Should it be static?
fs/cifs/cifsglob.h:1691:24: sparse: symbol 'tcpSesAllocCount' was not declared. Should it be static?
fs/cifs/cifsglob.h:1692:24: sparse: symbol 'tcpSesReconnectCount' was not declared. Should it be static?
fs/cifs/cifsglob.h:1693:24: sparse: symbol 'tconInfoReconnectCount' was not declared. Should it be static?
fs/cifs/cifsglob.h:1696:24: sparse: symbol 'bufAllocCount' was not declared. Should it be static?
fs/cifs/cifsglob.h:1698:24: sparse: symbol 'totBufAllocCount' was not declared. Should it be static?
fs/cifs/cifsglob.h:1699:24: sparse: symbol 'totSmBufAllocCount' was not declared. Should it be static?
fs/cifs/cifsglob.h:1701:24: sparse: symbol 'smBufAllocCount' was not declared. Should it be static?
fs/cifs/cifsglob.h:1702:24: sparse: symbol 'midCount' was not declared. Should it be static?
fs/cifs/cifsglob.h:1705:20: sparse: symbol 'enable_oplocks' was not declared. Should it be static?
fs/cifs/cifsglob.h:1706:20: sparse: symbol 'lookupCacheEnabled' was not declared. Should it be static?
fs/cifs/cifsglob.h:1707:28: sparse: symbol 'global_secflags' was not declared. Should it be static?
fs/cifs/cifsglob.h:1709:28: sparse: symbol 'sign_CIFS_PDUs' was not declared. Should it be static?
fs/cifs/cifsglob.h:1710:20: sparse: symbol 'linuxExtEnabled' was not declared. Should it be static?
fs/cifs/cifsglob.h:1711:28: sparse: symbol 'CIFSMaxBufSize' was not declared. Should it be static?
fs/cifs/cifsglob.h:1712:28: sparse: symbol 'cifs_min_rcv' was not declared. Should it be static?
fs/cifs/cifsglob.h:1713:28: sparse: symbol 'cifs_min_small' was not declared. Should it be static?
fs/cifs/cifsglob.h:1714:28: sparse: symbol 'cifs_max_pending' was not declared. Should it be static?
fs/cifs/cifsglob.h:1717:30: sparse: symbol 'uidtree' was not declared. Should it be static?
fs/cifs/cifsglob.h:1718:30: sparse: symbol 'gidtree' was not declared. Should it be static?
fs/cifs/cifsglob.h:1719:26: sparse: symbol 'siduidlock' was not declared. Should it be static?
fs/cifs/cifsglob.h:1720:26: sparse: symbol 'sidgidlock' was not declared. Should it be static?
fs/cifs/cifsglob.h:1721:30: sparse: symbol 'siduidtree' was not declared. Should it be static?
fs/cifs/cifsglob.h:1722:30: sparse: symbol 'sidgidtree' was not declared. Should it be static?
fs/cifs/cifsglob.h:1723:26: sparse: symbol 'uidsidlock' was not declared. Should it be static?
fs/cifs/cifsglob.h:1724:26: sparse: symbol 'gidsidlock' was not declared. Should it be static?
>> fs/cifs/cifsfs.c:903:25: sparse: symbol 'smb3_fs_type' was not declared. Should it be static?

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation


2018-05-24 08:55:12

by Fengguang Wu

[permalink] [raw]
Subject: [RFC PATCH cifs] smb3: smb3_fs_type can be static


Fixes: 64a051adf591 ("smb3: add module alias for smb3 to cifs.ko")
Signed-off-by: kbuild test robot <[email protected]>
---
cifsfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 645bb88..f0a68e9 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -900,7 +900,7 @@ struct file_system_type cifs_fs_type = {
};
MODULE_ALIAS_FS("cifs");

-struct file_system_type smb3_fs_type = {
+static struct file_system_type smb3_fs_type = {
.owner = THIS_MODULE,
.name = "smb3",
.mount = cifs_do_mount,

2018-05-24 09:37:05

by Steve French

[permalink] [raw]
Subject: Re: [RFC PATCH cifs] smb3: smb3_fs_type can be static

original patch already updated with the missing "static"

so shouldn't see this warning anymore (also cleaned up a few more warnings)

On Thu, May 24, 2018 at 3:53 AM, kbuild test robot
<[email protected]> wrote:
>
> Fixes: 64a051adf591 ("smb3: add module alias for smb3 to cifs.ko")
> Signed-off-by: kbuild test robot <[email protected]>
> ---
> cifsfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
> index 645bb88..f0a68e9 100644
> --- a/fs/cifs/cifsfs.c
> +++ b/fs/cifs/cifsfs.c
> @@ -900,7 +900,7 @@ struct file_system_type cifs_fs_type = {
> };
> MODULE_ALIAS_FS("cifs");
>
> -struct file_system_type smb3_fs_type = {
> +static struct file_system_type smb3_fs_type = {
> .owner = THIS_MODULE,
> .name = "smb3",
> .mount = cifs_do_mount,
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html



--
Thanks,

Steve