aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@infradead.org>2017-01-28 19:05:23 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-03 07:01:38 -0500
commit62898c2d7efc1029d77b5fabe968871524f0297c (patch)
treee89773e7e354bd8b2b55b8cd85a1709a1e2baef5
parent1a8dded1a3fcfb0c865a35688c86aa45bac37393 (diff)
staging: lustre: obd: move s3 in lmd_parse to inner loop
Building the lustre client with W=1 reports the following error: obdclass/obd_mount.c: In function lmd_parse: obdclass/obd_mount.c:880: warning: variable set but not used The solution is to move s3 to the inner loop where it is only used. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8378 Reviewed-on: https://review.whamcloud.com/23820 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/lustre/obdclass/obd_mount.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/obdclass/obd_mount.c b/drivers/staging/lustre/lustre/obdclass/obd_mount.c
index 2283e920d839..8e0d4b1d86dc 100644
--- a/drivers/staging/lustre/lustre/obdclass/obd_mount.c
+++ b/drivers/staging/lustre/lustre/obdclass/obd_mount.c
@@ -877,7 +877,7 @@ static int lmd_parse_mgs(struct lustre_mount_data *lmd, char **ptr)
877 */ 877 */
878static int lmd_parse(char *options, struct lustre_mount_data *lmd) 878static int lmd_parse(char *options, struct lustre_mount_data *lmd)
879{ 879{
880 char *s1, *s2, *s3, *devname = NULL; 880 char *s1, *s2, *devname = NULL;
881 struct lustre_mount_data *raw = (struct lustre_mount_data *)options; 881 struct lustre_mount_data *raw = (struct lustre_mount_data *)options;
882 int rc = 0; 882 int rc = 0;
883 883
@@ -906,6 +906,7 @@ static int lmd_parse(char *options, struct lustre_mount_data *lmd)
906 while (*s1) { 906 while (*s1) {
907 int clear = 0; 907 int clear = 0;
908 int time_min = OBD_RECOVERY_TIME_MIN; 908 int time_min = OBD_RECOVERY_TIME_MIN;
909 char *s3;
909 910
910 /* Skip whitespace and extra commas */ 911 /* Skip whitespace and extra commas */
911 while (*s1 == ' ' || *s1 == ',') 912 while (*s1 == ' ' || *s1 == ',')