Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1838271ybn; Thu, 26 Sep 2019 03:01:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxcxuxleZfb6U+Z74ekmVi6TLIxuqLsGDyyWMbs6pv2ID9WdaXLw4+MWCYDyUm1DVnzrFRY X-Received: by 2002:a17:906:4801:: with SMTP id w1mr2218752ejq.245.1569492095450; Thu, 26 Sep 2019 03:01:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569492095; cv=none; d=google.com; s=arc-20160816; b=YMZ15orc2wgiyx/mowynHJ8ywzgNXcSBzN13WEvPc6sc8nVgux9vnKrbgGysIpVWrI MGE4cAfNUGgOfaxNTJXjrEuaNSL3Pe0VcoNmsFm8pn0kBxTeKrDk51+dMljoVD4Ksg3U o6IInqvSQsVbhDe5wsjzhN/Zxx0b4No5svdhdlvtLS+8ssbmasa3NimFQ8IwDLE8kIM6 Qp/quWB1X7c/kRkOvcUYO95gf9Hf6J4W0LBFPhSovNgYbZsOKKRP1rp4PXmQqNy7BQG5 gXd0LmRUIp4GVhSDoElu73PuQbwTq9I3c77D3beQmyeuBcscLBX23ceQkwi3Casqdz3X o57g== 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:mime-version :message-id:date:subject:cc:to:from; bh=+Arpb7Z2qCWrvUpdQDRByL+W1qOFw5hIlNoD93W6h7A=; b=Rb9nvbOosR3UtcYlD8U5EQcvJ7rBi0VkNq6BO1Zd+Qkm1ITrOEyXwJ4rCrb9nUe1s7 UEToRNZ6Ls2GQ9CqS13vWC9osgBk0zk11YSK67n9Lvn3VBs3i1DVg8vQKew2vSJDRaA6 FXhYnOgGu6HD5Y0eXPjyEy8tPJCIuTmD8HdRL+ZSNESnhWXVTjJUd6MXr2GKuHP2C9eE BiUGCzrdaXumgWsJhL4zEmgegeiy3EwNa2HlwedUDk0sd5k6dW+0jK6moDOfc+hLCble pMaxlhFpiu9TNlMX72SioEYFozZ800aFUhyHpBWWD4k9nCcHdrwiGae3+NP2Iv+o2be5 C4sQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b8si939612edc.231.2019.09.26.03.01.11; Thu, 26 Sep 2019 03:01:35 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727924AbfIYVhG (ORCPT + 99 others); Wed, 25 Sep 2019 17:37:06 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:43596 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727857AbfIYVhF (ORCPT ); Wed, 25 Sep 2019 17:37:05 -0400 Received: by mail-wr1-f65.google.com with SMTP id q17so38151wrx.10 for ; Wed, 25 Sep 2019 14:37:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+Arpb7Z2qCWrvUpdQDRByL+W1qOFw5hIlNoD93W6h7A=; b=PwRQjFbFq8C00kdufKVpOlKWBoL3nb8G4bxTw0xmCXuXIEe2EyFdLmN3Rlvq/vD2Kx k0NHNf2DDuoOTPp3FL6gwWq5aduo9gk/b1X/OB58PxrRRScmSf69FqKTVYGyBUV0hU8D fkPvDqMjKLXOaYQorf6usYQWRTRlB4j0CztT9SXijteJTJ/4LOkOouvPXnzEP9R60Os9 GVk8lC0+3Z6TRFVhLSeVRcbF6YvXAi8M6fQERIkid3w5e02895xvNtfqJaxg2HF+b1EM iPHj0KDOAQnPKClvvTDTiI06nftAA16oj76cVr95BqppW81qHkr+XwTKrYHwSAJzulRs Zg7A== X-Gm-Message-State: APjAAAXKiz7uTOHN7XzZZdFLpmCz6jWzi700V4D5OI1jaJUz4+HsrIEw v+sDin9Bk41qXmhbvNHl/1U= X-Received: by 2002:adf:ee50:: with SMTP id w16mr298441wro.93.1569447422763; Wed, 25 Sep 2019 14:37:02 -0700 (PDT) Received: from localhost.localdomain (99-48-196-88.sta.estpak.ee. [88.196.48.99]) by smtp.googlemail.com with ESMTPSA id t203sm188889wmf.42.2019.09.25.14.37.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Sep 2019 14:37:02 -0700 (PDT) From: Denis Efremov To: Johan Hovold , Alex Elder , Greg Kroah-Hartman Cc: Denis Efremov , greybus-dev@lists.linaro.org, linux-kernel@vger.kernel.org Subject: [PATCH] greybus: remove excessive check in gb_connection_hd_cport_quiesce() Date: Thu, 26 Sep 2019 00:36:56 +0300 Message-Id: <20190925213656.8950-1-efremov@linux.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.21.0