* [PATCH] f2fs: remove redundant initialization of pointer 'p'
@ 2018-02-21 18:13 ` Colin King
0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2018-02-21 18:13 UTC (permalink / raw)
To: Jaegeuk Kim, Chao Yu, linux-f2fs-devel; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Pointer p is initialized with a value that is never read and is later
re-assigned a new value, hence the initialization is redundant and can
be removed.
Cleans up clang warning:
fs/f2fs/extent_cache.c:463:19: warning: Value stored to 'p' during
its initialization is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
fs/f2fs/extent_cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c
index ff2352a0ed15..956b2744386b 100644
--- a/fs/f2fs/extent_cache.c
+++ b/fs/f2fs/extent_cache.c
@@ -460,7 +460,7 @@ static struct extent_node *__insert_extent_tree(struct inode *inode,
struct rb_node *insert_parent)
{
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
- struct rb_node **p = &et->root.rb_node;
+ struct rb_node **p;
struct rb_node *parent = NULL;
struct extent_node *en = NULL;
--
2.15.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] f2fs: remove redundant initialization of pointer 'p'
@ 2018-02-21 18:13 ` Colin King
0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2018-02-21 18:13 UTC (permalink / raw)
To: Jaegeuk Kim, Chao Yu, linux-f2fs-devel; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Pointer p is initialized with a value that is never read and is later
re-assigned a new value, hence the initialization is redundant and can
be removed.
Cleans up clang warning:
fs/f2fs/extent_cache.c:463:19: warning: Value stored to 'p' during
its initialization is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
fs/f2fs/extent_cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c
index ff2352a0ed15..956b2744386b 100644
--- a/fs/f2fs/extent_cache.c
+++ b/fs/f2fs/extent_cache.c
@@ -460,7 +460,7 @@ static struct extent_node *__insert_extent_tree(struct inode *inode,
struct rb_node *insert_parent)
{
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
- struct rb_node **p = &et->root.rb_node;
+ struct rb_node **p;
struct rb_node *parent = NULL;
struct extent_node *en = NULL;
--
2.15.1
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: remove redundant initialization of pointer 'p'
2018-02-21 18:13 ` Colin King
@ 2018-02-25 15:17 ` Chao Yu
-1 siblings, 0 replies; 4+ messages in thread
From: Chao Yu @ 2018-02-25 15:17 UTC (permalink / raw)
To: Colin King, Jaegeuk Kim, Chao Yu, linux-f2fs-devel
Cc: kernel-janitors, linux-kernel
On 2018/2/22 2:13, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Pointer p is initialized with a value that is never read and is later
> re-assigned a new value, hence the initialization is redundant and can
> be removed.
>
> Cleans up clang warning:
> fs/f2fs/extent_cache.c:463:19: warning: Value stored to 'p' during
> its initialization is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Thanks,
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: remove redundant initialization of pointer 'p'
@ 2018-02-25 15:17 ` Chao Yu
0 siblings, 0 replies; 4+ messages in thread
From: Chao Yu @ 2018-02-25 15:17 UTC (permalink / raw)
To: Colin King, Jaegeuk Kim, Chao Yu, linux-f2fs-devel
Cc: kernel-janitors, linux-kernel
On 2018/2/22 2:13, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Pointer p is initialized with a value that is never read and is later
> re-assigned a new value, hence the initialization is redundant and can
> be removed.
>
> Cleans up clang warning:
> fs/f2fs/extent_cache.c:463:19: warning: Value stored to 'p' during
> its initialization is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Thanks,
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-02-25 15:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-21 18:13 [PATCH] f2fs: remove redundant initialization of pointer 'p' Colin King
2018-02-21 18:13 ` Colin King
2018-02-25 15:17 ` [f2fs-dev] " Chao Yu
2018-02-25 15:17 ` Chao Yu
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.