All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
To: Oleg Drokin <oleg.drokin@intel.com>,
	Andreas Dilger <andreas.dilger@intel.com>
Cc: lustre-devel@lists.lustre.org, linux-kernel@vger.kernel.org,
	Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Subject: [lustre cleanups 3/6] Clean up another C warnining:
Date: Tue,  1 Dec 2015 17:05:16 -0500	[thread overview]
Message-ID: <1449007519-73974-4-git-send-email-Valdis.Kletnieks@vt.edu> (raw)
In-Reply-To: <1449007519-73974-1-git-send-email-Valdis.Kletnieks@vt.edu>

drivers/staging/lustre/lustre/fid/../include/lustre_cfg.h: In function 'lustre_cfg_free':
drivers/staging/lustre/lustre/fid/../include/lustre_cfg.h:253:6: warning: variable 'len' set but not used [-Wunused-but-set-variable]
  int len;

Yep, we're just gonna call kfree, no need to calculate len. Bye-bye.

Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
---
diff --git a/drivers/staging/lustre/lustre/include/lustre_cfg.h b/drivers/staging/lustre/lustre/include/lustre_cfg.h
index eb6b292b7b25..d30d8b054c92 100644
--- a/drivers/staging/lustre/lustre/include/lustre_cfg.h
+++ b/drivers/staging/lustre/lustre/include/lustre_cfg.h
@@ -252,10 +252,6 @@ static inline struct lustre_cfg *lustre_cfg_new(int cmd,
 
 static inline void lustre_cfg_free(struct lustre_cfg *lcfg)
 {
-	int len;
-
-	len = lustre_cfg_len(lcfg->lcfg_bufcount, lcfg->lcfg_buflens);
-
 	kfree(lcfg);
 	return;
 }
-- 
2.6.3


WARNING: multiple messages have this Message-ID (diff)
From: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
To: lustre-devel@lists.lustre.org
Subject: [lustre-devel] [lustre cleanups 3/6] Clean up another C warnining:
Date: Tue,  1 Dec 2015 17:05:16 -0500	[thread overview]
Message-ID: <1449007519-73974-4-git-send-email-Valdis.Kletnieks@vt.edu> (raw)
In-Reply-To: <1449007519-73974-1-git-send-email-Valdis.Kletnieks@vt.edu>

drivers/staging/lustre/lustre/fid/../include/lustre_cfg.h: In function 'lustre_cfg_free':
drivers/staging/lustre/lustre/fid/../include/lustre_cfg.h:253:6: warning: variable 'len' set but not used [-Wunused-but-set-variable]
  int len;

Yep, we're just gonna call kfree, no need to calculate len. Bye-bye.

Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
---
diff --git a/drivers/staging/lustre/lustre/include/lustre_cfg.h b/drivers/staging/lustre/lustre/include/lustre_cfg.h
index eb6b292b7b25..d30d8b054c92 100644
--- a/drivers/staging/lustre/lustre/include/lustre_cfg.h
+++ b/drivers/staging/lustre/lustre/include/lustre_cfg.h
@@ -252,10 +252,6 @@ static inline struct lustre_cfg *lustre_cfg_new(int cmd,
 
 static inline void lustre_cfg_free(struct lustre_cfg *lcfg)
 {
-	int len;
-
-	len = lustre_cfg_len(lcfg->lcfg_bufcount, lcfg->lcfg_buflens);
-
 	kfree(lcfg);
 	return;
 }
-- 
2.6.3

  parent reply	other threads:[~2015-12-01 22:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01 22:05 [lustre cleanups 0/6] Patch series to make lustre safe(r) for W=1 compiles Valdis Kletnieks
2015-12-01 22:05 ` [lustre-devel] " Valdis Kletnieks
2015-12-01 22:05 ` [lustre cleanups 1/6] Swap inline/const to kill 272 warnings Valdis Kletnieks
2015-12-01 22:05   ` [lustre-devel] " Valdis Kletnieks
2015-12-01 22:05 ` [lustre cleanups 2/6] Fix set-but-unused whinge Valdis Kletnieks
2015-12-01 22:05   ` [lustre-devel] " Valdis Kletnieks
2015-12-01 22:05 ` Valdis Kletnieks [this message]
2015-12-01 22:05   ` [lustre-devel] [lustre cleanups 3/6] Clean up another C warnining: Valdis Kletnieks
2015-12-01 22:05 ` [lustre cleanups 4/6] Fix another C compiler whine: Valdis Kletnieks
2015-12-01 22:05   ` [lustre-devel] " Valdis Kletnieks
2015-12-01 22:05 ` [lustre cleanups 5/6] Nuke an unsigned >= 0 assert Valdis Kletnieks
2015-12-01 22:05   ` [lustre-devel] " Valdis Kletnieks
2015-12-01 22:05 ` [lustre cleanups 6/6] Nuke another " Valdis Kletnieks
2015-12-01 22:05   ` [lustre-devel] " Valdis Kletnieks
2015-12-04  6:23 ` [lustre cleanups 0/6] Patch series to make lustre safe(r) for W=1 compiles Dilger, Andreas
2015-12-04  6:23   ` [lustre-devel] " Dilger, Andreas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1449007519-73974-4-git-send-email-Valdis.Kletnieks@vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=andreas.dilger@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    --cc=oleg.drokin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.