linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs: remove unused actions
@ 2020-01-21  7:34 Alex Shi
  2020-01-23 23:28 ` kbuild test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Shi @ 2020-01-21  7:34 UTC (permalink / raw)
  Cc: Chris Mason, Josef Bacik, David Sterba, linux-btrfs, linux-kernel

Seems no one care ret and features in func btrfs_sysfs_feature_update,
so better to remove them.

Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Chris Mason <clm@fb.com> 
Cc: Josef Bacik <josef@toxicpanda.com> 
Cc: David Sterba <dsterba@suse.com> 
Cc: linux-btrfs@vger.kernel.org 
Cc: linux-kernel@vger.kernel.org 
---
 fs/btrfs/sysfs.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
index 5ebbe8a5ee76..93f870727aa7 100644
--- a/fs/btrfs/sysfs.c
+++ b/fs/btrfs/sysfs.c
@@ -1148,13 +1148,10 @@ void btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info,
 {
 	struct btrfs_fs_devices *fs_devs;
 	struct kobject *fsid_kobj;
-	u64 features;
-	int ret;
 
 	if (!fs_info)
 		return;
 
-	features = get_features(fs_info, set);
 	ASSERT(bit & supported_feature_masks[set]);
 
 	fs_devs = fs_info->fs_devices;
@@ -1168,7 +1165,7 @@ void btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info,
 	 * to use sysfs_update_group but some refactoring is needed first.
 	 */
 	sysfs_remove_group(fsid_kobj, &btrfs_feature_attr_group);
-	ret = sysfs_create_group(fsid_kobj, &btrfs_feature_attr_group);
+	sysfs_create_group(fsid_kobj, &btrfs_feature_attr_group);
 }
 
 int __init btrfs_init_sysfs(void)
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] btrfs: remove unused actions
  2020-01-21  7:34 [PATCH] btrfs: remove unused actions Alex Shi
@ 2020-01-23 23:28 ` kbuild test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2020-01-23 23:28 UTC (permalink / raw)
  To: Alex Shi
  Cc: kbuild-all, Chris Mason, Josef Bacik, David Sterba, linux-btrfs,
	linux-kernel

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

Hi Alex,

I love your patch! Perhaps something to improve:

[auto build test WARNING on v5.5-rc7]
[also build test WARNING on next-20200123]
[cannot apply to btrfs/next]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Alex-Shi/btrfs-remove-unused-actions/20200124-043621
base:    def9d2780727cec3313ed3522d0123158d87224d
config: powerpc-defconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   fs//btrfs/sysfs.c: In function 'btrfs_sysfs_feature_update':
>> fs//btrfs/sysfs.c:1168:2: warning: ignoring return value of 'sysfs_create_group', declared with attribute warn_unused_result [-Wunused-result]
     sysfs_create_group(fsid_kobj, &btrfs_feature_attr_group);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/sysfs_create_group +1168 fs//btrfs/sysfs.c

  1140	
  1141	
  1142	/*
  1143	 * Change per-fs features in /sys/fs/btrfs/UUID/features to match current
  1144	 * values in superblock. Call after any changes to incompat/compat_ro flags
  1145	 */
  1146	void btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info,
  1147			u64 bit, enum btrfs_feature_set set)
  1148	{
  1149		struct btrfs_fs_devices *fs_devs;
  1150		struct kobject *fsid_kobj;
  1151	
  1152		if (!fs_info)
  1153			return;
  1154	
  1155		ASSERT(bit & supported_feature_masks[set]);
  1156	
  1157		fs_devs = fs_info->fs_devices;
  1158		fsid_kobj = &fs_devs->fsid_kobj;
  1159	
  1160		if (!fsid_kobj->state_initialized)
  1161			return;
  1162	
  1163		/*
  1164		 * FIXME: this is too heavy to update just one value, ideally we'd like
  1165		 * to use sysfs_update_group but some refactoring is needed first.
  1166		 */
  1167		sysfs_remove_group(fsid_kobj, &btrfs_feature_attr_group);
> 1168		sysfs_create_group(fsid_kobj, &btrfs_feature_attr_group);
  1169	}
  1170	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25639 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-23 23:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-21  7:34 [PATCH] btrfs: remove unused actions Alex Shi
2020-01-23 23:28 ` kbuild test robot

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).