* [PATCH 1/3] fs: befs: remove unneeded initialization to NULL
@ 2016-05-07 19:25 Salah Triki
2016-05-07 19:25 ` [PATCH 2/3] " Salah Triki
2016-05-07 19:25 ` [PATCH 3/3] fs: befs: remove unneeded initializations " Salah Triki
0 siblings, 2 replies; 3+ messages in thread
From: Salah Triki @ 2016-05-07 19:25 UTC (permalink / raw)
To: akpm; +Cc: Salah Triki, linux-kernel
bh is reinitialized by befs_bread_iaddr() so no need to init it
with NULL in the beginning of befs_read_datastream().
Signed-off-by: Salah Triki <salah.triki@acm.org>
---
fs/befs/datastream.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/befs/datastream.c b/fs/befs/datastream.c
index ebd5071..aa35686 100644
--- a/fs/befs/datastream.c
+++ b/fs/befs/datastream.c
@@ -48,7 +48,7 @@ struct buffer_head *
befs_read_datastream(struct super_block *sb, befs_data_stream * ds,
befs_off_t pos, uint * off)
{
- struct buffer_head *bh = NULL;
+ struct buffer_head *bh;
befs_block_run run;
befs_blocknr_t block; /* block coresponding to pos */
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/3] fs: befs: remove unneeded initialization to NULL
2016-05-07 19:25 [PATCH 1/3] fs: befs: remove unneeded initialization to NULL Salah Triki
@ 2016-05-07 19:25 ` Salah Triki
2016-05-07 19:25 ` [PATCH 3/3] fs: befs: remove unneeded initializations " Salah Triki
1 sibling, 0 replies; 3+ messages in thread
From: Salah Triki @ 2016-05-07 19:25 UTC (permalink / raw)
To: akpm; +Cc: Salah Triki, linux-kernel
bh is reinitialized by befs_read_datastream() so no need to init it
with NULL in the beginning of befs_read_lsymlink().
Signed-off-by: Salah Triki <salah.triki@acm.org>
---
fs/befs/datastream.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/befs/datastream.c b/fs/befs/datastream.c
index aa35686..068f7be 100644
--- a/fs/befs/datastream.c
+++ b/fs/befs/datastream.c
@@ -127,7 +127,7 @@ befs_read_lsymlink(struct super_block * sb, befs_data_stream * ds, void *buff,
{
befs_off_t bytes_read = 0; /* bytes readed */
u16 plen;
- struct buffer_head *bh = NULL;
+ struct buffer_head *bh;
befs_debug(sb, "---> %s length: %llu", __func__, len);
while (bytes_read < len) {
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 3/3] fs: befs: remove unneeded initializations to NULL
2016-05-07 19:25 [PATCH 1/3] fs: befs: remove unneeded initialization to NULL Salah Triki
2016-05-07 19:25 ` [PATCH 2/3] " Salah Triki
@ 2016-05-07 19:25 ` Salah Triki
1 sibling, 0 replies; 3+ messages in thread
From: Salah Triki @ 2016-05-07 19:25 UTC (permalink / raw)
To: akpm; +Cc: Salah Triki, linux-kernel
iaddr_array is unconditionally initialized to NULL in
befs_find_brun_dblindirect().
Signed-off-by: Salah Triki <salah.triki@acm.org>
---
fs/befs/datastream.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/befs/datastream.c b/fs/befs/datastream.c
index 068f7be..4cbd4c2 100644
--- a/fs/befs/datastream.c
+++ b/fs/befs/datastream.c
@@ -427,7 +427,7 @@ befs_find_brun_dblindirect(struct super_block *sb,
struct buffer_head *dbl_indir_block;
struct buffer_head *indir_block;
befs_block_run indir_run;
- befs_disk_inode_addr *iaddr_array = NULL;
+ befs_disk_inode_addr *iaddr_array;
struct befs_sb_info *befs_sb = BEFS_SB(sb);
befs_blocknr_t indir_start_blk =
@@ -486,7 +486,6 @@ befs_find_brun_dblindirect(struct super_block *sb,
iaddr_array = (befs_disk_inode_addr *) dbl_indir_block->b_data;
indir_run = fsrun_to_cpu(sb, iaddr_array[dbl_block_indx]);
brelse(dbl_indir_block);
- iaddr_array = NULL;
/* Read indirect block */
which_block = indir_indx / befs_iaddrs_per_block(sb);
@@ -511,7 +510,6 @@ befs_find_brun_dblindirect(struct super_block *sb,
iaddr_array = (befs_disk_inode_addr *) indir_block->b_data;
*run = fsrun_to_cpu(sb, iaddr_array[block_indx]);
brelse(indir_block);
- iaddr_array = NULL;
blockno_at_run_start = indir_start_blk;
blockno_at_run_start += diblklen * dblindir_indx;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-07 19:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-07 19:25 [PATCH 1/3] fs: befs: remove unneeded initialization to NULL Salah Triki
2016-05-07 19:25 ` [PATCH 2/3] " Salah Triki
2016-05-07 19:25 ` [PATCH 3/3] fs: befs: remove unneeded initializations " Salah Triki
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.