mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Halcrow <mhalcrow@us.ibm.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, toml@us.ibm.com
Subject: [PATCH 6/7] eCryptfs: Remove unnecessary variable initializations
Date: Wed, 25 Jul 2007 15:52:38 -0500	[thread overview]
Message-ID: <20070725205238.GW14091@halcrow.austin.ibm.com> (raw)
In-Reply-To: <20070725204855.GQ14091@halcrow.austin.ibm.com>

Andrew Morton wrote:
> >       struct mutex *tfm_mutex = NULL;
>
> This initialisation looks like it's here to kill bogus gcc warning
> (if it is, it should have been commented).  Please investigate
> uninitialized_var() and __maybe_unused sometime.

Remove some unnecessary variable initializations. There may be a few
more such intializations remaining in the code base; a future patch
will take care of those.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
---
 fs/ecryptfs/keystore.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c
index a718136..d9739bc 100644
--- a/fs/ecryptfs/keystore.c
+++ b/fs/ecryptfs/keystore.c
@@ -1009,7 +1009,7 @@ decrypt_passphrase_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
 {
 	struct scatterlist dst_sg;
 	struct scatterlist src_sg;
-	struct mutex *tfm_mutex = NULL;
+	struct mutex *tfm_mutex;
 	struct blkcipher_desc desc = {
 		.flags = CRYPTO_TFM_REQ_MAY_SLEEP
 	};
@@ -1123,8 +1123,8 @@ int ecryptfs_parse_packet_set(struct ecryptfs_crypt_stat *crypt_stat,
 	size_t found_auth_tok;
 	size_t next_packet_is_auth_tok_packet;
 	struct list_head auth_tok_list;
-	struct ecryptfs_auth_tok *matching_auth_tok = NULL;
-	struct ecryptfs_auth_tok *candidate_auth_tok = NULL;
+	struct ecryptfs_auth_tok *matching_auth_tok;
+	struct ecryptfs_auth_tok *candidate_auth_tok;
 	char *candidate_auth_tok_sig;
 	size_t packet_size;
 	struct ecryptfs_auth_tok *new_auth_tok;
-- 
1.5.1.6


  parent reply	other threads:[~2007-07-25 20:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-25 20:48 [PATCH 0/7] eCryptfs: Trivial updates Michael Halcrow
2007-07-25 20:49 ` [PATCH 1/7] eCryptfs: Remove unnecessary BUG_ON Michael Halcrow
2007-07-25 20:50 ` [PATCH 2/7] eCryptfs: Collapse flag set into one statement Michael Halcrow
2007-07-25 20:50 ` [PATCH 3/7] eCryptfs: Grammatical fix (destruct to destroy) Michael Halcrow
2007-07-25 20:51 ` [PATCH 4/7] eCryptfs: Comments for some structs Michael Halcrow
2007-07-25 22:59   ` Satyam Sharma
2007-07-25 20:52 ` [PATCH 5/7] eCryptfs: kerneldoc fixes for crypto.c and keystore.c Michael Halcrow
2007-07-25 20:52 ` Michael Halcrow [this message]
2007-07-25 20:53 ` [PATCH 7/7] eCryptfs: Make needlessly global symbols static Michael Halcrow

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=20070725205238.GW14091@halcrow.austin.ibm.com \
    --to=mhalcrow@us.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=toml@us.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®