Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1860859ybn; Thu, 26 Sep 2019 03:21:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJq0HAgd35zUQbAysktbc2sOK1kbehhm4RAb/Jo+zV0wteOrqTJ19w1DYdqqLl2TqZU+g6 X-Received: by 2002:a17:907:411d:: with SMTP id nw21mr2318385ejb.8.1569493268301; Thu, 26 Sep 2019 03:21:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569493268; cv=none; d=google.com; s=arc-20160816; b=0SXcoK1clJROlAFV+Enr5hdaKe/+quWXWo1IN7rOj0SyJMxw35rnKLJ+bjf1FvZmI5 9zepueOY9cNKIzCIKIc6Z1iSIvcuB3GeGV2fe/qhG+4UqYLRYREbqNekkVDHiSPiunEn X+CiVHaDmxjIQuOemEyPhWqxkdu54nYNbRZGz596x8Ub1eGpbwXkDdGwxCaZZSmGTH8j dXxAWCKf/32wPQf+iYhA6jRHuH/TQQtNAJ5UyM2azlHX8FkfoiN8ukd6EcF+Vpj0rFJz 0s6LYDXZhRz1ah8ZL5x5rwaE7LNmod+SB6841mIfSUEJPi57S2SvOq8Smoois9bC+pdW 3CDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=tv1CVBkJYPlU1j1V6OUzMhflRJNxhhdmMY2H2CfxK90=; b=IOO2Dgj8XyHqx/fyKdCOk0Lddq6MbD5WvRFV2di4WQB7rW25hHw/AYEgfGxUo0w5jR JtTanDxDVGQ6k2cJPJv71h7pSEhsZ5tXoF7lcSf86lzVohXrX7uIXaiW+/i+3Kv328QJ 0yFz74cxhA55f8ZP3TTzY+ktJn5TNiQndfe9eYe3rusEe1CfQv/KyzFApVQApGIAWDRu jQLrJ7Zey2m512KDNN8DcFJaIRMUa8QIhwE3saNbSW9ZIp6MYn5rhp53jNFTXdoK7J7o bScj2Rzg5heyHTln8kxidhQnS0XiNu+JX6S34wuQvW9yuHcfa1cA5QiVWwif0m+FEhG8 FusQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d10si1035523edk.115.2019.09.26.03.20.44; Thu, 26 Sep 2019 03:21:08 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392567AbfIZF5N (ORCPT + 99 others); Thu, 26 Sep 2019 01:57:13 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:33073 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392526AbfIZF5N (ORCPT ); Thu, 26 Sep 2019 01:57:13 -0400 Received: by mail-lf1-f65.google.com with SMTP id y127so756308lfc.0 for ; Wed, 25 Sep 2019 22:57:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=tv1CVBkJYPlU1j1V6OUzMhflRJNxhhdmMY2H2CfxK90=; b=C9+szqlIsc7zvFxIYKWn1Pkfy4NeaJUiTLcbQlU9a+EdWag1x5IHGg4r2cn2PzWXRC PxERwGb2aHCd5b0alDoHjMubeEL2kvgcI0GWERk+Ywk/ROb2XZqq+XmsFusqHHCPQuu9 ZQvgbRu5deFk1dlI1LZuglmcNYtn9UB9ddSKtcTYvIhOSbVCuOcNZiUuaxDUZDR7l0cr r1hJ9+PcqyWW1HdmrVekjJt6c0RSH8gpkFgXUEYXvjtH1OkX6Wl4zIwAcBzaN9u1X/Gm z9A0qC8i7uKrkt2aOaJidjKMbdwHlwmHBIj3x9XdzYIFFtzAwBEYD8s//rQs8zx1Uw7+ 5MJg== X-Gm-Message-State: APjAAAWjzq8UMAaZDbgVhWK9SO/To3pwSy/3XJUbo7QnpvrBES3/afmG DbgbSO3ni9NJew0d6sgEheE= X-Received: by 2002:a19:4bd7:: with SMTP id y206mr1029411lfa.9.1569477430290; Wed, 25 Sep 2019 22:57:10 -0700 (PDT) Received: from xi.terra (c-51f1e055.07-184-6d6c6d4.bbcust.telenor.se. [85.224.241.81]) by smtp.gmail.com with ESMTPSA id y8sm246833ljh.21.2019.09.25.22.57.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Sep 2019 22:57:09 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.92.2) (envelope-from ) id 1iDMmB-0001Nn-BI; Thu, 26 Sep 2019 07:57:15 +0200 Date: Thu, 26 Sep 2019 07:57:15 +0200 From: Johan Hovold To: Denis Efremov Cc: Johan Hovold , Alex Elder , Greg Kroah-Hartman , greybus-dev@lists.linaro.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] greybus: remove excessive check in gb_connection_hd_cport_quiesce() Message-ID: <20190926055715.GI14159@localhost> References: <20190925213656.8950-1-efremov@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190925213656.8950-1-efremov@linux.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 26, 2019 at 12:36:56AM +0300, Denis Efremov wrote: > Function pointer "hd->driver->cport_quiesce" is already checked > at the beginning of gb_connection_hd_cport_quiesce(). Thus, the > second check can be removed. > > Signed-off-by: Denis Efremov > --- > drivers/greybus/connection.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/greybus/connection.c b/drivers/greybus/connection.c > index fc8f57f97ce6..e3799a53a193 100644 > --- a/drivers/greybus/connection.c > +++ b/drivers/greybus/connection.c > @@ -361,9 +361,6 @@ static int gb_connection_hd_cport_quiesce(struct gb_connection *connection) > if (connection->mode_switch) > peer_space += sizeof(struct gb_operation_msg_hdr); > > - if (!hd->driver->cport_quiesce) > - return 0; > - > ret = hd->driver->cport_quiesce(hd, connection->hd_cport_id, > peer_space, > GB_CONNECTION_CPORT_QUIESCE_TIMEOUT); Nice catch, thanks. Acked-by: Johan Hovold