* [PATCH] lib: rhashtable: Correct self-assignment in rhashtable.c
@ 2018-07-02 16:35 Rishabh Bhatnagar
2018-07-03 14:26 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Rishabh Bhatnagar @ 2018-07-02 16:35 UTC (permalink / raw)
To: netdev, neilb, tgraf, herbert; +Cc: linux-arm-msm, Rishabh Bhatnagar
In file lib/rhashtable.c line 777, skip variable is assigned to
itself. The following error was observed:
lib/rhashtable.c:777:41: warning: explicitly assigning value of
variable of type 'int' to itself [-Wself-assign] error, forbidden
warning: rhashtable.c:777
This error was found when compiling with Clang 6.0. Change it to iter->skip.
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: NeilBrown <neilb@suse.com>
---
lib/rhashtable.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index 9427b57..3109b2e 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -774,7 +774,7 @@ int rhashtable_walk_start_check(struct rhashtable_iter *iter)
skip++;
if (list == iter->list) {
iter->p = p;
- skip = skip;
+ iter->skip = skip;
goto found;
}
}
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] lib: rhashtable: Correct self-assignment in rhashtable.c
2018-07-02 16:35 [PATCH] lib: rhashtable: Correct self-assignment in rhashtable.c Rishabh Bhatnagar
@ 2018-07-03 14:26 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2018-07-03 14:26 UTC (permalink / raw)
To: rishabhb; +Cc: netdev, neilb, tgraf, herbert, linux-arm-msm
From: Rishabh Bhatnagar <rishabhb@codeaurora.org>
Date: Mon, 2 Jul 2018 09:35:34 -0700
> In file lib/rhashtable.c line 777, skip variable is assigned to
> itself. The following error was observed:
>
> lib/rhashtable.c:777:41: warning: explicitly assigning value of
> variable of type 'int' to itself [-Wself-assign] error, forbidden
> warning: rhashtable.c:777
> This error was found when compiling with Clang 6.0. Change it to iter->skip.
>
> Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
> Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
> Reviewed-by: NeilBrown <neilb@suse.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] lib: rhashtable: Correct self-assignment in rhashtable.c
[not found] <1530493906-19711-1-git-send-email-rishabhb@codeaurora.org>
@ 2018-07-02 1:32 ` NeilBrown
0 siblings, 0 replies; 3+ messages in thread
From: NeilBrown @ 2018-07-02 1:32 UTC (permalink / raw)
To: Linux Kernel Network Developers, Rishabh Bhatnagar, tgraf, linux-arm-msm
Cc: herbert, linux-kernel, Rishabh Bhatnagar
[-- Attachment #1: Type: text/plain, Size: 1261 bytes --]
(added netdev@vger.kernel.org)
On Sun, Jul 01 2018, Rishabh Bhatnagar wrote:
> In file lib/rhashtable.c line 777, skip variable is assigned to
> itself. The following error was observed:
>
> lib/rhashtable.c:777:41: warning: explicitly assigning value of
> variable of type 'int' to itself [-Wself-assign] error, forbidden
> warning: rhashtable.c:777
> This error was found when compiling with Clang 6.0. Change it to iter->skip.
>
> Change-Id: I5abd1ce5ba76737a73bd6eca94b07b1bd5267523
> Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
Thanks for catching that!
Reviewed-by: NeilBrown <neilb@suse.com>
Thanks,
NeilBrown
> ---
> lib/rhashtable.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/rhashtable.c b/lib/rhashtable.c
> index 9427b57..3109b2e 100644
> --- a/lib/rhashtable.c
> +++ b/lib/rhashtable.c
> @@ -774,7 +774,7 @@ int rhashtable_walk_start_check(struct rhashtable_iter *iter)
> skip++;
> if (list == iter->list) {
> iter->p = p;
> - skip = skip;
> + iter->skip = skip;
> goto found;
> }
> }
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-03 14:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-02 16:35 [PATCH] lib: rhashtable: Correct self-assignment in rhashtable.c Rishabh Bhatnagar
2018-07-03 14:26 ` David Miller
[not found] <1530493906-19711-1-git-send-email-rishabhb@codeaurora.org>
2018-07-02 1:32 ` NeilBrown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).