mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] staging: lustre: fixed shadowed variable in socklnd_cb.c
@ 2016-11-03 22:49 Andrew Kanner
  2016-11-03 23:31 ` Dilger, Andreas
  2016-11-07  2:01 ` James Simmons
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Kanner @ 2016-11-03 22:49 UTC (permalink / raw)
  To: oleg.drokin
  Cc: andreas.dilger, jsimmons, gregkh, viro, bevans, bhaktipriya96,
	lustre-devel, devel, linux-kernel

Removed redundant declaration of variable 'tx' in local scope
Fixed: sparse warning:
socklnd_cb.c:2476:41: warning: symbol 'tx' shadows an earlier one
socklnd_cb.c:2435:25: originally declared here

Signed-off-by: Andrew Kanner <andrew.kanner@gmail.com>
---
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
index c1c6f60..f31f4a1 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
@@ -2473,8 +2473,8 @@ ksocknal_check_peer_timeouts(int idx)
 		 * holding only shared lock
 		 */
 		if (!list_empty(&peer->ksnp_tx_queue)) {
-			struct ksock_tx *tx = list_entry(peer->ksnp_tx_queue.next,
-						    struct ksock_tx, tx_list);
+			tx = list_entry(peer->ksnp_tx_queue.next,
+					struct ksock_tx, tx_list);
 
 			if (cfs_time_aftereq(cfs_time_current(),
 					     tx->tx_deadline)) {
-- 
2.1.4

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

* Re: [PATCH v2] staging: lustre: fixed shadowed variable in socklnd_cb.c
  2016-11-03 22:49 [PATCH v2] staging: lustre: fixed shadowed variable in socklnd_cb.c Andrew Kanner
@ 2016-11-03 23:31 ` Dilger, Andreas
  2016-11-07  2:01 ` James Simmons
  1 sibling, 0 replies; 3+ messages in thread
From: Dilger, Andreas @ 2016-11-03 23:31 UTC (permalink / raw)
  To: Andrew Kanner
  Cc: Drokin, Oleg, James Simmons, Greg Kroah-Hartman, Alexander Viro,
	bevans, bhaktipriya96, Lustre Development List, devel,
	Linux Kernel Mailing List

On Nov 3, 2016, at 16:49, Andrew Kanner <andrew.kanner@gmail.com> wrote:
> 
> Removed redundant declaration of variable 'tx' in local scope
> Fixed: sparse warning:
> socklnd_cb.c:2476:41: warning: symbol 'tx' shadows an earlier one
> socklnd_cb.c:2435:25: originally declared here
> 
> Signed-off-by: Andrew Kanner <andrew.kanner@gmail.com>

Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>

> ---
> drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
> index c1c6f60..f31f4a1 100644
> --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
> +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
> @@ -2473,8 +2473,8 @@ ksocknal_check_peer_timeouts(int idx)
> 		 * holding only shared lock
> 		 */
> 		if (!list_empty(&peer->ksnp_tx_queue)) {
> -			struct ksock_tx *tx = list_entry(peer->ksnp_tx_queue.next,
> -						    struct ksock_tx, tx_list);
> +			tx = list_entry(peer->ksnp_tx_queue.next,
> +					struct ksock_tx, tx_list);
> 
> 			if (cfs_time_aftereq(cfs_time_current(),
> 					     tx->tx_deadline)) {
> -- 
> 2.1.4
> 

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

* Re: [PATCH v2] staging: lustre: fixed shadowed variable in socklnd_cb.c
  2016-11-03 22:49 [PATCH v2] staging: lustre: fixed shadowed variable in socklnd_cb.c Andrew Kanner
  2016-11-03 23:31 ` Dilger, Andreas
@ 2016-11-07  2:01 ` James Simmons
  1 sibling, 0 replies; 3+ messages in thread
From: James Simmons @ 2016-11-07  2:01 UTC (permalink / raw)
  To: Andrew Kanner
  Cc: oleg.drokin, andreas.dilger, gregkh, viro, bevans, bhaktipriya96,
	lustre-devel, devel, linux-kernel


> Removed redundant declaration of variable 'tx' in local scope
> Fixed: sparse warning:
> socklnd_cb.c:2476:41: warning: symbol 'tx' shadows an earlier one
> socklnd_cb.c:2435:25: originally declared here

Reviewed-by: James Simmons <jsimmons@infradead.org>
 
> Signed-off-by: Andrew Kanner <andrew.kanner@gmail.com>
> ---
>  drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
> index c1c6f60..f31f4a1 100644
> --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
> +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
> @@ -2473,8 +2473,8 @@ ksocknal_check_peer_timeouts(int idx)
>  		 * holding only shared lock
>  		 */
>  		if (!list_empty(&peer->ksnp_tx_queue)) {
> -			struct ksock_tx *tx = list_entry(peer->ksnp_tx_queue.next,
> -						    struct ksock_tx, tx_list);
> +			tx = list_entry(peer->ksnp_tx_queue.next,
> +					struct ksock_tx, tx_list);
>  
>  			if (cfs_time_aftereq(cfs_time_current(),
>  					     tx->tx_deadline)) {
> -- 
> 2.1.4
> 
> 

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

end of thread, other threads:[~2016-11-07  2:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-03 22:49 [PATCH v2] staging: lustre: fixed shadowed variable in socklnd_cb.c Andrew Kanner
2016-11-03 23:31 ` Dilger, Andreas
2016-11-07  2:01 ` James Simmons

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®