Message ID | 75aec6f877a89c63478073861cf277bbfcb90453.1680786859.git.bcodding@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | RFC: NFS sysfs mounts to rpc client structure | expand |
Hi Benjamin,
kernel test robot noticed the following build warnings:
[auto build test WARNING on trondmy-nfs/linux-next]
[also build test WARNING on linus/master v6.3-rc5 next-20230406]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Benjamin-Coddington/NFS-rename-nfs_client_kset-to-nfs_kset/20230406-221247
base: git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
patch link: https://lore.kernel.org/r/75aec6f877a89c63478073861cf277bbfcb90453.1680786859.git.bcodding%40redhat.com
patch subject: [PATCH 2/6] NFS: rename nfs_client_kobj to nfs_net_kobj
config: i386-randconfig-s001-20230403 (https://download.01.org/0day-ci/archive/20230407/202304070607.zNXFIg0W-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://github.com/intel-lab-lkp/linux/commit/27e42c94f90782f5d27b8de8e18d701e99764a03
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Benjamin-Coddington/NFS-rename-nfs_client_kset-to-nfs_kset/20230406-221247
git checkout 27e42c94f90782f5d27b8de8e18d701e99764a03
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 olddefconfig
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash fs/nfs/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304070607.zNXFIg0W-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> fs/nfs/sysfs.c:20:16: sparse: sparse: symbol 'nfs_net_kobj' was not declared. Should it be static?
diff --git a/fs/nfs/sysfs.c b/fs/nfs/sysfs.c index 81d98727b79f..a496e26fcfb7 100644 --- a/fs/nfs/sysfs.c +++ b/fs/nfs/sysfs.c @@ -17,7 +17,7 @@ #include "netns.h" #include "sysfs.h" -struct kobject *nfs_client_kobj; +struct kobject *nfs_net_kobj; static struct kset *nfs_kset; static void nfs_netns_object_release(struct kobject *kobj) @@ -58,8 +58,8 @@ int nfs_sysfs_init(void) nfs_kset = kset_create_and_add("nfs", NULL, fs_kobj); if (!nfs_kset) return -ENOMEM; - nfs_client_kobj = nfs_netns_object_alloc("net", nfs_kset, NULL); - if (!nfs_client_kobj) { + nfs_net_kobj = nfs_netns_object_alloc("net", nfs_kset, NULL); + if (!nfs_net_kobj) { kset_unregister(nfs_kset); nfs_kset = NULL; return -ENOMEM; @@ -69,7 +69,7 @@ int nfs_sysfs_init(void) void nfs_sysfs_exit(void) { - kobject_put(nfs_client_kobj); + kobject_put(nfs_net_kobj); kset_unregister(nfs_kset); } @@ -172,7 +172,7 @@ void nfs_netns_sysfs_setup(struct nfs_net *netns, struct net *net) { struct nfs_netns_client *clp; - clp = nfs_netns_client_alloc(nfs_client_kobj, net); + clp = nfs_netns_client_alloc(nfs_net_kobj, net); if (clp) { netns->nfs_client = clp; kobject_uevent(&clp->kobject, KOBJ_ADD);
Match the variable names to the sysfs structure. Signed-off-by: Benjamin Coddington <bcodding@redhat.com> --- fs/nfs/sysfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)