All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ceph: remove redundant variable ino
@ 2022-05-18  8:55 Colin Ian King
  2022-05-18 14:08 ` Jeff Layton
  2022-05-18 14:23 ` Xiubo Li
  0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2022-05-18  8:55 UTC (permalink / raw)
  To: Jeff Layton, Xiubo Li, Ilya Dryomov, ceph-devel
  Cc: kernel-janitors, linux-kernel

Variable ino is being assigned a value that is never read. The variable
and assignment are redundant, remove it.

Cleans up clang scan build warning:
warning: Although the value stored to 'ino' is used in the enclosing
expression, the value is never actually read from 'ino'
[deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 fs/ceph/mds_client.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 00c3de177dd6..20197f05faec 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -437,7 +437,7 @@ static int ceph_parse_deleg_inos(void **p, void *end,
 	ceph_decode_32_safe(p, end, sets, bad);
 	dout("got %u sets of delegated inodes\n", sets);
 	while (sets--) {
-		u64 start, len, ino;
+		u64 start, len;
 
 		ceph_decode_64_safe(p, end, start, bad);
 		ceph_decode_64_safe(p, end, len, bad);
@@ -449,7 +449,7 @@ static int ceph_parse_deleg_inos(void **p, void *end,
 			continue;
 		}
 		while (len--) {
-			int err = xa_insert(&s->s_delegated_inos, ino = start++,
+			int err = xa_insert(&s->s_delegated_inos, start++,
 					    DELEGATED_INO_AVAILABLE,
 					    GFP_KERNEL);
 			if (!err) {
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ceph: remove redundant variable ino
  2022-05-18  8:55 [PATCH] ceph: remove redundant variable ino Colin Ian King
@ 2022-05-18 14:08 ` Jeff Layton
  2022-05-18 14:23 ` Xiubo Li
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Layton @ 2022-05-18 14:08 UTC (permalink / raw)
  To: Colin Ian King, Xiubo Li, Ilya Dryomov, ceph-devel
  Cc: kernel-janitors, linux-kernel

On Wed, 2022-05-18 at 09:55 +0100, Colin Ian King wrote:
> Variable ino is being assigned a value that is never read. The variable
> and assignment are redundant, remove it.
> 
> Cleans up clang scan build warning:
> warning: Although the value stored to 'ino' is used in the enclosing
> expression, the value is never actually read from 'ino'
> [deadcode.DeadStores]
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  fs/ceph/mds_client.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index 00c3de177dd6..20197f05faec 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -437,7 +437,7 @@ static int ceph_parse_deleg_inos(void **p, void *end,
>  	ceph_decode_32_safe(p, end, sets, bad);
>  	dout("got %u sets of delegated inodes\n", sets);
>  	while (sets--) {
> -		u64 start, len, ino;
> +		u64 start, len;
>  
>  		ceph_decode_64_safe(p, end, start, bad);
>  		ceph_decode_64_safe(p, end, len, bad);
> @@ -449,7 +449,7 @@ static int ceph_parse_deleg_inos(void **p, void *end,
>  			continue;
>  		}
>  		while (len--) {
> -			int err = xa_insert(&s->s_delegated_inos, ino = start++,
> +			int err = xa_insert(&s->s_delegated_inos, start++,
>  					    DELEGATED_INO_AVAILABLE,
>  					    GFP_KERNEL);
>  			if (!err) {

Reviewed-by: Jeff Layton <jlayton@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ceph: remove redundant variable ino
  2022-05-18  8:55 [PATCH] ceph: remove redundant variable ino Colin Ian King
  2022-05-18 14:08 ` Jeff Layton
@ 2022-05-18 14:23 ` Xiubo Li
  1 sibling, 0 replies; 3+ messages in thread
From: Xiubo Li @ 2022-05-18 14:23 UTC (permalink / raw)
  To: Colin Ian King, Jeff Layton, Ilya Dryomov, ceph-devel
  Cc: kernel-janitors, linux-kernel


On 5/18/22 4:55 PM, Colin Ian King wrote:
> Variable ino is being assigned a value that is never read. The variable
> and assignment are redundant, remove it.
>
> Cleans up clang scan build warning:
> warning: Although the value stored to 'ino' is used in the enclosing
> expression, the value is never actually read from 'ino'
> [deadcode.DeadStores]
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>   fs/ceph/mds_client.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index 00c3de177dd6..20197f05faec 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -437,7 +437,7 @@ static int ceph_parse_deleg_inos(void **p, void *end,
>   	ceph_decode_32_safe(p, end, sets, bad);
>   	dout("got %u sets of delegated inodes\n", sets);
>   	while (sets--) {
> -		u64 start, len, ino;
> +		u64 start, len;
>   
>   		ceph_decode_64_safe(p, end, start, bad);
>   		ceph_decode_64_safe(p, end, len, bad);
> @@ -449,7 +449,7 @@ static int ceph_parse_deleg_inos(void **p, void *end,
>   			continue;
>   		}
>   		while (len--) {
> -			int err = xa_insert(&s->s_delegated_inos, ino = start++,
> +			int err = xa_insert(&s->s_delegated_inos, start++,
>   					    DELEGATED_INO_AVAILABLE,
>   					    GFP_KERNEL);
>   			if (!err) {

Merged into ceph-client/testing branch. Thanks!

-- Xiubo



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-18 14:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-18  8:55 [PATCH] ceph: remove redundant variable ino Colin Ian King
2022-05-18 14:08 ` Jeff Layton
2022-05-18 14:23 ` Xiubo Li

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.