lkml.org 
[lkml]   [2016]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] staging: lustre: fixed shadowed variable in socklnd_cb.c

> 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
>
>

\
 
 \ /
  Last update: 2016-11-07 03:01    [W:0.027 / U:1.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site