From ab34291da5537f8b1e037873591d6a5d54e00749 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Fri, 14 Nov 2014 17:25:04 +0530 Subject: [PATCH] greybus: connection: fix duplicating naming in _gb_hd_connection_insert() Though this doesn't cause any logical issues as far as the behavior of the routine is concerned as the local variable would be considered inside the 'while' loop. But its better not to use the same name for variables at different levels. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/connection.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index 4515bcd..f460df4 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -23,13 +23,13 @@ static void _gb_hd_connection_insert(struct greybus_host_device *hd, u16 cport_id = connection->hd_cport_id; while (*link) { - struct gb_connection *connection; + struct gb_connection *_connection; above = *link; - connection = rb_entry(above, struct gb_connection, hd_node); - if (connection->hd_cport_id > cport_id) + _connection = rb_entry(above, struct gb_connection, hd_node); + if (_connection->hd_cport_id > cport_id) link = &above->rb_left; - else if (connection->hd_cport_id < cport_id) + else if (_connection->hd_cport_id < cport_id) link = &above->rb_right; } rb_link_node(node, above, link); -- 2.7.4