Skip to contentSkip to conversation

afs: remove unused variable 'afs_voltypes'

PATCH In review YueHaibing 2 participants 2 messages Aug 9, 2019 Afs filesystem

lore
Share & tools
lore

YueHaibing

author
#0 lore raw

PATCH 1/1 afs: remove unused variable 'afs_voltypes'

fs/afs/volume.c:15:26: warning:
afs_voltypes defined but not used [-Wunused-const-variable=]

It is not used since commit d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation")

---
 fs/afs/volume.c | 2 --
 1 file changed, 2 deletions(-)
fs/afs/volume.c +0 -2
index 1a41430..92ca5e2 100644
@@ -12,8 +12,6 @@
 unsigned __read_mostly afs_volume_gc_delay = 10;
 unsigned __read_mostly afs_volume_record_life = 60 * 60;
 
-static const char *const afs_voltypes[] = { "R/W", "R/O", "BAK" };
-
 /*
  * Allocate a volume record and load it up from a vldb record.
  */
Signature · 1 line
2.7.4
#1 lore raw

This is true but I believe afs_voltypes should be used in the afs_put_volume() and afs_deactivate_volume() enter() tracing.

If it will not be used for those calls then removal is correct.

Jeffrey Altman

Quoted 18 lines · YueHaibing

fs/afs/volume.c:15:26: warning:
afs_voltypes defined but not used [-Wunused-const-variable=]

It is not used since commit d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation")

---
 fs/afs/volume.c | 2 --
 1 file changed, 2 deletions(-)
fs/afs/volume.c +0 -0
index 1a41430..92ca5e2 100644

fs/afs/volume.c line 17

Quoted 8 lines
fs/afs/volume.c +0 -2
@@ -12,8 +12,6 @@
 unsigned __read_mostly afs_volume_gc_delay = 10;
 unsigned __read_mostly afs_volume_record_life = 60 * 60;
 
-static const char *const afs_voltypes[] = { "R/W", "R/O", "BAK" };
-
 /*
  * Allocate a volume record and load it up from a vldb record.
  */

begin:vcard
fn:Jeffrey Altman
n:Altman;Jeffrey
org:AuriStor, Inc.
adr:;;255 W 94TH ST STE 6B;New York;NY;10025-6985;United States email;internet:[email protected]
title:CEO
tel;work:+1-212-769-9018 url:https://www.linkedin.com/in/jeffreyaltman/ version:2.1
end:vcard