Received: by 10.223.164.221 with SMTP id h29csp3202407wrb; Fri, 3 Nov 2017 03:29:50 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Sf2aM3rC0rxYUNpOVPPmRAKzrd3oF6kDeDIgxnFZbyyzxOSlbfscUg2YgICRkI131W+1qY X-Received: by 10.84.242.136 with SMTP id d8mr6378804pll.307.1509704990592; Fri, 03 Nov 2017 03:29:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509704990; cv=none; d=google.com; s=arc-20160816; b=SmELYvF/IompIur529aJz1RqqmcviDpt2UHmX9LTjXeUTYmLDx4owW39dEtYUuTQ20 DDnft2tAtQS0iarGMC0TPNW/SfhlyO3qg2GNB2hKKQ2Wzo4ESmkOUH6HEkMgCMLqDk56 Z5lqRDKDDaLignaHh0ArdpWqJHpqEB3SuNCPZjdaqCAOleybJVaPUoDlO55Y1KzoEfzy lwg8EgzSF1o5LbWF17STgqNdZNs0ysL2HWDMkbd78l1/0DvGw6FjzBB90kuXLqKi+uH5 RpHtXRweudlqnEHCdbQBkRoNqiATP+HxWK43lr7G+4vujLGODntB6l+hYS4IWocIHQBI jHkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=euQ2Bag6oXrBWoVetEiDWKr4HHRqbrKb1HgafPJiaVY=; b=nHdqq6MOeJI3JZElgCe8dk4a5YqaY6KtMbmgtZYD1mz62m/TadhA/VgP1HartMPgVw xvn/ZTATQImKrl7yy+SFybDwJO9SnxSL8hL1WHK7tTUs6bxJu4rw9HmTZqIB2yt81wID gW9ygNvhuwLhaO+UsgvakBonRNHGUo4QuIMRJxQaQ3CDRs+Tsfmg4Ou3UnejKvzYGKfY hWIctpGqHD+1DUEzB0G7YGDy4pwxhdmAPNuB6Vs7/cYgpik5T+bIS8lsUycZhTTYEBgp zdaIGzDkR6nZFuo6TB7TTucaweAbDfm2yblh8NFPRSuzAluwOn2G4M0BjHEmDVNUVrth aTiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nexus-software-ie.20150623.gappssmtp.com header.s=20150623 header.b=ethJkCg6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z188si5521516pgb.121.2017.11.03.03.29.36; Fri, 03 Nov 2017 03:29:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nexus-software-ie.20150623.gappssmtp.com header.s=20150623 header.b=ethJkCg6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755802AbdKCK2p (ORCPT + 97 others); Fri, 3 Nov 2017 06:28:45 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:47502 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755758AbdKCK2f (ORCPT ); Fri, 3 Nov 2017 06:28:35 -0400 Received: by mail-wm0-f68.google.com with SMTP id r196so489970wmf.2 for ; Fri, 03 Nov 2017 03:28:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nexus-software-ie.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=euQ2Bag6oXrBWoVetEiDWKr4HHRqbrKb1HgafPJiaVY=; b=ethJkCg6495btoBjwxXwZzwzYCZ6gKFS5cdBwbs13t66cyV7LJNy7KGMVkd00p4lNw 7B+KwNkmg6nJELLyEbUpGW+3hG8DDlHrETgrVkGHbYfRUxHKEKAYByA8dhH20XFYQ935 KScz0p+GokrZz8KcQi13350aDnA4JfUnOsRKJfBo+hsXJEie3vpvKAcjv6k1p9atfXIH Cvb0kWCZTs9QqQj6UnIlfKGJ+aODmXqTPHG4d4yzZG3+2+7psDMHSJ+BBSj9bY0cQFif H4Xu6WFW/9llm9RubIO+QaiPhsUaBoYvIfJrpIY91lj3juh3laz5JBwIWddwnqvBD+6s gsQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=euQ2Bag6oXrBWoVetEiDWKr4HHRqbrKb1HgafPJiaVY=; b=I6QaE6gOMaUXdUC4JtJA/KO1pRXBP1vAjlha+LqYObnotjyasJrqHOaNb5mScMwDdH nmCg+y7c4FIdp0zCAVKZPEA9CMhSHLMPWtdms+mH1RHktgNLXvXmL9RucgphLSLHzXtq TrooBFrQq9zD3dAIYgyH2sJOICqpMvEqe42ST1f2h0KkJkIuAL52yYYf2or2AGHe35ct neG1nF87mZ0kNQ1iwdCcaIHgTg2IWxcdxaYreT2UISKmoI97BO/337IOKqk2MJXOishU rNOsUD/m/WPlmSXEjrT/k46E6pH7Y3fmkuvoXUGPr284xwNjFpQS9dV6kUZQSpFck6R/ J9rQ== X-Gm-Message-State: AMCzsaXzSzmC6QNpG6yzQmmGNJ5TIuhuaBK+tjP7lLEHo1UYGEBqdNx2 zGaeBpiiz5R/IQv0Rou380Bz3Enrn6c= X-Received: by 10.80.175.165 with SMTP id h34mr6281029edd.292.1509704913209; Fri, 03 Nov 2017 03:28:33 -0700 (PDT) Received: from [192.168.192.35] ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id n7sm4992235edl.12.2017.11.03.03.28.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Nov 2017 03:28:32 -0700 (PDT) Subject: Re: [PATCH 1/2] staging: greybus: remove unused kfifo_ts To: Arnd Bergmann , Johan Hovold , Alex Elder , Greg Kroah-Hartman Cc: Viresh Kumar , Gioh Kim , Arushi Singhal , Abdul Rauf , greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org References: <20171102143304.851481-1-arnd@arndb.de> From: Bryan O'Donoghue Message-ID: <881e54df-80bf-bec2-408d-6718c55d403f@nexus-software.ie> Date: Fri, 3 Nov 2017 10:28:31 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20171102143304.851481-1-arnd@arndb.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/11/17 14:32, Arnd Bergmann wrote: > As of commit 8e1d6c336d74 ("greybus: loopback: drop bus aggregate > calculation"), nothing ever reads from kfifo_ts, so there is no > reason to write to it or even allocate it any more. > > Signed-off-by: Arnd Bergmann > --- > drivers/staging/greybus/loopback.c | 27 +++------------------------ > 1 file changed, 3 insertions(+), 24 deletions(-) > > diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c > index 08e255884206..85046fb16aad 100644 > --- a/drivers/staging/greybus/loopback.c > +++ b/drivers/staging/greybus/loopback.c > @@ -72,7 +72,6 @@ struct gb_loopback { > > struct dentry *file; > struct kfifo kfifo_lat; > - struct kfifo kfifo_ts; > struct mutex mutex; > struct task_struct *task; > struct list_head entry; > @@ -262,7 +261,6 @@ static void gb_loopback_check_attr(struct gb_loopback *gb) > gb->iteration_max, kfifo_depth); > } > kfifo_reset_out(&gb->kfifo_lat); > - kfifo_reset_out(&gb->kfifo_ts); > > switch (gb->type) { > case GB_LOOPBACK_TYPE_PING: > @@ -387,13 +385,6 @@ static u64 gb_loopback_calc_latency(struct timeval *ts, struct timeval *te) > return __gb_loopback_calc_latency(t1, t2); > } > > -static void gb_loopback_push_latency_ts(struct gb_loopback *gb, > - struct timeval *ts, struct timeval *te) > -{ > - kfifo_in(&gb->kfifo_ts, (unsigned char *)ts, sizeof(*ts)); > - kfifo_in(&gb->kfifo_ts, (unsigned char *)te, sizeof(*te)); > -} > - > static int gb_loopback_operation_sync(struct gb_loopback *gb, int type, > void *request, int request_size, > void *response, int response_size) > @@ -433,7 +424,6 @@ static int gb_loopback_operation_sync(struct gb_loopback *gb, int type, > do_gettimeofday(&te); > > /* Calculate the total time the message took */ > - gb_loopback_push_latency_ts(gb, &ts, &te); > gb->elapsed_nsecs = gb_loopback_calc_latency(&ts, &te); > > out_put_operation: > @@ -521,11 +511,9 @@ static void gb_loopback_async_operation_callback(struct gb_operation *operation) > err = true; > } > > - if (!err) { > - gb_loopback_push_latency_ts(gb, &op_async->ts, &te); > + if (!err) > gb->elapsed_nsecs = gb_loopback_calc_latency(&op_async->ts, > &te); > - } > > if (op_async->pending) { > if (err) > @@ -1241,18 +1229,12 @@ static int gb_loopback_probe(struct gb_bundle *bundle, > retval = -ENOMEM; > goto out_conn; > } > - if (kfifo_alloc(&gb->kfifo_ts, kfifo_depth * sizeof(struct timeval) * 2, > - GFP_KERNEL)) { > - retval = -ENOMEM; > - goto out_kfifo0; > - } > - > /* Fork worker thread */ > mutex_init(&gb->mutex); > gb->task = kthread_run(gb_loopback_fn, gb, "gb_loopback"); > if (IS_ERR(gb->task)) { > retval = PTR_ERR(gb->task); > - goto out_kfifo1; > + goto out_kfifo; > } > > spin_lock_irqsave(&gb_dev.lock, flags); > @@ -1266,9 +1248,7 @@ static int gb_loopback_probe(struct gb_bundle *bundle, > > return 0; > > -out_kfifo1: > - kfifo_free(&gb->kfifo_ts); > -out_kfifo0: > +out_kfifo: > kfifo_free(&gb->kfifo_lat); > out_conn: > device_unregister(dev); > @@ -1302,7 +1282,6 @@ static void gb_loopback_disconnect(struct gb_bundle *bundle) > kthread_stop(gb->task); > > kfifo_free(&gb->kfifo_lat); > - kfifo_free(&gb->kfifo_ts); > gb_connection_latency_tag_disable(gb->connection); > debugfs_remove(gb->file); > > This looks right to me Reviewed-by: Bryan O'Donoghue From 1582965188848543613@xxx Thu Nov 02 14:34:04 +0000 2017 X-GM-THRID: 1582965188848543613 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread